在内核模块配方中发送额外文件

问题描述 投票:2回答:3

有没有办法在构建out of tree kernel模块时可以发送更多文件?

我试过这样的事情:

FILES_${PN} += "${bindir}/my_program"
do_install_append() {
    install -d ${D}${bindir}
    install -m 0755 ${D}/my_program ${D}${bindir}/my_program
}

像这样:

FILES_kernel-module-${PN} += "${bindir}/my_program"
do_install_append() {
    install -d ${D}${bindir}
    install -m 0755 ${D}/my_program ${D}${bindir}/my_program
}

但仍抱怨:

ERROR: QA Issue: my-module: Files/directories were installed but not shipped in any package:
  /usr
  /usr/bin
  /usr/bin/my_program
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
my-module: 3 installed and not shipped files. [installed-vs-shipped]
yocto bitbake openembedded
3个回答
3
投票

这是很常见的情况 - 您已经安装了额外的二进制文件,但它尚未添加到输出包(已安装但未发货)。

解决方案应基于您需要添加到输出图像的文件类型。

检查这个帖子:2 step solution to ERROR: QA Issue: Files/directories were installed but not shipped

此外,如果您需要快速验证文件是否正确构建等,您可以在build / local.conf中添加此行(因为您已经安装了它们):

IMAGE_INSTALL + =“{binary_name}”

编辑:

除了下面OP的评论:对不起我的误解,看起来你需要在你的食谱中继承module.bbclass,看看doc:Yocto Mega Manual - module.bbclass并告诉我这是否适合你。您还可以查看这个简单的教程:Howto build a kernel module out of the kernel tree


0
投票

FILES _ $ {PN}不能用于内核配方,因为内核至少默认情况下$ {PN}不会出现在PACKAGES中。 “kernel-module - $ {PN}”也无效。我猜你想要将文件添加到基于内核的包中,如下所示:

FILES_kernel-base += "${bindir}/my_program"


0
投票

我不相信module.bbclass从PACKAGES中删除了$ {PN},但确实清除了FILES _ $ {PN}。因此,如果要将任何文件添加到包中,则必须在继承模块后设置FILES _ $ {PN}。

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.