source: freewrt/docs/handbook/user/00-allinone.tex@ f84929f

freewrt_1_0 freewrt_2_0
Last change on this file since f84929f was f84929f, checked in by Phil Sutter <n0-1@…>, 19 years ago

prepared for handbook user/devel-split, also inserted a first snippet for the devel handbook

git-svn-id: svn://www.freewrt.org/branches/freewrt_1_0@1145 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 9.4 KB
RevLine 
[025bc8e]1\chapter{Introduction}
2
3Welcome to FreeWRT! This handbook covers the building, installation and usage
4aspects of the FreeWRT 1.0 Linux distribution. FreeWRT is a portable, secure
5and functional Linux distribution for embedded systems. As FreeWRT is a source
6code distribution, it does not provide any pre-compiled firmware for embedded
7systems. The latest version of this document is always available at the
8FreeWRT website. If you have any comments, criticism or found some wrong
9description, please send us an eMail to freewrt-handbook@freewrt.org, we are
10always happy about getting feedback to this document, and will try to update
11or correct the issues mentioned by you.
12
13The handbook is split into five distinct sections. Appliance Development Kit
14covers the building of FreeWRT firmware images. The second section, Installing
15FreeWRT, covers all aspects regarding the installation and deinstallation of
16FreeWRT firmware images. The third section is a detailed description of the
17startup process of FreeWRT. The fourth section, Using FreeWRT, covers
18administrational tasks, such as network configuration, the FreeWRT
19configuration filesystem, package management and update mechanism. The last
20section helps troubleshooting problems and recovering a bad firmware
21installation. The appendix contains board specific information. For FreeWRT
221.0 these are only Broadcom based embedded systems.
23
24The intended audience for this handbook are advanced users with basic
25knowledge about Linux, networking and software development. The reader should
26be aware of basic command line tools, the vi editor and a shell. FreeWRT does
27not contain any high level administration tools (e.g. web based
28administration) and is fully configured via command line.
29
30\section{Typographic Conventions}
31
32Examples starting with \# indicate a command that must be invoked as super
33user. You can use su to gain super user privilges.
34
35\begin{Verbatim}
36# fwcf commit
37\end{Verbatim}
38
39Examples staring with \$ indicate a command that can be invoked as a normal
40user. The default user account on a freshly installed FreeWRT system is
41,,admin''.
42
43\begin{Verbatim}
44$ cat /etc/banner
45\end{Verbatim}
46
47\chapter{Appliance Development Kit (ADK)}
48
49Our appliance development kit is called ,,buildroot''. The ADK is the core of
50FreeWRT and contains all scripts and sources to create firmware images for
51every supported embedded system. FreeWRT 1.0 supports the following embedded
52systems:
53
54\begin{itemize}
55\item Asus WL500g
56\item Asus WL500g deluxe
57\item Asus WL500g premium
58\item Linksys WRT54G v1.0
59\item Linksys WRT54G v1.1
60\item Linksys WRT54G v2.0
61\item Linksys WRT54G v2.2
62\item Linksys WRT54G v3.0
63\item Linksys WRT54G v3.1
64\item Linksys WRT54G v4.0
65\item Linksys WRT54GS v1.0
66\item Linksys WRT54GS v1.1
67\item Linksys WRT54GS v4
68\item Linksys WRT54G3G
69\item Netgear WGT634u
70\end{itemize}
71
72In this release we only support the Linux 2.4 kernel. The ADK contains over
73300 software packages.
74
75\section{Prerequisites}
76
77Here is a list of all supported and tested host systems. The host system is
78needed to create a firmware for your embedded system.
79
80\begin{itemize}
81\item Debian GNU/Linux 3.1 or newer
82\item Gentoo Linux
83\item Ubuntu Dapper Drake or newer
84\item Fedora Core 4 or newer
85\item OpenBSD 3.9 or newer
86\item MirOS BSD
87\end{itemize}
88
89Please install the following software, which is needed to build a basic
90firmware image. If you choose more packages some more prerequisites might be
91needed. Buildroot will warn you about any software you need to install to
92compile a specific package. Here is a list of the required software:
93
94\begin{itemize}
95\item gcc3 or higher
96\item g++
97\item binutils
98\item patch
99\item gzip
100\item bzip2
101\item unzip
102\item flex
103\item bison
104\item GNU make
105\item zlib (+headers)
106\item ncurses (+headers)
107\item (g)libc headers
108\item subversion
109\item perl
110\end{itemize}
111
112The buildroot checks for the required versions of these tools in advance.
113
114To build FreeWRT with buildroot it is recommended to have an unprivileged
115user. Please \underline{never} build FreeWRT as super user. Because all necessary source
116tarballs are downloaded from the internet automagically, your host system
117needs a working internet connection.
118
119\section{Getting the source}
120
121Now go to a directory where you want to build the firmware. Depending on the
122features you select you will need about 2.5-5 GB free disk space. This
123includes the buildroot itself, any source archives which will be downloaded
124and their extracted copies (for compiling).
125
126To get the initial FreeWRT 1.0 buildroot try one of these commands:
127\begin{Verbatim}
128$ svn co http://www.freewrt.org/svn/branches/freewrt_1_0 freewrt
129$ svn co svn://www.freewrt.org/branches/freewrt_1_0 freewrt
130\end{Verbatim}
131
132After successfully downloading, enter the directory:
133
134\begin{Verbatim}
135$ cd freewrt
136\end{Verbatim}
137
138This directory will be referred to as the ADK root later on.
139
140\section{Some Theory First}
141
142Building a FreeWRT firmware image is just like building a new Linux kernel,
143but a little more complex. There is a ncurses-based configuration menu at the
144beginning, the changes made are saved into a file named ,,.config'' in the ADK
145root. The build is done by the various Makefiles, compiling and linking the
146sources together accordingly to the symbols defined in ,,.config''.
147
148Unlike kernel compilation, FreeWRT needs to be cross-compiled always. This
149leads to special premises, as most of the tools need to be specially build.
150But no panic, FreeWRT will do this all for you. In fact, this is done at the
151second run of \texttt{make} (the first one opens the configuration), and
152therefore can be seen as part of the first firmware build. For clarity
153though, we will discuss these two things separately.
154
155\section{Preparing the Build Process}
156
157After downloading the FreeWRT ADK, it's time to prepare the ADK for the
158building of firmware Images (for explanations see the chapter above).
159
160\subsection{Creating A Configuration}
161The first step is to run \texttt{make}. After checking some prerequisites (see
162,,Troubleshooting'' below for aid in problems), a console based configuration
163menu should start. Theoretically no choices have to be made, but it's proven
164usefull to at least:
165\begin{itemize}
166\item select a target (menu: ,,Embedded System'')
167\item select the root filesystem type (menu: ,,Target Firmware type'')
168\end{itemize}
169
170Then quit saving changes. If you forgot that, just run \texttt{make} again, redo
171your changes, then save.
172
173\subsection{Building ADK}
174Now that you have a (first) configuration, it is time to build the toolchain
175(compiler, libraries) for cross-compiling. To do this, just enter {{{make}}}
176again. The build starts downloading and compiling each needed part of the
177toolchain, and later continues with building the first firmware image. Later
178one can be taken as proof of a working ADK.
179
180Already experienced in compiling gcc? Then you know... If not, better be told
181that it takes \underline{really long} to finish. In the meantime I suggest reading the
182next (optional) chapter dealing with internals about cross-compiling.
183
184\section{Details Of Cross-Compiling}
185
186TODO: someone with enough knowledge about this may fill this chapter with
187\underline{interesting} information!
188
189\section{Building A FreeWRT Firmware Image}
190
191Ok. Your local copy of the FreeWRT ADK should now be prepared for building
192images. The next step is to do an extensive configuration for the image you
193want to create. To start the configuration menu, type {{{make menuconfig}}}.
194
195when selecting packages, \texttt{<*>} means it will be inserted into the firmware
196images and \texttt{<M>} means it will be build as an addon package which can be
197installed later.
198
199The target device and filesystem should already been chosen by you to the
200right value, if not you will have to issue a \texttt{make clean} before actually
201building the firmware image, because otherwise things get messed up. (smooth
202rebuild is a (yet) missing feature in our buildroot.) For the packages, if
203unsure, you can just select one of the package collections. After that, you
204can still manually check the choices made by the collection and correct them
205if appropriate. Do not forget to save your configuration when leaving!
206
207Guess ... right, type \texttt{make} again to build the new FreeWRT firmware
208image. Depending on your package selections and underlying hardware, this will
209take different amounts of time. For your spare time there is the following
210chapter giving some explanation about what is done at this point.
211
212\section{Firmware Build Process In Detail}
213
214Just like when building the ADK's toolchain, the sources for the selected
215packages are downloaded from the internet first, then build using the
216cross-compiler and libraries of the ADK.
217
218TODO: more to follow by some more skilled people!!
219
220\section{Troubleshooting}
221This section deals with various tips for problems with ADK installation.
222
223\subsection{Errors During Prerequisites Check}
224To re-issue the checks, use ,,make prereq''.
225
226\begin{itemize}
227\item GNU make 3.80 too old
228 On my FC4 buildsystem the first I get is
229\begin{Verbatim}
230 $ make
231 GNU make 3.80 too old.
232 Please install GNU make 3.81 or higher to continue.
233 You can override this check, see http://www.freewrt.org/faq for details.
234 It is suggested to upgrade your copy of bison to
235 GNU Bison 2.3 because of its bug fixes.
236 make: *** [.prereq_done] Error 1
237\end{Verbatim}
238
239 it is quite a nice error that tells me to use more up to date software, but we can
240 anyhow give this hostsystem a try and tell make to ignore those errors/warnings:
241\begin{Verbatim}
242 make prereq-noerror
243\end{Verbatim}
244\end{itemize}
Note: See TracBrowser for help on using the repository browser.