- Timestamp:
- May 17, 2007, 10:25:52 PM (19 years ago)
- Branches:
- freewrt_1_0, freewrt_2_0
- Children:
- dac4ea5
- Parents:
- 034cb53
- Location:
- docs/handbook/user
- Files:
-
- 2 edited
-
cover.tex (modified) (1 diff)
-
handbook.tex (modified) (59 diffs)
Legend:
- Unmodified
- Added
- Removed
-
docs/handbook/user/cover.tex
r034cb53 r8ca8ce4 18 18 \\ 19 19 \rightline{% 20 Revision 1.0.1 }20 Revision 1.0.1, \svnInfoRevision} 21 21 \\ 22 22 \rightline{% 23 World, \ today23 World, \svnToday 24 24 } 25 25 \vfill -
docs/handbook/user/handbook.tex
r034cb53 r8ca8ce4 1 \documentclass[12pt,a4paper,openany,smallheadings, 2 headinclude,headsepline,final]{scrreprt} 3 \usepackage[utf8]{inputenc} 4 \usepackage{amsmath} 5 \usepackage{amsfonts} 6 \usepackage{amssymb} 7 \usepackage{caption2} 8 \usepackage[canadian]{babel} 9 \usepackage{varioref} 10 \usepackage{txfonts} 11 \usepackage[pdftex]{graphicx} 1 \documentclass[12pt,a4paper,openany,smallheadings,headinclude,headsepline,final]{scrreprt} 2 %\usepackage{ucs} % Unicode support 3 \usepackage[utf8]{inputenc} % UTF-8 characters as input are allowed 4 %\usepackage{amsmath} 5 %\usepackage{amsfonts} 6 %\usepackage{amssymb} 7 %\usepackage{caption2} 8 \usepackage[english]{babel} % Sets the layout to English style 9 \usepackage{varioref} % Intelligent page references 10 %\usepackage{txfonts} 11 \usepackage[pdftex]{color} % Colour control for LaTeX documents 12 \usepackage[pdftex]{graphicx} % Enhanced support for graphics 12 13 %\usepackage{listings} 13 \usepackage{makeidx} 14 \usepackage[T1]{fontenc} 15 16 % fancy verbatim enables changing of font, fontsize, etc. in verbatim code 17 % also set smaller font and a frame as default 18 \usepackage{fancyvrb} 19 \fvset{fontsize=\small, frame=single} 14 \usepackage{makeidx} % Standard LaTeX package for creating indexes 15 \usepackage{longtable} % Allow tables to flow over page boundaries 16 \usepackage[T1]{fontenc} % T1-fonts 17 \usepackage{fancyvrb} % Sophisticated verbatim text 18 \usepackage[a4paper,rmargin=2cm,lmargin=2cm,tmargin=2.5cm,bmargin=3.5cm]{geometry} % Flexible and complete interface to document dimensions 19 \usepackage{fixltx2e, mparhack} % Patches for LaTeX; A workaround for a LaTeX bug in marginpars 20 \usepackage[nofancy]{svninfo} % Typeset Subversion Keywords 21 \usepackage{float} % Improved interface for floating objects 22 \usepackage{hyperref} % Extensive support for hypertext in LaTeX 23 20 24 21 25 % marvosym macht Pfeil kaputt, also sichern 22 26 % line 28, /usr/share/texmf/tex/latex/marvosym/marvosym.sty 23 \let\RescueRightarrow=\Rightarrow 24 \usepackage{marvosym} 25 \renewcommand{\Rightarrow}{\RescueRightarrow} 26 27 \usepackage[pdftex]{color} 27 %\let\RescueRightarrow=\Rightarrow 28 %\usepackage{marvosym} 29 %\renewcommand{\Rightarrow}{\RescueRightarrow} 30 28 31 \definecolor{skyblue}{rgb}{0,0.3323,0.5720} 29 \usepackage[% 30 colorlinks=true,anchorcolor=red, 31 breaklinks=true,linkcolor=blue,urlcolor=red, 32 citecolor=skyblue, 33 pdfauthor={The FreeWRT Team}, 34 pdftitle={FreeWRT User Handbook}, 35 pdfcreator={tetex and VIM}, 36 pdfsubject={Open Source}, 37 pdfview=FitV, 38 pdfstartview=FitV, 39 pdfstartpage={1}, 40 pdfpagelayout=SinglePage, 41 pdfpagemode=None, 42 pdfkeywords={FreeWRT}]{hyperref} 43 \usepackage{cancel} 32 \restylefloat{figure} 33 \hypersetup{ 34 colorlinks=true,anchorcolor=red, 35 breaklinks=true,linkcolor=blue,urlcolor=red, 36 citecolor=skyblue, 37 pdfauthor={The FreeWRT Team}, 38 pdftitle={FreeWRT User Handbook}, 39 pdfcreator={tetex and VIM}, 40 pdfsubject={Open Source}, 41 pdfview=FitV, 42 pdfstartview=FitV, 43 pdfstartpage={1}, 44 pdfpagelayout=SinglePage, 45 pdfpagemode=None, 46 pdfkeywords={FreeWRT} 47 } 48 \fvset{fontsize=\small, frame=single} % fancyvrb: set small font size and enable frames 49 %\usepackage{cancel} 44 50 %\usepackage[final, activate, verbose=true]{microtype} 45 \usepackage{ngerman}51 %\usepackage{ngerman} 46 52 %\usepackage{bookman} 47 53 %\usepackage[a4paper,twoside,rmargin=2cm,lmargin=2cm,tmargin=2.5cm]{geometry} 48 \usepackage[a4paper,rmargin=2cm,lmargin=2cm,tmargin=2.5cm,bmargin=3.5cm]{geometry}54 %\usepackage[a4paper,rmargin=2cm,lmargin=2cm,tmargin=2.5cm,bmargin=3.5cm]{geometry} 49 55 %\usepackage{ncntrsbk} 50 \usepackage{float}51 \restylefloat{figure}56 %\usepackage{float} 57 %\restylefloat{figure} 52 58 %\bibliographystyle{alphadin} 53 \bibliographystyle{alpha} 54 55 % Change Section, Chapter Layout 56 % http://www.mackichan.com/index.html?techtalk/518.htm~mainFrame 57 %\usepackage{sectsty} 58 %\allsectionsfont{\raggedleft} 59 %\chapterfont{\raggedleft} 60 61 % BEGIN Fancy Header Extensions 62 % Save Graphics in Latex box 63 %\renewcommand{\headheight}{30pt} %Make height wider so picture is ok 64 %\renewcommand{\footskip}{45pt} %Make height wider so picture is ok 65 66 \usepackage{fixltx2e, mparhack} 59 %\bibliographystyle{alpha} 67 60 68 61 % Generate index in preamble 69 62 \makeindex 63 70 64 \begin{document} 65 \svnInfo $Id$ 71 66 \setlength{\marginparwidth}{10mm} 67 72 68 \include{cover} 69 73 70 \renewcommand{\thepage}{\roman{page}} 74 71 \tableofcontents … … 85 82 \renewcommand{\sectionmark}[1]{\markright{\thesection.\ \scshape #1}} 86 83 87 %Bilitz 88 %\newcommand{\blitz}{ \mbox{\Huge \Lightning} } 89 \newcommand{\blitz}{ \Lightning } 90 \newcommand{\entspr}{\stackrel{\wedge}{=}} 91 84 85 % Create some new commands for designing the text 86 % applications 87 \newcommand{\app}[1]{% 88 \textsf{\textit{#1}}} 89 % terminology, vendor or product names 90 \newcommand{\term}[1]{% 91 \textsc{#1}} 92 % filenames and directories 93 \newcommand{\file}[1]{% 94 \textsf{#1}} 95 % user input 96 \newcommand{\command}[1]{% 97 \texttt{\textbf{#1}}} 98 % example code, output of applications 99 \newcommand{\code}[1]{% 100 \texttt{#1}} 101 % emphasized text (nicer than \emph{}) 102 \newcommand{\strong}[1]{% 103 \textbf{#1}} 92 104 93 105 … … 100 112 systems. The latest version of this document is always available at the 101 113 FreeWRT website. If you have any comments, criticism or found some wrong 102 description, please send us an e-mail to freewrt-handbook@freewrt.org, we are 114 description, please send us an e-mail to 115 \href{mailto:freewrt-handbook@freewrt.org}{freewrt-handbook@freewrt.org}, we are 103 116 always happy about getting feedback to this document, and will try to update 104 117 or correct the issues mentioned by you. 105 118 106 The FreeWRT User handbook is split into five distinct sections. Appliance107 Development Kit covers the building of FreeWRT firmware images. The second 108 section, Installing FreeWRT, covers all aspects regarding the installation and 109 deinstallation of FreeWRT firmware images. The third section is a detailed 110 description of the startup process of FreeWRT. The fourth section, Using FreeWRT, 111 covers administrational tasks, such as network configuration, the FreeWRT 112 configuration filesystem, package management and update mechanism. The last 113 section helps troubleshooting problems and recovering a bad firmware installation. 114 The appendix contains board specific information.For FreeWRT 1.0 these are only119 The FreeWRT User handbook is split into several distinct chapters. 120 \nameref{ch:ADK} covers the building of FreeWRT firmware images. 121 In \autoref{ch:installing}, \nameref{ch:installing}, all aspects regarding the 122 installation and deinstallation of FreeWRT firmware images are covered. The 123 next chapter, \nameref{ch:administration}, covers administrational tasks, such 124 as network configuration, the FreeWRT configuration filesystem, package 125 management and update mechanism. The last chapter, \nameref{ch:troubleshooting}, 126 helps troubleshooting problems and recovering a bad firmware installation. The 127 appendix contains board specific information. For FreeWRT 1.0 these are only 115 128 Broadcom based embedded systems. 116 129 … … 123 136 \section{Typographic Conventions} 124 137 125 Examples starting with \ #indicate a command that must be invoked as super126 user. You can use suto gain super user privileges.127 128 \begin{Verbatim} 138 Examples starting with \code{\#} indicate a command that must be invoked as super 139 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] 129 142 # fwcf commit 130 143 \end{Verbatim} 131 144 132 Examples starting with \ $ indicate a command that can be invoked as a normal133 user. The default user account on a freshly installed FreeWRT system is134 ,,admin'', the password ,,FreeWRT''.135 136 \begin{Verbatim} 145 Examples starting with \code{\$} indicate a command that can be invoked as a 146 normal user. The default user account on a freshly installed FreeWRT system is 147 "\code{admin}", the password "\code{FreeWRT}". 148 149 \begin{Verbatim}[label=example for a command line as non-privileged user] 137 150 $ cat /etc/banner 138 151 \end{Verbatim} 139 152 140 \chapter{Appliance Development Kit (ADK)} 153 %\chapter{Web Interface Builder (WIB)}\label{ch:WIB} 154 % 155 %FIXME It is named later in the text, but not explained what it is. Probably 156 %this chapter can be joined with the chapter about ADK 157 158 \chapter{Appliance Development Kit (ADK)}\label{ch:ADK} 141 159 142 160 The ADK is the core of FreeWRT and contains all scripts and sources to create … … 145 163 146 164 \begin{itemize} 147 \item Asus WL500g148 \item Asus WL500g deluxe149 \item Asus WL500g premium150 \item Linksys WRT54G v2.0151 \item Linksys WRT54G v2.2152 \item Linksys WRT54G v3.0153 \item Linksys WRT54G v3.1154 \item Linksys WRT54G v4.0155 \item Linksys WRT54GS v1.0156 \item Linksys WRT54GS v1.1157 \item Linksys WRT54GS v4158 \item Linksys WRT54G3G159 \item Linksys WRT54GL160 \item Netgear WGT634u165 \item Asus WL500g 166 \item Asus WL500g deluxe 167 \item Asus WL500g premium 168 \item Linksys WRT54G v2.0 169 \item Linksys WRT54G v2.2 170 \item Linksys WRT54G v3.0 171 \item Linksys WRT54G v3.1 172 \item Linksys WRT54G v4.0 173 \item Linksys WRT54GS v1.0 174 \item Linksys WRT54GS v1.1 175 \item Linksys WRT54GS v4 176 \item Linksys WRT54G3G 177 \item Linksys WRT54GL 178 \item Netgear WGT634u 161 179 \end{itemize} 162 180 … … 172 190 173 191 \begin{itemize} 174 \item Debian GNU/Linux175 \item Gentoo Linux176 \item OpenSuSE 177 \item Ubuntu GNU/Linux178 \item Fedora Core 179 \item OpenBSD (partial support)\footnote{some addon packages does not compile}180 \item MirOS BSD (partial support)\footnote{some addon packages does not compile}192 \item Debian GNU/Linux 193 \item Gentoo Linux 194 \item OpenSuSE 195 \item Ubuntu GNU/Linux 196 \item Fedora Core 197 \item OpenBSD (partial support)\footnote{some addon packages does not compile} 198 \item MirOS BSD (partial support)\footnote{some addon packages does not compile} 181 199 \end{itemize} 182 200 … … 187 205 188 206 \begin{itemize} 189 \item gcc3 or higher190 \item g++191 \item binutils192 \item patch193 \item gzip194 \item bzip2195 \item unzip196 \item flex197 \item bison198 \item GNU make199 \item zlib (+headers)200 \item ncurses (+headers)201 \item (g)libc headers202 \item perl207 \item gcc3 or higher 208 \item g++ 209 \item binutils 210 \item patch 211 \item gzip 212 \item bzip2 213 \item unzip 214 \item flex 215 \item bison 216 \item GNU make 217 \item zlib (+headers) 218 \item ncurses (+headers) 219 \item (g)libc headers 220 \item perl 203 221 \end{itemize} 204 222 … … 213 231 214 232 Now go to a directory where you want to build the firmware. Depending on the 215 features you select you will need about 2.5- 5 GB free disk space. This233 features you select you will need about 2.5--5 GB free disk space. This 216 234 includes the ADK itself, any source archives which will be downloaded 217 235 and their extracted copies (for compiling). 218 236 219 237 To get the latest stable FreeWRT ADK try one of these commands: 220 Via HTTP protocol: 221 \begin{verbatim} 238 \begin{Verbatim}[label=Check out the 1.0-branch of FreeWRT ADK via HTTP protocol] 222 239 $ svn co http://www.freewrt.org/svn/tags/freewrt_1_0_x freewrt 223 \end{verbatim} 224 Via subversion protocol: 225 \begin{verbatim} 240 \end{Verbatim} 241 \begin{Verbatim}[label=Check out the 1.0-branch of FreeWRT ADK via subversion protocol] 226 242 $ svn co svn://www.freewrt.org/itags/freewrt_1_0_x freewrt 227 \end{ verbatim}228 229 The value \dq{}x\dq{}is a place holder for the latest minor release number.243 \end{Verbatim} 244 245 The value $x$ is a place holder for the latest minor release number. 230 246 Take a look at our project page to find out which minor release number is the latest one. 231 247 … … 241 257 242 258 Building a FreeWRT firmware image is just like building a new Linux kernel, 243 but a little more complex. There is a ncurses-based configuration menu at the244 beginning, the changes made are saved into a file named ,,.config''in the ADK259 but a little more complex. There is a \app{ncurses}-based configuration menu at the 260 beginning, the changes made are saved into a file named \file{.config} in the ADK 245 261 root. The build is done by the various Makefiles, compiling and linking the 246 sources together accordingly to the symbols defined in ,,.config''.262 sources together accordingly to the symbols defined in \file{.config}. 247 263 248 264 Unlike kernel compilation, FreeWRT needs to be cross-compiled. This 249 265 leads to special premises, as most of the tools need to be specially build. 250 266 But no panic, FreeWRT will do this all for you. In fact, this is done at the 251 second run of \ texttt{make} (the first one opens the configuration), and267 second run of \command{make} (the first one opens the configuration), and 252 268 therefore can be seen as part of the first firmware build. For clarity 253 269 though, we will discuss these two things separately. … … 259 275 260 276 \subsection{Creating A Configuration} 261 The first step is to run \texttt{make}. After checking some prerequisites (see 262 ,,Troubleshooting'' below for aid in problems), a console based configuration 277 278 The first step is to run \command{make}. After checking some prerequisites (see 279 \nameref{ch:troubleshooting} below for aid in problems), a console based configuration 263 280 menu should start. Theoretically no choices have to be made, but it's proven 264 281 useful to at least: 265 282 \begin{itemize} 266 \item select a target (menu: ,,Embedded System'')267 \item select the root filesystem type (menu: ,,Target Firmware type'')283 \item select a target (menu: \code{Embedded System}) 284 \item select the root filesystem type (menu: \code{Target Firmware type}) 268 285 \end{itemize} 269 286 270 Then quit saving changes. If you forgot that, just run \ texttt{make} again, redo287 Then quit saving changes. If you forgot that, just run \command{make} again, redo 271 288 your changes, then save. 272 289 … … 274 291 275 292 Now that you have a first minimal configuration, it is time to build the toolchain 276 for cross-compiling. To do this, just enter {{{make}}} again. The build starts293 for cross-compiling. To do this, just enter \command{make} again. The build starts 277 294 downloading and compiling each needed part of the toolchain, and later continues 278 295 with building the first firmware image. Later one can be taken as proof of a 279 296 working ADK. 280 297 281 Already experienced in compiling gcc? Then you know...If not, better be told298 Already experienced in compiling \app{gcc}? Then you know\dots If not, better be told 282 299 that it takes \underline{really long} to finish. In the meantime I suggest reading the 283 300 next chapter dealing with internals about cross-compiling. … … 286 303 287 304 A cross-compile toolchain exists of a set of tools: a compiler, linker, assembler, 288 debugger and a clibrary. A cross-compile toolchain runs on your host system and305 debugger and a C~library. A cross-compile toolchain runs on your host system and 289 306 creates native binaries for your target system. A cross-compile toolchain is 290 307 basically created in six steps: 291 308 292 309 \begin{enumerate} 293 \item Get and prepare the Kernel and C Library headers of your target system294 \item Compile the binutils package for your target295 \item Compile a static Ccompiler for your target296 \item Compile and install a Clibrary for your target297 \item Compile and install a full C/C++compiler298 \item Compile and install the GNU debugger310 \item Get and prepare the Kernel and C~library headers of your target system 311 \item Compile the binutils package for your target 312 \item Compile a static C~compiler for your target 313 \item Compile and install a C~library for your target 314 \item Compile and install a full C/C++~compiler 315 \item Compile and install the GNU debugger 299 316 \end{enumerate} 300 317 301 318 The cross-compile toolchain is created in 302 ,,staging\_dir\_\$(cpu\_arch)''\footnote{f.e. mipsel, which stands for MIPS Little 303 Endian)}.All the tools running on the host, but used to create, analyze or debug319 \file{staging\_dir\_\$(cpu\_arch)}\footnote{e.g. mipsel, which stands for MIPS 320 Little Endian}. All the tools running on the host, but used to create, analyze or debug 304 321 for the target are kept in this directory. All addon headers and libraries 305 322 are installed to this directory. 306 323 307 324 If you want to compile a simple application without using the ADK, just use the 308 compiler directly ( f.e. compiling a MIPS Little Endian application):309 \begin{ verbatim}325 compiler directly (e.g. compiling a MIPS Little Endian application): 326 \begin{Verbatim}[label=compile a simple application with the cross-compiler] 310 327 ./staging_dir_mipsel/bin/mipsel-linux-uclibc-gcc -o myapp myapp.c 311 \end{ verbatim}312 313 Check with ,,file''if you got a MIPS binary:314 \begin{ verbatim}328 \end{Verbatim} 329 330 Check with the tool \app{file} if you got a MIPS binary: 331 \begin{Verbatim}[label=check the binary with \app{file}] 315 332 $ file myapp 316 333 myapp: ELF 32-bit LSB MIPS-I executable, MIPS, version 1 (SYSV), dynamically 317 334 linked (uses shared libs), not stripped 318 \end{ verbatim}335 \end{Verbatim} 319 336 320 337 \section{Building A FreeWRT Firmware Image} … … 322 339 Your local copy of the FreeWRT ADK should now be prepared for building firmware 323 340 images. The next step is to do an extensive configuration for the image you 324 want to create. To start the configuration menu, type ,,\texttt{make menuconfig}''.325 326 When selecting packages, \ texttt{<*>} means it will be inserted into the firmware327 images and \ texttt{<M>} means it will be build as an addon package which can be341 want to create. To start the configuration menu, type \command{make menuconfig}. 342 343 When selecting packages, \code{<*>} means it will be inserted into the firmware 344 images and \code{<M>} means it will be build as an addon package which can be 328 345 installed later at runtime. 329 346 330 347 The target device and filesystem should already been chosen by you to the right 331 value, if not you will have to issue a ,,\texttt{make clean}''before actually348 value, if not you will have to issue a \command{make clean} before actually 332 349 building the firmware image. Otherwise things get messed up. A smooth 333 350 rebuild is a missing feature in the current ADK. For the packages, if unsure, you … … 336 353 forget to save your configuration when leaving! 337 354 338 After leaving the menubased configuration, type ,,\texttt{make}''again to build355 After leaving the menubased configuration, type \command{make} again to build 339 356 the new FreeWRT firmware image. Depending on your package selections and 340 357 underlying hardware, this will take different amounts of time. For your spare time … … 345 362 346 363 Just like when building the ADK's toolchain, the sources for the selected 347 packages are downloaded from the internet first, then buil dusing the364 packages are downloaded from the internet first, then built using the 348 365 cross-compiler and libraries of the ADK. 349 366 … … 351 368 352 369 \begin{itemize} 353 \item compile the Linux kernel and all supported kernel modules354 \item compile all selected packages355 \item clean the target root directory356 \item install all packages to the target root directory357 \item create the root filesystem image358 \item create the firmware image (bootloader, kernel and root filesystem)370 \item compile the Linux kernel and all supported kernel modules 371 \item compile all selected packages 372 \item clean the target root directory 373 \item install all packages to the target root directory 374 \item create the root filesystem image 375 \item create the firmware image (bootloader, kernel and root filesystem) 359 376 \end{itemize} 360 377 361 The result of the build process is created in the ,,bin'' directory.378 The result of the build process is created in the directory \file{bin/}. 362 379 You will find a firmware image in the top level directory. Check the size of 363 the bin -file to see if it is small enough to fit into flash memory of364 your embedded system. Furthermore there is a ,,package'' directory, which365 contains all base and add on packages.380 the binary image file to see if it is small enough to fit into flash memory of 381 your embedded system. Furthermore there is a directory \file{package/}, which 382 contains all base and add--on packages. 366 383 367 384 \section{Troubleshooting} 385 368 386 This section deals with various tips for problems with the ADK installation. 369 387 370 388 \subsection{Errors During Prerequisites Check} 371 To re-issue the checks, use ,,make prereq''. 389 390 To re-issue the checks, use \command{make prereq}. 372 391 373 392 \begin{itemize} 374 \item GNU make 3.80 too old 393 \item GNU make 3.80 too old \\ 375 394 On a Fedora Core 4 hostsystem the first you'll get is 376 \begin{verbatim} 395 \begin{Verbatim}[label=error message with too old GNU make] 377 396 $ make 378 397 GNU make 3.80 too old. … … 382 401 GNU Bison 2.3 because of its bug fixes. 383 402 make: *** [.prereq_done] Error 1 384 \end{verbatim} 385 403 \end{Verbatim} 386 404 it is quite a nice error that tells you to use more up to date software, but we can 387 anyhow give this hostsystem a try and tell make to ignore those errors/warnings: 388 \begin{verbatim} 389 make prereq-noerror 390 \end{verbatim} 405 anyhow give this hostsystem a try and tell make to ignore those 406 errors/warnings running \command{make prereq-noerror}. 391 407 \end{itemize} 392 408 … … 394 410 395 411 If you encounter any compilation errors, then first try to reproduce the error. 396 First update your ADK tree via ,,svn update'', to be sure that the error is not397 already fixed in the subversion repository. After that do a ,,make clean \&\&398 make'', to reproduce your problem.412 First update your ADK tree via \command{svn update}, to be sure that the error is not 413 already fixed in the subversion repository. After that do a \command{make clean 414 \&\& make}, to reproduce your problem. 399 415 400 416 If you can reproduce the problem, please file a bug report. Please always 401 417 report following information: 402 418 \begin{itemize} 403 \item Operating system type and version404 \item GCC and Binutils versions of your host system405 \item complete error message, not only the last 4 lines419 \item Operating system type and version 420 \item GCC and Binutils versions of your host system 421 \item complete error message, not only the last 4 lines 406 422 \end{itemize} 407 423 408 \chapter{Installing FreeWRT Firmware Images} 424 \chapter{Installing FreeWRT Firmware Images}\label{ch:installing} 409 425 410 426 The FreeWRT ADK produces a single image holding both kernel and root 411 427 filesystem. This image can be written into your hardware's builtin flash memory 412 428 on serveral ways (ordered by needed skills, increasing downwards): 413 \begin{itemize} % TODO: insert \ref's to jump to the appropriate section? 414 \item via the original firmware's web interface 415 \item via \texttt{mtd} when reflashing or migrating from another third party distribution 416 \item via network using a TFTP client 429 \begin{itemize} 430 \item via the original firmware's web interface 431 (\autoref{sec:webinterface}) 432 \item via \texttt{mtd} when reflashing or migrating from another third 433 party distribution (\autoref{sec:mtd}) 434 \item via network using a TFTP client (\autoref{sec:tftp}) 417 435 \end{itemize} 418 436 419 437 \section{Flashing The Firmware} 420 438 421 \subsection{Web Interface Method} 439 \subsection{Web Interface Method}\label{sec:webinterface} 440 422 441 The following text describes how to use the original firmware's web interface 423 to flash FreeWRT. The object of demonstration is an Asus WL500gP, but this442 to flash FreeWRT. The object of demonstration is an \term{Asus WL500gP}, but this 424 443 guide should fit more or less fine for other systems, too. 425 444 426 If you flash a router from Linksys, we strongly suggest to use the popular427 \te xtbf{ping exploit} to allow recovery, if your image is broken or the flash445 If you flash a router from \term{Linksys}, we strongly suggest to use the popular 446 \term{ping exploit} to allow recovery, if your image is broken or the flash 428 447 process was interrupted by a power shortage. 429 448 430 449 There are some things that you should have done previously: 431 450 \begin{itemize} 432 \item read the special documentation page about your hardware in our wiki, some433 systems need special precaution before flashing434 \item a firmware image has to be built (matching the used hardware, of course)435 \item the router has to be powered on436 \item your computer needs to be connected to one of the LAN ports (using IP 437 address 192.168.1.2)451 \item read the special documentation page about your hardware in our wiki, some 452 systems need special precaution before flashing 453 \item a firmware image has to be built (matching the used hardware, of course) 454 \item the router has to be powered on 455 \item your computer needs to be connected to one of the LAN ports 456 (using IP address \file{192.168.1.2}) 438 457 \end{itemize} 439 458 440 459 \parbox{17em}{ 441 460 After preparation is complete, open your favourite browser and type 442 \ texttt{192.168.1.1} into the address bar. You should reach the web interface's461 \command{192.168.1.1} into the address bar. You should reach the web interface's 443 462 startup page: 444 463 }\hfill\parbox{20em}{\includegraphics[width=20em]{pics/asus-startup.png}} \\ [1em] 445 464 \parbox{17em}{ 446 Then click \textit{System Setup}:465 Then click on \code{System Setup}: 447 466 }\hfill\parbox{20em}{\includegraphics[width=20em]{pics/asus-system_setup.png}} \\ [1em] 448 467 \parbox{17em}{ 449 Then click \textit{Firmware Upgrade}, and enter the name of your firmware image468 In the new menu click on \code{Firmware Upgrade}, and enter the name of your firmware image 450 469 into the appropriate field: 451 470 }\hfill\parbox{20em}{\includegraphics[width=20em]{pics/asus-fw_upgrade.png}} \\ [1em] 452 Finally click \textit{Upload}. As the whole process of writing the image to453 flash and rebooting (don't forget that it creates sshhostkeys on first boot)454 takes quite long , better go and get a coffee or tea.455 456 When everything went good, you can login using ssh. The default username is457 \dq{}admin\dq{}. The default password for images created via WIB or ADK is458 \dq{}FreeWRT\dq{}. It is possible to change this password in the ADK, before image 459 creation.460 461 \subsection{\texttt{mtd} -- The Flash Utility} 471 Finally click on \code{Upload}. As the whole process of writing the image to 472 flash and rebooting (don't forget that it creates \app{ssh} hostkeys on first boot) 473 takes quite long (yes, a couple of minutes). Better go and get a coffee or tea. 474 475 When everything went well, you can login using \app{ssh}. The default username is 476 "\code{admin}". The default password for images created via WIB or ADK is 477 "\code{FreeWRT}". It is possible to change this password in the ADK, 478 before image creation. 479 480 \subsection{\texttt{mtd} -- The Flash Utility}\label{sec:mtd} 462 481 463 482 For this method to work, you need to copy the file containing the firmware 464 image to the router, preferably into /tmp, the memory filesystem should be 465 big enough to hold the full image. If not, use wget to get the image 466 via http or ftp and pipe the result into \texttt{mtd}. 467 468 Then the image is written to flash using 469 \texttt{mtd}, optionally giving additional options (see below). 470 471 The \texttt{mtd} utility was written with simplicity and code size in mind. 472 It's features were derived from the mtd-utils, %TODO: insert \ref to homepage 483 image to the router, preferably into \file{/tmp/}, the memory filesystem should be 484 big enough to hold the full image. If not, use \app{wget} to get the image 485 via http or ftp and pipe the result into \app{mtd}. 486 487 Then the image is written to flash using \app{mtd}, optionally giving 488 additional options (see below). 489 490 The \app{mtd} utility was written with simplicity and code size in mind. 491 It's features were derived from the 492 \href{http://sources.redhat.com/jffs2/}{\app{mtd-utils}}, 473 493 combining the needed parts into a single small tool providing all the 474 494 functionality necessary for FreeWRT, and leaving everything out that's not. 475 495 476 \ texttt{mtd} provides the following features:496 \app{mtd} provides the following features: 477 497 \begin{description} 478 \item[unlock] some chips need unlocking before they can be written to479 \item[erase] this is a filesystem independent method to delete all contents on480 the flash. Basically this is like \texttt{format} in MS--DOS.481 \item[write] this is generally the same functionality as using482 \texttt{dd} or \texttt{rawrite}, but \texttt{mtd} takes care of the quirks483 that have to be paid attention to for correctly handling the type of flash484 in use498 \item[unlock] some chips need unlocking before they can be written to 499 \item[erase] this is a filesystem independent method to delete all contents on 500 the flash. Basically this is like \app{format} in MS--DOS. 501 \item[write] this is generally the same functionality as using 502 \app{dd} or \app{rawrite}, but \app{mtd} takes care of the quirks 503 that have to be paid attention to for correctly handling the type of flash 504 in use 485 505 \end{description} 486 506 … … 491 511 Mostly, similar to the sample usage shown in the help output should be all that has to be 492 512 done to write the firmware to flash: 493 \begin{Verbatim} 513 \begin{Verbatim}[label=write a previously downloaded new firmware-file into flash] 494 514 # mtd -e linux -r write freewrt.bin linux & 495 515 \end{Verbatim} 496 516 Or via wget pipe: 497 \begin{Verbatim} 517 \begin{Verbatim}[label=download and write a new firmware-file into flash] 498 518 # wget -O - http://www.yourserver.com/freewrt.bin | mtd -e linux -r write - linux & 499 519 \end{Verbatim} 500 The parameters explained in detail: \\ 501 \begin{tabular}{l|l} 502 -e linux & erase existing data in flash\\ 503 -r & trigger rebooting right after finishing work\\ 504 write & write the firmware image contained in the file given as next parameter 505 to flash\\ 506 freewrt.bin & the actual image to write - ignore the suffix, it is detected at 507 runtime\\ 508 linux & this is an abstract identifier for a certain partition in flash, so 509 don't change this\\ 510 \& & put the process into background, to prevent accidentally stopping\\ 511 \end{tabular} 512 513 \subsection{Installation using TFTP} 520 The parameters explained in detail: 521 \begin{description} 522 \item[\command{-e linux}] erase existing data in flash 523 \item[\command{-r}] trigger rebooting right after finishing work 524 \item[\command{write}] write the firmware image contained in the file given as 525 next parameter to flash 526 \item[\command{freewrt.bin}] the actual image to write -- ignore the suffix, 527 it is detected at runtime 528 \item[\command{linux}] this is an abstract identifier for a certain partition 529 in flash, so don't change this 530 \item[\command{\&}] put the process into background, to prevent accidentally 531 stopping 532 \end{description} 533 534 \subsection{Installation using TFTP}\label{sec:tftp} 514 535 515 536 All supported target devices are shipped with a builtin bootloader, comparable to 516 the BIOS of x86--machines. This bootloader is used to bootstrap the system until537 the BIOS of \term{x86} machines. This bootloader is used to bootstrap the system until 517 538 it can boot a regular operating system. Besides the ability to load 518 539 the executable code from flash, it can be received from another node in the 519 540 local area network via the famous TFTP protocol. 520 541 521 For doing this, there are two ways: \\542 For doing this, there are two ways: 522 543 \begin{itemize} 523 \item the device acts as a client, asks the local dhcpdfor a lease, the524 address of the next tftpdand the filename to download525 \item the device acts as a server, having a known IP address and waiting for526 any TFTP client to connect and send the file544 \item the device acts as a client, asks the local \app{dhcpd} for a lease, the 545 address of the next \app{tftpd} and the filename to download 546 \item the device acts as a server, having a known IP address and waiting for 547 any TFTP client to connect and send the file 527 548 \end{itemize} 528 549 529 550 Most of the hardware supported by FreeWRT 1.0 uses the second method. Only the 530 device Netgear WGT634uis using the first method, the bootloader provides a551 device \term{Netgear WGT634u} is using the first method, the bootloader provides a 531 552 DHCP/TFTP client. Though this may be a little confusing to people being familiar 532 553 with netboot technologies, it is definitely the easier way of doing it. Otherwise … … 536 557 made even more easy by providing a little shell script for the job. Invocation 537 558 is as follows: 538 \begin{Verbatim} 559 \begin{Verbatim}[label=sending the new firmware via TFTP] 539 560 $ ./scripts/flash.sh firmware.bin [address] 540 561 \end{Verbatim} 541 The second Parameter \ textit{address} is used to specify a different IP address542 of the target device than the default \ textit{192.168.1.1}.543 544 \ textbf{Beware:} do not rename the firmware image before flashing it using the562 The second Parameter \code{address} is used to specify a different IP address 563 of the target device than the default \file{192.168.1.1}. 564 565 \strong{Beware:} do not rename the firmware image before flashing it using the 545 566 script as the original name is parsed to guess what hardware is to be flashed. 546 567 … … 550 571 default. The following list shows what has to be done for a certain device to 551 572 get it to wait at boot: \\ 552 \begin{center}\begin{tabular}{l|l|l} % TODO: fill this table 553 \textbf{Target Device} & \textbf{Action to be taken} & \textbf{Comments} \\ 554 \hline 555 All supported Linksys models & Ping Exploit & nvram variable boot\_wait needs to be on \\ 556 All supported Asus models & Recovery mode & power off, push and hold the 557 reset button, power on, power led is flashing\\ 558 \end{tabular}\end{center} 559 560 \chapter{FreeWRT Administration} 573 \begin{center} 574 \begin{tabular}{l|l|p{7cm}} % TODO: fill this table 575 \strong{Target Device} & \strong{Action to be taken} & \strong{Comments} \\ 576 \hline 577 All supported Linksys models & Ping Exploit & nvram variable \code{boot\_wait} needs to be on \\ 578 All supported Asus models & Recovery mode & power off 579 $\rightarrow$ push and hold the reset button 580 $\rightarrow$ power on 581 $\rightarrow$ power led is flashing\\ 582 \end{tabular} 583 \end{center} 584 585 \chapter{FreeWRT Administration}\label{ch:administration} 561 586 562 587 After the FreeWRT firmware image has been built by the ADK and later flashed … … 567 592 \section{Network Configuration} 568 593 569 The device names for real network interfaces in Linux are named ethx (xis570 0-9). If the device has a switch, the different ports are separated via VLAN571 technology. The vlan interfaces are named ethx.y. The network configuration in572 FreeWRT is managed via Busybox's ifupdown implementation. Busybox's ip builtin573 command configures the network interfaces. There is no \ texttt{ifconfig} or \texttt{route}.594 The device names for real network interfaces in Linux are named \code{ethx} (\code{x} is 595 \code{0--9}). If the device has a switch, the different ports are separated via VLAN 596 technology. The vlan interfaces are named \code{ethx.y}. The network configuration in 597 FreeWRT is managed via \app{Busybox}'s \app{ifupdown} implementation. \app{Busybox}'s builtin \app{ip} 598 command configures the network interfaces. There is no \app{ifconfig} or \app{route}. 574 599 To show all configured network interfaces use: 575 \begin{Verbatim} 600 \begin{Verbatim}[label=show IP address] 576 601 $ ip addr show 577 602 \end{Verbatim} 578 603 To show the kernel routing table use: 579 \begin{Verbatim} 604 \begin{Verbatim}[label=show routing table] 580 605 $ ip route show 581 606 \end{Verbatim} 582 607 583 All available network settings can be found in \ texttt{/etc/network/interfaces}608 All available network settings can be found in \file{/etc/network/interfaces} 584 609 which has the common form: 585 \begin{Verbatim}[label= /etc/network/interfaces]610 \begin{Verbatim}[label=common form of \file{/etc/network/interfaces}] 586 611 auto <iface-name> 587 612 iface <iface-name> inet <method> … … 591 616 \end{Verbatim} 592 617 593 \ texttt{auto <iface-name>} is optional and, if set, tells the "ifup"script to618 \code{auto <iface-name>} is optional and, if set, tells the \app{ifup} script to 594 619 start this interface automatically on bootup. 595 620 596 621 Each interface needs a unique name which, depending on the method, represents 597 either a physical interface or a logical interface name like "eth0.1"for a598 physical VLAN or "umts"as a logical name for a PPP interface.622 either a physical interface or a logical interface name like \code{eth0.1} for a 623 physical VLAN or \code{umts} as a logical name for a PPP interface. 599 624 600 625 Possible methods are: 601 626 \begin{description} 602 \item[static] use the given options to configure the interface statically603 \item[dhcp] just start a dhcp client using the interface \texttt{iface-name}604 \item[manual] don't configure the interface but start pre-up.dhook scripts605 \item[ppp] run \texttt{pon <provider>} where \texttt{<provider>} is given as an interface option627 \item[static] use the given options to configure the interface statically 628 \item[dhcp] just start a dhcp client using the interface \code{iface-name} 629 \item[manual] don't configure the interface but start \code{pre-up.d} hook scripts 630 \item[ppp] run \code{pon <provider>} where \code{<provider>} is given as an interface option 606 631 \end{description} 607 632 … … 610 635 using VLAN tagging. You can configure the switch by simply adding the interface 611 636 to the config file and giving the desired switch-ports: 612 \begin{Verbatim}[label= /etc/network/interfaces]637 \begin{Verbatim}[label=\file{/etc/network/interfaces}] 613 638 auto eth0.0 614 639 iface eth0.0 inet static … … 631 656 \end{Verbatim} 632 657 633 This configures three VLAN interfaces \ texttt{eth0.0} on ports 1 and 2,634 \ texttt{eth0.1} on port 3 and 4 and \texttt{eth0.2} on port 0.635 636 637 If you need to do some advanced settings, because you have for example 638 a powerful switch with a VLAN trunking port connected to one of your switch 658 This configures three VLAN interfaces \code{eth0.0} on ports 1 and 2, 659 \code{eth0.1} on port 3 and 4 and \code{eth0.2} on port 0. 660 661 662 If you need to do some advanced settings, because you have for example 663 a powerful switch with a VLAN trunking port connected to one of your switch 639 664 ports, the configuration would look like this: 640 665 641 \begin{Verbatim}[label= /etc/network/interfaces]666 \begin{Verbatim}[label=\file{/etc/network/interfaces}] 642 667 auto eth0.1 643 668 iface eth0.1 inet static … … 669 694 \end{Verbatim} 670 695 671 This configures four VLAN interfaces, \ texttt{eth0.1} on physical ports 2, 3 and 4.672 The interfaces \ texttt{eth0.2}, \texttt{eth0.3} and \texttt{eth0.4} are three673 different networks with VLAN ID 2- 4. The physical port 1 needs to be connected696 This configures four VLAN interfaces, \code{eth0.1} on physical ports 2, 3 and 4. 697 The interfaces \code{eth0.2}, \code{eth0.3} and \code{eth0.4} are three 698 different networks with VLAN ID 2--4. The physical port 1 needs to be connected 674 699 to a VLAN trunking port on a switch with knows the same VLAN IDs. 675 700 … … 677 702 Explanation: 678 703 \begin{description} 679 \item[port 0] this is typically the port labeled as WAN680 \item[port 1-4] these are typically the ports labeled as LAN681 \item[port 5] this special port represents the port where the router-board is682 connected to the switch683 \item[*] one interface always need an asterisk behind port 5 which means it is684 the default interface and gets all the packages with unknown tags.704 \item[port 0] this is typically the port labeled as WAN 705 \item[port 1--4] these are typically the ports labeled as LAN 706 \item[port 5] this special port represents the port where the router--board is 707 connected to the switch 708 \item[*] one interface always need an asterisk behind port 5 which means it is 709 the default interface and gets all the packages with unknown tags. 685 710 \end{description} 686 711 … … 689 714 IP settings, so these are the commonly used options: 690 715 \begin{description} 691 \item[address] the IP address - required 692 \item[netmask] the netmask - required 693 \item[broadcast] broadcast address - only required for legacy applications (if using +, it will calculated automatically by the kernel) 694 \item[gateway] an IP address added as default gateway if present 695 \item[mac-address] if you need to change your MAC address (required for some DSL providers) 716 \item[address] the IP address --- required 717 \item[netmask] the netmask --- required 718 \item[broadcast] broadcast address --- only required for legacy 719 applications (if using \code{+}, it will be calculated automatically by the kernel) 720 \item[gateway] an IP address added as default gateway if present 721 \item[mac-address] if you need to change your MAC address (required for some DSL providers) 696 722 \end{description} 697 723 698 724 \subsection{DHCP} 699 725 That's just as simple as: 700 \begin{Verbatim}[label= /etc/network/interfaces]726 \begin{Verbatim}[label=\file{/etc/network/interfaces}] 701 727 auto eth0.1 702 728 iface eth0.1 inet dhcp … … 708 734 709 735 This is mostly needed to combine LAN and WLAN to a homogeneous network. 710 Be sure you have installed the package \ texttt{bridge-utils}.711 712 \begin{Verbatim}[label= /etc/network/interfaces]736 Be sure you have installed the package \app{bridge-utils}. 737 738 \begin{Verbatim}[label=\file{/etc/network/interfaces}] 713 739 auto eth0.0 714 740 iface eth0.0 inet manual … … 728 754 \end{Verbatim} 729 755 730 This creates a new bridging interface \ texttt{br0} which combines the VLAN731 interface \ texttt{eth0.0} (representing the LAN-ports 1-4) and the WLAN interface732 \ texttt{eth1} (on some devices like Asus WL500gP this might be \texttt{eth2}).756 This creates a new bridging interface \code{br0} which combines the VLAN 757 interface \code{eth0.0} (representing the LAN-ports 1--4) and the WLAN interface 758 \code{eth1} (on some devices like \term{Asus WL500gP} this might be \code{eth2}). 733 759 The bridge interface needs always be the last one, otherwise it can not find 734 the interfaces in bridge-ifaces.760 the interfaces in \code{bridge-ifaces}. 735 761 736 762 \subsection{WLAN} 737 763 A router containing a WLAN interface has an additional ethernet device 738 representing it. On Broad com-based hardware it is typically \texttt{eth1}739 ( Linksys),\texttt{eth2} (Asus WL500gP) or on Netgear WGT634uwhich has a Madwifi740 WLAN chip, it is \ texttt{ath0}, \texttt{ath1}, etc. You can use these interfaces764 representing it. On Broad\-com-based hardware it is typically \code{eth1} 765 (\term{Linksys}),\code{eth2} (\term{Asus WL500gP}) or on \term{Netgear WGT634u} which has a Madwifi 766 WLAN chip, it is \code{ath0}, \code{ath1}, etc. You can use these interfaces 741 767 standalone or bridged with other devices, e.g. the internal LAN. 742 768 … … 745 771 Mandatory options and default parameters are in bold font. 746 772 747 \begin{tabular}{l|l|l} 748 \textbf{Option} & \textbf{Parameter} & \textbf{Description} \\ 749 \hline 750 \textbf{type}& broadcom & Broadcom based card \\ 751 & atheros & Madwifi driver \\ 752 \textbf{mode}& ap & Access point mode \\ 753 & sta & Client mode \\ 754 & adhoc & Ad-Hoc mode \\ 755 & wds & WDS point-to-point link over wireless\\ 756 & monitor & The node acts as a passive monitor and only receives packets \\ 757 \textbf{ssid}& <String> & Set the SSID (Network Name) \\ 758 country & {ALL|DE|JP|US|...} & The country code used to determine the regulatory settings. \\ 773 \begin{tabular}{l|l|p{10cm}} 774 \strong{Option} & \strong{Parameter} & \strong{Description} \\ 775 \hline\hline 776 \code{\strong{type}} & \code{broadcom} & Broadcom based card \\ 777 & \code{atheros} & Madwifi driver \\ 778 \hline 779 \code{\strong{mode}} & \code{ap} & Access point mode \\ 780 & \code{sta} & Client mode \\ 781 & \code{adhoc} & Ad-Hoc mode \\ 782 & \code{wds} & WDS point-to-point link over wireless\\ 783 & \code{monitor} & The node acts as a passive monitor and only receives packets \\ 784 \hline 785 \code{\strong{ssid}} & \code{<String>} & Set the SSID (Network Name) \\ 786 \hline 787 \code{country} & \code{\{ALL|DE|JP|US|\ldots\}} & The country code used to determine the regulatory settings. \\ 788 \hline 759 789 \end{tabular} 760 790 761 791 \subsubsection{Security Settings} 762 \begin{tabular}{l|l|l} 763 \textbf{Option} & \textbf{Parameter} & \textbf{Description} \\ 764 \hline 765 \textbf{security}& none & No authorization \\ 766 & wep & WEP key \\ 767 & wpa-psk & WPA with preshared key \\ 768 & 8021x & IEEE 802.1X authentication \\ 769 \textbf{authorization}& & \textbf{wpa-psk} \\ 770 & psk & WPA PSK \\ 771 & psk2 & WPA2 PSK \\ 772 & psk psk2 & WPA PSK and WPA2 PSK \\ 773 & & \textbf{8021x} \\ 774 & wpa & WPA with RADIUS \\ 775 & wpa2 & WPA2 with RADIUS \\ 776 & wpa wpa2 & WPA and WPA2 \\ 777 \textbf{encryption}& & \textbf{wep} \\ 778 & - & not needed, automatically by key size \\ 779 & & \textbf{wpa-psk} \\ 780 & tkip & RC4 encryption \\ 781 & aes & AES encryption \\ 782 & aes+tkip & support both \\ 783 & & \textbf{8021x} \\ 784 & wep & RC4 encryption (static) \\ 785 & tkip & RC4 encryption \\ 786 & aes & AES encryption \\ 787 & aes+tkip & support both \\ 788 eap-type & & \textbf{8021x} \\ 789 & \textbf{tls} & Transport Layer Security \\ 790 & ttls & Tunnelled TLS \\ 791 & peap & Protected EAP \\ 792 & leap & Cisco Wireless \\ 793 key & & \textbf{wep} \\ 794 &\{\textbf{1}|2|3|4\}& Select WEP key to use. \\ 795 key[1..4] & & \textbf{wep} \\ 796 & <String> & WEP key. The key must be 5, 13 or 16 bytes 797 long, or 10, 26, 32, or 64 hex digits long. The encryption 798 algorithm is automatically selected based on the key size. key1 is 799 the key for WEP client mode. \\ 800 wpa-key & & \textbf{wpa-psk} \\ 801 & <String> & Password to use with WPA/WPA2 PSK (at least 8, 802 up to 63 chars) \\ 803 wpa-gtk-rekey & & \textbf{wpa-psk}, \textbf{8021x} \\ 804 & <Int> (\textbf{3600}) & Rekeying interval in seconds. \\ 805 \textbf{radius-ipaddr}& & \textbf{8021x} \\ 806 & <a.b.c.d> & IP to connect. \\ 807 radius-port & & \textbf{8021x} \\ 808 & <Int> (\textbf{1812}) & RADIUS-Port no. to connect \\ 809 \textbf{radius-key}& & \textbf{8021x} \\ 810 & <String> & Shared Secret for connection to the Radius server \\ 792 \begin{longtable}{l|l|p{10cm}} 793 \strong{Option} & \strong{Parameter} & \strong{Description} \\ 794 \hline\hline 795 \code{\strong{security}} & \code{none} & No authorization \\ 796 & \code{wep} & WEP key \\ 797 & \code{wpa-psk} & WPA with preshared key \\ 798 & \code{8021x} & IEEE 802.1X authentication \\ 799 \hline 800 \code{\strong{authorization}} & & \strong{wpa-psk} \\ 801 & \code{psk} & WPA PSK \\ 802 & \code{psk2} & WPA2 PSK \\ 803 & \code{psk psk2} & WPA PSK and WPA2 PSK \\ 804 & & \strong{8021x} \\ 805 & \code{wpa} & WPA with RADIUS \\ 806 & \code{wpa2} & WPA2 with RADIUS \\ 807 & \code{wpa wpa2} & WPA and WPA2 \\ 808 \hline 809 \code{\strong{encryption}} & & \strong{wep} \\ 810 & --- & not needed, automatically by key size \\ 811 & & \strong{wpa-psk} \\ 812 & \code{tkip} & RC4 encryption \\ 813 & \code{aes} & AES encryption \\ 814 & \code{aes+tkip} & support both \\ 815 & & \strong{8021x} \\ 816 & \code{wep} & RC4 encryption (static) \\ 817 & \code{tkip} & RC4 encryption \\ 818 & \code{aes} & AES encryption \\ 819 & \code{aes+tkip} & support both \\ 820 \hline 821 \code{eap-type} & & \strong{8021x} \\ 822 & \code{\strong{tls}} & Transport Layer Security \\ 823 & \code{ttls} & Tunnelled TLS \\ 824 & \code{peap} & Protected EAP \\ 825 & \code{leap} & Cisco Wireless \\ 826 \hline 827 \code{key} & & \strong{wep} \\ 828 &\code{\{\strong{1}|2|3|4\}} & Select WEP key to use. \\ 829 \hline 830 \code{key[1..4]} & & \strong{wep} \\ 831 & \code{<String>} & WEP key. The key must be 5, 13 or 16 bytes 832 long, or 10, 26, 32, or 64 hex digits long. The encryption 833 algorithm is automatically selected based on the key size. key1 is 834 the key for WEP client mode. \\ 835 \hline 836 \code{wpa-key} & & \strong{wpa-psk} \\ 837 & <String> & Password to use with WPA/WPA2 PSK (at least 8, up to 63 chars) \\ 838 \hline 839 \code{wpa-gtk-rekey} & & \strong{wpa-psk}, \strong{8021x} \\ 840 & \code{<Int>} (\strong{3600}) & Rekeying interval in seconds. \\ 841 \hline 842 \code{\strong{radius-ipaddr}} & & \strong{8021x} \\ 843 & \code{<a.b.c.d>} & IP to connect. \\ 844 \hline 845 \code{radius-port} & & \strong{8021x} \\ 846 & \code{<Int>} (\strong{1812}) & RADIUS-Port no. to connect \\ 847 \hline 848 \strong{radius-key} & & \strong{8021x} \\ 849 & \code{<String>} & Shared Secret for connection to the Radius server \\ 850 \hline 851 \end{longtable} 852 853 \subsubsection{MAC filter} 854 \begin{tabular}{l|l|p{10cm}} 855 \strong{Option} & \strong{Parameter} & \strong{Description} \\ 856 \hline\hline 857 \code{macmode} & \code{\{0|1|2\}} & 0: Disable MAC address matching. \\ 858 & & 1: Deny association to stations on the MAC list. \\ 859 & & 2: Allow association to stations on the MAC list. \\ 860 \hline 861 \code{maclist} & \code{<MAC1> \ldots <MACn>} & List of space separated mac addresses to 862 allow/deny according to \code{macmode}. Addresses should be entered with colons, 863 e.g.: "\code{00:02:2D:08:E2:1D 00:03:3E:05:E1:1B}"\\ 811 864 \end{tabular} 812 865 813 \subsubsection{MAC filter} 814 \begin{tabular}{l|l|l} 815 \textbf{Option} & \textbf{Parameter} & \textbf{Description} \\ 816 macmode & {0|1|2} & 0 - Disable MAC address matching. \\ 817 & & 1 - Deny association to stations on the MAC list. \\ 818 & & 2 - Allow association to stations on the MAC list. \\ 819 maclist & <MAC1> ... <MACn> & List of space separated mac addresses to 820 allow/deny according to ''macmode''. Addresses should be entered with colons, 821 e.g.: 00:02:2D:08:E2:1D 00:03:3E:05:E1:1B\\ 866 \subsubsection{Wireless Distribution System (WDS)} 867 \begin{tabular}{l|l|p{10cm}} 868 \strong{Option} & \strong{Parameter} & \strong{Description} \\ 869 \hline\hline 870 \code{lazywds} & \code{\{0|1\}} & Accept WDS connections from anyone \\ 871 \hline 872 \code{wds-bridge} & \code{br\{X\}} & Add WDS peers to bridge brX \\ 873 \hline 874 \code{wds-security} & \code{\{wpa-psk\}} & secure the wds bridge with WPA (optional)\\ 875 \hline 876 \code{wds-encryption} & \code{\{aes|tkip\}} & Use AES or TKIP as cipher\\ 877 \hline 878 \code{wds-wpa-key} & \code{<String>} & Password to use with WPA PSK (at least 8, up to 63 chars) \\ 879 \hline 880 \code{wds} & \code{<MAC1> \ldots <MACn>} & List of WDS peer mac addresses (\code{xx:xx:xx:xx:xx:xx}, space separated) \\ 881 \hline 822 882 \end{tabular} 823 883 824 \subsubsection{Wireless Distribution System (WDS)}825 \begin{tabular}{l|l|l}826 \texttt{Option} & \texttt{Parameter} & \texttt{Description} \\827 lazywds & {0|1} & Accept WDS connections from anyone \\828 wds-bridge & {brX} & Add WDS peers to bridge brX \\829 wds-security & {wpa-psk} & secure the wds bridge with WPA (optional)\\830 wds-encryption & {aes|tkip} & Use AES or TKIP as cipher\\831 wds-wpa-key & <String> & Password to use with WPA PSK (at least 8, up to 63 chars) \\832 wds & <MAC1> ... <MACn> & List of WDS peer mac addresses (xx:xx:xx:xx:xx:xx, space separated) \\833 \end{tabular}834 835 884 \subsubsection{Miscellaneous} 836 \begin{tabular}{l|l|l} 837 \textbf{Option} & \textbf{Parameter} & \textbf{Description} \\ 838 channel & \{1-14\} & The wifi channel \\ 839 maxassoc & \{1-255\} & Maximum number of associated clients \\ 840 gmode & \{LegacyB| \textbf{Auto}| GOnly| BDeferred| Performance| LRS\} & Set the 54g Mode \\ 841 frameburst & \{\textbf{0}|1\} & Disable/Enable frameburst mode. \\ 842 txpower & \{0-255|\textbf{-1}\} & Set the transmit power in dBm \\ 843 rate & <Int> (\textbf{-1}) & force a fixed rate \\ 844 & & valid values for 802.11a are (6, 9, 12, 18, 24, 36, 48, 54) \\ 845 & & valid values for 802.11b are (1, 2, 5.5, 11) \\ 846 & & valid values for 802.11g are (1, 2, 5.5, 6, 9, 11, 12, 18, 24, 36, 48, 54) \\ 847 & &-1 means automatically determine the best rate \\ 848 rts & \{0-2347\} & Set the RTS threshhold. \\ 849 frag & \{256-2346\} & Set the fragmentation threshhold. \\ 850 afterburner & \{\textbf{0}|1\} & Enable Afterburner capability \\ 851 isolate & \{\textbf{0}|1\} & Hide Clients from each other \\ 852 bridge-if & \{br0...brX\} & The bridge interface (optional) 853 \end{tabular} 885 \begin{longtable}{l|l|p{10cm}} 886 \strong{Option} & \strong{Parameter} & \strong{Description} \\ 887 \hline\hline 888 \code{channel} & \code{\{1--14\}} & The wifi channel \\ 889 \hline 890 \code{maxassoc} & \code{\{1--255\}} & Maximum number of associated clients \\ 891 \hline 892 % TODO: add descriptions to the different gmode settings 893 \code{gmode} & & Set the 54g Mode \\ 894 & \code{\strong{Auto}} & default \\ 895 & \code{LegacyB} & \\ 896 & \code{GOnly} & \\ 897 & \code{BDeferred} & \\ 898 & \code{Performance} & \\ 899 & \code{LRS} & \\ 900 \hline 901 \code{frameburst} & \code{\{\strong{0}|1\}} & Disable/Enable frameburst mode. \\ 902 \hline 903 \code{txpower} & \code{\{0--255|\strong{$-1$}\}} & Set the transmit power in dBm \\ 904 \hline 905 \code{rate} & \code{<Int> (\strong{$-1$})} & force a fixed rate \\ 906 & & valid values for 802.11a are (6, 9, 12, 18, 24, 36, 48, 54) \\ 907 & & valid values for 802.11b are (1, 2, 5.5, 11) \\ 908 & & valid values for 802.11g are (1, 2, 5.5, 6, 9, 11, 12, 18, 24, 36, 48, 54) \\ 909 & & $-1$ means automatically determine the best rate \\ 910 \hline 911 \code{rts} & \code{\{0-2347\}} & Set the RTS threshhold. \\ 912 \hline 913 \code{frag} & \code{\{256-2346\}} & Set the fragmentation threshhold. \\ 914 \hline 915 \code{afterburner} & \code{\{\strong{0}|1\}} & Enable Afterburner capability \\ 916 \hline 917 \code{isolate} & \code{\{\strong{0}|1\}} & Hide Clients from each other \\ 918 \hline 919 \code{bridge-if} & \code{\{br0..brX\}} & The bridge interface (optional) \\ 920 \hline 921 \end{longtable} 854 922 855 923 \subsubsection{Examples} 856 WLAN with WEP128 857 \begin{Verbatim} 924 \paragraph{WLAN with WEP128} 925 \begin{Verbatim}[label=\file{/etc/network/interfaces}] 858 926 iface eth1 inet static 859 927 address 192.168.10.1 … … 869 937 \end{Verbatim} 870 938 871 WLAN without encryption 872 \begin{Verbatim} 939 \paragraph{WLAN without encryption} 940 \begin{Verbatim}[label=\file{/etc/network/interfaces}] 873 941 iface eth1 inet static 874 942 address 192.168.10.1 … … 883 951 \end{Verbatim} 884 952 885 WLAN with WPA2 (AES) 886 \begin{Verbatim} 953 \paragraph{WLAN with WPA2 (AES)} 954 \begin{Verbatim}[label=\file{/etc/network/interfaces}] 887 955 iface eth1 inet static 888 956 address 192.168.10.1 … … 901 969 902 970 If you want to do MAC filtering, add the following to the sample above: 903 \begin{Verbatim} 971 \begin{Verbatim}[label=\file{/etc/network/interfaces}] 904 972 wireless-macmode 2 905 973 wireless-mac 00:01:02:03:04:05 06:07:08:09:0a:0b … … 908 976 909 977 To enhance wireless performance, you can enable some flags like Broadcom's SpeedBooster. Normally, these flags are not dangerous: 910 \begin{Verbatim} 978 \begin{Verbatim}[label=\file{/etc/network/interfaces}] 911 979 wireless-gmode performance 912 980 wireless-frameburst 1 … … 914 982 \end{Verbatim} 915 983 916 WLAN client with WPA2 (AES) (''untested'') 917 \begin{Verbatim} 984 \paragraph{WLAN client with WPA2 (AES) (\strong{untested})} 985 \begin{Verbatim}[label=\file{/etc/network/interfaces}] 918 986 iface eth1 inet static 919 987 address 192.168.10.1 … … 930 998 \end{Verbatim} 931 999 932 WLAN client with WEP128 933 \begin{Verbatim} 1000 \paragraph{WLAN client with WEP128} 1001 \begin{Verbatim}[label=\file{/etc/network/interfaces}] 934 1002 iface eth1 inet dhcp 935 1003 wireless-type broadcom … … 944 1012 SSID, channel and encryption parameters. 945 1013 946 WDS node 1 (MAC of Wireless 06:05:04:03:02:01)947 \begin{Verbatim} 1014 WDS node 1 (MAC of Wireless \code{06:05:04:03:02:01}) 1015 \begin{Verbatim}[label=\file{/etc/network/interfaces}] 948 1016 iface br0 inet static 949 1017 bridge-ifaces eth1 … … 960 1028 wireless-wds-bridge br0 961 1029 \end{Verbatim} 962 WDS node 2 (MAC of Wireless 01:02:03:04:05:06)963 \begin{Verbatim} 1030 WDS node 2 (MAC of Wireless \code{01:02:03:04:05:06}) 1031 \begin{Verbatim}[label=\file{/etc/network/interfaces}] 964 1032 iface br0 inet static 965 1033 bridge-ifaces eth1 … … 977 1045 \end{Verbatim} 978 1046 979 Peer-to-Peer mode (no encryption, IP must be static) 980 \begin{Verbatim} 1047 \paragraph{Peer-to-Peer mode (no encryption, IP must be static)} 1048 \begin{Verbatim}[label=\file{/etc/network/interfaces}] 981 1049 iface eth1 inet static 982 1050 address 192.168.10.1 … … 994 1062 995 1063 PPP comes in various flavours for different situations, the most commonly 996 needed will likely be DSL and for WRT54G3Gusers UMTS. So there exists a997 hook-script that evaluates a "use-template"option and generates a ppp-peer.1064 needed will likely be DSL and for \term{WRT54G3G} users UMTS. So there exists a 1065 hook-script that evaluates a \code{use-template} option and generates a ppp-peer. 998 1066 This way everything needed so far can be configured within the 999 \ texttt{interfaces} file. Be sure you have installed the packages1000 \ texttt{kmod-ppp}, \texttt{ppp} and \texttt{ppp-mod-pppoe}. For providers1001 using PPTP for authentication, instead of PPPoE, you need to install \ texttt{pptp}.1067 \code{interfaces} file. Be sure you have installed the packages 1068 \app{kmod-ppp}, \app{ppp} and \app{ppp-mod-pppoe}. For providers 1069 using PPTP for authentication, instead of PPPoE, you need to install \app{pptp}. 1002 1070 1003 1071 \subsubsection{DSL with PPPoE} 1004 \begin{Verbatim} 1072 \begin{Verbatim}[label=\file{/etc/network/interfaces}] 1005 1073 auto ppp0 1006 1074 iface ppp0 inet ppp … … 1012 1080 \end{Verbatim} 1013 1081 1014 Now your DSL connection will be started on boot (\ texttt{auto ppp0})1015 and you can manually shut it down with \ texttt{ifdown ppp0} or start it up with1016 \ texttt{ifup ppp0}.1017 The template \ texttt{dsl} will configure a typical PPPoE peer for you.1082 Now your DSL connection will be started on boot (\code{auto ppp0}) 1083 and you can manually shut it down with \command{ifdown ppp0} or start it up with 1084 \command{ifup ppp0}. 1085 The template \code{dsl} will configure a typical PPPoE peer for you. 1018 1086 1019 1087 \subsubsection{DSL with PPTP} 1020 \begin{Verbatim} 1088 \begin{Verbatim}[label=\file{/etc/network/interfaces}] 1021 1089 auto ppp0 1022 1090 iface ppp0 inet ppp … … 1025 1093 ppp-username foo 1026 1094 ppp-password bar 1027 ppp-modemip 10.0.0.11028 ppp-mtu 14801095 ppp-modemip 10.0.0.1 1096 ppp-mtu 1480 1029 1097 ppp-device eth0.1 1030 1098 \end{Verbatim} 1031 1099 1032 Now your DSL connection will be started on boot (\ texttt{auto ppp0})1033 and you can manually shut it down with \ texttt{ifdown ppp0} or start it up with1034 \ texttt{ifup ppp0}.1035 The template \ texttt{pptp} will configure a typical PPTP peer for you.1100 Now your DSL connection will be started on boot (\code{auto ppp0}) 1101 and you can manually shut it down with \command{ifdown ppp0} or start it up with 1102 \command{ifup ppp0}. 1103 The template \code{pptp} will configure a typical PPTP peer for you. 1036 1104 1037 1105 \subsubsection{UMTS} 1038 1106 Same footprint different template and some specific options. That is all that 1039 1107 is needed for an UMTS connection to Vodafone as it can be seen in this example. 1040 \begin{Verbatim} 1108 \begin{Verbatim}[label=\file{/etc/network/interfaces}] 1041 1109 iface ppp0 inet ppp 1042 1110 use-template umts … … 1049 1117 umts-mode umts_first 1050 1118 \end{Verbatim} 1051 As you can see: unneeded options like \ texttt{ppp-username} or1052 \ texttt{ppp-password} can just be removed or commented out. Don't leave them1053 without a value as that causes a failure in \ texttt{ipup}. It does work if you1054 give empty double quotes as value like "".1119 As you can see: unneeded options like \code{ppp-username} or 1120 \code{ppp-password} can just be removed or commented out. Don't leave them 1121 without a value as that causes a failure in \app{ipup}. It does work if you 1122 give empty double quotes as value like \code{""}. 1055 1123 1056 1124 Note that you have to set the correct APN, username and password for your provider! … … 1058 1126 You may also remove the pin from your SIM-card and the configuration if you like. 1059 1127 1060 For Linksys WRT54G3G a package called \texttt{broadcom-watchbutton} will be1128 For \term{Linksys WRT54G3G} a package called \app{broadcom-watchbutton} will be 1061 1129 installed, this is a small daemon that monitors the UMTS-button of the router 1062 and executes \ texttt{ifup umts} or \texttt{ifdown umts} on a button press.1063 You have to set \ texttt{watchbutton=YES} in /etc/rc.conf to have it start automatically.1064 1065 This is totally independent from the \ texttt{auto umts} setting. Even if you1130 and executes \command{ifup umts} or \command{ifdown umts} on a button press. 1131 You have to set \code{watchbutton=YES} in /etc/rc.conf to have it start automatically. 1132 1133 This is totally independent from the \code{auto umts} setting. Even if you 1066 1134 start the connection on bootup you can shut it down again with a button press. 1067 1135 … … 1069 1137 \subsubsection{per interface} 1070 1138 You can execute various commands on interface startup or shutdown with special option: 1071 \begin{Verbatim} 1139 \begin{Verbatim}[label=\file{/etc/network/interfaces}] 1072 1140 iface foobar inet static 1073 1141 [...] … … 1081 1149 You can give each option multiple times and their commands will be executed in given order. 1082 1150 \begin{description} 1083 \item[pre-up] before the interface will be started1084 \item[up] after the interface was started successfully1085 \item[down] before the interface goes down1086 \item[post-down] after the interface shut down1151 \item[pre-up] before the interface will be started 1152 \item[up] after the interface was started successfully 1153 \item[down] before the interface goes down 1154 \item[post-down] after the interface shut down 1087 1155 \end{description} 1088 1156 … … 1090 1158 Additionally you can write scripts executed for each interface if you put them in 1091 1159 \begin{itemize} 1092 \item \texttt{/etc/network/if-pre-up.d}1093 \item \texttt{/etc/network/if-up.d}1094 \item \texttt{/etc/network/if-down.d}1095 \item \texttt{/etc/network/if-post-down.d}1160 \item \texttt{/etc/network/if-pre-up.d} 1161 \item \texttt{/etc/network/if-up.d} 1162 \item \texttt{/etc/network/if-down.d} 1163 \item \texttt{/etc/network/if-post-down.d} 1096 1164 \end{itemize} 1097 1165 Same semantics as above. … … 1099 1167 \section{FWCF - FreeWRT Configuration Filesystem} 1100 1168 1101 FWCF is a separate flash partition for all changes made to the /etcdirectory.1102 There is a small tool named \ texttt{fwcf}, which is used to setup the system or1169 FWCF is a separate flash partition for all changes made to the \file{/etc/} directory. 1170 There is a small tool named \app{fwcf}, which is used to setup the system or 1103 1171 to commit changes to the fwcf partition. 1104 1172 1105 On bootup the script \ texttt{/sbin/mount\_root} is executed, which calls \dq{}fwcf1106 setup\dq{} to setup /etcas memory filesystem and overlay the changes committed1173 On bootup the script \file{/sbin/mount\_root} is executed, which calls 1174 \command{fwcf setup} to setup \file{/etc/} as memory filesystem and overlay the changes committed 1107 1175 to the fwcf partition. 1108 1176 1109 If you change anything in /etcand like to keep the change, it is required to1110 execute \ dq{}fwcf commit\dq{}. This will compress all changed or new files in /etc1111 and write the result into the fwcf partition. The fwcf partition is 128 Kb in1177 If you change anything in \file{/etc/} and like to keep the change, it is required to 1178 execute \command{fwcf commit}. This will compress all changed or new files in 1179 \file{/etc/} and write the result into the fwcf partition. The fwcf partition is 128 Kb in 1112 1180 size. This size is not changeable at the moment. 1113 1181 1114 1182 If you need more detailed information, please read the specification of FWCF, 1115 1183 which can be found 1116 here\url{http://www.freewrt.org/trac/wiki/Documentation/Specs/FwCf}1184 at \url{http://www.freewrt.org/trac/wiki/Documentation/Specs/FwCf} 1117 1185 1118 1186 If you want to remove all your changes and start your configuration from scratch, 1119 use \ dq{}fwcf erase\dq{}. This is also required if you switch between compression1187 use \command{fwcf erase}. This is also required if you switch between compression 1120 1188 plugins. Right now LZO plugin is default. 1121 1189 … … 1123 1191 1124 1192 All software for FreeWRT is available as a IPKG package. IPKG is a package manager 1125 very similar to Debian's dpkg/apt-getutilities. It is specially designed for1193 very similar to Debian's \app{dpkg/apt-get} utilities. It is specially designed for 1126 1194 embedded systems and is widely used. The FreeWRT project use a special version, 1127 1195 which is embedded to the busybox binary. Normally the command line tool 1128 \ texttt{ipkg} is pre-installed.1129 1130 IPKG uses a configuration file similar to /etc/apt/sources.list, which1196 \app{ipkg} is pre-installed. 1197 1198 IPKG uses a configuration file similar to \file{/etc/apt/sources.list}, which 1131 1199 contains a list of software repositories available via HTTP or FTP. 1132 The configuration file \ texttt{/etc/ipkg.conf} contains the official1200 The configuration file \file{/etc/ipkg.conf} contains the official 1133 1201 FreeWRT 1.0 repository for your board and kernel version. 1134 1202 1135 1203 To update the list of available packages execute following command as root: 1136 \begin{ verbatim}1204 \begin{Verbatim}[label=update list of available packages] 1137 1205 # ipkg update 1138 \end{ verbatim}1206 \end{Verbatim} 1139 1207 1140 1208 This command requires a working internet connection, because it will fetch a 1141 package list from every repository declared in /etc/ipkg.conf.1209 package list from every repository declared in \file{/etc/ipkg.conf}. 1142 1210 1143 1211 To install a new package use following command: 1144 \begin{ verbatim}1212 \begin{Verbatim}[label=example installation of \app{tcpdump}] 1145 1213 # ipkg install tcpdump 1146 \end{ verbatim}1147 1148 This will install the package tcpdumpand all dependencies onto the flash.1214 \end{Verbatim} 1215 1216 This will install the package \app{tcpdump} and all dependencies onto the flash. 1149 1217 Where the data is saved depends on the root filesystem you decided to use while 1150 1218 installing FreeWRT. If you use jffs2 as root filesystem, then the package is … … 1155 1223 symlinks to the read-only squashfs partition. 1156 1224 1157 You can also remove packages, but this is only useful if you are using JFFS21225 You can also remove packages, but this is only useful if you are using jffs2 1158 1226 as root filesystem: 1159 \begin{ verbatim}1227 \begin{Verbatim}[label=example removal of \app{tcpdump}] 1160 1228 # ipkg remove tcpdump 1161 \end{ verbatim}1162 1163 This will not remove any dependencies, installed earlier. For example, libpcap1164 is still installed after executing this command.1229 \end{Verbatim} 1230 1231 This will not remove any dependencies, installed earlier. For example, 1232 \app{libpcap} is still installed after executing this command. 1165 1233 On jffs2 root filesystem you should never remove any essential packages like 1166 busybox, fwcf or uclibc, otherwise you make the embedded system unusable.1167 1168 Nearly the same as for removing packages, counts for ipkg upgrade. Please1169 \ textbf{never ever} use ipkg upgradeto update your embedded system. This command1234 \app{busybox}, \app{fwcf} or \app{uclibc}, otherwise you make the embedded system unusable. 1235 1236 Nearly the same as for removing packages, counts for \command{ipkg upgrade}. Please 1237 \strong{never ever} use \command{ipkg upgrade} to update your embedded system. This command 1170 1238 is only useful to upgrade single packages on a jffs2 rootfilesystem or data 1171 1239 partition. … … 1175 1243 Some of the available packages containing software which start services at boot 1176 1244 time. For that we provide simple startup scripts, which are installed into the 1177 directory \ texttt{/etc/init.d}. See following example for1178 the package \ texttt{dnsmasq}, a combined dns and dhcp1245 directory \file{/etc/init.d}. See following example for 1246 the package \app{dnsmasq}, a combined dns and dhcp 1179 1247 server daemon: 1180 1248 1181 \begin{ verbatim}1249 \begin{Verbatim}[label=\file{/etc/init.d/S50dnsmasq}] 1182 1250 #!/bin/sh 1183 1251 … … 1205 1273 esac 1206 1274 exit 0 1207 \end{ verbatim}1275 \end{Verbatim} 1208 1276 1209 1277 After installation the package postinst script will add all needed changes to the 1210 /etcdirectory. For example packages can add new user and groups, add new1211 variables to /etc/rc.confor just add new values to existing files as1212 /etc/services. It is FreeWRT policy to do notstart any services after1278 \file{/etc/} directory. For example packages can add new user and groups, add new 1279 variables to \file{/etc/rc.conf} or just add new values to existing files as 1280 \file{/etc/services}. It is FreeWRT policy not to start any services after 1213 1281 installation or in case of a new boot. To start services on bootup you need to set 1214 \ $servicename=YES in /etc/rc.conf and commit your changes via \dq{}fwcf1215 commit\dq{}. For every policy exist aexception, we start all essential services1282 \code{\$servicename=YES} in \file{/etc/rc.conf} and commit your changes via 1283 \command{fwcf commit}. For every policy exists an exception, we start all essential services 1216 1284 by default, like ssh daemon, syslog and network initialisation. 1217 1285 1218 For some services you can control the startup behavio r by modifying1219 the services\_flags variable in /etc/rc.conf.1220 1221 For example the variable \ $ssh\_opts is provided asargument to the dropbear1222 ssh daemon to control its behavio r.1286 For some services you can control the startup behaviour by modifying 1287 the \code{\$servicename\_flags} variable in \file{/etc/rc.conf}. 1288 1289 For example the variable \code{\$ssh\_opts} is provided as an argument to the dropbear 1290 ssh daemon to control its behaviour. 1223 1291 1224 1292 Having this policy helps you to configure your FreeWRT embedded system without 1225 1293 shooting yourself in the foot. For example if you try to realize a firewall system 1226 and trying to set the rules in /etc/firewall.user, which is read by1227 /etc/init.d/S45firewall, if the iptables package is installed. You can just1228 reload the changed ruleset via /etc/init.d/S45firewall restart. If you managed1294 and trying to set the rules in \file{/etc/firewall.user}, which is read by 1295 \file{/etc/init.d/S45firewall}, if the iptables package is installed. You can just 1296 reload the changed ruleset via \code{/etc/init.d/S45firewall restart}. If you managed 1229 1297 to kick you out of the system, you can just reboot the system and you gain access 1230 1298 again. As soon as your are ready with the firewall configuration and you decide 1231 to activate the firewall rules on bootup, you set \$firewall=YES in /etc/rc.conf, 1232 commit your changes via \dq{}fwcf commit\dq{} and reboot. Now the firewall 1299 to activate the firewall rules on bootup, you set \code{firewall=YES} in 1300 \file{/etc/rc.conf}, 1301 commit your changes via \command{fwcf commit} and reboot. Now the firewall 1233 1302 rules will be activated on bootup. 1234 1303 1235 1304 1236 \chapter{Troubleshooting} 1305 \chapter{Troubleshooting}\label{ch:troubleshooting} 1237 1306 1238 1307 \section{Failsafe Mode} … … 1246 1315 It stops even before the root filesystem gets mounted read--write, and fwcf is 1247 1316 set up. It will just set the LAN interface up and give it the IP address 1248 192.168.1.1 and netmask 255.255.255.0. Then it will start a telnet daemon, so 1249 you get straight access (without depending on the installed SSH--daemon).1317 \file{192.168.1.1} and netmask \file{255.255.255.0}. Then it will start a 1318 \app{telnet} daemon, so you get straight access (without depending on the installed SSH daemon). 1250 1319 1251 1320 \subsection{How It Works} … … 1253 1322 To get FreeWRT into failsafe mode you need physical access to the device and 1254 1323 the failsafe utility. The failsafe utility is built inside our ADK and 1255 is available in the directory bin/after a successful build.1324 is available in the directory \file{bin/} after a successful build. 1256 1325 1257 1326 If you just want to compile the tool and not a complete firmware image, 1258 1327 use following command: 1259 1328 1260 \begin{Verbatim} 1329 \begin{Verbatim}[label=building the failsafe utility for the host system] 1261 1330 $ make subdir=tools/failsafe install 1262 1331 \end{Verbatim} 1263 1332 1264 1333 For some operating systems we provide ready to go binaries of failsafe. 1265 Take a look at http://www.freewrt.org/downloads/tools/failsafe1334 Take a look at \url{http://www.freewrt.org/downloads/tools/failsafe} 1266 1335 1267 1336 The tool just opens a network socket and waits for a special UDP packet … … 1275 1344 see the device specific page for the exact network port. 1276 1345 1277 Configure your network interface to the IP address 192.168.1.2with network1278 mask 255.255.255.0. Now start the failsafe utility on your computer.1346 Configure your network interface to the IP address \file{192.168.1.2} with network 1347 mask \file{255.255.255.0}. Now start the failsafe utility on your computer. 1279 1348 1280 1349 \begin{Verbatim} … … 1319 1388 \end{Verbatim} 1320 1389 1321 Now you can change files in /etcand repair your broken configuration.1390 Now you can change files in \file{/etc/} and repair your broken configuration. 1322 1391 Do not forget to commit your changes afterwards. 1323 1392 … … 1326 1395 \end{Verbatim} 1327 1396 1328 If you want to start over with the default /etcdirectory, just remove the fwcf1397 If you want to start over with the default \file{/etc/} directory, just remove the fwcf 1329 1398 partition content with following command: 1330 1399 … … 1333 1402 \end{Verbatim} 1334 1403 1335 You can either use "reboot -f" or "-r" for mtdto reboot the system.1404 You can either use \command{reboot -f} or the option \command{-r} for \app{mtd} to reboot the system. 1336 1405 1337 1406 %\section{Serial Console}
Note:
See TracChangeset
for help on using the changeset viewer.
