如何找到哪个Yocto Project配方填充了图像根文件系统上的特定文件 [英] How to find which Yocto Project recipe populates a particular file on an image root filesystem

查看:259
本文介绍了如何找到哪个Yocto Project配方填充了图像根文件系统上的特定文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Yocto Project上做了很多工作,一个共同的挑战是确定在rootfs上包含文件的原因(或从什么配方).这是希望可以从构建系统的环境log&中得到的东西.元数据.理想情况下,一组命令将允许将文件链接回源(即配方).

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).

我通常的策略是对元数据(例如grep -R filename ../layers/*)执行搜索,并在互联网上搜索所述文件名,以查找可能负责任的食谱的线索.但是,这并不总是非常有效.在许多情况下,配方中没有明确说明文件名.此外,在许多情况下,多个配方提供了文件名,这导致了额外的工作来寻找最终提供该配方的文件.当然,还有许多其他线索可以找到答案.无论如何,当构建系统似乎应该具有足够的信息以使解决问题的方法变得简单时,此调查通常会非常费力.

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.

推荐答案

这是oe-pkgdata-util脚本及其子命令find-path的确切用例.该脚本是openembedded-core的一部分.

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

请参见以下示例(在OE构建环境中执行,即bitbake可以执行):

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

您可以清楚地看到此库属于glibc配方.

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

oe-pkgdata-util具有更有用的子命令来查看有关包装和配方的信息,值得检查--help.

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

这篇关于如何找到哪个Yocto Project配方填充了图像根文件系统上的特定文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