【问题标题】:New Yocto Recipe Builds but Work Directory is Deleted after Compilation新的 Yocto 食谱构建但工作目录在编译后被删除
【发布时间】:2018-10-16 16:23:19
【问题描述】:

我正在尝试将 zbar 的配方从 0.10.0 更新到 0.20.1。这是原始配方:

https://github.com/openembedded/meta-openembedded/blob/master/meta-oe/recipes-support/zbar/zbar_0.10.bb

我修改后的食谱在这个问题的底部。该包确实编译,但问题是在“打包”步骤期间发生了一些事情,并且“工作”目录被清除,除了“工作”目录内的“临时”目录。在编译期间,如果我列出工作目录中的文件,我期望的一切都存在,但编译成功后,有些东西会清理文件。我究竟做错了什么?

编译期间:

user@ubuntu:~/rpi/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/zbar/0.20.1-r0$ cd ../0.20.1-r0/ ; ls
build              image            pkgdata                sysroot-destdir
configure.sstate   license-destdir  pseudo                 temp
debugsources.list  package          recipe-sysroot
git                packages-split   recipe-sysroot-native

编译后:

user@ubuntu:~/rpi/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/zbar/0.20.1-r0$ cd ../0.20.1-r0/ ; ls
temp

Yocto 食谱:

DESRIPTION = "2D barcode scanner toolkit."
SECTION = "graphics"
LICENSE = "LGPL-2.1"

DEPENDS = "pkgconfig intltool-native libpng jpeg"

LIC_FILES_CHKSUM = "file://LICENSE;md5=243b725d71bb5df4a1e5920b344b86ad"

S = "${WORKDIR}/git"

SRCREV = "edcf08b49e0a5fe71c18fa9d4b8ed83ed8fc9082"
SRC_URI = "git://github.com/mchehab/zbar.git"

inherit autotools pkgconfig

EXTRA_OECONF = " --without-x --without-imagemagick --without-qt --without-python2 --disable-video --without-gtk"

FILES_${PN} += "${bindir}"
FILES_${PN} += "${libdir}"

do_install_append() {
    echo "done..."
}

【问题讨论】:

  • INHERIT = rm_work,从local.conf中删除这一行
  • 请注意,您可以删除 DEPENDS=pkgconfig(因为 pkgconfig 类依赖于 pkgconfig-native),${bindir} 已经在 FILES_${PN} 中,并将 ${libdir} 添加到 FILES_${ PN} 会破坏库打包。

标签: linux yocto zbar openembedded


【解决方案1】:

这是因为 rm_work 类。你可以删除,

INHERIT += "rm_work"

来自local.conf 或相应的图像配方文件。或者你可以只为你的食谱禁用 rm_work,

RM_WORK_EXCLUDE += "zbar"

conf/local.conf.

【讨论】:

    猜你喜欢
    • 2020-04-09
    • 1970-01-01
    • 2021-10-23
    • 2021-02-24
    • 2016-12-14
    • 2019-01-24
    • 2021-05-18
    • 2021-04-16
    • 1970-01-01
    相关资源
    最近更新 更多