简体   繁体   English

如何获得Yocto中所有可用目标的列表?

[英]How to get a list of all available targets in Yocto?

I'm trying to configure a custom Yocto build for a embedded system. 我正在尝试为嵌入式系统配置自定义Yocto构建。

I need to add packages to both the target fs and the tool chain. 我需要向目标fs和工具链添加包。

Currently I'm only trying to add packages that already has a recipe. 目前我只是想添加已有配方的包。

For example by adding IMAGE_INSTALL += " boost-dev" and TOOLCHAIN_TARGET_TASK += "boost-dev" I can add boost to both targetfs and tool chain. 例如,通过添加IMAGE_INSTALL += " boost-dev"TOOLCHAIN_TARGET_TASK += "boost-dev"我可以为targetfs和工具链添加提升。

What I want to do 我想做的事

The rootfs built by the Yocto is very complete and has a lot of libraries, but the tool chain only has the most basic ones. Yocto构建的rootfs非常完整,并且有很多库,但工具链只有最基本的库。

I want to add the missing libraries to the tool chain. 我想将缺少的库添加到工具链中。

Question: 题:

How do I find the names of available libraries? 如何找到可用库的名称?

Like boost-dev , I did a lot of googling to find out by adding the name boost-dev to TOOLCHAIN_TARGET_TASK I can get what I want. boost-dev一样,我做了很多谷歌搜索,通过添加名称boost-devTOOLCHAIN_TARGET_TASK我可以得到我想要的东西。

But things like OpenGL and OpenCL, even though I know they are provided by /meta-fsl-arm/recipes-graphics/imx-gpu-viv in my case, how shall I find out what package name shall I add to TOOLCHAIN_TARGET_TASK ? 但是像OpenGL和OpenCL这样的东西,即使我知道它们是由/meta-fsl-arm/recipes-graphics/imx-gpu-viv在我的情况下,我该如何找到我要添加到TOOLCHAIN_TARGET_TASK包名?

I did more googling and found the way to get package names used by a bitbake target by looking at dependencies. 我做了更多的谷歌搜索,并通过查看依赖关系找到了获取bitbake目标使用的包名称的方法。

By doing bitbake -g <packagename> -u depexp , the dependency among packages are shown, so are the name of all packages involved in the Yocto build. 通过执行bitbake -g <packagename> -u depexp ,显示了包之间的依赖关系,Yocto构建中涉及的所有包的名称也是如此。

For example, devil package depends on devil-dev , hence doing TOOLCHAIN_TARGET_TASK += "devil-dev" in meta-toolchain%.bbappend adds devil to the tool chain. 例如, devil包依赖于devil-dev ,因此在meta-toolchain%.bbappend TOOLCHAIN_TARGET_TASK += "devil-dev"添加到工具链中。

The package names found this way may not be complete, specifically some child-packages included in a parent-package may not be shown here. 以这种方式找到的包名称可能不完整,具体而言,父包中包含的一些子包可能不会在此处显示。

When this happens, first locate the parent-package that is likely to contain the child-package, then find the .bb file and .inc file for it. 发生这种情况时,首先找到可能包含子包的父包,然后找到它的.bb文件和.inc文件。

In those files there's likely a PACKAGES variable that tells what child-package are provided by this package. 在这些文件中,可能有一个PACKAGES变量,用于说明此包提供的子包。 Those child-package can then be added to TOOLCHAIN_TARGET_TASK . 然后可以将这些子包添加到TOOLCHAIN_TARGET_TASK

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM