Bootlin at FOSDEM: two talks and video recording

I'm going to FOSDEMAs usual, Bootlin will again be present at the FOSDEM conference in Brussels, on February, 4th and February 5th. We will of course mostly be attending the Embedded DevRoom, with multiple talks around development in the embedded space.

We will also be giving two talks this year:

  • My colleague Maxime Ripard will be giving a talk about IIO, a new subsystem for I/O devices. In short, IIO is a new subsystem in the kernel to write drivers for devices like Analog-to-Digital converters. Maxime has worked on a driver inside the IIO subsystem for the internal ADCs of the AT91 processors from Atmel, and will base his talk mostly on the experience developing this driver. This talk will take place on Saturday, 12:00 AM to 1:00 PM in the Lameere room.
  • I will be giving a talk on Using Qt for non-graphical applications. It is a talk that has already been given at the Embedded Linux Conference Europe, but the audience of FOSDEM and ELCE being quite different, we have chosen to propose it for FOSDEM as well, and it got accepted. This talk will take place on Sunday, 1:00 PM to 2:00 PM in the Lameere room.

There are also other talks that are worth noting: a SoC power management talk from Jean Pihet who works on OMAP power management support in the Linux kernel, a talk about OpenCores and OpenRISC, a talk about Safe Upgrade of Embedded Systems by Arnout Vandecappelle, who contributes a lot to Buildroot, and also other talks about OpenWRT, Yocto, licensing issues in Android, the EFL libraries, and more.

We will also be carrying our camcorder to video record those talks. We are trying to see with the FOSDEM organization team if it possible to record the audio directly from the room sound systems in order to provide better audio quality in our videos.

If you happen to be at FOSDEM, we’d be very happy to meet you!

Buildroot Developer Day, Brussels edition

BuildrootAround each FOSDEM conference and Embedded Linux Conference Europe event, we have been organizing a Buildroot Developer Day for a few years, in order to gather some developers and users of the Buildroot build system, in order to discuss the development of Buildroot, its features, development process, design, and more.

In Prague at the last Embedded Linux Conference Europe in October 2011, we had a very interesting meeting that gathered developers from other build systems (OE-lite, OpenBricks and PXTdist), and we published a report of this meeting.

The next Buildroot Developer Day will take place on Friday, 3rd February, just before the FOSDEM conference, in Brussels. This is the first meeting that will gather such a number of Buildroot developers: Peter Korsgaard (Buildroot maintainer), Arnout Vandecapelle (developer from Essensium/Mind, who has been contributing a lot to Buildroot lately), Thomas De Schampheleire (also a big contributor in the last year or so), Luca Ceresoli, Yann E. Morin (developer of Crosstool-NG), my colleague Maxime Ripard (who contributed package enhancements and improvements of the package infrastructure) and myself.

This meeting is open to all Buildroot developers and users, and will take place in a location easily accessible in the center of Brussels. Do not hesitate to contact me at thomas.petazzoni@bootlin.com if you want to take part to this meeting.

Buildroot 2011.11 released: details on new features

As planned, Buildroot 2011.11 has been released at the end of November. You can download this release as a tarball or through the Git repository.

This release brings a set of new features on which I thought it would be nice to give some details.

The file and local site method

Each package in Buildroot defines from where the source code for the particular component being built is fetched. Buildroot has of course always supported fetching a tarball from HTTP of FTP servers. Later on, Buildroot has added support for fetching from Git, Subversion and Bazaar repositories, for example by doing:

MYPKG_SITE = http://somelocation.com/svn/foobar/trunk
MYPKG_SITE_METHOD = svn

or

MYPKG_SITE = git://somelocation.com/foobar.git

The <pkg>_SITE_METHOD variable allows to define the fetching method. When not specified, Buildroot tries to guess it from the <pkg>_SITE value. Of course, in ambiguous cases such as Subversion or Git repositories over HTTP (as shown in the first example), the <pkg>_SITE_METHOD must be specified.

This new version of Buildroot brings two new site methods: file and local.

The file site method allows to specify the location of a local tarball as the source code for the component to be built. For example:

MYPKG_SITE = /opt/software/something-special-1.0.tar.gz
MYPKG_SITE_METHOD = file

This can be useful for internal software that isn’t publicly available on a HTTP or FTP server or in a revision control system. This new site method was added by David Wagner, who has been an intern at Bootlin between April and September this year.

The new local site method allows to specify the location of the source code to be built as a local directory. Buildroot will automatically copy the contents of this directory into the build directory of the component and build it from here. This is very useful because it allows to version control your source code as you wish, make changes to it, and easily tell Buildroot to rebuild your component. Note that the copy is using rsync so that further copies are very fast (see the pkg-reconfigure and pkg-rebuild targets below). An example of using the local site method:

MYPKG_SITE = /opt/software/something-special/
MYPKG_SITE_METHOD = local

This new site method has been implemented by myself, as the result from my experience of using Buildroot with various Bootlin customers.

The source directory override mechanism

The local site method described above is great for packaging special components that are specific to the embedded device one is working on, like the end-user application, or special internal libraries, etc.

However, there are cases where it is needed to work with a specific version of an open-source component. This is typically the case for the Linux kernel or the chosen bootloader (U-Boot, Barebox) or with other components. In that case, one may want to keep using Buildroot to build those components, but tell Buildroot to fetch the source code from a different location than the official tarball of the component. This is what the source directory override mechanism provide.

For example, if you want Buildroot to use the source code of the Linux kernel from /opt/project/linux/ rather than download it from a Git repository or as a tarball, you can write the following variable definition in a board/company/project/local.mk file:

