gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 22:41:40 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'
据我了解,我提供的要安装在 Image 上的配方的文件没有打包在某个包中,所以 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/46071039/

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