简体   繁体   English

TOOLCHAIN_HOST_TASK 与 TOOLCHAIN_TARGET_TASK

[英]TOOLCHAIN_HOST_TASK Vs TOOLCHAIN_TARGET_TASK

I am sorry for naive question.我很抱歉提出了幼稚的问题。 I could not understand the difference between these Yocto variables.我无法理解这些 Yocto 变量之间的区别。 The Manual says手册说

TOOLCHAIN_HOST_TASK: Lists packages that make up the host part of the SDK (ie the part that runs on the SDKMACHINE). TOOLCHAIN_HOST_TASK:列出构成 SDK 主机部分(即在 SDKMACHINE 上运行的部分)的包。 When you use bitbake -c populate_sdk to create the SDK, a set of default packages apply.当您使用 bitbake -c populate_sdk 创建 SDK 时,会应用一组默认包。 This variable allows you to add more packages.此变量允许您添加更多包。

And

TOOLCHAIN_TARGET_TASK: Lists packages that make up the target part of the SDK (ie the part built for the target hardware). TOOLCHAIN_TARGET_TASK:列出构成 SDK 目标部分(即为目标硬件构建的部分)的包。

I could not understand what is difference between Host part of SDK and target part of SDK ?我不明白 SDK 的主机部分和 SDK 的目标部分有什么区别?

As for I understand, Host part is that we expanded on our host PC and use it for cross-development.据我了解,Host 部分是我们在我们的主机 PC 上进行扩展并使用它进行交叉开发。 What is target part of SDK ? SDK 的目标部分是什么?

The recipes added to TOOLCHAIN_TARGET_TASK will be cross-compiled for the target architecture, and included in the target sysroot in the SDK.添加到TOOLCHAIN_TARGET_TASK的配方将针对目标架构进行交叉编译,并包含在 SDK 的目标 sysroot 中。

The recipes added to TOOLCHAIN_HOST_TASK will be built to run on the developer machine.添加到TOOLCHAIN_HOST_TASK的配方将构建为在开发人员机器上运行。

So if you want a certain library available in the SDK, so that you can develop applications linking to it, add it to TOOLCHAIN_TARGET_TASK .因此,如果您希望 SDK 中提供某个库,以便您可以开发链接到它的应用程序,请将其添加到TOOLCHAIN_TARGET_TASK Then the cross-compiles library and its header files will be available in the SDK.然后交叉编译库及其头文件将在 SDK 中可用。

If you on the other hand have a tool that's need during building, like a code-generator or cmake, you add it to TOOLCHAIN_HOST_TASK so that it's available on the developer machine during the build of the target software.另一方面,如果您有一个在构建过程中需要的工具,如代码生成器或 cmake,您可以将它添加到TOOLCHAIN_HOST_TASK以便在构建目标软件的过程中在开发者机器上可用。

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

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