Buildroot gains better support for external toolchains

Buildroot logoBuildroot 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.

Linux kernel 2.6.29 – New features for embedded users

Tuz Linux logoThe 2.6.29 version of the Linux kernel has just been released by Linus Torvalds. Like all kernel releases, this new version offers a number of interesting new features.

For embedded users, the most important new feature is certainly the inclusion of Squashfs, a read-only compressed filesystem. This filesystem is very well-suited to store the immutable parts of an embedded system (applications, libraries, static data, etc.), and replaces the old cramfs filesystem which had some strong limitations (file size, filesystem size and limited compression).

Squashfs is a block filesystem, but since it is read-only, you can also use it on flash partitions, through the mtdblock driver. It’s fine as you just write the filesystem image once. Don’t hesitate to try it to get the best performance out of your flash partitions. Ideally, you should even use it on top of UBI, which would transparently allow the read-only parts of your filesystem to participate to wear-leveling. See sections about filesystems in our embedded Linux training materials for details.

This new release also adds Fastboot support, at least for scsi probes and libata port scan. This is a step forward to reducing boot time, which is often critical in embedded systems.

2.6.29 also allows stripping of generated symbols under CONFIG_KALLSYMS_ALL, saving up to 200 KB for kernels built with this feature. This is nice for embedded systems with very little RAM, which still need this feature during development.

Another new feature of this kernel is the support for the Samsung S3C64XX CPUs. Of course, a lot of new boards and devices are supported, such as the framebuffer of the i.MX 31 CPU, or the SMSC LAN911x and LAN912x Ethernet controllers.

The other major features of this new kernel, not necessarily interesting for embedded systems are the inclusion of the btrfs filesystem, the inclusion of the kernel modesetting code, support for WiMAX, scalability improvements (support of 4096 CPUs!), filesystem freezing capability, filesystem improvements and many new drivers.

For more details on the 2.6.29 improvements, the best resource is certainly the human-readable changelog written by the KernelNewbies.org community.

The Buildroot project begins a new life

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.

FOSDEM 2009 videos

As previously announced, I had the chance to attend the FOSDEM conference again this year. And once again, the famous Bootlin video camera was with me, and I could record a few talks. I’m pleased to make them available today.

FOSDEM, the Free and Open Source Software Developers' European Meeting

Here are the available videos, with my personal comments. Of course, except the talk about CMake, all of them come from the embedded devroom. Thanks to the speakers for sharing their knowledge and presenting their projects !

  • video captureWt, a C++ web toolkit, for rich web interfaces to embedded systems, by Pieter Libin (Noesis Solutions)
    Video (44 minutes, 124M)
    Presentation of a Web application generator, which generates a Web application including a web server from a C++ description. The C++ design is based on many ideas coming from Qt, which eases the creation of the graphical application. Certainly a very interesting tool for embedded systems.
  • Hacking with modular hardware: the BUG, by Ken Gilmer (Bug Labs)
    Video (43 minutes, 129M)
    The BUG is a set of hardware modules that can be combined together. A base module contains the CPU, memory and other basic components, while additional modules can provide GPS, Wifi, webcam, I/O lines and many others. Of course, it comes with a completely free software SDK. Can be an interesting starting point for prototyping or hobbyist embedded hacking, even though the hardware is quite expensive.
  • Building Embedded Linux Systems with PTXdist, by Robert Schwebel (Pengutronix)
    Video (68 minutes, 151M)
    A very good presentation on why system building tools are needed for Embedded Linux systems (cross-compiling issues, etc.), and how PTXdist fits this need. Even though I’m personally quite fan of Buildroot, PTXdist’s competitor, the presentation was very interesting.
  • video captureDevelopment on the OpenMoko with hackable:1, by Pierre Pronchery (Bearstech)
    Video (55 minutes, 189M)
    A hands-on lab on the OpenMoko, which unfortunately was too short to be really interesting, and restricted to only the 10-12 people at the front of the room. Interesting for the people who did it, probably not so interesting to watch afterwards.
  • Development and Certification of Linux-Based Fire Safety & Security Systems, by Baurzhan Ismagulov (Siemens)
    Video (47 minutes, 124M)
    The topic of the talk was really appealing, because the use of free software in environments where human life is in danger has always caused many debates and discussions. Unfortunately, the talk completely misses the point : the speaker spent the whole talk discussing Germany-specific rules and laws for the certification of fire safety and security systems, almost without saying a word on how Linux can match these rules.
  • Maemo on BeagleBoard, by Juha Kallionen (Nokia)
    Video (20 minutes, 51M)
    Good talk, but not a lot of content, outside of « Hey, we run Maemo on BeagleBoard, try it !». A kind of announcement talk, I would say.
  • video captureAdvanced power management for OMAP3, by Peter De Schrijver (Nokia)
    Video (49 minutes, 169M)
    A very interesting, in-depth, technical talk about the power management features of the OMAP3 CPU and how these features can be used by the Linux kernel.
  • Emdebian 1.0 release – small and super small Debian, by Neil Williams (Debian)
    Video (86 minutes, 257M)
    video captureAgain, another interesting talk about the status of Emdebian, which has just reached 1.0. Neil described both Emdebian Crush and Emdebian Grip, that are two different approaches for making Debian more suitable for embedded systems. Very good progress has been made, and Emdebian is certainly something that should now be considered as a distribution for embedded systems.
  • CMake – what can it do for your project, by Alexander Neundorf
    Video (45 minutes, 167M)
    A general introduction to CMake, with lots of examples and demonstrations. Very nice for those who never had the opportunity to look at CMake.

