Adding packages to the SDKs

The Yocto build system will automatically include in the target sysroot all the libraries and header files that are needed to build the applications running in the target. Extra packages can be added to the target sysroot by appending them to the TOOLCHAIN_TARGET_TASK variable. For example, you can selectively add only the static libraries you need to the toolchain by adding them as follows in your image recipe or conf/local.conf file:

TOOLCHAIN_TARGET_TASK_append = " libc-staticdev" 

To add a native package to the host sysroot in the SDK, two things are needed:

  1. The package needs to inherit the nativesdk class, and usually the native class too, by doing the following:
BBCLASSEXTEND = "native nativesdk" 
  1. The ...

Get Embedded Linux Development Using Yocto Project Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.