Bitbake没有在rootfs映像中安装我的文件 [英] Bitbake not installing my file in the rootfs image

查看:382
本文介绍了Bitbake没有在rootfs映像中安装我的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我已经创建了一个烘烤食谱,可以将我的两个文件(VPU的固件二进制文件)复制到目标根文件系统上的/lib/firmware/目录中.


I have created a bitbake recipe that would copy 2 of my files (firmware binaries for VPU) into /lib/firmware/ directory on targets root filesystem.

我尝试了很多选择,所以现在不确定我食谱中的哪些内容是不必要/多余的,以及哪些内容是必需的. 我认为FILESEXTRAPATHS ..,SRC_URI ..和do_install ..应该足够了,但它不能同时使用,也不能用于所有其他东西.

I have tried many options so I'm now not sure what in my recipe is unnecessary/redundant and what is needed. I think that FILESEXTRAPATHS.., SRC_URI.. and do_install.. should be enough but it doesn't work with just it and neither with all other stuff.

DESCRIPTION = "VPU libraries provided by fsl"

LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"

PACKAGE_ARCH = "all"
ALLOW_EMPTY_${PN} = "1"

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += " \
    file://vpu_fw_imx6d.bin \
    file://vpu_fw_imx6q.bin \
"

INSANE_SKIP_${PN} += "installed-vs-shipped"

do_install () {
    install -d ${D}${base_libdir}/firmware/
    cp ${WORKDIR}/vpu_fw_imx6d.bin ${D}${base_libdir}/firmware/
    cp ${WORKDIR}/vpu_fw_imx6q.bin ${D}${base_libdir}/firmware/
    chmod 755 ${D}${base_libdir}/firmware/vpu_fw_imx6d.bin
    chmod 755 ${D}${base_libdir}/firmware/vpu_fw_imx6q.bin
}
PACKAGES = "${PN}"
FILES_${PN} += " \
        ${D}${base_libdir}/firmware/vpu_fw_imx6d.bin \
        ${D}${base_libdir}/firmware/vpu_fw_imx6q.bin \
"

你能指出我做错了什么吗?

Could you please point me what I do wrong?


安德斯(Anders)的回答确实有帮助并解决了该问题.


Anders answer really helped and resolved the issue.

我正在发布固定"食谱,以防有人觉得有用.

I'm posting "fixed" recipe in case someone finds it helpful.

DESCRIPTION = "VPU libraries provided by fsl"

LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"

PACKAGE_ARCH = "all"

SRC_URI += " \
    file://vpu_fw_imx6d.bin \
    file://vpu_fw_imx6q.bin \
"

do_install () {
    install -d ${D}${base_libdir}/firmware/
    install -m 755 ${WORKDIR}/vpu_fw_imx6d.bin ${D}${base_libdir}/firmware/
    install -m 755 ${WORKDIR}/vpu_fw_imx6q.bin ${D}${base_libdir}/firmware/
}

FILES_${PN} += " \
        ${base_libdir}/firmware/vpu_fw_imx6d.bin \
        ${base_libdir}/firmware/vpu_fw_imx6q.bin \
"

推荐答案

为了安全起见,删除所有不必要的行.

Remove all lines that aren't necessy, just to be on the safe side.

FILESEXTRAPATHS不是必需的;仅在编写.bbappend文件来修改另一层中的配方时使用.

FILESEXTRAPATHS is not necessary; it's only used when you're writing a .bbappend file to modify a recipe in another layer.

ALLOW_EMPT_${PN}.它用于允许PN为空,仅在创建其他程序包时才有用.在您的情况下,您将固件文件打包为PN,因此,如果无法安装这些文件,则在构建软件包时最好先消除bitbake错误.

ALLOW_EMPT_${PN} is also not needed. It's used to allow PN to be empty, which is only useful if you're creating other packages. In your case, you wnat the firmware files in PN, thus it's better to have bitbake error out while building your package if the files can't be installed.

INSANE_SKIP_${PN} += "installed-vs-shipped".仅当您将do_install中安装的文件没有放入软件包时才需要.通常,建议您不要安装它们或删除文件.

INSANE_SKIP_${PN} += "installed-vs-shipped" is also not needed. It's only required if you install files in your do_install that you're not putting in a package. Normally, you're advised to not install them or delete the files instead.

您的do_install()应该工作正常;尽管我建议使用install而不是cpchmod.这样,您还可以确保所有者和组正确. (对此的检查已作为新的质量检查检查添加到了Jethro中.)

Your do_install() should work fine; though I'd recommend to use install instead of cp and chmod. That way you're also ensured that the owner and group will be correct. (Checks for this are added as a new QA check in Jethro).

PACKAGES = "${PN}".

从您的FILES_${PN}定义中删除${D}. FILES中的路径应该是目标上的路径(即不包括D-目录).

Remove ${D} from you FILES_${PN} definition. The paths in FILES should be the path on the target (i.e. not including the D-directory).

这应该使您无法运行.

这篇关于Bitbake没有在rootfs映像中安装我的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