How to Find Which Yocto Project Recipe Populates a Particular File on an Image Root Filesystem

How to find which Yocto Project recipe populates a particular file on an image root filesystem

This is exact use case for oe-pkgdata-util script and its subcommand find-path. That script is part of openembedded-core.

See this example (executed in OE build environment, i.e. bitbake works):

tom@pc:~/oe/build> oe-pkgdata-util find-path /lib/ld-2.24.so
glibc: /lib/ld-2.24.so

You can clearly see that this library belongs to glibc recipe.

oe-pkgdata-util has more useful subcommands to see information about packages and recipes, it worth to check the --help.

How to know who is included a particular recipe in yocto

you can generate dependency graph using

bitbake -g <image>

it will generate dependency graph in dotty file format. You can view it in dotty or in a editor

Flattened recipe dependencies are saved to 'recipe-depends.dot' if needed to go into task level dependencies then looking into 'task-depends.dot' might be helpful.

howto find which recipe provides a RPM (or DEB or IPK) package?

If those packages are already built, you can use the oe-pkgdata-util tool to find which recipe that provides a certain package. It's agnostic to which package format you're using, so it works for rpm/deb/ipk.

In the example below I want to find out which recipe that provides the package called libmount1, and the command shows that the recipe name is util-linux

$ oe-pkgdata-util lookup-recipe libmount1
util-linux

And to find the recipe-space package name:

$ oe-pkgdata-util lookup-pkg -r libmount1
util-linux-libmount

Generate a file and deploy it to image, inside a yocto recipe

You don't specify where this file gets created, what path filename contains, but from the error I suspect you create it directly under ${D} somewhere.

If you instead create the manifest file under e.g. ${B}, and then during the regular do_install you install it using e.g. install -Dm0644 ${B}/my_manifest ${D}/dest/path/my_manifest the ownership issue will be taken care of as with any other file that a recipe installs.

Just make sure that the do_create_manifest task is run before do_install.

which recipe will be used first?

bitbake -e dmidecode | grep -e "^PV=" will tell you.

The layer priority (BBFILE_PRIORITY) takes precedence, then PV which is dynamically set if you're getting the sources from git IIRC. There's also DEFAULT_PREFERENCE that can be set and modifies the logic behind version precedence.



Related Topics



Leave a reply



Submit