LINUX_OVERRIDE_SRCDIR = /opt/project/linux

Then, you reference this file through the BR2_PACKAGE_OVERRIDE_FILE option, in Build options -> location of a package override file. When building the Linux kernel, Buildroot will copy the source code from /opt/project/linux into the kernel build directory, output/build/linux-VERSION/ and then start the build process of the kernel.

Basically, this mechanism is exactly like the local site method described previously, except that it is possible to override the source directory of a package without modifying the package .mk file, which is nice for open-source packages supported in Buildroot but that require local modifications.

To summarize, here is my recommendation on how to use Buildroot for packages that require project-specific modifications:

  • You are using an existing open-source component on which you make some tiny bug fixes or modifications. In this case, the easiest solution is to add additional patches to the package directory, in package/<thepackage>/.
  • You are using an existing open-source component, but are making major changes to it, that require proper version control outside of Buildroot. In this case, using the source directory override feature is recommended: it allows to keep the Buildroot package .mk file unmodified while still using your custom source code for the package.
  • You have project-specific libraries or applications and want to integrate them in the build. My commendation is to version control them outside of Buildroot, and then create Buildroot packages for them using the local site method. Note that in the pkg_SITE variable, you can use the $(TOPDIR) variable to reference the top source directory of Buildroot. I for example often use MYAPP_SITE = $(TOPDIR)/../myapplication/.

The <pkg>-rebuild and <pkg>-reconfigure targets

For a long time, when one wanted to completely rebuild a given package from scratch, a possibility was has been to remove its build directory completely before restarting the build process:

rm -rf output/build/mypackage-1.0/
make

Or, using the -dirclean target available for each package:

make avahi-dirclean
make

As these commands remove completely the build directory, the build process is restarted from the beginning: extracting the source code, patching the source code, configuring, compiling, installing.

In 2011.11, we have added two new per-package targets to make it easy to use Buildroot during the development of components:

  • make mypkg-reconfigure will restart the build process of mypkg from the configuration step (the source code is not re-extracted or repatched, so modifications made to the build directory are preserved)
  • make mypkg-rebuild will restart the build process of mypkg from the compilation step (the source code is not re-extracted or repatched, the configuration step is not redone)

So, a typical usage could be:

emacs output/build/mypkg-1.0/src/foobar.c
make foobar-rebuild

However, beware that all build directories are removed when you do make clean, so the above example is only useful for quick testing of changes.

The case where the -reconfigure and -rebuild are really useful is in combination with the local site method or the source override directory mechanism. In this case, when pkg-reconfigure or pkg-rebuild is invoked, a synchronization of the source code is done between the source directory and the build directory is done before restarting the build.

Let’s take the example of a package named mypkg for which package/mypkg/mypkg.mk contains:

MYPKG_SITE = /opt/mypkg
MYPKG_SITE_METHOD = local

Then, to work on your package, you can simply do

emacs /opt/mypkg/foobar.c    # Edit as usual your project
make mypkg-rebuild           # Synchronizes the source code from
                             # /opt/mypkg to the build directory
                             # and restart the build

Integration of real-time extensions

In this 2011.11, an interesting addition is the integration of the Xenomai and RTAI real-time extensions to the Linux kernel. The Xenomai integration was initially proposed by Thomas de Schampheleire and then extended by myself, and I have also added the RTAI integration. This integration allows to seamlessly integrate the kernel patching process and the compilation of the required userspace libraries for those real-time extensions.

Conversion of the documentation to asciidoc

Back in 2004, one of my first contribution to Buildroot was to start writing documentation. At the time, the amount of documentation was small, so a single and simple HTML document was sufficient. Nowadays, Buildroot documentation has been extended significantly, and will have to be extended even further in the future. The approach of a single raw HTML document was no longer up to the task.

Therefore, I have worked on converting the existing documentation over to the asciidoc format. This allows us to split the source of the documentation in several files, for easier edition, and allows to generates a documentation in multiple formats: single HTML, split HTML, raw text or PDF.

Just run make manual in Buildroot 2011.11 to generate the manual. Note that the version available on the website is still the old HTML version, but it should soon be updated to the new asciidoc version.

Bootlin contributions

Bootlin has again contributed to this Buildroot release:

$ git shortlog -sen 2011.08..2011.11 | head -12
   126	Peter Korsgaard
   104	Gustavo Zacarias
    62	Thomas Petazzoni, from Bootlin
    27	Yann E. MORIN
    21	Sven Neumann
    13	Yegor Yefremov
    10	Thomas De Schampheleire
     7	H Hartley Sweeten
     5	Frederic Bassaler
     4	Arnout Vandecappelle (Essensium/Mind)
     4	Maxime Ripard, from Bootlin
     3	Baruch Siach

Our contributions have been:

  • Implementation of the source directory override mechanism
  • Implementation of the local and file site methods
  • Implementation of the pkg-rebuild and pkg-reconfigure targets
  • Conversion of the documentation to asciidoc and documentation improvements
  • Various improvements for external toolchain support: optimization of the toolchain extraction and copy (reduced build time), integration of the support of the CodeSourcery x86 toolchains, update of all CodeSourcery toolchains to the latest available versions
  • Removed useless arguments from the CMAKETARGETS, AUTOTARGETS and GENTARGETS macros, used by all packages in Buildroot. Instead, such pieces of information are automatically figured out from the package .mk file location in the source tree
  • Added the cifs-utils package (for mounting CIFS network filesystems), the libplayer package, the picocom package.
  • Cleanup, improve and merge the Xenomai integration done by Thomas de Schampheleire, and implement the RTAI integration
  • Did a lot of cleanup in the source tree by creating a new support/ directory to contain various tools and scripts needed by Buildroot that were spread over the rest of the tree: the kconfig source code, the special libtool patches, various scripts, etc.