Program for Embedded Linux Conference 2009 announced

CELF penguinThe program for the Embedded Linux Conference 2009 has been announced a few days ago, and the registration is now open. For the record, the Embedded Linux Conference is probably the largest technical conference specifically dedicated to the use of Linux on embedded systems. Organized by the CE Linux Forum every year, this conference gathers a large audience and a wide range of very interesting talks.

The 2009 edition of ELC will take place from April 6th to April 8th, in downtown San Francisco, in the United States.

The program features :

  • Almost 50 talks, tutorials and keynotes. The topics go from multimedia, flash filesystems, system initialization, memory management, instrumentation and debugging tools, real-time, embedded distributions, system building,
  • An opening keynote by Dirk Hohndel from Intel
  • A keynote by David Woodhouse, one of the two embedded Linux maintainers
  • Other famous speakers such as Paul Mundt (maintainer of the Linux port to the SuperH architecture), Kate Alhola (from Maemo/Nokia), Dan Malek (from Embedded Alley), Mike Anderson (the PTR group, famous for his JTAG tutorial), Jake Edge (from LWN), Klaas van Gend (from Montavista), Frank Rowand (from Sony, famous for his real-time adventures talk), Jim Ready, Denis Oliver Kropp (DirectFB main developer)
  • A panel on The Linux Kernel, what’s next with Jonathan Corbet, Greg KH, Andrew Morton, Keith Packard and Ted Ts’o
  • And last but not least, a talk from Michael Opdenacker, Bootlin, on flash filesystems.

Of course, both Michael and I will attend the conference. Hope to meet you there!
Golden Gate Bridge

Call for presentations for the LSM embedded track

The Libre Software Meeting (LSM) is an annual event on free software taking place in july in France since 2000. The LSM meeting is organized this year in Nantes, France from 7th to 11th July. Amongst several tracks, the Libre Software Meeting will feature an « Embedded Systems and Open Hardware » track, for which the call for presentations has been released recently.

The purpose of the “Embedded Systems and Open Hardware” session is to give the state of the art of free software for embedded systems and Open Hardware. Technical topics of this session include but are not limited to:

  • Embedded OS Development kernel architecture, implementation and port for embedded systems
  • Embedded Development Tools: tool chains and project cases (tool chain projects, packaging for cross compilation, portability …)
  • Embedded Linux: µClinux…
  • Real-time extensions for Linux: RTLinux, RTAI…
  • Hard real-time kernels: eCos, RTEMS, ADEOS, Xenomai…
  • Soft Real-time kernels
  • Embedded Java
  • GUI for embedded systems: Gtk, Qt, Nano/X…
  • Linux and System on Chip (SoC)
  • Open Hardware, Open design, free IP modules (Intellectual Property) and softcores: opencores, OpenRISC, NIOS, Microblaze, LEONSparc, FPGA…

