Introduction to Embedded Linux Build Systems

This article tries to brief the purpose of embedded Linux build systems and introduction to few of the popular ones.

To develop a Linux based embedded systems, it is required to compile the bootloader, kernel, filesystem and applications using script files using custom build procedures. An Embedded Linux Build System refers to the the tools and the environment for building the software packages for a particular board/machine.

Why Build Systems

The Linux system is a massive collection of numerous software components. The effort needed to build it is humongous and the nature of the activity is also complex. As a result, manual build procedures can be tedious and error-prone and automation of the build procedure will directly improve the productivity.

The manual procedure involves building the bootloader, kernel and file system. This requires deep knowledge of the configure, make and other build scripts. Again it is not straight forward to build complex software, because of the dependencies of them on several other packages. Downloading and building all these dependencies together would have several incompatibility issues. These issues demand for developing the embedded Linux build systems.

Build Procedure

Build systems are the tools that were developed to ease the embedded Linux build procedure which is listed below

  • Downloading the tested versions of software sources

  • Building the cross tool chains

  • Building the kernel and bootloader

  • Building the libraries and applications required for the target system

  • Building the required file system image as per the targets storage type.

  • Supporting further upgradations of the packages in the rootfs.

Build systems allows the product developers to

  • Customize its features and configurations

  • Choose the list of packages required

There are several build systems available, each has its own ideologies and focus in building the Linux operating system for the target. Below given are the most popular among them.

Buildroot

This is a build system based on make. This is simple as the GNU build system

  • Light weight build system, easy to edit and configure using menu configuration.

  • It is supports building several embedded applications with minimal foot-print.

You can find more details about buildroot in http://www.buildroot.org

Yocto / OpenEmbedded

This build system is based on bitbake instead of make.

  • Supports huge list of packages

  • Supports several target boards and architectures

  • Supports Layered approach to segregate and maintain the build scripts.

  • Became a de-facto build system for embedded Linux. And it is also the base for other Distributions like Peta Linux of Xilinx and RDK for broadband / video (RDK-B).

  • OpenEmbedded has several derivatives which has several features like IDE support, debugging with emulators etc.

Details about Yocto and OpenEmbedded can be found in

OpenWRT / LEDE

This build system is a popular build system to build custom distributions for networking devices like routers and access points.

  • It is a derivative of buildroot.

  • Has its own light weight software components as replacement for init system(procd), network manager(netifd), interprocess communication(ubus), etc.,

  • Has several network related software components natively supported. It is also base of few other distributions like QSDK for Qualcomm network SoCs.

  • Further details of OpenWRT in https://openwrt.org/

AOSP / Soong

The Android Open Source Project has built its own build system called as Soong which is based on the blueprint (metabuild system) and kati (Modified Make) and ninja (alternative for make).

  • Soong builds Android system with lots of Android specific components like its own init system, HAL codes, system services, Java packages and external opensource packages.

  • Soong build system - https://source.android.com/setup/build

Desktop Linux Distributions for Embedded

Several Desktop distributions too supports ARM architecture and it is possible that they can be used as such in the embedded targets. Which saves lot of build time.

  • Using Desktop Linux distributions leaves the security fixes and package upgradation taken care by the distro maintainers.

  • Their limitations would be the size and the support for proprietary drivers.

  • Debian / Ubuntu supports building bare minimal rootfs through utilities like debootstrap or mutistrap.

  • Fedora too provides minimal rootfs for ARM based systems.

Conclusion

Building embedded systems, which were a complex process earlier, has been simplified a lot by open source build frameworks and there exists a variety of choices and flexibilities for embedded Linux developers.

For any services related to building the embedded Linux / Android for custom targets using above build systems, specific customization services like fast boot, performance improvement and security improvements on Linux, you can reach us through sales@zilogic.com.