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.

mkenvimage: a tool to generate a U-Boot environment binary image

Many embedded devices these days use the U-Boot bootloader. This bootloader stores its configuration into an area of the flash called the environment that can be manipulated from within U-Boot using the printenv, setenv and saveenv commands, or from Linux using the fw_printenv and fw_setenv userspace utilities provided with the U-Boot source code.

This environment is typically stored in a specific flash location, defined in the board configuration header in U-Boot. The environment is basically stored as a sequence of null-terminated strings, with a little header containing a checksum at the beginning.

While this environment can easily be manipulated from U-Boot or from Linux using the above mentioned commands, it is sometimes desirable to be able to generate a binary image of an environment that can be directly flashed next to the bootloader, kernel and root filesystem into the device’s flash memory. For example, on AT91 devices, the SAM-BA utility provided by Atmel is capable of completely reflashing an AT91 based system connected through the serial port of the USB device port. Or, in factory, initial flashing of devices typically takes place either through specific CPU monitors, or through a JTAG interface. For all of these cases, having a binary environment image is desirable.

David Wagner, who has been an intern with us at Bootlin from April to September 2011, has written a utility called mkenvimage which just does this: generate a valid binary environment image from a text file describing the key=value pairs of the environment. This utility has been merged into the U-Boot Git repository (see the commit) and will therefore be part of the next U-Boot release.

With mkenvimage you can write a text file uboot-env.txt describing the environment, like:

bootargs=console=ttyS0,115200
bootcmd=tftp 22000000 uImage; bootm
[...]

Then use mkenvimage as follows:

./tools/mkenvimage -s 0x4200 -o uboot-env.bin uboot-env.txt

The -s option allows to specify the size of the image to create. It must match the size of the flash area reserved for the U-Boot environment. Another option worth having in mind is -r, which must be used when there are two copies of the environment stored in the flash thanks to the CONFIG_ENV_ADDR_REDUND and CONFIG_ENV_SIZE_REDUND. Unfortunately, U-Boot has chosen to have a different environment layout in those two cases, so you must tell mkenvimage whether you’re using a redundant environment or a single environment.

This utility has proven to be really useful, as it allows to automatically reflash a device with an environment know to work. It also allows to very easily generate a different environment image per-device, for example to contain the device MAC address and/or the device serial number.

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.

Embedded Linux Conference Europe 2011 videos

One week after the end of the Embedded Linux Conference Europe 2011, we are pleased to release the videos of all talks that took place during this event. We would like to thank the Linux Foundation for allowing us to record those talks and to share freely the resulting videos on-line, and also thank the Clarion Congress Hotel technical staff for helping us with technical details related to video recording.

Below, you’ll find 51 videos, in both a 1920×1080 HD format and a reduced 800×450 format. In total, it represents 28 GB of video, for a duration of 2214 minutes, that is more of 36 hours of video. We hope that you will enjoy those videos and that these will be useful to those who couldn’t attend the conference.

Jim ZemlinVideo capture
Executive Director of The Linux Foundation
Imagine a World Without Linux
Video (24 minutes):
full HD (220M), 450×800 (76M)

Linus Torvalds, Alan Cox, Thomas Gleixner, Paul McKenneyVideo capture
moderated by Lennart Poettering
Kernel Developer Panel
Video (55 minutes):
full HD (622M), 450×800 (191M)

Zach PfefferVideo capture
Linaro
Linaro’s Android Platform
Video (45 minutes):
full HD (604M), 450×800 (164M)

Thomas GleixnerVideo capture
Linutronix
State of PREEMPT_RT
Video (46 minutes):
full HD (374M), 450×800 (147M)

Jessica ZhangVideo capture
Intel
The Yocto Project Eclipse plug-in: An effective IDE environment for both Embedded Application and System developers
Video (45 minutes):
full HD (431M), 450×800 (118M)

Satoru UedaVideo capture
Sony Corporation / Japan OSS Promotion Forum
Contributing to the Community? Does your Manager Support You?
Video (42 minutes):
full HD (556M), 450×800 (140M)

Benjamin ZoresVideo capture
Alcatel-Lucent
Embedded Linux Optimization Techniques: How Not To Be Slow
Slides
Video (44 minutes):
full HD (328M), 450×800 (125M)

Ohad Ben-CohenVideo capture
Texas Instruments
Remote Processor Messaging
Slides
Video (48 minutes):
full HD (433M), 450×800 (131M)

