| 1 | \documentclass[a4paper,pdftex,12pt]{article}
|
|---|
| 2 | \usepackage{german}
|
|---|
| 3 | \usepackage{parskip}
|
|---|
| 4 | \usepackage[latin1]{inputenc}
|
|---|
| 5 | \usepackage{graphicx}
|
|---|
| 6 |
|
|---|
| 7 | \sloppy
|
|---|
| 8 |
|
|---|
| 9 | \begin{document}
|
|---|
| 10 |
|
|---|
| 11 | \clearpage
|
|---|
| 12 | %\includegraphics{images/fhlogo}
|
|---|
| 13 |
|
|---|
| 14 | \hspace{2.1cm}\textsf{\large FreeWRT technical documentation}
|
|---|
| 15 |
|
|---|
| 16 | \vspace{0.5cm}
|
|---|
| 17 |
|
|---|
| 18 | \begin{center}
|
|---|
| 19 | \textbf{\Large Firmware, Flash layout, Startup scripts, Filesystems}
|
|---|
| 20 |
|
|---|
| 21 | Waldemar Brodkorb (wbx@freewrt.org)
|
|---|
| 22 | \end{center}
|
|---|
| 23 | \vspace{1cm}
|
|---|
| 24 |
|
|---|
| 25 | \section{Firmware}
|
|---|
| 26 |
|
|---|
| 27 | The development team always provide monolithic firmware images, which contains the
|
|---|
| 28 | kernel, a filesystem and sometimes some specific vendor headers.
|
|---|
| 29 |
|
|---|
| 30 | \section{Flash layout}
|
|---|
| 31 |
|
|---|
| 32 | The flash layout of the supported embedded systems is designed in the same way.
|
|---|
| 33 | There are some model specific differences between the exact sizes and partition
|
|---|
| 34 | offsets.
|
|---|
| 35 |
|
|---|
| 36 | We always have a separate partition for the bootloader. After that we have a
|
|---|
| 37 | partition for the kernel including a embedded root filesystem.
|
|---|
| 38 |
|
|---|
| 39 |
|
|---|
| 40 | \section{System startup}
|
|---|
| 41 |
|
|---|
| 42 | \subsection{Bootloader}
|
|---|
| 43 |
|
|---|
| 44 | The bootloader initializes the hardware, f.e. CPU, cache and ethernet devices.
|
|---|
| 45 | The different supported embedded systems have different bootloaders, with
|
|---|
| 46 | different features and sizes. To access the bootloader and a command line
|
|---|
| 47 | prompt you always need a serial connection to the embedded system.
|
|---|
| 48 | Not all embedded systems have a serial device onboard or only some crippled
|
|---|
| 49 | ones. Most of the time you can solder the board to get some working serial
|
|---|
| 50 | device, but this is not part of this short technical introduction.
|
|---|
| 51 |
|
|---|
| 52 | \section{Kernel}
|
|---|
| 53 |
|
|---|
| 54 | The kernel is configured via append line to startup the ash compatible
|
|---|
| 55 | /etc/preinit script.
|
|---|
| 56 |
|
|---|
| 57 | \section{Preinit}
|
|---|
| 58 |
|
|---|
| 59 | This is needed to first make some checks, which root filesystem is used and
|
|---|
| 60 | then to switch the root filesystem to that. This is either a complete writable
|
|---|
| 61 | root filesystem, which fills up the complete available flash.
|
|---|
| 62 |
|
|---|
| 63 | The preinit script exports the environment variable PATH and then mounts the
|
|---|
| 64 | virtual proc filesystem to /proc.
|
|---|
| 65 |
|
|---|
| 66 | There is another board specific preinit script, which is used to setup
|
|---|
| 67 | some board specific drivers or startup variables. (preinit.arch)
|
|---|
| 68 | After that the script mount\_root will mount the root filesystem and
|
|---|
| 69 | all other filesystems and startup init to start the system.
|
|---|
| 70 |
|
|---|
| 71 | \subsection{Root filesystem}
|
|---|
| 72 |
|
|---|
| 73 | - mini-fo
|
|---|
| 74 | - jffs2
|
|---|
| 75 | - usb
|
|---|
| 76 | - nfs
|
|---|
| 77 |
|
|---|
| 78 | \subsection{System startup}
|
|---|
| 79 |
|
|---|
| 80 | In /etc/inittab we use /etc/init.d/rcS to startup all services, which
|
|---|
| 81 | are activated in /etc/rc.conf
|
|---|
| 82 |
|
|---|
| 83 | \end{document}
|
|---|