LCA14: LCA14-402: Build your Own Toolchains

814 views
599 views

Published on

Resource: LCA14
Name: LCA14-402: Build your Own Toolchains
Date: 06-03-2014
Speaker: Rob Savoye

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
814
On SlideShare
0
From Embeds
0
Number of Embeds
24
Actions
Shares
0
Downloads
14
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

LCA14: LCA14-402: Build your Own Toolchains

  1. 1. Rob Savoye, LCA14, Macau LCA14-402: Build Your Own Toolchains
  2. 2. A toolchain is all the components used to compile source code. It includes the compiler, the assembler, the linker, a C library, and performance analysis tools. What Is a Toolchain ?
  3. 3. Jenkins is a build automation system used by other Companies and projects at Linaro. It supports: • Supports multiple projects • Projects can be chained together • Can use the LAVA build farm • Can use the Toolchain Working Group (TCWG) build farm What Is Jenkins ?
  4. 4. Cbuildv2 is a tool for building complete toolchains, both native and cross. It is integrated into Linaro's development and release processes. It is designed to be used by both developers, and automated build and test systems like Jenkins. It can be downloaded from: git://git.linaro.org/toolchain/cbuild2.git What Is Cbuildv2 ?
  5. 5. • Needed something integrated with Linaro processes • Needed to work with Jenkins • Better support for remote development and testing • Long term, will support better analysis tools Why Another Build Tool ?
  6. 6. • Integrated with Jenkins • Fully utilizes the TCWG build farm • Supports GIT branches and revisions • No patches to any sources required • Builds toolchains the way they were designed to be configured, built and tested Cbuildv2 Features
  7. 7. Jenkins Build Page
  8. 8. Jenkins Cbuildv2 job
  9. 9. Jenkins Console Output
  10. 10. Jenkins TCWG Dashboard
  11. 11. Jenkins build Failure
  12. 12. Jenkins Build Success
  13. 13. Jenkins GCC 4.8 Page
  14. 14. Dependencies for the build: Gmp, Mpc, Mpfr, DejaGnu 1. Dependencies 2. Binutils 3. GCC stage 1 (C only) 4. Glibc (or Eglibc, or newlib) 5. GCC stage 2 (all languages) 6. GDB 7. GDBserver Stages In Building
  15. 15. PATH/cbuild2/configure --with-local-snapshots= Configuring Cbuildv2
  16. 16. PATH/cbuild2.sh --target arm-linux-gnueabihf --build all Commonly used Options • --check Runs ‘make check’ on all the toolchain components • --tarsrc Produces a source tarball for GCC, Binutils, and GDB • --tarbin Produces a binary tarball, the toolchain, and a sysroot • --dryrun Run through the steps to do a build Invoking Cbuildv2
  17. 17. • --tarbin Builds a binary release • --tarsrc Builds a source tarball • --release 2014.02 Tags the release directories and tarballs Release Building With Cbuildv2
  18. 18. • gcc=gcc.git~neon-intrinsics • gcc=gcc.git~neon-intrinsics@123abcd • gcc=git://git.linaro.org/toolchain/gcc.git • gcc=file:///home/rob/projects/gnu/gcc.git Specifying Git Branches For Cbuildv2
  19. 19. • ./builds/${host}/${target}/${component} The build directory for each component • ./builds/${host}/${destdir}/ Where the toolchain gets installed • ./sysroot=sysroots/${target} The sysroot for the target • ./snapshots/ Where all the source tarballs and git repositories live • /opt/linaro/ Where the binary tarballs should be installed Directories Used By Cbuildv2
  20. 20. Cbuildv2 installs all the toolchain components in builds/destdir/${host}. It expects to find the sysroot in /opt/linaro. At build time,a symbolic link is created in /opt/linaro that points to the freshly built sysroot where GCC expects to find it. This link is the same as where everything gets installed from the binary tarballs. Using The Toolchain
  21. 21. • 6 x86_64 Proliant build machines tcwgbuild01-06 • 6 Samsung Chromebooks tcwgchromebook01-06 • 6 TI Beagle Board Blacks tcwgblack01-06 • QEMU ARM and AARCH64 Linux user mode only TCWG Build Farm
  22. 22. More about Linaro Connect: http://connect.linaro.org More about Linaro: http://www.linaro.org/about/ More about Linaro engineering: http://www.linaro.org/engineering/ Linaro members: www.linaro.org/members

×