Jeff Osier-MixonVideo capture
Intel
Collaborative Initiatives in Embedded Linux
Video (26 minutes):
full HD (266M), 450×800 (73M)

Karim YaghmourVideo capture
Opersys Inc.
Leveraging Android’s Linux Heritage
Video (51 minutes):
full HD (419M), 450×800 (168M)

Pierre TardyVideo capture
Intel
Using pytimechart For Real World Analysis
Slides
Video (51 minutes):
full HD (495M), 450×800 (132M)

Arnd BergmannVideo capture
Linaro
Optimizations for Cheap Flash Media
Video (44 minutes):
full HD (524M), 450×800 (146M)

Vitaly WoolVideo capture
Sony Ericsson
Saving Power with Wi-Fi: How to Prolong Your Battery Life and Still Stay Connected
Slides
Video (50 minutes):
full HD (371M), 450×800 (143M)

David StewartVideo capture
Intel
Developing Embedded Linux Devices Using the Yocto Project and What’s new in 1.1
Slides
Video (47 minutes):
full HD (370M), 450×800 (124M)

Tetsuyuki KobayashiVideo capture
Kyoto Micro Computer
Android is NOT Just “Java on Linux”
Slides
Video (37 minutes):
full HD (542M), 450×800 (129M)

Thomas PetazzoniVideo capture
Bootlin
Using Buildroot For a Real Project
Slides
Video (55 minutes):
full HD (408M), 450×800 (156M)

Tim BirdVideo capture
Sony Network Entertainment
Status of Embedded Linux BoFs
Slides
Video (60 minutes):
full HD (877M), 450×800 (213M)

Lauro Ramos Venancio and Samuel OrtizVideo capture
Instituto Nokia de Tecnologia, Intel
The Linux NFC Subsystem
Slides
Video (31 minutes):
full HD (229M), 450×800 (87M)

David AndersVideo capture
Texas Instruments
Board Bringup: LCD and Display Interfaces
Slides
Video (39 minutes):
full HD (242M), 450×800 (98M)

Antti AumoVideo capture
President of Global Solutions at Ixonos
Re-Defining the Cloud Phone
Video (32 minutes):
full HD (360M), 450×800 (108M)

Dirk HohndelVideo capture
Chief Linux and Open Source Technologist at Intel
Reflection on 20 Years of Linux
Video (30 minutes):
full HD (235M), 450×800 (92M)

Grant LikelyVideo capture
Secret Lab
Device Tree Status Report
Video (51 minutes):
full HD (775M), 450×800 (178M)

Laurent PinchartVideo capture
Ideas on Board
Success Story of the Open-Source Camera Stack: The Nokia N9 Case
Slides
Video (48 minutes):
full HD (308M), 450×800 (120M)

Avinash Mahadeva and Vishwanth SripathyVideo capture
Texas Instuments
SOC Power Management – Debugging and Optimization Techniques
Video (41 minutes):
full HD (288M), 450×800 (108M)

Rafael J. WysockiVideo capture
Faculty of Physics, U. Warsaw / SUSE Labs
Power Management Using PM Domains on SH7372
Slides
Video (46 minutes):
full HD (692M), 450×800 (157M)

Sascha HauerVideo capture
Pengutronix e.K.
A Generic Clock Framework in the Kernel: Why We Need It and Why We Still Don’t Have It
Video (45 minutes):
full HD (345M), 450×800 (134M)

Ruud DerwigVideo capture
Synopsys
Android Platform Optimizations
Slides
Video (43 minutes):
full HD (266M), 450×800 (105M)

Inki DaeVideo capture
Samsung Electronics
DRM Driver Development For Embedded Systems
Slides
Video (22 minutes):
full HD (367M), 450×800 (91M)

Lorenzo PieralisiVideo capture
ARM Ltd.
Consolidating Linux Power Management on ARM Multiprocessor Systems
Slides
Video (46 minutes):
full HD (283M), 450×800 (113M)

Thomas PetazzoniVideo capture
Bootlin
Using Qt For Non-Graphical Applications
Slides
Video (49 minutes):
full HD (340M), 450×800 (124M)

Marek Szyprowski and Kyungmin ParkVideo capture
Samsung Electronics
ARM DMA-Mapping Framework Redesign and IOMMU Integration
Slides
Video (49 minutes):
full HD (790M), 450×800 (195M)

Keerthyd Jagadeesh and Vishwanath SripathyVideo capture
Texas Instruments
Thermal Framework for ARM based SOCs
Video (42 minutes):
full HD (316M), 450×800 (113M)

