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

半世苍凉 提交于 2019-12-03 02:04:59

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.

If you prefer a graphical presentation, the Toaster web UI will also show you this, plus dependency information.

The candidate files deployed for each recipe are placed in each $WORKDIR/image

So you can cd to

$ cd ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}

and perform a

$ find . -path '*/image/*/fileYouAreLookingFor'

from the result you should be able to infer the ${PN} of the recipe which deploys such file.

For example:

$ find . -path '*/image/*/mc'
./bash-completion/2.4-r0/image/usr/share/bash-completion/completions/mc
./mc/4.8.18-r0/image/usr/share/mc
./mc/4.8.18-r0/image/usr/bin/mc
./mc/4.8.18-r0/image/usr/libexec/mc
./mc/4.8.18-r0/image/etc/mc
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!