Next release cycle and next Buildroot meeting

The next release cycle has already started. After the meeting in Prague, it was decided that Peter Korsgaard (Buildroot maintainer) would maintain a next branch between the -rc1 and the final version of every release, in order to keep merging the new features for the next release while debugging the current release. This next branch for 2012.02 has already been merged. For example, the addition of the scp and Mercurial site methods has already been merged for 2012.02, as well as numerous other package updates.

On my side, besides usual package updates, I’d like to focus my work for this 2012.02 cycle on improving the testing coverage and on improving the documentation. My colleague Maxime Ripard is working on integrating systemd into Buildroot, as an alternate init mechanism.

The Buildroot community will also be organizing its next meeting in Brussels, on Friday February, 3rd 2012, right before the FOSDEM conference. Buildroot users and developers are invited to join, just contact us through the Buildroot mailing list.

Report from the Buildroot Developer Day

Right after the Embedded Linux Conference Europe, a new edition of the Buildroot Developer Day took place on Saturday, 29th October 2011 in Prague.

Unlike past Buildroot Developer Day that were followed only by Buildroot developers and Yann E. Morin as the crosstool-NG maintainer, this edition of the Buildroot Developer Day was followed by developers of other build systems: Robert Schwebel from PTXdist, Esben Haabendal from OE-lite and we also had the opportunity to discuss with Benjamin Zores and Davide Calvalca from OpenBricks. This made the day very interesting, even though if it was a bit less focused on Buildroot than expected.

I have written and sent a complete report of the discussions, which were about the following topics:

  • Expanding the send-patches.org initiative. This was an important topic, as developers of several build systems had the opportunity to discuss it during this meeting.
  • The testing infrastructure of Buildroot, how to improve it.
  • Package management. A long requested feature for Buildroot, but which would make Buildroot a lot more complicated and probably less reliable. Following this meeting, our position is to not implement such a feature and to keep Buildroot simple. Should package management be necessary, there are other build systems that implement such a feature (at the expense of higher complexity, of course).
  • Toolchain backend. We will soon switch to using the crosstool-NG backend as the default method of building toolchains in Buildroot. Long term, we would like to get rid of the code that builds a toolchain in Buildroot in order to factorize the efforts at the level of the crosstool-NG project.
  • Migration of the documentation to the asciidoc format has been accepted, and the next version of Buildroot will feature this updated documentation.
  • Out-of-tree build of packages. This is a very internal question to how Buildroot builds package. See the report for details.
  • Website improvement, because the current Buildroot website is quite ugly.
  • Maintenance process. We are seeing a quite significant increase in the number of contributions to Buildroot and some of these contributions are taking more and more time to get integrated. We discussed the topic and came up with a few proposals on how to improve the situation.
  • Host packages visible in menuconfig. Traditionally, packages built for the host are not user-selectable as Buildroot since they are just dependencies to build target packages. However, we had the case of some host packages that should be user-selectable. The principle has been agreed upon.
  • Per-package device file handling. A mechanism proposed by Maxime Ripard, from Bootlin, to allow each package to specify special permissions/owernships/device files to install in the target filesystem.
  • Relocatable toolchain and SDK. Buildroot produces a SDK (set of utilities and libraries to build applications for the target independently from Buildroot), but this SDK is currently not relocatable. We discussed the various issues to fix to make it relocatable.
  • Licensing report generation, which is also a feature that has been requested in the past.

All in all, it was a very interesting and motivating day, that got closed by a short visit of Prague’s center and a nice dinner. The next edition of the Buildroot Developer day will take place on Friday, 3rd 2012 in Brussels, the day before the FOSDEM conference. It is open to all Buildroot users and developers!

Regarding Buildroot itself, the maintainer Peter Korsgaard will release 2011.11-rc1 early next week, and 2011.11 by the end of November. This release will have several new useful features, which we will cover in details in a future blog post.

Buildroot 2011.08 released!

Buildroot logoAs promised by the time-based release schedule, a new version 2011.08 of Buildroot has just been released. For those just coming in, Buildroot is a utility that automates the process of building an embedded Linux system: generating a cross-compilation toolchain or importing an existing one, cross-compiling multiple user-space libraries or applications, generating a root filesystem image and building the kernel or bootloader images. We use it extensively at Bootlin for various projects and therefore contribute regularly to this project.

The major highlights of this version are :

  • An updated version of udev. For a long time, Buildroot has been stuck with an ancient udev release, due to the slightly more complicated dependencies of newer udev versions. Fortunately, Yegor Yefremov and other contributors have done the work to integrate those dependencies and get a modern version of udev to work in Buildroot.
  • An updated version of util-linux has been integrated. Here as well, updating it wasn’t completely straightforward, due to utility libraries such as libuuid, which is also present and e2fsprogfs, and used by multiple other packages.
  • The conversion of the Linux kernel build process and the bootloaders build process to the GENTARGETS infrastructure of Buildroot. This makes the build process of the kernel and the bootloaders much more similar to regular packages, and allows to provide the capability of fetching kernel sources not only from tarballs over http/ftp, but also from Git or Subversion repositories.
  • The kernel build process has been extended to support Linux 3.x versions and also release candidates versions.
  • Some improvements for using Buildroot to generate systems for non-MMU targets
  • Some new packages have been added: acl, attr, ebtables, gnutls, inotify-tools, ipset, libargtable2, libiqrf, libmnl, libnspr, libnss, libroxml, libyaml, live555, mxml, orc, rsyslog, sredird, statserial, stunnel, ti-utils, uboot-tools, yajl, and many, many packages have been upgraded or fixed.

