Cross-Development Toolchain Generation in Yocto Project (OE)

chbae 2023. 4. 19. 00:49

다음은 Yocto Project Reference Manual 4장의 일부 글이다. 기본적으로 Yocto Project (OE)에서는 cross toolchain을 직접 빌드하여 만든다. 다음은 Yocto Project (OE)를 이용하여 host에서 cross toolchain을 생성하는 단계이다.



gcc -> binutils-cross -> gcc-cross-initial -> linux-libc-headers -> glibc-initial -> glibc -> gcc-cross -> gcc-runtime

  • gcc: The build host's GNU Compiler Collection (GCC).
  • binutils-cross: The bare minimum binary utilities needed in order to run the gcc-cross-initial phase of the bootstrap operation.
  • gcc-cross-initial: An early stage of the bootstrap process for creating the cross-compiler. This stage builds enough of the gcc-cross, the C library, and other pieces needed to finish building the final cross-compiler in later stages. This tool is a "native" package (i.e. it is designed to run on the build host).
  • linux-libc-headers: Headers needed for the cross-compiler.
  • glibc-initial: An initial version of the Embedded GLIBC needed to bootstrap glibc.
  • gcc-cross: The final stage of the bootstrap process for the cross-compiler. This stage results in the actual cross-compiler that BitBake uses when it builds an image for a targeted device -> If you are replacing this cross compiler toolchain with a custom version, you must replace gcc-cross.
  • gcc-runtime: Runtime libraries resulting from the toolchain bootstrapping process. This tool produces a binary that consists of the runtime libraries need for the targeted device.

relocatable toolchain (SDK) 생성 과정은 아래 reference를 참고하면 된다.