Build An Embedded Linux Distro From Scratch
Build An Embedded Linux Distro From Scratch
Summary: Learn how to build a custom Linux® distribution to use in an embedded environment, in this case to
drive a Technologic Systems TS-7800 single-board computer. In this tutorial, you learn about cross-compiling,
the boot loader, file systems, the root file system, disk images, and the boot process, all with respect to the
decisions you make as you're building the system and creating the distribution.
Objectives
This tutorial shows you how to install Linux on a target system. Not a prebuilt Linux distribution, but your own,
built from scratch. While the details of the procedure necessarily vary from one target to another, the same
general principles apply.
The result of this tutorial (if you have a suitable target) is a functional Linux system you can get a shell prompt on.
The tutorial begins with a discussion of cross-compilation issues, then discusses what the components of a Linux
system are and how they are put together. Both the building and the installation and configuration of the target
system are covered.
The specific target discussed, a Technologic Systems TS-7800, imposes its own default boot and bring-up
behaviors; other systems will have other mechanics, and this tutorial does not go into great detail about every
possible boot loader.
Developers who are interested in targeting embedded systems, or who just want to learn more about what Linux
systems are like under the hood, will get the most out of this tutorial.
The host environment used is Ubuntu, but other systems work as well. Users are assumed to have basic
familiarity with UNIX® or Linux system administration issues. The tutorial assumes root access to a host system.
This tutorial assumes that your shell is a Bourne shell derivative; if you use a C shell derivative, the prompt will
www.ibm.com/developerworks/linux/tutorials/l-embedded-distro/ 1/2
8/3/12 Build an embedded Linux distro from scratch
probably look different, and you will need to use different commands to set environment variables.
For cross-compiling (which is useful when targeting embedded systems), I used crosstool-ng version 1.1.0,
released in May of 2008. You may download it from the distribution site (see Resources). Details follow on
installing and configuring it.
1 of 12 | Next
www.ibm.com/developerworks/linux/tutorials/l-embedded-distro/ 2/2