lca14: lca14-402: build your own toolchains
DESCRIPTION
Resource: LCA14 Name: LCA14-402: Build your Own Toolchains Date: 06-03-2014 Speaker: Rob SavoyeTRANSCRIPT
Rob Savoye, LCA14, Macau
LCA14-402: Build Your Own Toolchains
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 ?
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 ?
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 ?
• 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 ?
• 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
Jenkins Build Page
Jenkins Cbuildv2 job
Jenkins Console Output
Jenkins TCWG Dashboard
Jenkins build Failure
Jenkins Build Success
Jenkins GCC 4.8 Page
Dependencies for the build:Gmp, Mpc, Mpfr, DejaGnu
1. Dependencies2. Binutils3. GCC stage 1 (C only)4. Glibc (or Eglibc, or newlib)5. GCC stage 2 (all languages)6. GDB7. GDBserver
Stages In Building
PATH/cbuild2/configure --with-local-snapshots=
Configuring Cbuildv2
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
• --tarbinBuilds a binary release
• --tarsrcBuilds a source tarball
• --release 2014.02Tags the release directories and tarballs
Release Building With Cbuildv2
• 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
• ./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
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
• 6 x86_64 Proliant build machinestcwgbuild01-06
• 6 Samsung Chromebookstcwgchromebook01-06
• 6 TI Beagle Board Blackstcwgblack01-06
• QEMU ARM and AARCH64Linux user mode only
TCWG Build Farm
More about Linaro Connect: http://connect.linaro.orgMore about Linaro: http://www.linaro.org/about/
More about Linaro engineering: http://www.linaro.org/engineering/Linaro members: www.linaro.org/members