lca14: lca14-402: build your own toolchains

22
Rob Savoye, LCA14, Macau LCA14-402: Build Your Own Toolchains

Upload: linaro

Post on 25-May-2015

326 views

Category:

Technology


0 download

DESCRIPTION

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

TRANSCRIPT

Page 1: LCA14: LCA14-402: Build your Own Toolchains

Rob Savoye, LCA14, Macau

LCA14-402: Build Your Own Toolchains

Page 2: LCA14: 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 ?

Page 3: LCA14: LCA14-402: Build your Own Toolchains

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 ?

Page 4: LCA14: LCA14-402: Build your Own Toolchains

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 ?

Page 5: LCA14: LCA14-402: Build your Own Toolchains

• 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 ?

Page 6: LCA14: LCA14-402: Build your Own Toolchains

• 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

Page 7: LCA14: LCA14-402: Build your Own Toolchains

Jenkins Build Page

Page 8: LCA14: LCA14-402: Build your Own Toolchains

Jenkins Cbuildv2 job

Page 9: LCA14: LCA14-402: Build your Own Toolchains

Jenkins Console Output

Page 10: LCA14: LCA14-402: Build your Own Toolchains

Jenkins TCWG Dashboard

Page 11: LCA14: LCA14-402: Build your Own Toolchains

Jenkins build Failure

Page 12: LCA14: LCA14-402: Build your Own Toolchains

Jenkins Build Success

Page 13: LCA14: LCA14-402: Build your Own Toolchains

Jenkins GCC 4.8 Page

Page 14: LCA14: LCA14-402: Build your Own Toolchains

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

Page 15: LCA14: LCA14-402: Build your Own Toolchains

PATH/cbuild2/configure --with-local-snapshots=

Configuring Cbuildv2

Page 16: LCA14: LCA14-402: Build your Own Toolchains

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

Page 17: LCA14: LCA14-402: Build your Own Toolchains

• --tarbinBuilds a binary release

• --tarsrcBuilds a source tarball

• --release 2014.02Tags the release directories and tarballs

Release Building With Cbuildv2

Page 18: LCA14: LCA14-402: Build your Own Toolchains

• 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

Page 19: LCA14: LCA14-402: Build your Own Toolchains

• ./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

Page 20: LCA14: LCA14-402: Build your Own Toolchains

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

Page 21: LCA14: LCA14-402: Build your Own Toolchains

• 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

Page 22: LCA14: LCA14-402: Build your Own Toolchains

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