The amount of patches merged for this release (287) is almost identical to the number of patches for the past release (286), but the number of contributors has increased from 28 to 35. Generally speaking, we are seeing an increasing number of requests and contributions from users :

   143  Peter Korsgaard
    36  Thomas Petazzoni
    21  Sven Neumann
    13  Gustavo Zacarias
    13  Yegor Yefremov
     9  Maxime Ripard
     7  Yann E. MORIN
     4  Baruch Siach
     4  Daniel Mack
     4  Luca Ceresoli
     3  Jean-Christophe PLAGNIOL-VILLARD
     3  Thomas De Schampheleire
     2  Allan W. Nielsen
     2  Mike Williams
     2  Phil Edworthy
     2  Will Newton
     1  Arnout Vandecappelle (Essensium - Mind)
     1  Arnout Vandecappelle (Essensium/Mind)
     1  Benoit Mauduit
     1  Benoît Mauduit
     1  Daniel Hobi
     1  Daniel Nyström
     1  Danomi Mocelopolis
     1  Evgeni Dobrev
     1  Francis Mendes
     1  Frederic Bassaler
     1  Frederik Pasch
     1  H Hartley Sweeten
     1  Heiko Helmle
     1  Marek Belisko
     1  Michael J. Hammel
     1  Milton Soares Filho
     1  Philippe Reynes
     1  Robin Holt
     1  Tristan Lelong

Two developers from Bootlin have contributed patches for this release: my colleague Maxime Ripard has contributed 9 patches (Python build fixes, toolchain configuration fix, new rsyslog package, rework of the logging init scripts, new stunnel package, /dev/shm fix for the initialization scripts, code cleanup) and I (Thomas Petazzoni) have contributed 36 patches (conversion of the kernel and bootloaders to the GENTARGETS infrastructure, support for Linux 3.x and release candidates, improvements for non-MMU targets, the new scons package, upgrade of valgrind, some other code cleanup and fixes).

For the next release, I expect to contribute a set of patches that has already been reviewed on the list, and which adds the possibility of building packages from an existing source directory instead of letting Buildroot handle the download/extract/patch part of the build process. This feature will make it much much easier to use Buildroot during the development of the kernel, an application or a library for the target embedded system. I have also posted patches that convert the documentation over to the asciidoc format and I intend to do various additions to this documentation.

It is also worth mentioning that the Buildroot developers (Peter Korsgaard and myself) and the Crosstool-NG maintainer Yann E. Morin are organizing a Developer Day on October, 29th in Prague, the day after the Embedded Linux Conference Europe. All developers or users interested in Buildroot and/or Crosstool-NG are invited to join. See http://lists.busybox.net/pipermail/buildroot/2011-August/045066.html for more details.

Buildroot 2011.05 released

Buildroot logoAs expected with the time-based releases, Buildroot 2011.05 has been released just a few days ago. We have already published many blog posts about Buildroot, but to summarize for our new readers, Buildroot is a tool that automates and simplifies the process of building an embedded Linux system. You define your system configuration and components in a menuconfig/xconfig interface similar to the one the kernel uses, then hit make, wait a bit, and you have your embedded Linux system ready to run on your device. At Bootlin, we appreciate the simplicity of Buildroot, and many of our customers also appreciate it for the same reason. Of course, we also contribute significantly to Buildroot and we have started a commercial support offering on Buildroot.

The 2011.05 release

The 2011.05 release cycle was a little bit more quiet than usual, so the number of new features or major changes is not as large as it was for past releases. Amongst the interesting things:

  • Until now, Buildroot was only capable of building systems using a static /dev, in which device files are statically listed in a device table and created at system build time. The 2011.05 has added a configuration option to select how the /dev directory on the target should be handled. It can be handled in four different ways:
    • with a static /dev, just as before
    • with just devtmpfs. It allows to have a dynamic /dev without any other userspace components, which is really nice.
    • with devtmpfs and mdev. In addition to having a dynamic /dev, it allows allows to execute arbitrary scripts when device are added/removed and to customize the owner, group and permissions for the device files.
    • with devtmpfs and udev. This is the full solution, as used in desktop distributions.
  • There has been an internal infrastructure change on support for external toolchains, and this change will make those toolchains slightly easier to use. In Buildroot terminology, an external toolchain is a toolchain that hasn’t been built by Buildroot, but which Buildroot uses to compile code for the target platform. It allows to re-use existing toolchains such as the CodeSourcery toolchains, or toolchains generated externally with Crosstool-NG. To support those toolchains, we rely on the sysroot mechanism that the GCC compiler provides since the 4.x era. This mechanism allows Buildroot to make a complete copy of the C library binaries, C library headers and kernel headers into a staging directory, and then tell the toolchain utility (compiler, linker, etc.) to use this new directory as their sysroot. This means that a --sysroot option needs to be passed at every invocation of those tools. As this was not very convenient, especially to use the Buildroot toolchain as a SDK to build applications not packaged in Buildroot, the 2011.05 has added wrappers for the toolchain tools, which makes this completely transparent. So one can now just use $(O)/host/usr/bin/arm-linux-gcc as usual, and it will do the right thing.
  • A few new packages have been added: bonnie++ (a block device benchmark), can-utils (userspace utilities for the famous industrial CAN bus), gdisk (a sort of fdisk program, but for the new GPT partition table format), htop (a nice top alternative to watch the activity of processes), input-event-daemon (a simple daemon that executes arbitrary command in reaction to input events), libexif (a library to read the contents of EXIF tags in pictures), libraw (a library to decode pictures in various RAW formats), libv4l (the library to interact with Video4Linux devices), ngircd (an IRC server).
  • Many packages have been upgraded: the Gtk stack, the U-Boot and Barebox bootloaders and the internal toolchain components (gcc and uClibc), with experimental gcc 4.6 support.

