An example of using FILES_${PN}

一世执手 提交于 2019-11-29 08:44:56

A recipe can (and usually does) produce more than one package. The system isn't completely stupid so for example all the headers will automatically go into -dev package and all documentation goes into -doc, but often the recipe writer needs to make a decision on which package a specific file belongs to. This is done with the FILES_<packagename> += "/path/to/file" format.

The default values for FILES_* can be found in meta/conf/bitbake.conf but note that classes your recipe inherits may also modify the values: check the final values with bitbake -e <recipe>|grep ^FILES_

In your case it looks like your project build system created some directories but didn't put anything in them? if that is the case you could alternatively modify your build system to not do that or add a do_install_append() function that removes the empty directories after installing.

usually <package name> is already defined in Yocto with ${PN} variable so files assignment would be simple. also asterisk * works fine if you'd like to add whole subtree. and perhaps consider to use some predefined variables on where to deposit your stuff on the final image tree:

FILES_${PN} += "${nonarch_base_libdir}/<your package folder>/*"

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!