Upstream Buildroot documentation is available at the
Also check out the application notes about
Buildroot for AVR32.
Requirements for build machine
Buildroot is a script system that heavily depends on a Linux® system. It is highly
recommended that users either run a native Linux installation or run Linux within a
virtual machine when running other operating systems.
Buildroot is supported by most host architecture and requires quite a lot of disk space.
Having 5 GB free disk space before starting to work on you root file system is in
general a good idea.
The build system also needs a set of host tools preinstalled on the build machine.
Most Linux distributions allow the user to install a package covering the build
List of requirements for the build machine:
- C compiler (GCC)
- C++ compiler for Qtopia (G++)
- GNU make
- autoconf (version 2.13 and 2.61)
- ncurses library (development install)
- zlib library (development install)
- libacl library (development install)
- lzo2 library (development install)
Using a proxy when downloading
Some networks are connected to the Internet through a proxy. Buildroot has no
means to detect your proxy settings, but you can tell your shell how your HTTP
and FTP proxy works. Buildroot will then use this information when downloading
the source code for various applications from the Internet.
To set HTTP proxy type the following in the shell you later will use for
- export http_proxy="http://<username>:<password>@<proxy URL>:<port>/
- export http_proxy="http://avr32:secretPassword@proxy.example.net:3128/
To set FTP proxy type the following in the shell you later will use for
- export ftp_proxy="ftp://<username>:<password>@<proxy URL>:<port>/
- export ftp_proxy="ftp://avr32:secretPassword@proxy.example.net:3128/
This short getting started guide is intended for ATNGW100, ATNGW100 mkII and
Start off by downloading the latest release from Atmel, extract it somewhere on you
system and enter the buildroot-avr32-<version> directory.
To load the default configuration for these boards, simply type the following
depending on your board:
- make atstk1002_defconfig
- make atstk1006_defconfig
- make atngw100_defconfig
- make atngw100mkii_defconfig
Buildroot will now load the board´s configuration and save it in a file
An optional step is to download all the source files before starting the build.
This can be initiated by typing:
The next step for the user is to start the build process. This is done by typing:
Buildroot will now start to download software packages from the Internet, extract them
on your local file system and compile them for AVR®32.
When the build process is finished and successful, you will find the created root file
systems in the binaries/<board name>/ directory. There can be various types of ready
binaries depending on what is chosen by the configuration system.
Buildroot has a well defined structure of directories. From a fresh extraction of the
tarball, Buildroot will look like:
After a successfull build there will be 6 extra directories in the base
directory of Buildroot:
This directory contains the successfully built images. Populated on the form
Directory used for building each library and application. Also, by default, holds the
staging_dir directory which contains the toolchain and libraries.
File which contains the system configuration, this will appear after the first time
running menuconfig or loading a default configuration
The top level configurations file for the kconfig system.
File with a default general configuration for Buildroot, mainly for x86 architecture.
This directory will contain all the downloaded source tar archives so the user only has
to download libraries and applications once.
In this directory the documentation for Buildroot can be found.
Directory made by kconfig, used for knowing which values are stored during
configuration setup. Leave it as it, everything is auto generated.
Top level makefile for Buildroot describing the initial rules for how to build a root file
system. This file will again include all the other makefiles spread out in the sub
Directory containing all the makefiles that describes how each library and application
shall be built.
Directory containing information about project building that allows Buildroot to be able
to have multiple projects ongoing in the same extracted source tree. Buildroot will
share compiled applications, libraries and toolchain whenever possible.
The project specific part of the build is located in this directory. Is populated on the
form project_build_avr32/>project name</. Here you will find the target specific
Linux kernel; busybox and uncompressed root file system.
Directory containing information about targets that is where the different boards are
defined, board specific patches to the Linux kernel and board specific files. Typically
this is where the base for the file system is located, called target_skeleton.
TODO list for upstream Buildroot describing what areas is in the works. Feel free to
work on TODO material if you are confident with how Buildroot works.
Directory containing makefiles for the toolchain that describes how it should be built
and what options a user have. The toolchain is a vital part of buildroot, since you are
not capable to build anything without a working toolchain. Given that the user has
chosen an internal toolchain.
Directory containing the extracted toolchain source tarballs and where Buildroot
builds the toolchain.
Flexibility and configuration
Buildroot is also highly flexible. For starter we recommend following the getting
started guide, but you can also configure each application to put in your image.
Enter the base directory of Buildroot and type:
A curses based menu system will guide you around the different choices.
If a user wants to use the atngw100 or atstk1002 default configuration as a base, but
do minor adjustment the following short guide will configure Buildroot to build it as a
Start off in the base directory for Buildroot and type:
- make atstk1002_defconfig or make atngw100_defconfig depending on the board.
- make menuconfig
- Project Options --->
Project name, change this to something descriptive.
Exit the menu system and save the configuration, then type:
Your file system will now be located in binaries/<project name>/ directory.
Deploy binaries to target system
Buildroot creates binaries ready to download onto the target, using a flash
programmer like avr32program or a SD-card. In the binaries directory in the
base directory of Buildroot, the user can find the following files depending
on the configuration system:
- <board base name>-linux-<version>.gz
6.1.1 <board base name>-linux-<version>.gz
This is the kernel targeted for your board. It is also included in the root
file system images so the user does not need to explicit download this into
This is the EXT2 version of the root file system. It is targeted for
SD/MMC-card boot, or other media that can hold an EXT2 file system. The .bz2
version of this file is a bzip2-compressed version of the same file system.
The JFFS2 root file system is target for the onboard flash device. Onboard
flash is typically NOR, NAND or DataFlash®
Buildroot can make multiple JFFS2 images when the target device has more than
one flash device or partition. In this case an extension is added to each image
file indicating the target flash device or partition.
For example a build for the ATNGW100 can generate three images:
Where the first file without an extension is only a file touched by the make
system and should be ignored. The other two files are for programming into the
two flash devices on the ATNGW100. They are named according to their content,
where the root image is "/" and the usr image is "/usr".
A full file system is available in a tar archive. This is useful if the user
wants to have the root file system mounted over network or extract the file
system to a removable medium like SD/MMC-card.
U-boot is the boot loader made for the target board; this must be programmed
with a flash programming tool like avr32program.
For more information about the Buildroot project,
see the upstream documentation,
an external site not in affection with Atmel.