Buildroot in the Linux Journal

Linux Journal 206 CoverThe Linux Journal has published an issue, numbered 206, dedicated to Embedded Linux. This issue has several articles around Embedded Linux related topics:

  • Hexapod, a Linux powered robot
  • Debugging Embedded Linux platforms with Python and GDB
  • Breaking free the Gumstix DSP
  • Speech I/O for Embedded Applications
  • CyanogenMod 7.0, Gingerbread in the house
  • Tiny Core Linux
  • Roll your own Embedded Linux System with Buildroot, written by Alexander Sirotkin, which gives a good introduction to what Buildroot is and how to use it.

It is great to see articles about Buildroot in a such widely read magazine, and it should definitely help increasing the awareness about this build system.

Linux Journal 206 Table of ContentsLinux Journal 206 Buildroot

Buildroot used by Fabrice Bellard in jslinux

In May, the famous developer Fabrice Bellard (known as the initial author of ffmpeg, qemu, but also for his records for the computation of pi) has released an impressive new project: an x86 emulator completely written in Javascript, which runs in a Web browser. This emulator is sufficiently capable and powerful to boot a Linux system. And the good news is that the Linux system that Fabrice Bellard is using for the demonstration was generated with Buildroot, as Bellard says in his technical notes about the project.

Buildroot 2011.02 released, with many interesting updates and commercial support!

Buildroot logoAs usual, the latest Buildroot version has been released just in time on the last day of the month: Buildroot 2011.02 is available for download!

This release of the increasingly popular embedded Linux build system provides new interesting features and updates:

  • Support of external toolchains has been improved with support for toolchain profiles. Those are predefined configurations for well-known toolchains such as the CodeSourcery ones for ARM, PowerPC, MIPS and SuperH. Buildroot is now capable of automatically downloading and installing those external toolchains, which is much easier than downloading them manually. It’s now easy to provide users with Buildroot configurations that use well known toolchains, without requiring them to pre-install anything specific.
  • Support for board configurations has been completely rewritten and largely simplified. All board-specific Makefile and configuration options have been removed, and instead, each board is represented by a single, simple (less than 20 lines) defconfig file, in the configs/ directory. In addition to the existing configuration, we have added support for the Mini2440 platform but also for many Qemu emulated platforms: Qemu ARM Versatile, Qemu MIPSel Malta, Qemu PowerPC G3 Beige, Qemu SH4 r2d and Qemu x86. Those configurations allow to easily produce a known-to-work system for the Qemu emulator, making Buildroot even easier to start working on your embedded Linux system. See the documentation for more details on how to add your own board support.
  • Support for the Blackfin architecture has been added, thanks to Mike Frysinger. This support came along with a lot of fixes to make Buildroot work better for non-MMU architectures, since Blackfin is the first actively supported non-MMU architecture in Buildroot. There will certainly be further improvements to support non-MMU architectures, and hopefully additional non-MMU platforms will be added. For those platforms, Buildroot is generally a very good embedded Linux build system, as those architectures are typically used for small to medium sized systems, with a relatively limited number of components.
  • The Crosstool-NG back-end has been improved and extended to support more Buildroot options, and has been upgraded to a newer Crosstool-NG version. This back-end is the third mode for Buildroot toolchain: it allows Buildroot to use Crosstool-NG as the toolchain generator.
  • Ccache support has been reworked and it now works properly. Since Buildroot often requires complete rebuilds from scratch, having the ccache compiler cache is very nice. On my laptop, compiling from scratch a sample Buildroot system was taking 5 minutes and 29 seconds without ccache, and now only takes 3 minutes and 40 seconds with ccache enabled and the cache already filled by a previous build.
  • A new CMake infrastructure has been added for packages, next to the existing generic and autotools infrastructure. For the moment, only two packages are using the infrastructure (cdrkit and libcuefile), but CMake is an increasingly popular build system and we will definitely see more packages using it in the future. Moreover, Buildroot generates a CMake toolchain file that describes the toolchain used by Buildroot, and which makes it very easy to cross-compile external libraries/applications for the Buildroot system using cmake -DCMAKE_TOOLCHAIN_FILE=/path/to/buildroot/output/toolchainfile.cmake.
  • A very nice cleanup job of the internal toolchain build process has been started by Gustavo Zacarias. The build process of binutils, gmp, mpfr and mpc has been migrated to proper packages, and this will also be done for gcc and gdb in the future.
  • As preliminary steps towards the generation of a standalone SDK from Buildroot, two important changes have been made. First, the staging directory is now inside $(O)/host/usr/PLATFORM-TUPLE/sysroot/, but a symbolic link from $(O)/staging has been kept for compatibility. This change will allow the $(O)/host directory to be the standalone SDK in the future. The second change is on pkg-config: its configuration has been adjusted so that it behaves properly to compile target packages without needing any environment variables or options. It makes the Buildroot pkg-config much easier to use to compile external applications.
  • The Python package has been upgraded to the latest Python version, 2.7.1. This was needed since a long time, since the version of Python we had in Buildroot was only 2.4. Moreover, the package has been completely rewritten, with more options, and has been tested on several platforms. Two external Python modules, python-mad and python-serial have also been added as packages, to show how such modules can be integrated into Buildroot.
  • A set of packages to add support in GStreamer for the TI DSP codecs has been added: gst-dsp, gst-omapfb, tidsp-binaries, dsp-tools, thanks to Felipe Contreras.
  • We have a bunch of new packages as well: mpd, the Music Player Daemon with many audio codecs and libraries, the dhrystone and whetstone benchmarks and other tools such as xmlstarlet, fbgrab, irda-utils, lsuio, etc.
  • Many other packages have been upgraded or fixed, and the results of our random configuration builds are much, much better than they were in the past.

