从本地目录中获取

时间:2018-01-30 17:23:47

标签: yocto bitbake

在Yocto邮件列表上发布了一个问题,但没有得到答案。希望有人可以在这里提供一个。

我们将一些源代码本地存储在一台机器上。发现 关于如何做到这一点,https://stackoverflow.com/a/27834916/1636521, 但由于某种原因,它对我不起作用。我很确定我是 错过了什么,但不知道到底是什么。

这是我的食谱

SUMMARY = ""
DESCRIPTION = ""
# Licensing Meta-data
LICENSE = "CLOSED"
LIC_FILES_CHKSUM = ""

# Modify these as desired
PV = "1.0+git${SRCPV}"
SRCREV = "${AUTOREV}"

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += "            \
            file://app.tgz \
          "
DEPENDS += "\
    libevent \
    "

do_compile () {
  export SWROOT=${S}/../app
  oe_runmake
}

do_install () {
:
}

这是我得到的错误:

Loading cache: 100%
|###########################################################################################################|
Time: 0:00:01
Loaded 3265 entries from dependency cache.
WARNING: /home/user/projects/petalinux-build-system/sources/core/../meta-piccard/recipes-piccard/cpe/cpe.bb:
Unable to get checksum for cpe SRC_URI entry app.tgz: file could not
be found
Parsing recipes: 100%
|#########################################################################################################|
Time: 0:00:04
Parsing of 2476 .bb files complete (2470 cached, 6 parsed). 3269
targets, 229 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.32.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "universal"
TARGET_SYS        = "arm-xilinx-linux-gnueabi"
MACHINE           = "zynq-generic"
DISTRO            = "petalinux"
DISTRO_VERSION    = "2017.3"
TUNE_FEATURES     = "arm armv7a vfp thumb neon
callconvention-hard       cortexa9"
TARGET_FPU        = "hard"
meta
meta-poky         = "HEAD:8506cec55de8950e89a4d3e786860f1086782587"
meta-perl
meta-systemd
meta-gpe
meta-python
meta-efl
meta-ruby
meta-filesystems
meta-gnome
meta-multimedia
meta-networking
meta-webserver
meta-xfce
meta-initramfs
meta-oe           = "HEAD:a9887ac249b81fcac3007244d0c807c71b73acef"
meta-linaro-toolchain = "HEAD:39860f6c7af0858981cc004bbe4f4c421f6be607"
meta-qt5          = "HEAD:eec778bfb9a0b5494d593a2d7bb02c027b641835"
meta-xilinx       = "HEAD:04a45809e0bc42b35c88f8a08305d82fd25e97cf"
meta-xilinx-tools = "HEAD:37eff634934efac72d3e2eabb7c4f8d0c8a36fbb"
meta-petalinux    = "HEAD:d74ceaef26e606c2761edfc3446d0ad3c3cc8b8e"
meta-virtualization = "HEAD:cbfd4376d5e9d229f857151ffdfb57fbc6c0c40d"
meta-openamp      = "HEAD:cfeca8988418e4967f0d6df828d23a1540ae25a0"
meta-swupdate     = "HEAD:6c066d36b1c3c6d46f16c09efe5fb7681bbf3dc5"
meta-piccard     = "master:9f114a33df76a3c3f40eca12b7195ff8ebaad876"
workspace         = "HEAD:51fa75c5477e29285bbbe810f4327b26d80d511d"

以下是食谱目录的ls

$ ls ~/projects/petalinux-build-system/sources/meta-piccard/recipes-piccard/cpe/files

app  app.tgz

The output of

bitbake cpe -e | grep FILESEXTRAPATHS

produces the following line

FILESEXTRAPATHS="/home/userl/projects/petalinux-build-system/sources/core/../meta-piccard/recipes-piccard/cpe/files:__default:"

我错过了什么?

1 个答案:

答案 0 :(得分:1)

您需要添加许可证文件校验和,请执行以下命令

md5sum apps.tgz

例如:

  

siva @ siva-Vostro-3268:〜$ md5sum hello.tar.gz
   62390830e7933767d5e3bd080d619c70 hello.tar.gz

然后复制数字并使用变量见到你的食谱(.bb),见下文,

SRC_URI[md5sum] = "62390830e7933767d5e3bd080d619c70"

SRC_URI += "file://app.tgz;md5=xxxxxx"