TOOLCHAIN_HOST_TASK Vs TOOLCHAIN_TARGET_TASK
Asked Answered
D

1

11

I am sorry for naive question. I could not understand the difference between these Yocto variables. The Manual says

TOOLCHAIN_HOST_TASK: Lists packages that make up the host part of the SDK (i.e. the part that runs on the SDKMACHINE). When you use bitbake -c populate_sdk to create the SDK, a set of default packages apply. This variable allows you to add more packages.

And

TOOLCHAIN_TARGET_TASK: Lists packages that make up the target part of the SDK (i.e. the part built for the target hardware).

I could not understand what is difference between Host part of SDK and target part of SDK ?

As for I understand, Host part is that we expanded on our host PC and use it for cross-development. What is target part of SDK ?

Diphase answered 7/2, 2020 at 12:14 Comment(0)
S
16

The recipes added to TOOLCHAIN_TARGET_TASK will be cross-compiled for the target architecture, and included in the target sysroot in the SDK.

The recipes added to TOOLCHAIN_HOST_TASK will be built to run on the developer machine.

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. Then the cross-compiled library and its header files will be available in the SDK.

If you, on the other hand, have a tool that's needed during building (of the image itself by done by Yocto), 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.

Support answered 7/2, 2020 at 13:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.