As a Bootlin engineer, I have again contributed significantly to this release: Peter Korsgaard, the Buildroot maintainer, has done 171 commits, Gustavo Zacarias has done 119 commits and I have done 103 commits. The next committer is Mike Frysinger (for the great Blackfin support) with 22 commits.

It is with this great Buildroot knowledge and experience that Bootlin has launched a few weeks ago an official offering of Buildroot commercial support. If you are using Buildroot for your embedded product, or want the buyers of your hardware platform to have a simple but efficient embedded Linux build system and you need help, development or consulting, do not hesitate to contact us.

Buildroot 2010.11 release and roadmap

Buildroot logoThe 2010.11 release of Buildroot has been published on November, 30th. Buildroot is a tool that eases the process of building an embedded Linux system: cross-compiling toolchain, root filesystem with dozens or hundreds of libraries and applications, bootloader and kernel.

Release 2010.11

Releases are made every three months, and the latest 2010.11 release has a number of improvements :

  • Experimental crosstool-NG back-end for handling the toolchain. Before, Buildroot could either compile a toolchain for you, or use an already existing external toolchain. However, the internal Buildroot process for building a toolchain is limited to uClibc and its maintenance is a duplication of the work done by the Crosstool-NG community. While this back-end is only experimental at the moment, the intention is to make it the default back-end in some future release, if everything works fine. Thanks to Yann E. Morin for implementing this back-end, and making related changes to Crosstool-NG.
  • The Kconfig infrastructure has been updated to the one of 2.6.36 and has been cleaned up (we now have a nice quilt patch series). This brings savedefconfig (for minimal Buildroot configurations) and nconfig support. We now also create a convenience Makefile wrapper in the output directory for out-of-tree builds, like the kernel has. So once you have done a first make O=/some/path menuconfig, you can go into /some/path and directly use make something without having to specify the output directory.
  • Old-style package hooks (*_HOOK_POST_*) have been removed. This was just a clean up process, because we have a more modern way of allowing packages to hook specific commands at various steps of the build process.
  • Download handling has been reworked and support for git/svn downloads was added, so that packages only available through version control systems can be added easily in Buildroot. The make source (to download all needed tarballs and files so that the build can be done completely offline) and make external-deps (to show all files that would need to be downloaded) commands have been improved to fix several issues
  • On the architecture side, support for ARM Cortex A9 and Sparc LEON variants was added. Support for Alpha, Cris, IA64 and Sparc64 (deprecated in 2010.08) was removed.
  • We also added a few more packages: argp-standalone, gdk-pixbuf, gpsd, gst-ffmpeg, libmpeg2, kbd, librsvg, nuttcp, rng-tools, rrdtool and xz. And removed some deprecated packages: dillo, libglib12, libgtk12, microwin and pcmcia.
  • Many, many packages have been updated. In particular, the Gtk+ library has been updated from 2.12 to 2.20, keeping the DirectFB support functional thanks to the work of Lionel Landwerlin (the DirectFB support in Gtk+ was broken since 2.12). So, finally, this brings us a recent and fresh Gtk+ library in Buildroot.
  • Many packages were converted to the autotargets or gentargets infrastructures (that we use to describe how a particular package should be downloaded, extracted, configured, built and installed), in particular thanks to the work of Martin Banky.

I have again contributed quite a bit to this release, but not as much as I wanted to. Here are the numbers:

git shortlog -s -n 2010.08..
   168  Peter Korsgaard
   115  Thomas Petazzoni
    55  Gustavo Zacarias
    37  Martin Banky
    26  Yann E. MORIN
    15  Lionel Landwerlin
    13  Mike Frysinger
    10  Paulius Zaleckas
     8  Maxime Petazzoni
     4  Konrad Eisele
     3  Chih-Min Chao
     2  Yegor Yefremov
     1  Andy Gibbs
     1  Felipe Contreras
     1  Frederik Pasch
     1  Heiko Zuerker
     1  Javier Viguera
     1  Luca Ceresoli
     1  Marcelo Roberto Jimenez
     1  Marcus Osdoba
     1  Matt Johnson
     1  Paul Burton
     1  Paul Jones
     1  Stanislav Bogatyrev
     1  Thomas Rudin
     1  Will Newton

The things I worked on are: cleanup of the kconfig patches and switch to the 2.6.36 one, removal of old-style hooks and many other small package cleanups, Gtk+ upgrade and documentation improvements. I’m also very happy to see that the number of contributors is increasing, as is the number of questions asked on the list, on IRC and on the bug tracker.

Buildroot developer day

