English Language flag
// Log In
// CVSweb
Project: FreeWRT
// Summary // Activity // Search // Tracker // Lists // News // SCM // Wiki

SCM Repository

ViewVC logotype

Diff of /branches/freewrt_1_0/docs/handbook/user/handbook.tex

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2537 by n0-1, Thu May 17 20:25:52 2007 UTC revision 2538 by n0-1, Thu May 17 21:12:17 2007 UTC
# Line 109  Welcome to FreeWRT! This handbook covers Line 109  Welcome to FreeWRT! This handbook covers
109  aspects of the FreeWRT 1.0 Linux distribution.  FreeWRT is a portable, secure  aspects of the FreeWRT 1.0 Linux distribution.  FreeWRT is a portable, secure
110  and functional Linux distribution for embedded systems. As FreeWRT is a source  and functional Linux distribution for embedded systems. As FreeWRT is a source
111  code distribution, it does not provide any pre-compiled firmware for embedded  code distribution, it does not provide any pre-compiled firmware for embedded
112  systems. The latest version of this document is always available at the  systems. The latest version of this document is always available at the FreeWRT
113  FreeWRT website. If you have any comments, criticism or found some wrong  website. If you have any comments, criticism or found some wrong description,
114  description, please send us an e-mail to  please send us an e-mail to
115  \href{mailto:freewrt-handbook@freewrt.org}{freewrt-handbook@freewrt.org}, we are  \href{mailto:freewrt-handbook@freewrt.org}{freewrt-handbook@freewrt.org}, we
116  always happy about getting feedback to this document, and will try to update  are always happy about getting feedback to this document, and will try to
117  or correct the issues mentioned by you.  update or correct the issues mentioned by you.
118    
119  The FreeWRT User handbook is split into several distinct chapters.  The FreeWRT User handbook is split into several distinct chapters.
120  \nameref{ch:ADK} covers the building of FreeWRT firmware images.  \nameref{ch:ADK} covers the building of FreeWRT firmware images.  In
121  In \autoref{ch:installing}, \nameref{ch:installing}, all aspects regarding the  \autoref{ch:installing}, \nameref{ch:installing}, all aspects regarding the
122  installation and deinstallation of FreeWRT firmware images are covered.  The  installation and deinstallation of FreeWRT firmware images are covered.  The
123  next chapter, \nameref{ch:administration}, covers administrational tasks, such  next chapter, \nameref{ch:administration}, covers administrational tasks, such
124  as network configuration, the FreeWRT configuration filesystem, package  as network configuration, the FreeWRT configuration filesystem, package
125  management and update mechanism. The last chapter, \nameref{ch:troubleshooting},  management and update mechanism. The last chapter,
126  helps troubleshooting problems and recovering a bad firmware installation.  The  \nameref{ch:troubleshooting}, helps troubleshooting problems and recovering a
127  appendix contains board specific information.  For FreeWRT 1.0 these are only  bad firmware installation.  The appendix contains board specific information.
128  Broadcom based embedded systems.  For FreeWRT 1.0 these are only Broadcom based embedded systems.
129    
130  The intended audience for this handbook are advanced users with basic  The intended audience for this handbook are advanced users with basic knowledge
131  knowledge about Linux, networking and software development. The reader should  about Linux, networking and software development. The reader should be aware of
132  be aware of basic command line tools, the vi editor and a shell. FreeWRT does  basic command line tools, the vi editor and a shell. FreeWRT does not contain
133  not contain any high level administration tools (e.g. web based  any high level administration tools (e.g. web based administration) and is
134  administration) and is fully configured via command line.  fully configured via command line.
135    
136  \section{Typographic Conventions}  \section{Typographic Conventions}
137    
138  Examples starting with \code{\#} indicate a command that must be invoked as super  Examples starting with \code{\#} indicate a command that must be invoked as
139  user. You can use \command{su} to gain super user privileges.  super user. You can use \command{su} to gain super user privileges.
140    
141  \begin{Verbatim}[label=example for a command line with super user privileges]  \begin{Verbatim}[label=example for a command line with super user privileges]
142  # fwcf commit  # fwcf commit
# Line 178  following embedded systems: Line 178  following embedded systems:
178          \item Netgear WGT634u          \item Netgear WGT634u
179  \end{itemize}  \end{itemize}
180    
181  In this release we only support the Linux 2.4 kernel. The ADK contains over  In this release we only support the Linux 2.4 kernel. The ADK contains over 600
182  600 software packages.  software packages.
183    
184  \section{Prerequisites}  \section{Prerequisites}
185    
186  Here is a list of all supported and tested host systems. The host system is  Here is a list of all supported and tested host systems. The host system is
187  needed to create a firmware for your embedded system.  needed to create a firmware for your embedded system.
188    
189  The list of supported GNU/Linux build systems is not an exclusive one, these are just the ones tested and verified. The other millions of linux distributions are very likely to work, too.  The list of supported GNU/Linux build systems is not an exclusive one, these
190    are just the ones tested and verified. The other millions of linux
191    distributions are very likely to work, too.
192    
193  \begin{itemize}  \begin{itemize}
194          \item Debian GNU/Linux          \item Debian GNU/Linux
# Line 194  The list of supported GNU/Linux build sy Line 196  The list of supported GNU/Linux build sy
196          \item OpenSuSE          \item OpenSuSE
197          \item Ubuntu GNU/Linux          \item Ubuntu GNU/Linux
198          \item Fedora Core          \item Fedora Core
199          \item OpenBSD (partial support)\footnote{some addon packages does not compile}          \item OpenBSD (partial support)
200          \item MirOS BSD (partial support)\footnote{some addon packages does not compile}                  \footnote{some addon packages does not compile}
201            \item MirOS BSD (partial support)
202                    \footnote{some addon packages does not compile}
203  \end{itemize}  \end{itemize}
204    
205  Please install the following software, which is needed to build a basic  Please install the following software, which is needed to build a basic
206  firmware image. If you choose more packages some more prerequisites might be  firmware image. If you choose more packages some more prerequisites might be
207  needed. The ADK host checks will warn you about any software you need to install to  needed. The ADK host checks will warn you about any software you need to
208  compile a specific package.  Here is a list of the required software:  install to compile a specific package.  Here is a list of the required
209    software:
210    
211  \begin{itemize}  \begin{itemize}
212          \item gcc3 or higher          \item gcc3 or higher
# Line 222  compile a specific package.  Here is a l Line 227  compile a specific package.  Here is a l
227    
228  The ADK scripts will check for the required versions of these tools in advance.  The ADK scripts will check for the required versions of these tools in advance.
229    
230  To build FreeWRT with the ADK it is recommended to have an unprivileged  To build FreeWRT with the ADK it is recommended to have an unprivileged user.
231  user. Please \underline{never} build FreeWRT as super user. Because all necessary source  Please \underline{never} build FreeWRT as super user. Because all necessary
232  tarballs are downloaded from the internet automatically, your host system  source tarballs are downloaded from the internet automatically, your host
233  needs a working internet connection.  system needs a working internet connection.
234    
235  \section{Getting the source}  \section{Getting the source}
236    
237  Now go to a directory where you want to build the firmware. Depending on the  Now go to a directory where you want to build the firmware. Depending on the
238  features you select you will need about 2.5--5 GB free disk space. This  features you select you will need about 2.5--5 GB free disk space. This
239  includes the ADK itself, any source archives which will be downloaded  includes the ADK itself, any source archives which will be downloaded and their
240  and their extracted copies (for compiling).  extracted copies (for compiling).
241    
242  To get the latest stable FreeWRT ADK try one of these commands:  To get the latest stable FreeWRT ADK try one of these commands:
243  \begin{Verbatim}[label=Check out the 1.0-branch of FreeWRT ADK via HTTP protocol]  \begin{Verbatim}[label=Check out the 1.0-branch of FreeWRT ADK via HTTP protocol]
# Line 242  $ svn co http://www.freewrt.org/svn/tags Line 247  $ svn co http://www.freewrt.org/svn/tags
247  $ svn co svn://www.freewrt.org/itags/freewrt_1_0_x freewrt  $ svn co svn://www.freewrt.org/itags/freewrt_1_0_x freewrt
248  \end{Verbatim}  \end{Verbatim}
249    
250  The value $x$ is a place holder for the latest minor release number.  The value $x$ is a place holder for the latest minor release number.  Take a
251  Take a look at our project page to find out which minor release number is the latest one.  look at our project page to find out which minor release number is the latest
252    one.
253    
254  After successfully downloading, enter the directory:  After successfully downloading, enter the directory:
255    
# Line 255  This directory will be referred to as th Line 261  This directory will be referred to as th
261    
262  \section{Some Theory First}  \section{Some Theory First}
263    
264  Building a FreeWRT firmware image is just like building a new Linux kernel,  Building a FreeWRT firmware image is just like building a new Linux kernel, but
265  but a little more complex. There is a \app{ncurses}-based configuration menu at the  a little more complex. There is a \app{ncurses}-based configuration menu at the
266  beginning, the changes made are saved into a file named \file{.config} in the ADK  beginning, the changes made are saved into a file named \file{.config} in the
267  root. The build is done by the various Makefiles, compiling and linking the  ADK root. The build is done by the various Makefiles, compiling and linking the
268  sources together accordingly to the symbols defined in \file{.config}.  sources together accordingly to the symbols defined in \file{.config}.
269    
270  Unlike kernel compilation, FreeWRT needs to be cross-compiled. This  Unlike kernel compilation, FreeWRT needs to be cross-compiled. This leads to
271  leads to special premises, as most of the tools need to be specially build.  special premises, as most of the tools need to be specially build.  But no
272  But no panic, FreeWRT will do this all for you. In fact, this is done at the  panic, FreeWRT will do this all for you. In fact, this is done at the second
273  second run of \command{make} (the first one opens the configuration), and  run of \command{make} (the first one opens the configuration), and therefore
274  therefore can be seen as part of the first firmware build.  For clarity  can be seen as part of the first firmware build.  For clarity though, we will
275  though, we will discuss these two things separately.  discuss these two things separately.
276    
277  \section{Preparing the Build Process}  \section{Preparing the Build Process}
278    
# Line 276  building of firmware images (for explana Line 282  building of firmware images (for explana
282  \subsection{Creating A Configuration}  \subsection{Creating A Configuration}
283    
284  The first step is to run \command{make}. After checking some prerequisites (see  The first step is to run \command{make}. After checking some prerequisites (see
285  \nameref{ch:troubleshooting} below for aid in problems), a console based configuration  \nameref{ch:troubleshooting} below for aid in problems), a console based
286  menu should start. Theoretically no choices have to be made, but it's proven  configuration menu should start. Theoretically no choices have to be made, but
287  useful to at least:  it's proven useful to at least:
288  \begin{itemize}  \begin{itemize}
289          \item select a target (menu: \code{Embedded System})          \item select a target (menu: \code{Embedded System})
290          \item select the root filesystem type (menu: \code{Target Firmware type})          \item select the root filesystem type (menu: \code{Target Firmware type})
291  \end{itemize}  \end{itemize}
292    
293  Then quit saving changes. If you forgot that, just run \command{make} again, redo  Then quit saving changes. If you forgot that, just run \command{make} again,
294  your changes, then save.  redo your changes, then save.
295    
296  \subsection{Building ADK}  \subsection{Building ADK}
297    
298  Now that you have a first minimal configuration, it is time to build the toolchain  Now that you have a first minimal configuration, it is time to build the
299  for cross-compiling. To do this, just enter \command{make} again. The build starts  toolchain for cross-compiling. To do this, just enter \command{make} again. The
300  downloading and compiling each needed part of the toolchain, and later continues  build starts downloading and compiling each needed part of the toolchain, and
301  with building the first firmware image. Later one can be taken as proof of a  later continues with building the first firmware image. Later one can be taken
302  working ADK.  as proof of a working ADK.
303    
304  Already experienced in compiling \app{gcc}? Then you know\dots If not, better be told  Already experienced in compiling \app{gcc}? Then you know\dots If not, better
305  that it takes \underline{really long} to finish. In the meantime I suggest reading the  be told that it takes \underline{really long} to finish. In the meantime I
306  next chapter dealing with internals about cross-compiling.  suggest reading the next chapter dealing with internals about cross-compiling.
307    
308  \section{Details Of Cross-Compiling}  \section{Details Of Cross-Compiling}
309    
310  A cross-compile toolchain exists of a set of tools: a compiler, linker, assembler,  A cross-compile toolchain exists of a set of tools: a compiler, linker,
311  debugger and a C~library. A cross-compile toolchain runs on your host system and  assembler, debugger and a C~library. A cross-compile toolchain runs on your
312  creates native binaries for your target system. A cross-compile toolchain is  host system and creates native binaries for your target system. A cross-compile
313  basically created in six steps:  toolchain is basically created in six steps:
314    
315  \begin{enumerate}  \begin{enumerate}
316          \item Get and prepare the Kernel and C~library headers of your target system          \item Get and prepare the Kernel and C~library headers of your target system
# Line 317  basically created in six steps: Line 323  basically created in six steps:
323    
324  The cross-compile toolchain is created in  The cross-compile toolchain is created in
325  \file{staging\_dir\_\$(cpu\_arch)}\footnote{e.g. mipsel, which stands for MIPS  \file{staging\_dir\_\$(cpu\_arch)}\footnote{e.g. mipsel, which stands for MIPS
326  Little Endian}. All the tools running on the host, but used to create, analyze or debug  Little Endian}. All the tools running on the host, but used to create, analyze
327  for the target are kept in this directory. All addon headers and libraries  or debug for the target are kept in this directory. All addon headers and
328  are installed to this directory.  libraries are installed to this directory.
329    
330  If you want to compile a simple application without using the ADK, just use the  If you want to compile a simple application without using the ADK, just use the
331  compiler directly (e.g. compiling a MIPS Little Endian application):  compiler directly (e.g. compiling a MIPS Little Endian application):
# Line 338  linked (uses shared libs), not stripped Line 344  linked (uses shared libs), not stripped
344    
345  Your local copy of the FreeWRT ADK should now be prepared for building firmware  Your local copy of the FreeWRT ADK should now be prepared for building firmware
346  images. The next step is to do an extensive configuration for the image you  images. The next step is to do an extensive configuration for the image you
347  want to create. To start the configuration menu, type \command{make menuconfig}.  want to create. To start the configuration menu, type \command{make
348    menuconfig}.
349    
350  When selecting packages, \code{<*>} means it will be inserted into the firmware  When selecting packages, \code{<*>} means it will be inserted into the firmware
351  images and \code{<M>} means it will be build as an addon package which can be  images and \code{<M>} means it will be build as an addon package which can be
# Line 346  installed later at runtime. Line 353  installed later at runtime.
353    
354  The target device and filesystem should already been chosen by you to the right  The target device and filesystem should already been chosen by you to the right
355  value, if not you will have to issue a \command{make clean} before actually  value, if not you will have to issue a \command{make clean} before actually
356  building the firmware image. Otherwise things get messed up. A smooth  building the firmware image. Otherwise things get messed up. A smooth rebuild
357  rebuild is a missing feature in the current ADK. For the packages, if unsure, you  is a missing feature in the current ADK. For the packages, if unsure, you can
358  can just select one of the package collections. After that, you can still manually  just select one of the package collections. After that, you can still manually
359  check the choices made by the collection and correct them if appropriate. Do not  check the choices made by the collection and correct them if appropriate. Do
360  forget to save your configuration when leaving!  not forget to save your configuration when leaving!
361    
362  After leaving the menubased configuration, type \command{make} again to build  After leaving the menubased configuration, type \command{make} again to build
363  the new FreeWRT firmware image. Depending on your package selections and  the new FreeWRT firmware image. Depending on your package selections and
364  underlying hardware, this will take different amounts of time. For your spare time  underlying hardware, this will take different amounts of time. For your spare
365  there is the following chapter giving some explanation about what is done at this  time there is the following chapter giving some explanation about what is done
366  point.  at this point.
367    
368  \section{Firmware Build Process In Detail}  \section{Firmware Build Process In Detail}
369    
# Line 372  The detailed order of firmware image bui Line 379  The detailed order of firmware image bui
379          \item clean the target root directory          \item clean the target root directory
380          \item install all packages to the target root directory          \item install all packages to the target root directory
381          \item create the root filesystem image          \item create the root filesystem image
382          \item create the firmware image (bootloader, kernel and root filesystem)          \item create the firmware image (bootloader, kernel and root
383                    filesystem)
384  \end{itemize}  \end{itemize}
385    
386  The result of the build process is created in the directory \file{bin/}.  The result of the build process is created in the directory \file{bin/}.  You
387  You will find a firmware image in the top level directory. Check the size of  will find a firmware image in the top level directory. Check the size of the
388  the binary image file to see if it is small enough to fit into flash memory of  binary image file to see if it is small enough to fit into flash memory of your
389  your embedded system. Furthermore there is a directory \file{package/}, which  embedded system. Furthermore there is a directory \file{package/}, which
390  contains all base and add--on packages.  contains all base and add--on packages.
391    
392  \section{Troubleshooting}  \section{Troubleshooting}
# Line 401  To re-issue the checks, use \command{mak Line 409  To re-issue the checks, use \command{mak
409     GNU Bison 2.3 because of its bug fixes.     GNU Bison 2.3 because of its bug fixes.
410     make: *** [.prereq_done] Error 1     make: *** [.prereq_done] Error 1
411          \end{Verbatim}          \end{Verbatim}
412     it is quite a nice error that tells you to use more up to date software, but we can     it is quite a nice error that tells you to use more up to date software, but
413     anyhow give this hostsystem a try and tell make to ignore those     we can anyhow give this hostsystem a try and tell make to ignore those
414     errors/warnings running \command{make prereq-noerror}.     errors/warnings running \command{make prereq-noerror}.
415  \end{itemize}  \end{itemize}
416    
417  \subsection{Compilation errors}  \subsection{Compilation errors}
418    
419  If you encounter any compilation errors, then first try to reproduce the error.  If you encounter any compilation errors, then first try to reproduce the error.
420  First update your ADK tree via \command{svn update}, to be sure that the error is not  First update your ADK tree via \command{svn update}, to be sure that the error
421  already fixed in the subversion repository. After that do a \command{make clean  is not already fixed in the subversion repository. After that do a
422  \&\& make}, to reproduce your problem.  \command{make clean \&\& make}, to reproduce your problem.
423    
424  If you can reproduce the problem, please file a bug report. Please always  If you can reproduce the problem, please file a bug report. Please always
425  report following information:  report following information:
# Line 439  on serveral ways (ordered by needed skil Line 447  on serveral ways (ordered by needed skil
447  \subsection{Web Interface Method}\label{sec:webinterface}  \subsection{Web Interface Method}\label{sec:webinterface}
448    
449  The following text describes how to use the original firmware's web interface  The following text describes how to use the original firmware's web interface
450  to flash FreeWRT. The object of demonstration is an \term{Asus WL500gP}, but this  to flash FreeWRT. The object of demonstration is an \term{Asus WL500gP}, but
451  guide should fit more or less fine for other systems, too.  this guide should fit more or less fine for other systems, too.
452    
453  If you flash a router from \term{Linksys}, we strongly suggest to use the popular  If you flash a router from \term{Linksys}, we strongly suggest to use the
454  \term{ping exploit} to allow recovery, if your image is broken or the flash  popular \term{ping exploit} to allow recovery, if your image is broken or the
455  process was interrupted by a power shortage.  flash process was interrupted by a power shortage.
456    
457  There are some things that you should have done previously:  There are some things that you should have done previously:
458  \begin{itemize}  \begin{itemize}
# Line 458  There are some things that you should ha Line 466  There are some things that you should ha
466    
467  \parbox{17em}{  \parbox{17em}{
468  After preparation is complete, open your favourite browser and type  After preparation is complete, open your favourite browser and type
469  \command{192.168.1.1} into the address bar. You should reach the web interface's  \command{192.168.1.1} into the address bar. You should reach the web
470  startup page:  interface's startup page:
471  }\hfill\parbox{20em}{\includegraphics[width=20em]{pics/asus-startup.png}} \\ [1em]  }\hfill\parbox{20em}{
472            \includegraphics[width=20em]{pics/asus-startup.png}
473    } \\ [1em]
474  \parbox{17em}{  \parbox{17em}{
475  Then click on \code{System Setup}:  Then click on \code{System Setup}:
476  }\hfill\parbox{20em}{\includegraphics[width=20em]{pics/asus-system_setup.png}} \\ [1em]  }\hfill\parbox{20em}{
477            \includegraphics[width=20em]{pics/asus-system_setup.png}
478    } \\ [1em]
479  \parbox{17em}{  \parbox{17em}{
480  In the new menu click on \code{Firmware Upgrade}, and enter the name of your firmware image  In the new menu click on \code{Firmware Upgrade}, and enter the name of your
481  into the appropriate field:  firmware image into the appropriate field:
482  }\hfill\parbox{20em}{\includegraphics[width=20em]{pics/asus-fw_upgrade.png}} \\ [1em]  }\hfill\parbox{20em}{
483            \includegraphics[width=20em]{pics/asus-fw_upgrade.png}
484    } \\ [1em]
485  Finally click on \code{Upload}. As the whole process of writing the image to  Finally click on \code{Upload}. As the whole process of writing the image to
486  flash and rebooting (don't forget that it creates \app{ssh} hostkeys on first boot)  flash and rebooting (don't forget that it creates \app{ssh} hostkeys on first
487  takes quite long (yes, a couple of minutes). Better go and get a coffee or tea.  boot) takes quite long (yes, a couple of minutes). Better go and get a coffee
488    or tea.
489  When everything went well, you can login using \app{ssh}. The default username is  
490  "\code{admin}". The default password for images created via WIB or ADK is  When everything went well, you can login using \app{ssh}. The default username
491  "\code{FreeWRT}". It is possible to change this password in the ADK,  is "\code{admin}". The default password for images created via WIB or ADK is
492  before image creation.  "\code{FreeWRT}". It is possible to change this password in the ADK, before
493    image creation.
494    
495  \subsection{\texttt{mtd} -- The Flash Utility}\label{sec:mtd}  \subsection{\texttt{mtd} -- The Flash Utility}\label{sec:mtd}
496    
497  For this method to work, you need to copy the file containing the firmware  For this method to work, you need to copy the file containing the firmware
498  image to the router, preferably into \file{/tmp/}, the memory filesystem should be  image to the router, preferably into \file{/tmp/}, the memory filesystem should
499  big enough to hold the full image. If not, use \app{wget} to get the image  be big enough to hold the full image. If not, use \app{wget} to get the image
500  via http or ftp and pipe the result into \app{mtd}.  via http or ftp and pipe the result into \app{mtd}.
501    
502  Then the image is written to flash using \app{mtd}, optionally giving  Then the image is written to flash using \app{mtd}, optionally giving
503  additional options (see below).  additional options (see below).
504    
505  The \app{mtd} utility was written with simplicity and code size in mind.  The \app{mtd} utility was written with simplicity and code size in mind.  It's
506  It's features were derived from the  features were derived from the
507  \href{http://sources.redhat.com/jffs2/}{\app{mtd-utils}},  \href{http://sources.redhat.com/jffs2/}{\app{mtd-utils}}, combining the needed
508  combining the needed parts into a single small tool providing all the  parts into a single small tool providing all the functionality necessary for
509  functionality necessary for FreeWRT, and leaving everything out that's not.  FreeWRT, and leaving everything out that's not.
510    
511  \app{mtd} provides the following features:  \app{mtd} provides the following features:
512  \begin{description}  \begin{description}
513          \item[unlock] some chips need unlocking before they can be written to          \item[unlock] some chips need unlocking before they can be written to
514          \item[erase] this is a filesystem independent method to delete all contents on          \item[erase] this is a filesystem independent method to delete all
515                  the flash. Basically this is like \app{format} in MS--DOS.                  contents on the flash. Basically this is like \app{format} in
516          \item[write] this is generally the same functionality as using                  MS--DOS.
517                  \app{dd} or \app{rawrite}, but \app{mtd} takes care of the quirks          \item[write] this is generally the same functionality as using \app{dd}
518                  that have to be paid attention to for correctly handling the type of flash                  or \app{rawrite}, but \app{mtd} takes care of the quirks that
519                  in use                  have to be paid attention to for correctly handling the type of
520                    flash in use
521  \end{description}  \end{description}
522    
523  Further it can request your system to reboot. Some of the features mentioned here can  Further it can request your system to reboot. Some of the features mentioned
524  also be combined, so it is e.g. possible to immediately reboot the system after  here can also be combined, so it is e.g. possible to immediately reboot the
525  the flash has been written.  system after the flash has been written.
526    
527  Mostly, similar to the sample usage shown in the help output should be all that has to be  Mostly, similar to the sample usage shown in the help output should be all that
528  done to write the firmware to flash:  has to be done to write the firmware to flash:
529  \begin{Verbatim}[label=write a previously downloaded new firmware-file into flash]  \begin{Verbatim}[label=write a previously downloaded new firmware-file into flash]
530  # mtd -e linux -r write freewrt.bin linux &  # mtd -e linux -r write freewrt.bin linux &
531  \end{Verbatim}  \end{Verbatim}
# Line 521  The parameters explained in detail: Line 537  The parameters explained in detail:
537  \begin{description}  \begin{description}
538          \item[\command{-e linux}] erase existing data in flash          \item[\command{-e linux}] erase existing data in flash
539          \item[\command{-r}] trigger rebooting right after finishing work          \item[\command{-r}] trigger rebooting right after finishing work
540          \item[\command{write}] write the firmware image contained in the file given as          \item[\command{write}] write the firmware image contained in the file
541                  next parameter to flash                  given as next parameter to flash
542          \item[\command{freewrt.bin}] the actual image to write -- ignore the suffix,          \item[\command{freewrt.bin}] the actual image to write -- ignore the
543                  it is detected at runtime                  suffix, it is detected at runtime
544          \item[\command{linux}] this is an abstract identifier for a certain partition          \item[\command{linux}] this is an abstract identifier for a certain
545                  in flash, so don't change this                  partition in flash, so don't change this
546          \item[\command{\&}] put the process into background, to prevent accidentally          \item[\command{\&}] put the process into background, to prevent
547                  stopping                  accidentally stopping
548  \end{description}  \end{description}
549    
550  \subsection{Installation using TFTP}\label{sec:tftp}  \subsection{Installation using TFTP}\label{sec:tftp}
551    
552  All supported target devices are shipped with a builtin bootloader, comparable to  All supported target devices are shipped with a builtin bootloader, comparable
553  the BIOS of \term{x86} machines. This bootloader is used to bootstrap the system until  to the BIOS of \term{x86} machines. This bootloader is used to bootstrap the
554  it can boot a regular operating system. Besides the ability to load  system until it can boot a regular operating system. Besides the ability to
555  the executable code from flash, it can be received from another node in the  load the executable code from flash, it can be received from another node in
556  local area network via the famous TFTP protocol.  the local area network via the famous TFTP protocol.
557    
558  For doing this, there are two ways:  For doing this, there are two ways:
559  \begin{itemize}  \begin{itemize}
560          \item the device acts as a client, asks the local \app{dhcpd} for a lease, the          \item the device acts as a client, asks the local \app{dhcpd} for a
561                  address of the next \app{tftpd} and the filename to download                  lease, the address of the next \app{tftpd} and the filename to
562          \item the device acts as a server, having a known IP address and waiting for                  download
563                  any TFTP client to connect and send the file          \item the device acts as a server, having a known IP address and
564                    waiting for any TFTP client to connect and send the file
565  \end{itemize}  \end{itemize}
566    
567  Most of the hardware supported by FreeWRT 1.0 uses the second method.  Only the  Most of the hardware supported by FreeWRT 1.0 uses the second method.  Only the
568  device \term{Netgear WGT634u} is using the first method, the bootloader provides a  device \term{Netgear WGT634u} is using the first method, the bootloader
569  DHCP/TFTP client. Though this may be a little confusing to people being familiar  provides a DHCP/TFTP client. Though this may be a little confusing to people
570  with netboot technologies, it is definitely the easier way of doing it. Otherwise  being familiar with netboot technologies, it is definitely the easier way of
571  one had to setup both DHCP and TFTP servers and configure them right.  doing it. Otherwise one had to setup both DHCP and TFTP servers and configure
572    them right.
573    
574  The even quite simple task of sending the flash image to the target device is  The even quite simple task of sending the flash image to the target device is
575  made even more easy by providing a little shell script for the job. Invocation  made even more easy by providing a little shell script for the job. Invocation
# Line 571  images and to improve bootup time, of co Line 589  images and to improve bootup time, of co
589  default. The following list shows what has to be done for a certain device to  default. The following list shows what has to be done for a certain device to
590  get it to wait at boot: \\  get it to wait at boot: \\
591  \begin{center}  \begin{center}
592          \begin{tabular}{l|l|p{7cm}} % TODO: fill this table  \begin{tabular}{l|l|p{7cm}} % TODO: fill this table
593                  \strong{Target Device} & \strong{Action to be taken} & \strong{Comments} \\  \strong{Target Device} & \strong{Action to be taken} & \strong{Comments} \\
594                  \hline  \hline
595                  All supported Linksys models & Ping Exploit & nvram variable \code{boot\_wait} needs to be on \\  All supported Linksys models & Ping Exploit & nvram variable \code{boot\_wait}
596                  All supported Asus models & Recovery mode & power off                                                needs to be on \\
597                                                              $\rightarrow$ push and hold the reset button  All supported Asus models & Recovery mode & power off $\rightarrow$ push and
598                                                              $\rightarrow$ power on                                              hold the reset button $\rightarrow$
599                                                              $\rightarrow$ power led is flashing\\                                              power on $\rightarrow$ power led is
600          \end{tabular}                                              flashing \\
601    \end{tabular}
602  \end{center}  \end{center}
603    
604  \chapter{FreeWRT Administration}\label{ch:administration}  \chapter{FreeWRT Administration}\label{ch:administration}
# Line 591  guides for using FreeWRT in general, of Line 610  guides for using FreeWRT in general, of
610    
611  \section{Network Configuration}  \section{Network Configuration}
612    
613  The device names for real network interfaces in Linux are named \code{ethx} (\code{x} is  The device names for real network interfaces in Linux are named \code{ethx}
614  \code{0--9}). If the device has a switch, the different ports are separated via VLAN  (\code{x} is \code{0--9}). If the device has a switch, the different ports are
615  technology. The vlan interfaces are named \code{ethx.y}.  The network configuration in  separated via VLAN technology. The vlan interfaces are named \code{ethx.y}.
616  FreeWRT is managed via \app{Busybox}'s \app{ifupdown} implementation. \app{Busybox}'s builtin \app{ip}  The network configuration in FreeWRT is managed via \app{Busybox}'s
617  command configures the network interfaces. There is no \app{ifconfig} or \app{route}.  \app{ifupdown} implementation. \app{Busybox}'s builtin \app{ip} command
618    configures the network interfaces. There is no \app{ifconfig} or \app{route}.
619  To show all configured network interfaces use:  To show all configured network interfaces use:
620  \begin{Verbatim}[label=show IP address]  \begin{Verbatim}[label=show IP address]
621  $ ip addr show  $ ip addr show
# Line 615  iface <iface-name> inet <method> Line 635  iface <iface-name> inet <method>
635    <option-z> <value>    <option-z> <value>
636  \end{Verbatim}  \end{Verbatim}
637    
638  \code{auto <iface-name>} is optional and, if set, tells the \app{ifup} script to  \code{auto <iface-name>} is optional and, if set, tells the \app{ifup} script
639  start this interface automatically on bootup.  to start this interface automatically on bootup.
640    
641  Each interface needs a unique name which, depending on the method, represents  Each interface needs a unique name which, depending on the method, represents
642  either a physical interface or a logical interface name like \code{eth0.1} for a  either a physical interface or a logical interface name like \code{eth0.1} for
643  physical VLAN or \code{umts} as a logical name for a PPP interface.  a physical VLAN or \code{umts} as a logical name for a PPP interface.
644    
645  Possible methods are:  Possible methods are:
646  \begin{description}  \begin{description}
647          \item[static] use the given options to configure the interface statically          \item[static] use the given options to configure the interface
648          \item[dhcp] just start a dhcp client using the interface \code{iface-name}                  statically
649          \item[manual] don't configure the interface but start \code{pre-up.d} hook scripts          \item[dhcp] just start a dhcp client using the interface
650          \item[ppp] run \code{pon <provider>} where \code{<provider>} is given as an interface option                  \code{iface-name}
651            \item[manual] don't configure the interface but start \code{pre-up.d}
652                    hook scripts
653            \item[ppp] run \code{pon <provider>} where \code{<provider>} is given
654                    as an interface option
655  \end{description}  \end{description}
656    
657  \subsection{Switch/VLAN}  \subsection{Switch/VLAN}
# Line 659  This configures three VLAN interfaces \c Line 683  This configures three VLAN interfaces \c
683  \code{eth0.1} on port 3 and 4 and \code{eth0.2} on port 0.  \code{eth0.1} on port 3 and 4 and \code{eth0.2} on port 0.
684    
685    
686  If you need to do some advanced settings, because you have for example  If you need to do some advanced settings, because you have for example a
687  a powerful switch with a VLAN trunking port connected to one of your switch  powerful switch with a VLAN trunking port connected to one of your switch
688  ports, the configuration would look like this:  ports, the configuration would look like this:
689    
690  \begin{Verbatim}[label=\file{/etc/network/interfaces}]  \begin{Verbatim}[label=\file{/etc/network/interfaces}]
# Line 693  iface eth0.4 inet static Line 717  iface eth0.4 inet static
717    
718  \end{Verbatim}  \end{Verbatim}
719    
720  This configures four VLAN interfaces, \code{eth0.1} on physical ports 2, 3 and 4.  This configures four VLAN interfaces, \code{eth0.1} on physical ports 2, 3 and
721  The interfaces \code{eth0.2}, \code{eth0.3} and \code{eth0.4} are three  4.  The interfaces \code{eth0.2}, \code{eth0.3} and \code{eth0.4} are three
722  different networks with VLAN ID 2--4. The physical port 1 needs to be connected  different networks with VLAN ID 2--4. The physical port 1 needs to be connected
723  to a VLAN trunking port on a switch with knows the same VLAN IDs.  to a VLAN trunking port on a switch with knows the same VLAN IDs.
724    
# Line 703  Explanation: Line 727  Explanation:
727  \begin{description}  \begin{description}
728          \item[port 0] this is typically the port labeled as WAN          \item[port 0] this is typically the port labeled as WAN
729          \item[port 1--4] these are typically the ports labeled as LAN          \item[port 1--4] these are typically the ports labeled as LAN
730          \item[port 5] this special port represents the port where the router--board is          \item[port 5] this special port represents the port where the
731                  connected to the switch                  router--board is connected to the switch
732          \item[*] one interface always need an asterisk behind port 5 which means it is          \item[*] one interface always need an asterisk behind port 5 which
733                  the default interface and gets all the packages with unknown tags.                  means it is the default interface and gets all the packages
734                    with unknown tags.
735  \end{description}  \end{description}
736    
737  \subsection{Static IP configuration}  \subsection{Static IP configuration}
# Line 716  IP settings, so these are the commonly u Line 741  IP settings, so these are the commonly u
741          \item[address] the IP address  --- required          \item[address] the IP address  --- required
742          \item[netmask] the netmask     --- required          \item[netmask] the netmask     --- required
743          \item[broadcast] broadcast address --- only required for legacy          \item[broadcast] broadcast address --- only required for legacy
744          applications (if using \code{+}, it will be calculated automatically by the kernel)                  applications (if using \code{+}, it will be calculated
745                    automatically by the kernel)
746          \item[gateway] an IP address added as default gateway if present          \item[gateway] an IP address added as default gateway if present
747          \item[mac-address] if you need to change your MAC address (required for some DSL providers)          \item[mac-address] if you need to change your MAC address (required for
748                    some DSL providers)
749  \end{description}  \end{description}
750    
751  \subsection{DHCP}  \subsection{DHCP}
# Line 732  Typically this configures the WAN-Port t Line 759  Typically this configures the WAN-Port t
759    
760  \subsection{Bridging}  \subsection{Bridging}
761    
762  This is mostly needed to combine LAN and WLAN to a homogeneous network.  This is mostly needed to combine LAN and WLAN to a homogeneous network.  Be
763  Be sure you have installed the package \app{bridge-utils}.  sure you have installed the package \app{bridge-utils}.
764    
765  \begin{Verbatim}[label=\file{/etc/network/interfaces}]  \begin{Verbatim}[label=\file{/etc/network/interfaces}]
766  auto eth0.0  auto eth0.0
# Line 754  iface br0 inet static Line 781  iface br0 inet static
781  \end{Verbatim}  \end{Verbatim}
782    
783  This creates a new bridging interface \code{br0} which combines the VLAN  This creates a new bridging interface \code{br0} which combines the VLAN
784  interface \code{eth0.0} (representing the LAN-ports 1--4) and the WLAN interface  interface \code{eth0.0} (representing the LAN-ports 1--4) and the WLAN
785  \code{eth1} (on some devices like \term{Asus WL500gP} this might be \code{eth2}).  interface \code{eth1} (on some devices like \term{Asus WL500gP} this might be
786  The bridge interface needs always be the last one, otherwise it can not find  \code{eth2}).  The bridge interface needs always be the last one, otherwise it
787  the interfaces in \code{bridge-ifaces}.  can not find the interfaces in \code{bridge-ifaces}.
788    
789  \subsection{WLAN}  \subsection{WLAN}
790  A router containing a WLAN interface has an additional ethernet device  A router containing a WLAN interface has an additional ethernet device
791  representing it. On Broad\-com-based hardware it is typically \code{eth1}  representing it. On Broad\-com-based hardware it is typically \code{eth1}
792  (\term{Linksys}),\code{eth2} (\term{Asus WL500gP}) or on \term{Netgear WGT634u} which has a Madwifi  (\term{Linksys}),\code{eth2} (\term{Asus WL500gP}) or on \term{Netgear WGT634u}
793  WLAN chip, it is \code{ath0}, \code{ath1}, etc. You can use these interfaces  which has a Madwifi WLAN chip, it is \code{ath0}, \code{ath1}, etc. You can use
794  standalone or bridged with other devices, e.g. the internal LAN.  these interfaces standalone or bridged with other devices, e.g. the internal
795    LAN.
796    
797  \subsubsection{Basic Settings}  \subsubsection{Basic Settings}
798    
# Line 773  Mandatory options and default parameters Line 801  Mandatory options and default parameters
801  \begin{tabular}{l|l|p{10cm}}  \begin{tabular}{l|l|p{10cm}}
802  \strong{Option} & \strong{Parameter} & \strong{Description} \\  \strong{Option} & \strong{Parameter} & \strong{Description} \\
803  \hline\hline  \hline\hline
804  \code{\strong{type}} & \code{broadcom}                & Broadcom based card \\  \code{\strong{type}} & \code{broadcom} & Broadcom based card \\
805                       & \code{atheros}                 & Madwifi driver \\                       & \code{atheros}  & Madwifi driver \\
 \hline  
 \code{\strong{mode}} & \code{ap}                      & Access point mode \\  
                      & \code{sta}                     & Client mode \\  
                      & \code{adhoc}                   & Ad-Hoc mode \\  
                      & \code{wds}                     & WDS point-to-point link over wireless\\  
                      & \code{monitor}                 & The node acts as a passive monitor and only receives packets \\  
806  \hline  \hline
807  \code{\strong{ssid}} & \code{<String>}                & Set the SSID (Network Name) \\  \code{\strong{mode}} & \code{ap}       & Access point mode \\
808  \hline                       & \code{sta}      & Client mode \\
809  \code{country}       & \code{\{ALL|DE|JP|US|\ldots\}} & The country code used to determine the regulatory settings. \\                       & \code{adhoc}    & Ad-Hoc mode \\
810                         & \code{wds}      & WDS point-to-point link over wireless\\
811                         & \code{monitor}  & The node acts as a passive monitor and
812                                             only receives packets \\
813    \hline
814    \code{\strong{ssid}} & \code{<String>} & Set the SSID (Network Name) \\
815    \hline
816    \code{country}       & \code{\{ALL|DE|JP|US|\ldots\}} & The country code used
817                                                            to determine the
818                                                            regulatory settings. \\
819  \hline  \hline
820  \end{tabular}  \end{tabular}
821    
# Line 792  Mandatory options and default parameters Line 823  Mandatory options and default parameters
823  \begin{longtable}{l|l|p{10cm}}  \begin{longtable}{l|l|p{10cm}}
824  \strong{Option} & \strong{Parameter} & \strong{Description} \\  \strong{Option} & \strong{Parameter} & \strong{Description} \\
825  \hline\hline  \hline\hline
826  \code{\strong{security}} & \code{none}            & No authorization \\  \code{\strong{security}} & \code{none}    & No authorization \\
827                           & \code{wep}             & WEP key \\                           & \code{wep}     & WEP key \\
828                           & \code{wpa-psk}         & WPA with preshared key \\                           & \code{wpa-psk} & WPA with preshared key \\
829                           & \code{8021x}           & IEEE 802.1X authentication \\                           & \code{8021x}   & IEEE 802.1X authentication \\
830  \hline  \hline
831  \code{\strong{authorization}} &                 & \strong{wpa-psk} \\  \code{\strong{authorization}} &                 & \strong{wpa-psk} \\
832                                & \code{psk}             & WPA PSK \\                                & \code{psk}      & WPA PSK \\
833                                & \code{psk2}            & WPA2 PSK \\                                & \code{psk2}     & WPA2 PSK \\
834                                & \code{psk psk2}        & WPA PSK and WPA2 PSK \\                                & \code{psk psk2} & WPA PSK and WPA2 PSK \\
835                                &                        & \strong{8021x} \\                                &                 & \strong{8021x} \\
836                                & \code{wpa}             & WPA with RADIUS \\                                & \code{wpa}      & WPA with RADIUS \\
837                                & \code{wpa2}            & WPA2 with RADIUS \\                                & \code{wpa2}     & WPA2 with RADIUS \\
838                                & \code{wpa wpa2}        & WPA and WPA2 \\                                & \code{wpa wpa2} & WPA and WPA2 \\
839  \hline  \hline
840  \code{\strong{encryption}} &                        & \strong{wep} \\  \code{\strong{encryption}} &                 & \strong{wep} \\
841                             & ---                    & not needed, automatically by key size \\                             & ---             & not needed, automatically by key size \\
842                             &                        & \strong{wpa-psk} \\                             &                 & \strong{wpa-psk} \\
843                             & \code{tkip}            & RC4 encryption \\                             & \code{tkip}     & RC4 encryption \\
844                             & \code{aes}             & AES encryption \\                             & \code{aes}      & AES encryption \\
845                             & \code{aes+tkip}        & support both \\                             & \code{aes+tkip} & support both \\
846                             &                        & \strong{8021x} \\                             &                 & \strong{8021x} \\
847                             & \code{wep}             & RC4 encryption (static) \\                             & \code{wep}      & RC4 encryption (static) \\
848                             & \code{tkip}            & RC4 encryption \\                             & \code{tkip}     & RC4 encryption \\
849                             & \code{aes}             & AES encryption \\                             & \code{aes}      & AES encryption \\
850                             & \code{aes+tkip}        & support both \\                             & \code{aes+tkip} & support both \\
851  \hline  \hline
852  \code{eap-type} &                        & \strong{8021x} \\  \code{eap-type} &                     & \strong{8021x} \\
853                  & \code{\strong{tls}}    & Transport Layer Security \\                  & \code{\strong{tls}} & Transport Layer Security \\
854                  & \code{ttls}            & Tunnelled TLS \\                  & \code{ttls}         & Tunnelled TLS \\
855                  & \code{peap}            & Protected EAP \\                  & \code{peap}         & Protected EAP \\
856                  & \code{leap}            & Cisco Wireless \\                  & \code{leap}         & Cisco Wireless \\
857  \hline  \hline
858  \code{key} &                            & \strong{wep} \\  \code{key} &                            & \strong{wep} \\
859             &\code{\{\strong{1}|2|3|4\}} & Select WEP key to use. \\             &\code{\{\strong{1}|2|3|4\}} & Select WEP key to use. \\
860  \hline  \hline
861  \code{key[1..4]} &                 & \strong{wep} \\  \code{key[1..4]} &                 & \strong{wep} \\
862                   & \code{<String>} & WEP key.  The key must be 5, 13 or 16 bytes                   & \code{<String>} & WEP key.  The key must be 5, 13 or 16
863                                       long, or 10, 26, 32, or 64 hex digits long.  The encryption                                       bytes long, or 10, 26, 32, or 64 hex
864                                       algorithm is automatically selected based on the key size. key1 is                                       digits long.  The encryption algorithm is
865                                       the key for WEP client mode. \\                                       automatically selected based on the key
866  \hline                                       size. key1 is the key for WEP client mode.
867  \code{wpa-key} &                 & \strong{wpa-psk} \\                                       \\
868                 & <String>        & Password to use with WPA/WPA2 PSK (at least 8, up to 63 chars) \\  \hline
869  \hline  \code{wpa-key} &          & \strong{wpa-psk} \\
870  \code{wpa-gtk-rekey} &                              & \strong{wpa-psk}, \strong{8021x} \\                 & <String> & Password to use with WPA/WPA2 PSK (at least 8, up
871                       & \code{<Int>} (\strong{3600}) & Rekeying interval in seconds. \\                              to 63 chars) \\
872    \hline
873    \code{wpa-gtk-rekey} &                              & \strong{wpa-psk},
874                                                          \strong{8021x} \\
875                         & \code{<Int>} (\strong{3600}) & Rekeying interval in
876                                                          seconds. \\
877  \hline  \hline
878  \code{\strong{radius-ipaddr}} &                  & \strong{8021x} \\  \code{\strong{radius-ipaddr}} &                  & \strong{8021x} \\
879                                & \code{<a.b.c.d>} & IP to connect. \\                                & \code{<a.b.c.d>} & IP to connect. \\
880  \hline  \hline
881  \code{radius-port} &                              & \strong{8021x} \\  \code{radius-port} &                              & \strong{8021x} \\
882                     & \code{<Int>} (\strong{1812}) & RADIUS-Port no. to connect \\                     & \code{<Int>} (\strong{1812}) & RADIUS-Port no. to connect
883                                                        \\
884  \hline  \hline
885  \strong{radius-key} &                 & \strong{8021x} \\  \strong{radius-key} &                 & \strong{8021x} \\
886                      & \code{<String>} & Shared Secret for connection to the Radius server \\                      & \code{<String>} & Shared Secret for connection to the
887                                            Radius server \\
888  \hline  \hline
889  \end{longtable}  \end{longtable}
890    
# Line 855  Mandatory options and default parameters Line 893  Mandatory options and default parameters
893  \strong{Option} & \strong{Parameter} & \strong{Description} \\  \strong{Option} & \strong{Parameter} & \strong{Description} \\
894  \hline\hline  \hline\hline
895  \code{macmode} & \code{\{0|1|2\}} & 0: Disable MAC address matching. \\  \code{macmode} & \code{\{0|1|2\}} & 0: Disable MAC address matching. \\
896                 &                  & 1: Deny association to stations on the MAC list. \\                 &                  & 1: Deny association to stations on the MAC
897                 &                  & 2: Allow association to stations on the MAC list. \\                                         list. \\
898  \hline                 &                  & 2: Allow association to stations on the MAC
899  \code{maclist} & \code{<MAC1> \ldots <MACn>} & List of space separated mac addresses to                                         list. \\
900  allow/deny according to \code{macmode}. Addresses should be entered with colons,  \hline
901  e.g.: "\code{00:02:2D:08:E2:1D 00:03:3E:05:E1:1B}"\\  \code{maclist} & \code{<MAC1> \ldots <MACn>} & List of space separated mac
902                                                   addresses to allow/deny
903                                                   according to \code{macmode}.
904                                                   Addresses should be entered with
905                                                   colons, e.g.:
906                                                   "\code{00:02:2D:08:E2:1D
907                                                   00:03:3E:05:E1:1B}"\\
908  \end{tabular}  \end{tabular}
909    
910  \subsubsection{Wireless Distribution System (WDS)}  \subsubsection{Wireless Distribution System (WDS)}
911  \begin{tabular}{l|l|p{10cm}}  \begin{tabular}{l|l|p{10cm}}
912  \strong{Option}       & \strong{Parameter}          & \strong{Description} \\  \strong{Option}       & \strong{Parameter}          & \strong{Description} \\
913  \hline\hline  \hline\hline
914  \code{lazywds}        & \code{\{0|1\}}              & Accept WDS connections from anyone \\  \code{lazywds}        & \code{\{0|1\}}              & Accept WDS connections
915                                                          from anyone \\
916  \hline  \hline
917  \code{wds-bridge}     & \code{br\{X\}}              & Add WDS peers to bridge brX \\  \code{wds-bridge}     & \code{br\{X\}}              & Add WDS peers to bridge
918                                                          brX \\
919  \hline  \hline
920  \code{wds-security}   & \code{\{wpa-psk\}}          & secure the wds bridge with WPA (optional)\\  \code{wds-security}   & \code{\{wpa-psk\}}          & secure the wds bridge
921                                                          with WPA (optional)\\
922  \hline  \hline
923  \code{wds-encryption} & \code{\{aes|tkip\}}         & Use AES or TKIP as cipher\\  \code{wds-encryption} & \code{\{aes|tkip\}}         & Use AES or TKIP as
924  \hline                                                        cipher\\
925  \code{wds-wpa-key}    & \code{<String>}             & Password to use with WPA PSK (at least 8, up to 63 chars) \\  \hline
926  \hline  \code{wds-wpa-key}    & \code{<String>}             & Password to use with WPA
927  \code{wds}            & \code{<MAC1> \ldots <MACn>} & List of WDS peer mac addresses (\code{xx:xx:xx:xx:xx:xx}, space separated) \\                                                        PSK (at least 8, up to 63
928                                                          chars) \\
929    \hline
930    \code{wds}            & \code{<MAC1> \ldots <MACn>} & List of WDS peer mac
931                                                          addresses
932                                                          (\code{xx:xx:xx:xx:xx:xx},
933                                                          space separated) \\
934  \hline  \hline
935  \end{tabular}  \end{tabular}
936    
# Line 885  e.g.: "\code{00:02:2D:08:E2:1D 00:03:3E: Line 938  e.g.: "\code{00:02:2D:08:E2:1D 00:03:3E:
938  \begin{longtable}{l|l|p{10cm}}  \begin{longtable}{l|l|p{10cm}}
939  \strong{Option} & \strong{Parameter} & \strong{Description} \\  \strong{Option} & \strong{Parameter} & \strong{Description} \\
940  \hline\hline  \hline\hline
941  \code{channel}      & \code{\{1--14\}}                & The wifi channel \\  \code{channel}  & \code{\{1--14\}}  & The wifi channel \\
942  \hline  \hline
943  \code{maxassoc}     & \code{\{1--255\}}               & Maximum number of associated clients \\  \code{maxassoc} & \code{\{1--255\}} & Maximum number of associated clients \\
944  \hline  \hline
945  % TODO: add descriptions to the different gmode settings  % TODO: add descriptions to the different gmode settings
946  \code{gmode}        &                                 & Set the 54g Mode \\  \code{gmode} &                      & Set the 54g Mode \\
947                      & \code{\strong{Auto}}            & default \\               & \code{\strong{Auto}} & default \\
948                      & \code{LegacyB}                  & \\               & \code{LegacyB}       & \\
949                      & \code{GOnly}                    & \\               & \code{GOnly}         & \\
950                      & \code{BDeferred}                & \\               & \code{BDeferred}     & \\
951                      & \code{Performance}              & \\               & \code{Performance}   & \\
952                      & \code{LRS}                      & \\               & \code{LRS}           & \\
953  \hline  \hline
954  \code{frameburst}   & \code{\{\strong{0}|1\}}         & Disable/Enable frameburst mode. \\  \code{frameburst} & \code{\{\strong{0}|1\}} & Disable/Enable frameburst mode. \\
955  \hline  \hline
956  \code{txpower}      & \code{\{0--255|\strong{$-1$}\}} & Set the transmit power in dBm \\  \code{txpower} & \code{\{0--255|\strong{$-1$}\}} & Set the transmit power in dBm \\
957  \hline  \hline
958  \code{rate}         & \code{<Int> (\strong{$-1$})}    & force a fixed rate \\  \code{rate} & \code{<Int> (\strong{$-1$})} & force a fixed rate \\
959                      &                                 & valid values for 802.11a are (6, 9, 12, 18, 24, 36, 48, 54) \\              &                              & valid values for 802.11a are (6,
960                      &                                 & valid values for 802.11b are (1, 2, 5.5, 11) \\                                               9, 12, 18, 24, 36, 48, 54) \\
961                      &                                 & valid values for 802.11g are (1, 2, 5.5, 6, 9, 11, 12, 18, 24, 36, 48, 54) \\              &                              & valid values for 802.11b are (1,
962                      &                                 & $-1$ means automatically determine the best rate \\                                               2, 5.5, 11) \\
963  \hline              &                              & valid values for 802.11g are (1,
964  \code{rts}          & \code{\{0-2347\}}               & Set the RTS threshhold. \\                                               2, 5.5, 6, 9, 11, 12, 18, 24, 36,
965  \hline                                               48, 54) \\
966  \code{frag}         & \code{\{256-2346\}}             & Set the fragmentation threshhold. \\              &                              & $-1$ means automatically determine
967                                                 the best rate \\
968    \hline
969    \code{rts}          & \code{\{0-2347\}}       & Set the RTS threshhold. \\
970    \hline
971    \code{frag}         & \code{\{256-2346\}}     & Set the fragmentation
972                                                    threshhold. \\
973  \hline  \hline
974  \code{afterburner}  & \code{\{\strong{0}|1\}}         & Enable Afterburner capability \\  \code{afterburner}  & \code{\{\strong{0}|1\}} & Enable Afterburner capability
975                                                    \\
976  \hline  \hline
977  \code{isolate}      & \code{\{\strong{0}|1\}}         & Hide Clients from each other \\  \code{isolate}      & \code{\{\strong{0}|1\}} & Hide Clients from each other \\
978  \hline  \hline
979  \code{bridge-if}    & \code{\{br0..brX\}}             & The bridge interface (optional) \\  \code{bridge-if}    & \code{\{br0..brX\}}     & The bridge interface (optional)
980                                                    \\
981  \hline  \hline
982  \end{longtable}  \end{longtable}
983    
# Line 972  If you want to do MAC filtering, add the Line 1033  If you want to do MAC filtering, add the
1033          wireless-macmode 2          wireless-macmode 2
1034          wireless-mac 00:01:02:03:04:05 06:07:08:09:0a:0b          wireless-mac 00:01:02:03:04:05 06:07:08:09:0a:0b
1035  \end{Verbatim}  \end{Verbatim}
1036  this enables the filter and defines the list to contain addresses that should be allowed.  this enables the filter and defines the list to contain addresses that should
1037    be allowed.
1038    
1039  To enhance wireless performance, you can enable some flags like Broadcom's SpeedBooster. Normally, these flags are not dangerous:  To enhance wireless performance, you can enable some flags like Broadcom's
1040    SpeedBooster. Normally, these flags are not dangerous:
1041  \begin{Verbatim}[label=\file{/etc/network/interfaces}]  \begin{Verbatim}[label=\file{/etc/network/interfaces}]
1042          wireless-gmode performance          wireless-gmode performance
1043          wireless-frameburst 1          wireless-frameburst 1
# Line 1062  iface eth1 inet static Line 1125  iface eth1 inet static
1125    
1126  PPP comes in various flavours for different situations, the most commonly  PPP comes in various flavours for different situations, the most commonly
1127  needed will likely be DSL and for \term{WRT54G3G} users UMTS. So there exists a  needed will likely be DSL and for \term{WRT54G3G} users UMTS. So there exists a
1128  hook-script that evaluates a \code{use-template} option and generates a ppp-peer.  hook-script that evaluates a \code{use-template} option and generates a
1129  This way everything needed so far can be configured within the  ppp-peer.  This way everything needed so far can be configured within the
1130  \code{interfaces} file. Be sure you have installed the packages  \code{interfaces} file. Be sure you have installed the packages \app{kmod-ppp},
1131  \app{kmod-ppp}, \app{ppp} and \app{ppp-mod-pppoe}. For providers  \app{ppp} and \app{ppp-mod-pppoe}. For providers using PPTP for authentication,
1132  using PPTP for authentication, instead of PPPoE, you need to install \app{pptp}.  instead of PPPoE, you need to install \app{pptp}.
1133    
1134  \subsubsection{DSL with PPPoE}  \subsubsection{DSL with PPPoE}
1135  \begin{Verbatim}[label=\file{/etc/network/interfaces}]  \begin{Verbatim}[label=\file{/etc/network/interfaces}]
# Line 1079  iface ppp0 inet ppp Line 1142  iface ppp0 inet ppp
1142          ppp-device eth0.1          ppp-device eth0.1
1143  \end{Verbatim}  \end{Verbatim}
1144    
1145  Now your DSL connection will be started on boot (\code{auto ppp0})  Now your DSL connection will be started on boot (\code{auto ppp0}) and you can
1146  and you can manually shut it down with \command{ifdown ppp0} or start it up with  manually shut it down with \command{ifdown ppp0} or start it up with
1147  \command{ifup ppp0}.  \command{ifup ppp0}.  The template \code{dsl} will configure a typical PPPoE
1148  The template \code{dsl} will configure a typical PPPoE peer for you.  peer for you.
1149    
1150  \subsubsection{DSL with PPTP}  \subsubsection{DSL with PPTP}
1151  \begin{Verbatim}[label=\file{/etc/network/interfaces}]  \begin{Verbatim}[label=\file{/etc/network/interfaces}]
# Line 1097  iface ppp0 inet ppp Line 1160  iface ppp0 inet ppp
1160          ppp-device eth0.1          ppp-device eth0.1
1161  \end{Verbatim}  \end{Verbatim}
1162    
1163  Now your DSL connection will be started on boot (\code{auto ppp0})  Now your DSL connection will be started on boot (\code{auto ppp0}) and you can
1164  and you can manually shut it down with \command{ifdown ppp0} or start it up with  manually shut it down with \command{ifdown ppp0} or start it up with
1165  \command{ifup ppp0}.  \command{ifup ppp0}.  The template \code{pptp} will configure a typical PPTP
1166  The template \code{pptp} will configure a typical PPTP peer for you.  peer for you.
1167    
1168  \subsubsection{UMTS}  \subsubsection{UMTS}
1169  Same footprint different template and some specific options. That is all that  Same footprint different template and some specific options. That is all that
# Line 1121  As you can see: unneeded options like \c Line 1184  As you can see: unneeded options like \c
1184  without a value as that causes a failure in \app{ipup}. It does work if you  without a value as that causes a failure in \app{ipup}. It does work if you
1185  give empty double quotes as value like \code{""}.  give empty double quotes as value like \code{""}.
1186    
1187  Note that you have to set the correct APN, username and password for your provider!  Note that you have to set the correct APN, username and password for your
1188    provider!
1189    
1190  You may also remove the pin from your SIM-card and the configuration if you like.  You may also remove the pin from your SIM-card and the configuration if you
1191    like.
1192    
1193  For \term{Linksys WRT54G3G} a package called \app{broadcom-watchbutton} will be  For \term{Linksys WRT54G3G} a package called \app{broadcom-watchbutton} will be
1194  installed, this is a small daemon that monitors the UMTS-button of the router  installed, this is a small daemon that monitors the UMTS-button of the router
1195  and executes \command{ifup umts} or \command{ifdown umts} on a button press.  and executes \command{ifup umts} or \command{ifdown umts} on a button press.
1196  You have to set \code{watchbutton=YES} in /etc/rc.conf to have it start automatically.  You have to set \code{watchbutton=YES} in /etc/rc.conf to have it start
1197    automatically.
1198    
1199  This is totally independent from the \code{auto umts} setting. Even if you  This is totally independent from the \code{auto umts} setting. Even if you
1200  start the connection on bootup you can shut it down again with a button press.  start the connection on bootup you can shut it down again with a button press.
1201    
1202  \subsection{custom interface hooks}  \subsection{custom interface hooks}
1203  \subsubsection{per interface}  \subsubsection{per interface}
1204  You can execute various commands on interface startup or shutdown with special option:  You can execute various commands on interface startup or shutdown with special
1205    option:
1206  \begin{Verbatim}[label=\file{/etc/network/interfaces}]  \begin{Verbatim}[label=\file{/etc/network/interfaces}]
1207  iface foobar inet static  iface foobar inet static
1208      [...]      [...]
# Line 1146  iface foobar inet static Line 1213  iface foobar inet static
1213      post-down <command>      post-down <command>
1214  \end{Verbatim}  \end{Verbatim}
1215    
1216  You can give each option multiple times and their commands will be executed in given order.  You can give each option multiple times and their commands will be executed in
1217    given order.
1218  \begin{description}  \begin{description}
1219          \item[pre-up] before the interface will be started          \item[pre-up] before the interface will be started
1220          \item[up] after the interface was started successfully          \item[up] after the interface was started successfully
# Line 1155  You can give each option multiple times Line 1223  You can give each option multiple times
1223  \end{description}  \end{description}
1224    
1225  \subsubsection{general hooks}  \subsubsection{general hooks}
1226  Additionally you can write scripts executed for each interface if you put them in  Additionally you can write scripts executed for each interface if you put them
1227    in
1228  \begin{itemize}  \begin{itemize}
1229          \item \texttt{/etc/network/if-pre-up.d}          \item \texttt{/etc/network/if-pre-up.d}
1230          \item \texttt{/etc/network/if-up.d}          \item \texttt{/etc/network/if-up.d}
# Line 1166  Same semantics as above. Line 1235  Same semantics as above.
1235    
1236  \section{FWCF - FreeWRT Configuration Filesystem}  \section{FWCF - FreeWRT Configuration Filesystem}
1237    
1238  FWCF is a separate flash partition for all changes made to the \file{/etc/} directory.  FWCF is a separate flash partition for all changes made to the \file{/etc/}
1239  There is a small tool named \app{fwcf}, which is used to setup the system or  directory.  There is a small tool named \app{fwcf}, which is used to setup the
1240  to commit changes to the fwcf partition.  system or to commit changes to the fwcf partition.
1241    
1242  On bootup the script \file{/sbin/mount\_root} is executed, which calls  On bootup the script \file{/sbin/mount\_root} is executed, which calls
1243  \command{fwcf setup} to setup \file{/etc/} as memory filesystem and overlay the changes committed  \command{fwcf setup} to setup \file{/etc/} as memory filesystem and overlay the
1244  to the fwcf partition.  changes committed to the fwcf partition.
1245    
1246  If you change anything in \file{/etc/} and like to keep the change, it is required to  If you change anything in \file{/etc/} and like to keep the change, it is
1247  execute \command{fwcf commit}. This will compress all changed or new files in  required to execute \command{fwcf commit}. This will compress all changed or
1248  \file{/etc/} and write the result into the fwcf partition.  The fwcf partition is 128 Kb in  new files in \file{/etc/} and write the result into the fwcf partition.  The
1249  size. This size is not changeable at the moment.  fwcf partition is 128 Kb in size. This size is not changeable at the moment.
1250    
1251  If you need more detailed information, please read the specification of FWCF,  If you need more detailed information, please read the specification of FWCF,
1252  which can be found  which can be found at
1253  at \url{http://www.freewrt.org/trac/wiki/Documentation/Specs/FwCf}  \url{http://www.freewrt.org/trac/wiki/Documentation/Specs/FwCf}
1254    
1255  If you want to remove all your changes and start your configuration from scratch,  If you want to remove all your changes and start your configuration from
1256  use \command{fwcf erase}. This is also required if you switch between compression  scratch, use \command{fwcf erase}. This is also required if you switch between
1257  plugins. Right now LZO plugin is default.  compression plugins. Right now LZO plugin is default.
1258    
1259  \section{IPKG - Packagemanagement}  \section{IPKG - Packagemanagement}
1260    
1261  All software for FreeWRT is available as a IPKG package. IPKG is a package manager  All software for FreeWRT is available as a IPKG package. IPKG is a package
1262  very similar to Debian's \app{dpkg/apt-get} utilities. It is specially designed for  manager very similar to Debian's \app{dpkg/apt-get} utilities. It is specially
1263  embedded systems and is widely used. The FreeWRT project use a special version,  designed for embedded systems and is widely used. The FreeWRT project use a
1264  which is embedded to the busybox binary. Normally the command line tool  special version, which is embedded to the busybox binary. Normally the command
1265  \app{ipkg} is pre-installed.  line tool \app{ipkg} is pre-installed.
1266    
1267  IPKG uses a configuration file similar to \file{/etc/apt/sources.list}, which  IPKG uses a configuration file similar to \file{/etc/apt/sources.list}, which
1268  contains a list of software repositories available via HTTP or FTP.  contains a list of software repositories available via HTTP or FTP.  The
1269  The configuration file \file{/etc/ipkg.conf} contains the official  configuration file \file{/etc/ipkg.conf} contains the official FreeWRT 1.0
1270  FreeWRT 1.0 repository for your board and kernel version.  repository for your board and kernel version.
1271    
1272  To update the list of available packages execute following command as root:  To update the list of available packages execute following command as root:
1273  \begin{Verbatim}[label=update list of available packages]  \begin{Verbatim}[label=update list of available packages]
# Line 1213  To install a new package use following c Line 1282  To install a new package use following c
1282  # ipkg install tcpdump  # ipkg install tcpdump
1283  \end{Verbatim}  \end{Verbatim}
1284    
1285  This will install the package \app{tcpdump} and all dependencies onto the flash.  This will install the package \app{tcpdump} and all dependencies onto the
1286  Where the data is saved depends on the root filesystem you decided to use while  flash.  Where the data is saved depends on the root filesystem you decided to
1287  installing FreeWRT. If you use jffs2 as root filesystem, then the package is  use while installing FreeWRT. If you use jffs2 as root filesystem, then the
1288  installed on the big linux partition. If you use squashfs-overlay, then the  package is installed on the big linux partition. If you use squashfs-overlay,
1289  package is installed on the mini-fo overlay filesystem which writes its data  then the package is installed on the mini-fo overlay filesystem which writes
1290  to the jffs2 data partition. If you use a squashfs-symlinks filesystem, then the  its data to the jffs2 data partition. If you use a squashfs-symlinks
1291  package data is directly install into the jffs2 data partition, containing  filesystem, then the package data is directly install into the jffs2 data
1292  symlinks to the read-only squashfs partition.  partition, containing symlinks to the read-only squashfs partition.
1293    
1294  You can also remove packages, but this is only useful if you are using jffs2  You can also remove packages, but this is only useful if you are using jffs2 as
1295  as root filesystem:  root filesystem:
1296  \begin{Verbatim}[label=example removal of \app{tcpdump}]  \begin{Verbatim}[label=example removal of \app{tcpdump}]
1297  # ipkg remove tcpdump  # ipkg remove tcpdump
1298  \end{Verbatim}  \end{Verbatim}
1299    
1300  This will not remove any dependencies, installed earlier. For example,  This will not remove any dependencies, installed earlier. For example,
1301  \app{libpcap} is still installed after executing this command.  \app{libpcap} is still installed after executing this command.  On jffs2 root
1302  On jffs2 root filesystem you should never remove any essential packages like  filesystem you should never remove any essential packages like \app{busybox},
1303  \app{busybox}, \app{fwcf} or \app{uclibc}, otherwise you make the embedded system unusable.  \app{fwcf} or \app{uclibc}, otherwise you make the embedded system unusable.
1304    
1305  Nearly the same as for removing packages, counts for \command{ipkg upgrade}.  Please  Nearly the same as for removing packages, counts for \command{ipkg upgrade}.
1306  \strong{never ever} use \command{ipkg upgrade} to update your embedded system.  This command  Please \strong{never ever} use \command{ipkg upgrade} to update your embedded
1307  is only useful to upgrade single packages on a jffs2 rootfilesystem or data  system.  This command is only useful to upgrade single packages on a jffs2
1308  partition.  rootfilesystem or data partition.
1309    
1310  \section{Startup scripts}  \section{Startup scripts}
1311    
1312  Some of the available packages containing software which start services at boot  Some of the available packages containing software which start services at boot
1313  time. For that we provide simple startup scripts, which are installed into the  time. For that we provide simple startup scripts, which are installed into the
1314  directory \file{/etc/init.d}. See following example for  directory \file{/etc/init.d}. See following example for the package
1315  the package \app{dnsmasq}, a combined dns and dhcp  \app{dnsmasq}, a combined dns and dhcp server daemon:
 server daemon:  
1316    
1317  \begin{Verbatim}[label=\file{/etc/init.d/S50dnsmasq}]  \begin{Verbatim}[label=\file{/etc/init.d/S50dnsmasq}]
1318  #!/bin/sh  #!/bin/sh
# Line 1274  esac Line 1342  esac
1342  exit 0  exit 0
1343  \end{Verbatim}  \end{Verbatim}
1344    
1345  After installation the package postinst script will add all needed changes to the  After installation the package postinst script will add all needed changes to
1346  \file{/etc/} directory. For example packages can add new user and groups, add new  the \file{/etc/} directory. For example packages can add new user and groups,
1347  variables to \file{/etc/rc.conf} or just add new values to existing files as  add new variables to \file{/etc/rc.conf} or just add new values to existing
1348  \file{/etc/services}. It is FreeWRT policy not to start any services after  files as \file{/etc/services}. It is FreeWRT policy not to start any services
1349  installation or in case of a new boot. To start services on bootup you need to set  after installation or in case of a new boot. To start services on bootup you
1350  \code{\$servicename=YES} in \file{/etc/rc.conf} and commit your changes via  need to set \code{\$servicename=YES} in \file{/etc/rc.conf} and commit your
1351  \command{fwcf commit}. For every policy exists an exception, we start all essential services  changes via \command{fwcf commit}. For every policy exists an exception, we
1352  by default, like ssh daemon, syslog and network initialisation.  start all essential services by default, like ssh daemon, syslog and network
1353    initialisation.
1354    
1355  For some services you can control the startup behaviour by modifying  For some services you can control the startup behaviour by modifying the
1356  the \code{\$servicename\_flags} variable in \file{/etc/rc.conf}.  \code{\$servicename\_flags} variable in \file{/etc/rc.conf}.
1357    
1358  For example the variable \code{\$ssh\_opts} is provided as an argument to the dropbear  For example the variable \code{\$ssh\_opts} is provided as an argument to the
1359  ssh daemon to control its behaviour.  dropbear ssh daemon to control its behaviour.
1360    
1361  Having this policy helps you to configure your FreeWRT embedded system without  Having this policy helps you to configure your FreeWRT embedded system without
1362  shooting yourself in the foot. For example if you try to realize a firewall system  shooting yourself in the foot. For example if you try to realize a firewall
1363  and trying to set the rules in \file{/etc/firewall.user}, which is read by  system and trying to set the rules in \file{/etc/firewall.user}, which is read
1364  \file{/etc/init.d/S45firewall}, if the iptables package is installed. You can just  by \file{/etc/init.d/S45firewall}, if the iptables package is installed. You
1365  reload the changed ruleset via \code{/etc/init.d/S45firewall restart}. If you managed  can just reload the changed ruleset via \code{/etc/init.d/S45firewall restart}.
1366  to kick you out of the system, you can just reboot the system and you gain access  If you managed to kick you out of the system, you can just reboot the system
1367  again. As soon as your are ready with the firewall configuration and you decide  and you gain access again. As soon as your are ready with the firewall
1368  to activate the firewall rules on bootup, you set \code{firewall=YES} in  configuration and you decide to activate the firewall rules on bootup, you set
1369  \file{/etc/rc.conf},  \code{firewall=YES} in \file{/etc/rc.conf}, commit your changes via
1370  commit your changes via \command{fwcf commit} and reboot. Now the firewall  \command{fwcf commit} and reboot. Now the firewall rules will be activated on
1371  rules will be activated on bootup.  bootup.
1372    
1373    
1374  \chapter{Troubleshooting}\label{ch:troubleshooting}  \chapter{Troubleshooting}\label{ch:troubleshooting}
1375    
1376  \section{Failsafe Mode}  \section{Failsafe Mode}
1377    
1378  Failsafe mode is very useful if you misconfigured your embedded system,  Failsafe mode is very useful if you misconfigured your embedded system, so that
1379  so that you can not access it anymore. E.g. if you accidentially disabled  you can not access it anymore. E.g. if you accidentially disabled secure shell
1380  secure shell or misconfigured the firewall, so that you can not login any  or misconfigured the firewall, so that you can not login any more.
 more.  
1381    
1382  When in failsafe mode, the device won't interpret any networking setup files.  When in failsafe mode, the device won't interpret any networking setup files.
1383  It stops even before the root filesystem gets mounted read--write, and fwcf is  It stops even before the root filesystem gets mounted read--write, and fwcf is
1384  set up. It will just set the LAN interface up and give it the IP address  set up. It will just set the LAN interface up and give it the IP address
1385  \file{192.168.1.1} and netmask \file{255.255.255.0}. Then it will start a  \file{192.168.1.1} and netmask \file{255.255.255.0}. Then it will start a
1386  \app{telnet} daemon, so you get straight access (without depending on the installed SSH daemon).  \app{telnet} daemon, so you get straight access (without depending on the
1387    installed SSH daemon).
1388    
1389  \subsection{How It Works}  \subsection{How It Works}
1390    
1391  To get FreeWRT into failsafe mode you need physical access to the device and  To get FreeWRT into failsafe mode you need physical access to the device and
1392  the failsafe utility. The failsafe utility is built inside our ADK and  the failsafe utility. The failsafe utility is built inside our ADK and is
1393  is available in the directory \file{bin/} after a successful build.  available in the directory \file{bin/} after a successful build.
1394    
1395  If you just want to compile the tool and not a complete firmware image,  If you just want to compile the tool and not a complete firmware image, use
1396  use following command:  following command:
1397    
1398  \begin{Verbatim}[label=building the failsafe utility for the host system]  \begin{Verbatim}[label=building the failsafe utility for the host system]
1399  $ make subdir=tools/failsafe install  $ make subdir=tools/failsafe install
# Line 1340  recognized network interface (eth0). Line 1409  recognized network interface (eth0).
1409  \subsection{Enabling Failsafe Mode}  \subsection{Enabling Failsafe Mode}
1410    
1411  Connect your computer to the embedded system via direct or crossed network  Connect your computer to the embedded system via direct or crossed network
1412  cable. Use the failsafe port (in most cases one of the LAN ports),  cable. Use the failsafe port (in most cases one of the LAN ports), see the
1413  see the device specific page for the exact network port.  device specific page for the exact network port.
1414    
1415  Configure your network interface to the IP address \file{192.168.1.2} with network  Configure your network interface to the IP address \file{192.168.1.2} with
1416  mask \file{255.255.255.0}. Now start the failsafe utility on your computer.  network mask \file{255.255.255.0}. Now start the failsafe utility on your
1417    computer.
1418    
1419  \begin{Verbatim}  \begin{Verbatim}
1420  $ ./failsafe  $ ./failsafe
# Line 1374  $ telnet 192.168.1.1 Line 1444  $ telnet 192.168.1.1
1444    
1445  \subsection{Repairing Your FreeWRT Configuration}  \subsection{Repairing Your FreeWRT Configuration}
1446    
1447  If you want to repair your configuration, you first need to  If you want to repair your configuration, you first need to mount the root
1448  mount the root filesystem read--writeable. This is best done via:  filesystem read--writeable. This is best done via:
1449    
1450  \begin{Verbatim}  \begin{Verbatim}
1451  # mount_root  # mount_root
# Line 1394  Do not forget to commit your changes aft Line 1464  Do not forget to commit your changes aft
1464  # fwcf commit  # fwcf commit
1465  \end{Verbatim}  \end{Verbatim}
1466    
1467  If you want to start over with the default \file{/etc/} directory, just remove the fwcf  If you want to start over with the default \file{/etc/} directory, just remove
1468  partition content with following command:  the fwcf partition content with following command:
1469    
1470  \begin{Verbatim}  \begin{Verbatim}
1471  mtd erase fwcf  mtd erase fwcf
1472  \end{Verbatim}  \end{Verbatim}
1473    
1474  You can either use \command{reboot -f} or the option \command{-r} for \app{mtd} to reboot the system.  You can either use \command{reboot -f} or the option \command{-r} for \app{mtd}
1475    to reboot the system.
1476    
1477  %\section{Serial Console}  %\section{Serial Console}
1478    

Legend:
Removed from v.2537  
changed lines
  Added in v.2538

root@freewrt.org:443
ViewVC Help
Powered by ViewVC 1.1.20