Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TOOLCHAIN_HOST_TASK Vs TOOLCHAIN_TARGET_TASK

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 ?

like image 440
TonyParker Avatar asked Mar 02 '23 20:03

TonyParker


1 Answers

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-compiles library and its header files will be available in the 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.

like image 169
Erik Botö Avatar answered Mar 12 '23 17:03

Erik Botö