A Buildroot Developer Day, meeting of some of the Buildroot developers, took place on October, 29th in Cambridge, UK, just after the Embedded Linux Conference Europe. Peter Korsgaard (Buildroot maintainer), Lionel Landwerlin (contributor), Yann E. Morin (contributor, Crosstool-NG developer), Nicolas Ferre (Atmel), Patrice Vilchez (Atmel) and Thomas Petazzoni (Bootlin) attended the meeting.

There has been discussions about cleaning up board support, libtool issues, Crosstool-NG integration, toolchain cleanup, top-level parallel make and package management. A report has been posted to the Buildroot mailing list.

The next Buildroot Developer Day will take place on Monday, 7th February, just after FOSDEM, in Brussels.

Roadmap for 2011.02

Here are some of the things that are in the pipeline, for 2011.02 if everything goes well.

  • Conversion of more (all remaining?) packages to the gentargets and autotargets infrastructures.
  • Cleanup of board support in Buildroot. We will now use minimal defconfigs for both Buildroot itself and for kernel configuration. The messy target/device/ directory will be cleaned-up. And we will add support for some emulated boards based on Qemu (x86, ARM, MIPS, PowerPC, SH4). This work is already done, so it’s very likely to be in 2011.02
  • Better support of devtmpfs, mdev and udev. An option will allow the user to select between static device creation and those three techniques for having a dynamic /dev. This is also ready.
  • Improvements in the external toolchain configuration and setup. Buildroot will be able to automatically download some well-known external toolchains, making them easier to use.
  • The Buildroot internal toolchain build process will be reworked, with conversion of most of the code to the package infrastructures, and the toolchain binaries and sysroot move to $(HOST_DIR). This will make it much, much easier to use the toolchain produced by Buildroot outside of Buildroot, and will allow us to generate a SDK to be shared with application developers, without requiring them to run Buildroot. See the report from the Buildroot Developers Day for details. This work has already been started by Gustavo Zacarias, and at least part of it will be in 2011.02.
  • Package management will be improved. Buildroot will know which package installed what in the different directories, and will therefore be able to cleanly remove a package from the system if it has been disabled in the configuration, without requiring a completely clean rebuild. Later on, this work could be used to generate .ipk packages, but for the moment, the focus is on being able to remove libraries and applications from the system when they are unselected from the configuration. This work has already been started by Lionel Landwerlin, and we will do our best to merge it into 2011.02.
  • Support for non-MMU architectures, and particularly Blackfin. Mike Frysinger has already posted patches to add Blackfin and support non-MMU for several packages. This is really a good news, as Buildroot is a good fit for non-MMU systems.
  • Public access to regression tests results

Toolchain cleanup work and board cleanup work are really interesting pieces, because they are the two remaining parts of Buildroot that haven’t been cleaned up and/or rewritten since the Buildroot project came back to life late 2008/early 2009. There are of course still some areas that need improvements of course, but for me, those two pieces are really closing the large cleanup work that has been started almost two years ago.

Of course, don’t hesitate to contact the Buildroot mailing-list, the IRC channel or the bug tracker if you have any questions or issues in using Buildroot.

Buildroot 2010.08 released!

Buildroot logoOn the last day of August, just in time, the 2010.08 version of Buildroot has been released. For the record, Buildroot is an easy-to-use embedded Linux build system: it can build your toolchain, your root filesystem with all its components (Busybox, libraries, applications, etc.), your kernel and your bootloaders, or any combination of these components.

Amongst the interesting changes in this version :

  • Complete rewrite of the bootloader build code. It contained a lot of legacy, unused and unclear stuff, it is now much easier to use and extend. We’ve removed support for Yaboot and added support for the new Barebox bootloader, and all the code to support AT91Bootstrap, AT91DataFlashBoot, U-Boot, Grub and Grub 2 has been rewritten.
  • Complete rewrite of the Linux kernel build code. It was also complicated to use, with an horribly complicated kernel version selection mechanism, the new code is much easier to configure and use.
  • The configuration file .config is now located in the out-of-tree directory when the O= option is used. So typically, for an out-of-tree build (which are very convenient when using the same Buildroot source tree for different projects/tests), you could do : mkdir ~/myoutput ; make O=~/myoutput menuconfig ; make O=~/myoutput
  • Support for building NPTL toolchains with uClibc, using the latest uClibc snapshots.
  • Support for the gconfig Gtk-based configurator, in addition to the already available menuconfig and xconfig
  • A particular effort has been put on fixing many of the bugs in our Bugzilla, improving robustness thanks to automated random builds, and converting even more packages to the generic and autotools infrastructure
  • Various things have also been deprecated: support for the CRIS, IA64, Sparc64 and Alpha architectures, support for Gtk over DirectFB (which is at the moment not supported upstream), Java support (no maintainer has volunteered to maintain this in Buildroot)
  • Many components have been bumped to newer versions
  • The shared configuration cache, which allowed to speed up the configuration of different packages, has been disabled by default, since it was causing a lot of problems with certain package configurations

