gpt4 book ai didi

yocto - 使用 FILES_${PN} 的示例

转载 作者:太空宇宙 更新时间:2023-11-04 11:48:19 26 4
gpt4 key购买 nike

即使在我阅读了手册之后,我仍然无法理解 FILES_${PN}。例如,我正在研究 this example制作启动脚本。在我写了类似的东西之后,我得到了这些错误信息。

ERROR: initscriptd-1.0-r0 do_package: QA Issue: initscriptd: Files/directories were installed but not shipped in any package:
/usr
/usr/sbin
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
initscriptd: 2 installed and not shipped files. [installed-vs-shipped]
ERROR: initscriptd-1.0-r0 do_package: Fatal QA errors found, failing task.
ERROR: initscriptd-1.0-r0 do_package: Function failed: do_package
ERROR: Logfile of failure stored in: /home/yahia/Desktop/elinux_dev/bake_factory/poky-pyro-17.0.1/build/tmp/work/core2-64-poky-linux/initscriptd/1.0-r0/temp/log.do_package.5252
ERROR: Task (/home/yahia/Desktop/elinux_dev/bake_factory/poky-pyro-17.0.1/meta-mylayer/recipes-core/mylayer-initscript/initscriptd.bb:do_package) failed with exit code '1'

据我所知,我提供的要安装在图像上的配方文件没有打包在某个包中,所以 Yocto 不知道在哪里解压它们,我说得对吗?

所以,我添加了 FILES_${PN} += "with all directory paths " 我安装了配方文件,然后它工作正常。

那么,您能向我解释一下为什么我需要这样做吗?什么时候?如果提供连贯的示例将会很有帮助。

最佳答案

一个配方可以(而且通常确实)生产多个包装。该系统并不完全愚蠢,因此例如所有标题都会自动进入 -dev包和所有文档进入 -doc , 但菜谱编写者通常需要决定特定文件属于哪个包。这是通过 FILES_<packagename> += "/path/to/file" 完成的格式。

FILES_* 的默认值可以在 meta/conf/bitbake.conf 中找到但请注意,您的食谱继承的类也可能会修改这些值:使用 bitbake -e <recipe>|grep ^FILES_ 检查最终值

在您的情况下,您的项目构建系统似乎创建了一些目录但没有在其中放置任何内容?如果是这种情况,您可以选择修改构建系统以不这样做或添加 do_install_append()安装后删除空目录的函数。

关于yocto - 使用 FILES_${PN} 的示例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56896129/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com