Seabright Technology Header Image

Cross testing under QEMU

We use QEMU to test programs built by the toolchain binary release for correctness. I’ve written up the instructions for spinning up your own at:

https://wiki.linaro.org/MichaelHope/Sandbox/QEMUCrossTest.

It’s focused on simplicity – getting a running, SSH only Cortex-A9 up and going as soon as possible. It’s not the latest, not graphical, and doesn’t replace the deeper documentation at:

https://wiki.linaro.org/Resources/HowTo/Qemu

Using the cloud for large Launchpad uploads

We host Linaro GCC up on Launchpad. It’s a bit tricky uploading a ~70 MB tarball over a non-resuming web form from New Zealand so I use VNC, Chromium, and an EC2 instance with a nice fat pipe instead. Here’s how.

On EC2:

  • SSH in with a bonus tunnel for the VNC server using ssh -L 5902:localhost:5902 ec2-host-name
  • Ensure vnc4server and chromium-browser are installed
  • Run vncserver :2. This spawns the VNC server in the background
  • Launch Chromium using DISPLAY=:2 chromium-browser

From your laptop:

  • Ensure remmina is installed
  • Start remmina
  • Create a new VNC connection to the server :2

You should see a new window on your laptop with a full screen Chromium. There’s no window manager but we don’t need one in this case.

Remmina seems to have SSH tunnel support built in but I’m happy with my method.

To close down on EC2:

  • Close Chromium
  • Run vncserver -kill :2

Using the Linaro LEB on a BeagleBone

A bonus about going to Linaro Connect is I can satisfy my gadget urges without paying for the extra postage to get things to NZ.

This trip included a BeagleBone from Farnell’s. I’ve written some terse notes on using the Linaro LEB on it and setting up the USB network gadget for easy networking.

Pre-built ARM compiler

Zhenqiang and I have been working on pre-built version of Linaro GCC to make cross compiling your apps for ARM easier.  The first version is out and up at https://launchpad.net/linaro-toolchain-binaries.  Here’s the announcement:


The Linaro Toolchain Working Group is pleased to announce the release of the Linaro Toolchain Binaries, a pre-built version of Linaro GCC and Linaro GDB that runs on generic Linux or Windows and targets the glibc Linaro Evaluation Build.

This is the first release. Releases will be made each month shortly after the corresponding source release.

Uses include:

  • Cross compiling ARM applications from your laptop
  • Remote debugging
  • Build the Linux kernel for your board

What’s included:

  • Linaro GCC 2012.01
  • Linaro GDB 2011.12
  • A statically linked gdbserver
  • A system root
  • Manuals under share/doc/

The system root contains the basic header files and libraries to link
your programs against.

The Linux version is supported on Ubuntu 10.04.3 and 11.10, Debian 6.0.2, Fedora 16, openSUSE 12.1, Red Hat Enterprise Linux Workstation 5.7 and later, and should run on any Linux Standard Base 3.0 compatible distribution. Please see the README about running on x86_64 hosts.

The Windows version is supported on Windows XP Pro SP3, Windows Vista Business SP2, and Windows 7 Pro SP1.

Benchmarking Techniques

I recently gave a a presentation on benchmarking techniques that covered our method, measuring, the statistics, and some future directions like STM. A copy is available under people.linaro.org/~michaelh/presentations

The notes version is a bit more readable.

Grab the original from Launchpad:
 bzr branch lp:~michaelh1/+junk/benchmarking-techniques

NEON Intrinsics Presentation

I did a short presentation on NEON intrinsics at the recent Linaro Connect in Cambridge.

Click here to grab a PDF version. The original ODP version complete with animations and notes is in source control. Try:
bzr branch lp:~michaelh1/+junk/intrinsics-demo

The presentation is nice and technical and covers what NEON intrinsics are, what the types and functions look like, and a colour space conversion example comparing plain C, hand written assembly, and the (more readable? more maintainable? faster?) intrinsics version.

Busy busy builders

I run a build farm for the toolchain group here at Linaro. The boards get a bit busy during release week:

The ursas are bootstrapping and testing three different configurations of the candidate GCC. The leos are checking the A9 build by rebuilding 22 essential packages from Ubuntu. The oorts are x86 cloud instances doing much the same.

Busy busy. It’ll be good to get these out and LAVAised once the validation farm comes online.

hurry.filesize

hurry.filesize does exactly what it says on the box and just what I needed – convert a number in bytes to a human readable string like ’30.4 GB’. Nice.

Toolchain build farm utilisation

Toolchain has four PandaBoards that are used for building GCC, GDB, and other interesting programs. Here’s a graph of how busy they are:

The green line is how many boards are currently running jobs. The blue line is how many jobs are queued up. The spike at day 3 is the end-of-week build of the upstream branches. The drop to three boards at day 7 is me reserving one for benchmarking. The spike at day 8 is the start of our release week where many commits and the final tarballs are built and tested.

All boards were busy for seven days out of eight. I think I might need a few more in the pool…

pbuilder cheat sheet

I’m working on an equivalent to the Android toolchain build which is easier to develop against and uses the native libraries shipped with Ubuntu. Part of that involves updating a few packages and getting them into the cloud based build farm. Launchpad’s private package archive is a great way of getting these built for a range of architectures and then sharing them about, but I’d like to test the packing before firing them off. That’s where pbuilder comes in.

Create a Natty based pbuilder:

sudo pbuilder create \
--distribution natty \
--components "main universe" \
--mirror http://nz.archive.ubuntu.com/ubuntu/ \
--http-proxy http://proxy:8123/

(Pull from NZ, use my local proxy)

Create the source package:

dpkg-buildpackage -S

Build inside pbuilder:

sudo pbuilder build binutils*ppa1.dsc

Push the build up to the ppa:

dput ppa:linaro-toolchain-dev/build-deps binutils*ppa1_source.changes

And wait for it to appear!.