Using an image-based SDK

For custom source code, we know the dependency libraries and the other applications we depend on. In such cases, we can create an image that reflects our needs exactly or uses the closest image provided by Poky.

In order to create the image-based SDK, execute the following command:

$ bitbake core-image-full-cmdline -c populate_sdk

With this command, the SDK is created based on the core-image-full-cmdline image. If we have a custom image, we can use it instead. The SDK is generated to match the architecture of the machine we set using the MACHINE variable.

After the SDK is built, a binary script can be found at build/tmp/deploy/sdk/poky-glibc-x86_64-core-image-full-cmdline-armv5e-toolchain-2.4.sh.

Do not open the preceding script on a simple text editor. The script has a piece of binary code that may cause a text editor to crash

The resulting script should be installed before being used. We can see the installation process in the following screenshot:

In the preceding example, the installation directory was /opt/poky/2.4; however, we may choose any directory. The installation provides the following:

  • environment-setup-armv5te-poky-linux-gnueabi: This is the script used to set up all environment variables needed to use the toolchain.
  • site-config-armv5te-poky-linux-gnueabi: This is the file with the variables used during toolchain creation.
  • version-armv5te-poky-linux-gnueabi: This is the version and timestamp information.
  • sysroots: This is a copy of the rootfs directory of images used for SDK generation. It includes binary, header, and library files distributed across sub-directories such as:
    • armv5te-poky-linux-gnueabi: This contains files for ARM machines
    • x86_64-pokysdk-linux: These are files for machines with x86-64 compatibility
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.15.248