Marc TitingerVideo capture
ST Microelectronics
Efficient JTAG-Based Linux Kernel Debugging
Slides
Video (57 minutes):
full HD (382M), 450×800 (141M)

Tsugikazu ShibataVideo capture
NEC and Linux Foundation Board Member
Toward the Long Term Stable Kernel tree for The Embedded Industry
Video (32 minutes):
full HD (606M), 450×800 (145M)

Lisko LappalainenVideo capture
MontaVista Software
Secure Virtualization in Automotive
Video (40 minutes):
full HD (301M), 450×800 (116M)

Jeff Osier-MixonVideo capture
Intel
Yocto Project Community BoFs
Video (60 minutes):
full HD (451M), 450×800 (167M)

Jon CorbetVideo capture
Editor at LWN.net
The Kernel Report: 20th Anniversary Edition
Video (28 minutes):
full HD (218M), 450×800 (88M)

Wim CoekaertsVideo capture
Senior Vice President, Linux and Virtualization Engineering at Oracle
Engineered Systems With Linux
Video (21 minutes):
full HD (175M), 450×800 (68M)

Andrea GalloVideo capture
ST-Ericsson
ARM Linux Kernel Alignment and Benefits For Snowball
Slides
Video (47 minutes):
full HD (394M), 450×800 (133M)

Liam Girdwood and Peter UjfalusiVideo capture
Texas Instruments
Smart Audio: Next-Generation ASoC For Smart Phones
Video (50 minutes):
full HD (367M), 450×800 (124M)

Pawel MollVideo capture
ARM Ltd.
Linux on Non-Existing SoCs
Video (52 minutes):
full HD (483M), 450×800 (143M)

Koen KooiVideo capture
The Angstrom Distribution
Integrating systemd: Booting Userspace in Less Than 1 Second
Slides
Video (44 minutes):
full HD (343M), 450×800 (125M)

Sylvain Leroy and Philippe ThierryVideo capture
Grsecurity in Embedded Linux Used in Android Operating System
Slides
Video (40 minutes):
full HD (384M), 450×800 (110M)

MyungJoo HamVideo capture
Samsung Electronics
Charger Manager: Aggregating Chargers, Fuel-Gauges and Batteries
Slides
Video (33 minutes):
full HD (434M), 450×800 (109M)

Arnd BergmannVideo capture
Linaro
News From the ARM Architecture
Video (49 minutes):
full HD (421M), 450×800 (150M)

Frank RowandVideo capture
Sony Network Entertainment
How Linux PREEMPT_RT Works
Slides
Video (45 minutes):
full HD (378M), 450×800 (135M)

Catalin MarinasVideo capture
ARM Ltd.
Linux Support for the ARM Large Physical Address Extensions
Slides
Video (52 minutes):
full HD (594M), 450×800 (170M)

Jim HuangVideo capture
0xlab
Build Community Android Distribution and Ensure the Quality
Video (44 minutes):
full HD (472M), 450×800 (143M)

Till JaegerVideo capture
JBB Rechtsanwälte
The Case AVM v. Cybits: The GPL and Embedded Systems
Video (42 minutes):
full HD (362M), 450×800 (124M)

Darren HartVideo capture
Intel
Tuning Linux For Embedded Systems: When Less is More
Slides
Video (45 minutes):
full HD (482M), 450×800 (135M)

Wolfram SangVideo capture
Pengutronix e.K.
Developer’s Diary: It’s About Time
Video (49 minutes):
full HD (482M), 450×800 (141M)

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.

Bootlin at Embedded Linux Conference Europe 2011

The next Embedded Linux Conference Europe will take place from October 26th to October 28th in Prague, together with the first edition of LinuxCon Europe and just after the Kernel Summit, the GStreamer conference and the Real-time Linux workshop: it’s a really impressive concentration of interesting talks for embedded Linux developers. Linus Torvalds is already announced as a keynote speaker of the LinuxCon Europe.

ELCE 2011

As ELCE is a conference that embedded Linux developers simply can’t miss, the complete team of Bootlin will be there: my colleague and Bootlin founder Michael Opdenacker (Michael is part of the organization committee for this event), my engineer colleagues Grégory Clément and Maxime Ripard and myself, Thomas Petazzoni.

