在内核模块配方中发送额外的文件 [英] Ship extra files in kernel module recipe

查看:604
本文介绍了在内核模块配方中发送额外的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

构建树外内核模块时,是否可以传送更多文件?

Is there a way I can ship more files when building an out of tree kernel module?

我尝试过这样的事情:

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]

推荐答案

这是很常见的情况-您已经安装了其他二进制文件,但尚未将其添加到输出包中(已安装但未发货 ).

This is quite common situation - you have installed additional binary but it hasn't been added to output package (installed but not shipped).

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

Solution should be based on type of file that you need to add to output image.

检查此线程:错误的两步解决方案:质量检查问题:文件/目录已安装但未发货

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

Also if you need to quickly verify if the files were properly build etc., you can just add this line in your build/local.conf (as you have already installed them):

IMAGE_INSTALL + ="{binary_name}"

IMAGE_INSTALL += "{binary_name}"

除了OP的以下评论: 抱歉,我的误解是您似乎需要在食谱中继承 module.bbclass ,请查看文档:如何从内核树中构建内核模块

In addition to below comment from OP: Sorry for my misunderstanding, it looks that you need to inherit module.bbclass in your recipe, check out the doc: Yocto Mega Manual - module.bbclass and let me know if this suits you. You can also check this simple tutorial: Howto build a kernel module out of the kernel tree

这篇关于在内核模块配方中发送额外的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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