Buildroot is a tool that I’ve already covered in a previous blog post. To me, its main purpose is to build the root filesystem for an embedded Linux system, with all the necessary applications and libraries. It automates the tedious process of cross-compiling and integrating all the free software components in an embedded system.
In addition to root filesystem generation, Buildroot is also known for its ability to generate a uClibc-based cross-compilation toolchain. Buildroot used to be for quite some time the only way to generate a toolchain based on this size-effective C library, but it is no longer the case with Crosstool-NG supporting glibc, uClibc and eglibc.
However, I’ve personaly never been really satisfied with uClibc generation of cross-compiling toolchains:
- It mixes the process of the cross-compilingn toolchain generation with the process of root filesystem generation, which are, in my opinion, two very different processes. Once your toolchain is generated, you generally don’t touch it, but regenerate your root filesystem dozens or hundred of times until all your components are here and properly integrated.
- The attention paid to toolchain generation in the Buildroot project itself is relatively small, while other projects like Crosstool-NG or vendors like Codesourcery, are specifically dedicated to providing toolchains. The fact that, for example, uClibc is the only C library supported is one example of this.
- It might necessary, for various reasons, make sense to use an already existing toolchain.
Support for the usage of external toolchains has already been present in Buildroot for a long time, but wasn’t developed enough to be easily usable. Months ago, I’ve started to improve the situation (here, here, here and here), and last week, two other patches have been integrated.
- The first patch, visible here removes the ugly configuration option that allows to configure the set of libraries that must be copied to the target filesystem, and replaces it with a nice selection of the C libary type: uClibc or glibc. It makes it clear that generating Linux system with the glibc library is possible with Buildroot, even if Buildroot has often been advertised as a uClibc only tool.
- The second patch, visible here adds checks for the conformity of Buildroot configuration versus the C library configuration. There are configuration options in Buildroot that must tell whether the C library supports IPv6, supports RPC, supports locale, supports large file, etc. These options must be set in the configuration interface according to the C library configuration, because some userspace packages depend on them. The added checks verify that the value set to these options match the configuration of your C library
So, now, external toolchains are a little bit easier to use with Buildroot, and your own vendor toolchain, Codesourcery toolchains or any other toolchain can be used with Buildroot. The only requirement is that the toolchain supports the sysroot feature, which is very common in most toolchains.
The Buildroot project has been around for a quite a while. For those just discovering Buildroot, it is a set of Makefiles that ease and automate the process of building a cross-compilation toolchain (based on the uClibc C library, since Buildroot has been initiated by uClibc developers) and a full embedded Linux system. Buildroot can compile over 600 packages : graphical libraries (Qt Embedded, Gtk, X.org, DirectFB), network servers (the Dropbear SSH server, several HTTP servers), and more), core components such as Busybox, DBUS, Avahi and many other free software packages that make sense on embedded systems. Of course, more packages can easily be added. Buildroot is very similar to PTXdist.
I remember using to this project and contributing to it back in 2004 when I still was an intern during my studies. One of my contributions was the writing of documentation for the project, which is still the official documentation. Since 2004, the project has evolved, but there was no clear maintainer and no stable releases. The developer community around Buildroot was not completely satisfied since no one was merging the proposed fixes and improvements, since there was no official maintainer. And Buildroot was difficult to use for users because it didn’t offer any kind of stable releas : users had to pick a random SVN checkout and cross fingers to get a reasonably-working version.
In January 2009, as part of the traditionnal new year’s resolution, Peter Korsgaard, one of the most active Buildroot developers, volunteered to step up as the official maintainer and to deliver releases. And indeed, he integrated many patches that were floating around, released several release candidates before releasing Buildroot 2009.02 on February, 12th. Since then he continues to make very interesting improvements to Buildroot, replies on the mailing list, review and merge the proposed patches. A new bug tracker has been set up, and the source code will soon be moved over the Git distributed version control system.
Definitely, it’s a new life starting for the Buildroot project. As a long-time user and occasional contributor of the project, I’m glad to see such evolution.
Here are the contributions that we made to the user and developer community in 2008, thanks to the customers who ordered our engineering and training services.
As you can see, we do our best to have all our contributions merged into mainline sources. So, if you need a new feature in the Linux kernel (supporting your new boards, for example), in development tools and libraries (Buildroot, QEMU…), and want to enjoy this feature in all future updates and releases, don’t hesitate to ask us. We will be glad to work with the community and find a long lasting solution.
- [x86] use ELF section to list CPU vendor specific code (commit)
- [MTD] fix minor typo in the MTD map driver for SHARP SL series (commit)
- [x86] configurable DMI scanning code (commit)
- [mm] directly use kmalloc() and kfree() in init/initramfs.c (commit)
- [x86] consolidate the definition of the force_mwait variable (commit)
- inflate: refactor inflate malloc code (commit)
- fs/buffer.c: uninline __remove_assoc_queue() (commit)
- [x86] make movsl_mask definition non-CPU specific (commit).
- [x86] move cmpxchg fallbacks to a generic place (commit)
- [x86] configuration options to compile out x86 CPU support code (commit)
- Configure out file locking features (commit)
- Fix comment in include/linux/mmc/host.h (commit)
- Configure out AIO support (commit)
- [PCI] allow quirks to be compiled out (commit)
- [x86] remove PC speaker code (commit)
- [Doc] improvement to Documentation/SubmittingPatches (commit)
- Work on multicast and ethtool configurability. Not merged yet.
- 65 e-mails sent to the kernel newbies mailing list to help new kernel developers.
Thomas Petazzoni became official committer in November 2008. In addition to contributions, patch review and integration of patches into the official Buildroot repository, and discussions on the mailing list.
- Thumb support, not integrated yet (post)
- Fixed URL for fakeroot sources, integrated (post)
- Bumped libpng version, integrated (post)
- Added the DirectFB examples package, integrated (post)
- Bumped up libgtk2 version, integrated (post)
- Work on external toolchain support, integrated. Several iterations, patches and discussions.
- External toolchain support improvements, integrated (post)
- More external toolchain fixes, integrated (post)
- External toolchain C++ cross-compiler fix, integrated (post)
- Kernel build fix related to external toolchain use, integrated (post)
- Fixed external toolchain build, integrated, and replaced later with an improved version (post)
- Fix Qtopia build issues, integrated and then replaced by an improved version (post)
- Another external toolchain support solution, integrated (post)
- Fixed TARGET_PATH for external toolchain builds, integrated (post)
- Fixed strange problems in pango configure target, integrated (post)
- Strip libgtk2 in the target, integrated (post)
- Strip pango libraries on the target, integrated (post)
- Strip gettext libraries on the target, integrated (post)
- Fix matchbox build, integrated (post)
- Create zlib installation directory in the staging dir, integrated (post)
- Bump up lite version, integrated (post)
- Added a parallel compilation fix for fontconfig, integrated (post)
- Documentation fixes (post, post)
- Increased write buffer size in pflash emulation, integrated (post)
- Reset wcycle after erase confirm, integrated (post)
- Improved pflash cfi01 debug messages, integrated (post)
- Added missing parenthesis in qemu_ram_alloc(), integrated (post)
- Add Flash support to the Versatile PB platform (post)
- Linux Tiny – Penguin Weight Watchers, Embedded Linux Conference 2008, United States
- Publication of an extensive report of the Embedded Linux Conference.
- Building a multimedia embedded Linux system from scratch, Linux Symposium, Canada
- Developing the Linux kernel: who? when? how? what?, Libre Software Meeting 2008, France
- News and trends in Linux 2.6, Libre Software Meeting 2008, France
- Choosing Free Software Graphical Libraries for Embedded Devices, ELC Europe 2008, The Nederlands
- Update on filesystems for flash storage, ELC Europe 2008, The Netherlands
- World domination for dummies (in French) and Filesystems for flash storage, JM2L event, France.
- Publication of videos from many technical conferences (Free and Open Source Developer European Meeting, Embedded Linux Conference, Libre Software Meeting, Ottawa Linux Symposium, Embedded Linux Conference Europe)
New training materials
All our training materials can now be found on our docs page. Some of them are not new, but have undergone substantial updates.
See our recent post for details.
We support organizations promoting Free Software:
You may also count our subscriptions to the most useful LWN.net resource.