I’ve again contributed to a significant portion of this release, being the author of the bootloader build code cleanup, the Linux kernel build code rewrite, leading an effort to reduce the number of outstanding bugs in our Bugzilla and many other little things. The contributors for this release are shown below :

   175  Peter Korsgaard
   168  Thomas Petazzoni
    38  Gustavo Zacarias
    18  cmchao
     8  Luca Ceresoli
     7  Paul Jones
     6  Lionel Landwerlin
     6  Malte Starostik
     5  Yann E. MORIN
     3  Julien Boibessot
     3  Khem Raj
     2  Dmytro Milinevskyy
     2  Francois Perrad
     2  Nick Leverton
     2  Peter Huewe
     2  Stanislav Bogatyrev
     1  Baruch Siach
     1  Bjørn Forsman
     1  Daniel Hobi
     1  Darcy Watkins
     1  Darius Augulis
     1  H Hartley Sweeten
     1  Karl Krach
     1  Kelvin Cheung
     1  Ossy
     1  Sagaert Johan
     1  Simon Pasch
     1  Slava Zanko
     1  Thiago A. Correa
     1  Will Wagner
     1  Yegor Yefremov

For the next release, there are already a few things in the pipeline :

  • Cleanup of all the board support code in Buildroot, in order to cleanly add support for more boards like BeagleBoard, Qemu boards, Calao boards, etc. We’ll use the new minimal defconfig mechanism used by the kernel. I’ve already started working on this
  • Cleanup of the package download process, to support Git and SVN download. The code has already been written by Maxime Petazzoni, reviewed on the list, so I expect it to be included fairly soon
  • Rewrite of libtool handling code, to remove some of our ugly libtool hacks. The code is currently being worked on by Lionel Landwerlin
  • Support for compiling toolchain using Crosstool-NG as a backend. The code is currently being finalized by Yann E. Morin, the author of Crosstool-NG
  • Further work on package uninstallation, clean partial rebuild. Some work has been started by Lionel Landwerlin, but it needs some discussion
  • Continue the conversion of packages to the generic and autotools infrastructures
  • I have also a ton of other things on my TODO-list : rework gdb/gdbserver support with external toolchains, rework the configuration of IPv6/RPC/locale/etc. with external toolchains, set up a Wiki-based Buildroot website with tutorials and better documentation, clean up the toolchain build process, reduce the number of “enhancement” bugs waiting in our Bugzilla, etc.

As Peter Korsgaard, Buildroot maintainer, said in the 2010.08 announcement: The next release is going to be 2010.11. Expect the first release candidate in late October and the final release at the end of November..

It is worth noting that we will be having a Buildroot Developer Day, on Friday 29th October, right after Embedded Linux Conference Europe. At least Peter Korsgaard, Lionel Landwerlin, Yann E. Morin and myself should be there.

Buildroot 2010.02 released, contributions from Bootlin!

Buildroot logoBuildroot is a embedded Linux system build system. It automates the process of downloading, configuring, compiling and installating all the components of an embedded Linux system, from Busybox to more complicated software stacks using Gtk, Qt, X.org, Gstreamer, etc. Buildroot is easy to use and extend, making it a nice choice for small to medium-sized embedded Linux systems.

As promised by the fixed-release schedule, a 2010.02 release has been published on Friday, with numerous improvements over the previous version 2009.11, many of which are part of the general cleanup process that the project is doing since the beginning of 2009. These improvements are detailed in the project CHANGES file.

Thomas Petazzoni, from Bootlin, implemented several of these improvements :

  • Creation of a package infrastructure for non-autotools packages. Buildroot had for a long time an infrastructure to factorize the code needed to build packages based on the autotools build systems. But all other packages were using hand-made Makefiles, which were hard to write and generated a lot of code duplication. Therefore, we have introduced an infrastructure that makes adding new packages much easier, and which allows us to cleanup the existing codebase significantly by factorizing a lot of common code. The autotools infrastructure has also been reworked on top of the generic infrastructure to avoid code duplication as well. At the same time, we have significantly improved the documentation on how to add new packages. This infrastructure is a building block that will allow us to easily add more features to all packages in Buildroot (such as package generation).
  • Removal of the external toolchain source mechanism, which was merged with the normal toolchain building procedure. This special casing was implemented to allow the compilation of AVR32 toolchains, but such an additional complexity wasn’t needed. Now, Buildroot continues to build AVR32 toolchains as it used to do, but the code is much cleaner. Another illustration of our large cleanup effort.
  • Many, many, many fixes to different packages, many of them to ensure that we do not depend on development packages being installed on the host. This is very important to ensure that our build procedure is as independent as possible from the development machine configuration.

From the list of contributors, ordered by the number of patches, Thomas Petazzoni of Bootlin has been the first Buildroot contributor for this last release :

$ git shortlog -e -n -s 2009.11..2010.02  (removed e-mail addresses)
139 Thomas Petazzoni
124 Peter Korsgaard
26  Lionel Landwerlin
23  Gustavo Zacarias
7   Julien Boibessot
4   Nigel Kukard
4   Sven Neumann
2   Anders Darander
2   Chris Packham
2   Daniel Mack
2   H Hartley Sweeten
2   Richard van Paasen
2   Will Wagner
2   William Wagner
2   Yann E. MORIN
1   Cameron Hutchison
1   Clark Rawlins
1   Francisco Gonzalez
1   Francisco Gonzalez Morell
1   Hans-Christian Egtvedt
1   Lionel Landwerlin
1   Ormund Williams
1   Rob Alley
1   Sagaert Johan
1   grante

For the next release, we will work on additional cleanup of Buildroot and particularly the target/ directory, which contains the code to build the Linux kernel, different bootloaders, and to generate the final root filesystem image in various formats. Improving support for external toolchains is also on our TODO list : supporting multilib toolchains such as the CodeSoucery toolchain, and fixing a long-standing issue with libtool.

Don’t hesitate to try Buildroot, and to report your successes and failures on the mailing-list, in our bug tracker, or on our IRC channel, #uclibc on Freenode.