build BuildRoot for AT91SAM9x5 family


Buildroot is used to build the cross tool chain, a small root filesystem image of different types (jffs2, tar, ubi) and the Atmel 2.6.39 kernel image.

Included applications into the root filesystem

The root filesystem images contain the following applications:

  • Busybox
  • Audio and video
    • alsa-utils
    • madplay
  • Compressors and decompressors
    • bzip2
  • Hardware handling
    • i2c-tools
    • udev
  • Networking
    • bridge-utils
    • can-utils
    • dropbear
    • ethtool
    • iperf
    • iproute2
    • iptables
    • lrzsz
    • mii-diag
    • portmap
    • wireless tools
    • wpa_supplicant
  • Shell and utilities
    • file
    • which

Get Buildroot

This version is based on the latest Buildroot release: 2011.05. First of all, you have to get Buildroot sources.

You can download the Buildroot archive:

$ wget
$ tar xvjf buildroot-2011.05.tar.bz2
$ cd buildroot

Or you can use git:

$ git clone
$ cd buildroot
$ git checkout 2011.05

Then you have to apply the 2011.05-at91_5series_1.0.patch patch file:

$ wget
$ patch -p1 < 2011.05-at91_5series_1.0.patch
$ chmod +x board/atmel/at91sam9x5ek/
$ chmod +x board/atmel/at91sam9x5ek/alsa/

Build Buildroot

The patch provides a default configuration, to use it you only have to do:

$ make at91sam9x5ek_defconfig

Then begin the building process with:

$ make
The build process is quite long and sources will be downloaded from Internet. Once it is done, you will have the following files:
$ ls output/images/
rootfs.jffs2  rootfs.tar.bz2  rootfs.ubi  rootfs.ubifs  uImage

rootfs.* files are the root filesystem images and uImage is the kernel image for u-boot.

The toolchain is located into output/host/usr/bin/.

Customizing Buildroot

Customizing the target filesystem

To setup the filesytem image:

make menuconfig

You can add or remove packages into the Package Selection for the target section.

You may want to customize the root filesystem by adding configuration file. You can do this by using a post build script called before creating filesystem images. It's what we do for alsa configuration file. You only have to fill the Custom script to run before creating filesystem images field into the System configuration section. Another way is to use a custom Root FS skeleton by selecting custom target skeleton in System Configuration -> Root FS skeleton.

You can also customize ownership/permissions and device files by editing System Configuration -> Path to the device tables.

Customizing the Busybox configuration

You can configure the Busybox but you will need to have done a first compilation of Buildroot without customizing it. Then invoke make busybox-menuconfig. The .config file will be put into the output/build/busybox directory. Run the compilation of Buildroot again.

For more information, you can have a look on BuildRoot documentation

Customizing the uClibc configuration

In the same way that Busybox, you can configure the uClibc. Make a first compilation of Buildroot without customizing it, invoke make uclibc-config. The .config file will be put into the output/toolchain/uClibc directory. Run the compilation of Buildroot again.

For more information, you can have a look on BuildRoot documentation

Add your own packages to Buildroot

If the software you want is not included into Buildroot, you can add it by yourself. There are several ways to add a package. It depends from the build system: generic makefile, autotools or cmake. You can find more information and some examples on the BuildRoot website

r3 - 04 Dec 2013 - 14:28:28 - NicolasFerre
Linux & Open Source related information for AT91 Smart ARM Microcontrollers

Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.

Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.

Atmel® and others, are registered trademarks or trademarks of Atmel Corporation or its subsidiaries. This site is powered by the TWiki collaboration platform

ARM® and others are registered trademarks or trademarks of ARM Ltd. Other terms and product names may be trademarks of others.

Ideas, requests, contributions ? Connect to LinksToCommunities page.

Syndicate this siteRSS ATOM