I will also have the chance to give two talks during this edition of ELCE:

  • Using Buildroot for real products. As Bootlin has used and is using Buildroot for multiple customer projects, this talk will share our experience on how to configure and setup Buildroot properly to build embedded Linux systems and include in a clean and nice way all of the specificities of each product.
  • Using Qt for non-graphical applications. Qt is often seen only as a graphical library, but it is in fact much more than that. Based on the experience of a customer project, this presentation will detail all the nice features that Qt offers to build embedded applications.

We highly recommend this conference to European embedded Linux developers and hope to meet some of our readers there! We will be the guys behind the video cameras in the embedded rooms. It’s worth mentioning that ELCE attendees are also granted, for free, the right to access LinuxCon Europe talks.

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.

uClibc 0.9.32 released, with NPTL support

A little bit more than one year after 0.9.31, the uClibc project has recently released a new version of the famous C library, uClibc 0.9.32. For the record, uClibc is an alternative standard C library for embedded Linux systems, which features a smaller size than the usual glibc or eglibc, a high-level of configurability and support for non-MMU architectures. uClibc usage is mandatory on non-MMU architectures running a Linux kernel since the traditional glibc or eglibc do not support non-MMU architectures. On architectures with MMU, uClibc may also be interesting for its reduced size, and has been used in a large number of systems over the last years.

The 0.9.32 release brings one major new feature : the support of the Native Posix Threads Library for the most common architectures (ARM, MIPS, PowerPC, x86, x86_64, SuperH and SuperH 64). NPTL is a different way of implementing the pthread userspace API than the one previously used in Linux, called LinuxThreads. The kernel mechanisms needed to implement NPTL have been added in 2.6 and support in glibc has been added a long time ago. uClibc was lagging behind in this area, and the new release fills this gap. This feature does not bring any visible API change, but completely changes the internal implementation of the threading mechanism, with better performance and a behavior that is more similar to the one we have on glibc based hosts. For more details about the differences about NPTL and LinuxThreads, one can check Ulrich Drepper and Ingo Molnar’s paper on this topic: NPTL Design paper.

Another new feature of the 0.9.32 release is support for the C6x architecture, which is a DSP architecture from Texas Instruments, capable of running a Linux kernel (see http://linux-c6x.org). Having upstream support in uClibc allows this architecture to benefit from a nice standard C library.

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.

Embedded Linux training: switch to the IGEPv2 board

Since early 2009, our training sessions have been using the USB-A9263 board from Calao Systems as the hardware platform for the practical labs. However, this AT91-based platform was getting older, and we therefore started the process of switching our training sessions to a new hardware platform, the IGEPv2 board from ISEE.

IGEPv2 board
IGEPv2 board

The IGEPv2 platform is very similar to the popular BeagleBoard and BeagleBoard-XM platforms, and has the following technical characteristics :

  • TI DM3730, which is the latest OMAP3 processor from Texas Instruments, clocked at 1 Ghz, and including a DSP for signal processing, an IVA block for audio/video decoding and the PowerVR SGX for 3D/OpenGL. This processor offers far more possibilities than the AT91 one, especially for multimedia applications.
  • 512 MB of RAM and 512 MB of OneNAND flash.
  • Integrated Ethernet connector, Wifi and Bluetooth connectivity.
  • One USB OTG port and one USB host port.
  • A microSD connector.
  • A DVI-D connector (HDMI), stereo input and ouput
  • RS232 connector
  • Multiple expansion ports to access LCD, camera, I2C, SPI, JTAG, etc. signals

Compared to the BeagleBoard-XM, this board has the following advantages:

  • it has a OneNAND Flash device, which allows us to demonstrate and practice the usage of MTD and Linux flash-specific filesystems such as JFFS2 and UBIFS in our training sessions. Even though block-based storage such as SD and eMMC is more and more popular in consumer-electronic devices, usage of raw NAND flash is still very common in industrial applications, and we therefore wanted to keep presenting those devices and their usage in embedded Linux
  • ISEE, the company manufacturing the IGEPv2, is located in Spain, which makes it easier for us to regularly order boards from them, since we are also located in Europe
  • the board provides Bluetooth and Wifi connectivity, which is nice

We have already given two sessions of our Embedded Linux system development training with the IGEPv2, and all our future sessions of this training will use this hardware platform, so the participants will benefit from a more modern platform, with far more capabilities than our previous AT91-based training hardware. This is also the board we are now giving to the participants to our public training sessions, so those participants come back home with a very nice and powerful platform which allows countless experiments around embedded Linux. Note that we also intend to port our Embedded Linux kernel and driver development training session to the IGEPv2 platform in the near future.