Embedded Building Tools BOF
Total Page:16
File Type:pdf, Size:1020Kb
Embedded Linux Conference - April 2009 Embedded building tools BOF Thomas Petazzoni - Michael Opdenacker Free Electrons http://free-electrons.com/ 1 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com Rights to copy © Copyright 2008-2009, Free Electrons [email protected] Document sources available on: http://free-electrons.com/pub/conferences/2009/elc/ Corrections, suggestions, contributions and translations are welcome! Attribution ± ShareAlike 3.0 Latest update: Apr 29, 2009 You are free to copy, distribute, display, and perform the work to make derivative works to make commercial use of the work Under the following conditions Attribution. You must give the original author credit. Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under a license identical to this one. For any reuse or distribution, you must make clear to others the license terms of this work. Any of these conditions can be waived if you get permission from the copyright holder. Your fair use and other rights are in no way affected by the above. License text: http://creativecommons.org/licenses/by-sa/3.0/legalcode 2 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com Which tools to build your system? OpenEmbedded Vendor tools (Eclipse) Buildroot Gentoo embedded Scratchbox Crosstool (toolchain only) PTXdist Crosstool-ng (toolchain only) LTIB ELDK Home made tools Others? Firmware Linux 3 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com Buildroot Pros Supports uClibc Simple design (kernel config interface, set of Makefiles) Efficient Reproducibility of the build process Cons Doesn©t support glibc, except with external toolchain and a bit of tuning Takes care of building the toolchain (2 in 1) No clean way of separating product-specific changes No packages 4 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com Scratchbox Pros Transparent cross-compilation Transparent execution Supports both uClibc and glibc Cons No infrastructure for build reproducibility Complex to add new host tools (need to compile them) Only uses its own toolchains (can compile your own, but complicated to integrate in Scratchbox) No recipes, no tool patches shared with the community. 5 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com OpenEmbedded Pros Clean separation of the build tool and the recipes Ability to generate a root filesystem and packages Clean separation of product-specific changes Widely used in the community Can generate packages Cons No stable releases Steep learning curve Very slow to run (for what reason ?) Too generic. Huge boot times Packages mandatory 6 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com Firmware Linux By Rob Landley Not using cross-compiling, but only native compiling thanks to Qemu Similar approach than Scratchbox, but less tricks. How mature is it ? 7 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com Home made tools Pros Meets your product needs Cons No free updates to mainstream software changes High maintenance cost. Sometimes difficult to extend. Only one person understands its design. Lot of legacy cruft in it. Don©t always meet future product needs. 8 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com LTIB Pros Clean separation of build system and packages Supports both uClibc and glibc Easy to extend to support new boards Accepts standard toolchains Cons Only used on Freescale boards? Size of community? 9 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com The other ones ? PTXdist Very similar to Buildroot Relies on a separate tool for building the toolchain, but seems limited to glibc Emdebian Vendor tools Great features But difficult to evaluate without a subscription. 10 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com Tools compared License Small glibc (G) Reproducibility Popularity Actively systems uClibc (U) / Leverage maintaine d Buildroot Free Yes G Good Good Yes Scratchbox Free Yes G + U Poor Low Yes OpenEmbedded Free No G + U Good Very good Definitely LTIB Free Yes G + U Good Low Yes PTXdist Free Yes G Good Low Yes Gentoo embedded Free No? G (U?) ? Low? Yes Firmware Linux Free Yes ? Poor Low Rob never sleeps Vendor tools Closed ? G + U Good N/A Yes Home made Closed ? ? ? N/A ? 11 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com Building the toolchain Buildroot Mixed with root filesystem construction, not really nice Only uClibc supported Crosstool Not really nice configuration through shell scripts Only glibc supported Crosstool-ng Much better configuration interface Supports both uClibc and glibc Hasn©t attracted a lot of community attention (yet ?) 12 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com Tool survey Number of users per tool in the BOF 30 25 20 15 OLS 2008 ELC 2009 10 5 0 Scratchbox PTXdist Firmware Linux Vendor tools ELDK Openwrt Buildroot OpenEmbedded LTIB Gentoo embedded Home made uClinux-dist Desktop distro 13 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com Questions Why is the community so fragmented ? Because it is not possible to create a universal tool that would match the needs of everybody ? Is it a problem ? NIH syndrom ? What are the missing features ? What are your complaints about the existing tools ? Complexity ? Lack of flexibility ? Don©t see the need ? 14 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com.