Skip to content

Basic Poky SDK Idea

Peter Saunderson edited this page Jul 28, 2016 · 7 revisions

Home / parallella-yoctobuild / meta-exotic / Design Guide / Introduction / Basic Poky SDK Idea

Basic Target Idea Introducing EXOTIC defines

####gcc build for the Yocto SDK

Yocto will also produce an SDK that can be used on any compatible build machine to build executable files or libraries for the target processor that may be copied to the target and run. The same executable could also be built on the target machine if the appropriate build environment has been installed on the target system.

Take gcc-cross-canadian as an example. First gcc-crosssdk-initial is used to create a simple first stage compiler (host=x86_64-linux, target=x86_64-pokysdk-linux). In yocto this is installed into two staging directories:

  1. sysroots/x86_64-linux ("${STAGING_DIR} / ${HOST_ARCH}${HOST_VENDOR}-${HOST_OS}")
  2. sysroots/x86_64-nativesdk-pokysdk-linux-tcbootstrap/opt/poky/2.0.1/sysroots/x86_64-pokysdk-linux/lib ("${STAGING_DIR}/${SDK_ARCH}-${SDKPKGSUFFIX}${SDK_VENDOR}-${SDK_OS}-tcbootstrap / ${target_base_libdir}/")

This compiler is then used by glibc (host=x86_64-pokysdk-linux, target=x86_64-pokysdk-linux) to produce libraries to enable the next stage build. In yocto these are installed in:

Now the gcc-crosssdk compiler is built (host=x86_64-linux, target=x86_64-pokysdk-linux) that is capable of building the final compiler. In yocto this is installed in:

  • sysroots/x86_64-linux ("${STAGING_DIR}/${HOST_ARCH}${HOST_VENDOR}-${HOST_OS}")

Now gcc-cross-canadian compiler is built for the target (host=x86_64-pokysdk-linux, target=arm-poky-linux-gnueabi). In yocto this is installed in:

  • sysroots/x86_64-nativesdk-pokysdk-linux ("${STAGING_DIR}/${HOST_ARCH}-${SDKPKGSUFFIX}${HOST_VENDOR}-${HOST_OS}")

####exotic gcc build for the Yocto SDK

For an exotic processor / microcontroller we modify this basic flow by adding a new target (EXOTIC_TARGET_?) so the final epiphany-elf-gcc-cross-canadian build uses this. To facilitate this in yocto we keep a copy of the original TARGET_? variables in a set of new variables TARGET_?_GVARIABLE and then assign EXOTIC_TARGET_? so that the epiphany-elf compiler can be built (host=x86_64-pokysdk-linux, target=epiphany-elf). Similar changes are made to the earlier compiler stages. The details of the new variables is found in the next section (see Introducing EXOTIC defines).

Basic Target Idea Introducing EXOTIC defines