The conference will last 30 minutes, questions included. Round tables will be organized. Synthetic presentations are scheduled to last 20 minutes. PDF versions of the presentation are not mandatory but they will be greatly appreciated (with an online web access just after the LSM event, they are a very useful documentation source for the entire community).

If you plan to participate and to propose a presentation, please send a message as soon as possible to the following address: embarque@rmll.info with a summary of your presentation (and if you can, a summary in English too) no later than 15th march 2009. Feel free to forward this Call For Presentation to other places or to everyone you think could be interested.

Agenda of FOSDEM embedded devroom announced

The FOSDEM is now scheduled in less than two weeks in Brussels. The agenda of the developers room dedicated to embedded topics has been published recently. A nice set of interesting talks will take place :

As usual, I’ll be at FOSDEM with Bootlin video camera, so soon after the conference, videos of the talks should be available from our website.

Kernel 2.6.28 is out with a few Bootlin contributions

A few hours before Christmas, Linus Torvalds released the latest stable version of the Linux kernel, 2.6.28. Jake Edge from LWN sums up the major highlights of this new release: « Some of the highlights of this kernel are the addition of the GEM GPU memory manager, the ext4 filesystem is no longer “experimental”, scalability improvements in memory management via the reworked vmap() and pageout scalability patches, moving the -staging drivers into the mainline, and much more ». As usual, the Kernel Newbies website offers an excellent human-readable summary of the changes.

Of particular interest to embedded developers will be the new boot tracer facility, which allows to draw SVG graphs of the kernel initialization procedures execution time, in order to analyze the boot time and possibly reduce it. Of course, a lot of architecture-dependent improvements have also been made (for example OProfile support for ARMv7 CPUs but also new supported boards) and a lot of drivers have been merged or improved, as usual.

Bootlin has contributed a few patches that have been merged and released in 2.6.28. While being a small contribution compared to the 9.000+ patches added to the kernel between 2.6.27 and 2.6.28, they still slightly improve the kernel for embedded users. Part of the Linux-Tiny efforts, these patches allow to reduce the size of the kernel by disabling features that may not be necessary on embedded systems. More specifically, these patches allow :

From the existing Linux Tiny patch ideas, the only one left in the feature removal area are the multicast support removal and ethtool removal. They have already been submitted a few months ago, but got rejected by the network maintainers. I will work on them again to fix the issues and try to re-submit them later.

Finally, Jonathan Corbet has published an analysis of the 2.6.28 developement cycle in terms of contributors and changes. An interesting reading.

Bootlin at FOSDEM 2009

The Free and Open Source Developer European Meeting (FOSDEM) is a major event for open source developers in Europe. This two-days event takes place in Brussels since several years and attracts 2000-3000 people around conferences and development rooms. The program for the main tracks has been recently announced, but the program for the development rooms is not available at this time. However, I’ve been at FOSDEM the last two years and always found interesting talks and discussions.

FOSDEM Banner

Of course, I’ll be particularly interested by the Embedded Devroom, and will record videos of the talks that will be posted on Bootlin website after the conference, as usual.

If you happen to come to FOSDEM, I’ll be happy to meet you!

Choosing graphical libraries for embedded systems

The free software community offers many solutions to embedded system developers willing to add graphical applications to their project. This variety of choice, typical from the free software world, has the advantage of giving several solutions, which increases the chance of finding the solution that bests suits your need, but at the same time, might confuse to choose the right one.

I made experiments with the major graphical libraries available, and reported these experiments during the Embedded Linux Conference Europe event, which took place early November 2008 in Ede, The Nederland. My presentation « Choosing graphical libraries for embedded systems » discussed DirectFB, X.org and its Kdrive variant, SDL, Nano-X, Gtk, Qt, FLTK and WxEmbedded, detailing the features, specifities, size of each solution and suitability to various use cases.

The slides are available under the Creative Commons BY-SA license : graphical-libraries.pdf (PDF), graphical-libraries.odp (Open Document Format).

While experimenting with these graphical libraries, I made a few contributions to the Buildroot project, which was used to build root filesystems including these libraries. I hope to release soon several root filesystems allowing an easy testing of these solutions, through Qemu.