The OpenWrt embedded
development framework
Florian Fainelli - florian@openwrt.org
January 22, 2008
Abstract
One of the biggest challenges to getting started with embedded
devices is that you cannot just install a copy of Linux and expect to
be able to compile a firmware. Even if you did remember to install
a compiler and every development tool offered, you still would not
have the basic set of tools needed to produce a firmware image. The
embedded device represents an entirely new hardware p latform, so in
a process called cross compiling you need to p roduce a new compiler
capable of generating code for your embedded platform, and then use
it to compile a basic Linux distribution to run on your device.
The process of creating a cross compiler can b e tricky and in many
cases when you are dealing with embedded devices you will be pro-
vided with a binary copy of a compiler and basic libraries rather than
instructions for creating your own. Likewise, it is also common to be
provided with a patched copy of the Linux kernel from the board or
chip vendor, but this is also dated and it can be difficult to spot ex-
actly what has been modified to make the kernel run on the embedded
platform.
OpenWrt has different approach to building a firmware; down-
loading, p atching and compiling ever ything from scratch, including
the cross compiler. OpenWrt does not contain any executables and
only very few sources, it is an automated system for downloading the
sources, patching them to work with the given platform and compil-
ing them correctly for that platform. What this means is that just by
chan ging the templates, you can change any step in th e process.
1