\documentclass[a4paper,pdftex,12pt]{article}
\usepackage{german}
\usepackage{parskip}
\usepackage[latin1]{inputenc}
\usepackage{graphicx}

\sloppy

\begin{document}

\clearpage
%\includegraphics{images/fhlogo}

\hspace{2.1cm}\textsf{\large FreeWRT technical documentation}

\vspace{0.5cm}

\begin{center}
\textbf{\Large Firmware, Flash layout, Startup scripts, Filesystems}

Waldemar Brodkorb (wbx@freewrt.org)
\end{center}
\vspace{1cm}

\section{Firmware} 

The development team always provide monolithic firmware images, which contains the
kernel, a filesystem and sometimes some specific vendor headers.

\section{Flash layout}

The flash layout of the supported embedded systems is designed in the same way.
There are some model specific differences between the exact sizes and partition
offsets.

We always have a separate partition for the bootloader. After that we have a
partition for the kernel including a embedded root filesystem.


\section{System startup}

\subsection{Bootloader}

The bootloader initializes the hardware, f.e. CPU, cache and ethernet devices.
The different supported embedded systems have different bootloaders, with 
different features and sizes. To access the bootloader and a command line
prompt you always need a serial connection to the embedded system. 
Not all embedded systems have a serial device onboard or only some crippled
ones. Most of the time you can solder the board to get some working serial
device, but this is not part of this short technical introduction.

\section{Kernel}

The kernel is configured via append line to startup the ash compatible
/etc/preinit script.

\section{Preinit}

This is needed to first make some checks, which root filesystem is used and
then to switch the root filesystem to that. This is either a complete writable
root filesystem, which fills up the complete available flash.

The preinit script exports the environment variable PATH and then mounts the
virtual proc filesystem to /proc.

There is another board specific preinit script, which is used to setup
some board specific drivers or startup variables. (preinit.arch)
After that the script mount\_root will mount the root filesystem and
all other filesystems and startup init to start the system.

\subsection{Root filesystem}

- mini-fo
- jffs2 
- usb
- nfs

\subsection{System startup}

In /etc/inittab we use /etc/init.d/rcS to startup all services, which
are activated in /etc/rc.conf

\end{document}
