Embedded_linux [SOLVED]: How to find which Yocto Project recipe populates a particular file on an image root filesystem

Embedded_linux [SOLVED]: How to find which Yocto Project recipe populates a particular file on an image root filesystem

Home Forums Embedded Linux Embedded_linux [SOLVED]: How to find which Yocto Project recipe populates a particular file on an image root filesystem

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4349

    Anonymous

    QuestionQuestion

    I work with the Yocto Project quite a bit and a common challenge is determining why (or from what recipe) a file has been included on the rootfs. This is something that can hopefully be derived from the build system’s environment, log & meta data. Ideally, a set of commands would allow linking a file back to a source (ie. recipe).

    My usual strategy is to perform searches on the meta data (e.g. grep -R filename ../layers/*) and searches on the internet of said filenames to find clues of possible responsible recipes. However, this is not always very effective. In many cases, filenames are not explicitly stated within a recipe. Additionally, there are many cases where a filename is provided by multiple recipes which leads to additional work to find which recipe ultimately supplied it. There are of course many other clues available to find the answer. Regardless, this investigation is often quite laborious when it seems the build system should have enough information to make resolving the answer simple.

    #4350

    Anonymous

    Accepted AnswerAnswer

    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:

    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.

    Source: http://stackoverflow.com/questions/42258323/how-to-find-which-yocto-project-recipe-populates-a-particular-file-on-an-image-r
    Author: Tomas Novotny
    Creative Commons License
    This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.