- Timestamp:
- Jan 24, 2007, 8:45:40 AM (19 years ago)
- Branches:
- freewrt_1_0, freewrt_2_0
- Children:
- 7d6779bf
- Parents:
- 9ba8799
- Location:
- docs/handbook/user
- Files:
-
- 2 edited
-
00-allinone.tex (modified) (19 diffs)
-
cover.tex (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
docs/handbook/user/00-allinone.tex
r9ba8799 rcd78f74 309 309 The FreeWRT ADK produces a single image holding both kernel and root 310 310 filesystem. This image can be written into your hardware's builtin flash memory 311 on serveral ways (ordered by needed skill z, increasing downwards):311 on serveral ways (ordered by needed skills, increasing downwards): 312 312 \begin{itemize} % TODO: insert \ref's to jump to the appropriate section? 313 313 \item via the original firmware's web interface … … 323 323 guide should fit more or less fine for other systems, too. 324 324 325 If you flash a router from Linksys, we strongly suggest to use the popular 326 \textbf{ping exploit} to allow recovery, if your image is broken or the flash 327 process was interrupted by a power shortage. 328 325 329 There are some things that you should have done previously: 326 330 \begin{itemize} 331 \item read the special documentation page about your hardware in our wiki, some 332 systems need special precaution before flashing 327 333 \item a firmware image has to be built (matching the used hardware, of course) 328 334 \item the router has to be powered on … … 345 351 Finally click \textit{Upload}. As the whole process of writing the image to 346 352 flash and rebooting (don't forget that it creates ssh hostkeys on first boot) 347 takes quite long, better go and get coffee. 348 349 When everything went good, you can login using ssh. 353 takes quite long, better go and get a coffee or tea. 354 355 When everything went good, you can login using ssh. The default username is 356 \dq{}admin\dq{}. The default password for images created via WIB or ADK is 357 \dq{}FreeWRT\dq{}. It is possible to change this password in the ADK, before image 358 creation. 350 359 351 360 \subsection{\texttt{mtd} -- The Flash Utility} 361 352 362 For this method to work, you need to copy the file containing the firmware 353 image to the router, preferably into /tmp (the tmpfs should be big enough to 354 hold the full image). Then the image is written to flash using 363 image to the router, preferably into /tmp, the memory filesystem should be 364 big enough to hold the full image. If not, use wget to get the image 365 via http or ftp and pipe the result into \texttt{mtd}. 366 367 Then the image is written to flash using 355 368 \texttt{mtd}, optionally giving additional options (see below). 356 369 … … 370 383 in use 371 384 \end{description} 372 further it can request your system to reboot. Some of the features mentioned here can 385 386 Further it can request your system to reboot. Some of the features mentioned here can 373 387 also be combined, so it is e.g. possible to immediately reboot the system after 374 388 the flash has been written. … … 377 391 done to write the firmware to flash: 378 392 \begin{Verbatim} 379 # mtd -e linux -r write freewrt.bin linux 393 # mtd -e linux -r write freewrt.bin linux & 394 \end{Verbatim} 395 Or via wget pipe: 396 \begin{Verbatim} 397 # wget -O - http://www.yourserver.com/freewrt.bin | mtd -e linux -r write - linux & 380 398 \end{Verbatim} 381 399 The parameters explained in detail: \\ … … 385 403 write & write the firmware image contained in the file given as next parameter 386 404 to flash\\ 387 linux.trx& the actual image to write - ignore the suffix, it is detected at405 freewrt.bin & the actual image to write - ignore the suffix, it is detected at 388 406 runtime\\ 389 407 linux & this is an abstract identifier for a certain partition in flash, so 390 408 don't change this\\ 409 \& & put the process into background, to prevent accidentally stopping\\ 391 410 \end{tabular} 392 411 393 412 \subsection{Installation using TFTP} 394 All supported target devices are shipped with a builtin firmware, comparable to 395 the BIOS of x86--machines. This firmware is used to bootstrap the system until 396 it can boot a regular operating system. Besides the (obvious) ability to load 413 414 All supported target devices are shipped with a builtin bootloader, comparable to 415 the BIOS of x86--machines. This bootloader is used to bootstrap the system until 416 it can boot a regular operating system. Besides the ability to load 397 417 the executable code from flash, it can be received from another node in the 398 418 local area network via the famous TFTP protocol. … … 405 425 any TFTP client to connect and send the file 406 426 \end{itemize} 407 All the hardware supported by FreeWRT-1.0 uses the second method. % TODO: righty? 408 Though this may be a little confusing to people being familiar with netboot 409 technologies, it is definitely the easier way of doing it. Otherwise one had to 410 setup both DHCP and TFTP servers and configure them right. 427 428 Most of the hardware supported by FreeWRT 1.0 uses the second method. Only the 429 device Netgear WGT634u is using the first method, the bootloader provides a 430 DHCP/TFTP client. Though this may be a little confusing to people being familiar 431 with netboot technologies, it is definitely the easier way of doing it. Otherwise 432 one had to setup both DHCP and TFTP servers and configure them right. 411 433 412 434 The even quite simple task of sending the flash image to the target device is … … 430 452 \textbf{Target Device} & \textbf{Action to be taken} & \textbf{Comments} \\ 431 453 \hline 432 \ldots & \ldots & \ldots \\ 454 All supported Linksys models & Ping Exploit & nvram variable boot\_wait needs to be on \\ 455 All supported Asus models & Recovery mode & power off, push and hold the 456 reset button, power on, power led is flashing\\ 433 457 \end{tabular}\end{center} 434 458 435 459 \chapter{FreeWRT Administration} 460 436 461 After the FreeWRT firmware image has been built by the ADK and later flashed 437 onto the hardware, the resulting operating system has to be aministrated. This462 onto the hardware, the resulting operating system has to be configured. This 438 463 section provides the necessary information to do that, including tips and 439 464 guides for using FreeWRT in general, of course. 440 465 441 466 \section{Network Configuration} 467 442 468 The device names for real network interfaces in Linux are named ethx (x is 443 469 0-9). If the device has a switch, the different ports are separated via VLAN … … 469 495 Each interface needs a unique name which, depending on the method, represents 470 496 either a physical interface or a logical interface name like "eth0.1" for a 471 physical VLAN or "umts" as a logical name for a pppinterface.497 physical VLAN or "umts" as a logical name for a PPP interface. 472 498 473 499 Possible methods are: … … 536 562 537 563 \subsection{Bridging} 538 This is mostly needed to combine LAN and WLAN to a homogeneous network like: 564 565 This is mostly needed to combine LAN and WLAN to a homogeneous network. 566 Be sure you have installed the package \texttt{bridge-utils}. 567 539 568 \begin{Verbatim}[label=/etc/network/interfaces] 540 569 auto eth0.0 … … 552 581 netmask 255.255.255.0 553 582 \end{Verbatim} 583 554 584 This creates a new bridging interface \texttt{br0} which combines the VLAN 555 interface \texttt{eth0.0} (representing the LAN-ports 1-4) and the WLAN 556 interface \texttt{eth1} (on some devices like Asus WL500g or Linksys WRT54G 557 v1.1 this might be \texttt{eth2}). 585 interface \texttt{eth0.0} (representing the LAN-ports 1-4) and the WLAN interface 586 \texttt{eth1} (on some devices like Asus WL500gP this might be \texttt{eth2}). 558 587 559 588 \subsection{WLAN} 560 589 A router containing a WLAN interface has an additional ethernet device 561 590 representing it. On Broadcom-based hardware it is typically \texttt{eth1} 562 (Linksys) or \texttt{eth2} (Asus) (in the current driver version), onMadwifi563 devicesit is \texttt{ath0}, \texttt{ath1}, etc. You can use these interfaces591 (Linksys),\texttt{eth2} (Asus WL500gP) or on Netgear WGT634u which has a Madwifi 592 WLAN chip, it is \texttt{ath0}, \texttt{ath1}, etc. You can use these interfaces 564 593 standalone or bridged with other devices, e.g. the internal LAN. 565 594 … … 776 805 777 806 \subsection{PPP} 807 778 808 PPP comes in various flavours for different situations, the most commonly 779 809 needed will likely be DSL and for WRT54G3G users UMTS. So there exists a 780 810 hook-script that evaluates a "use-template" option and generates a ppp-peer. 781 811 This way everything needed so far can be configured within the 782 \texttt{interfaces} file. 812 \texttt{interfaces} file. Be sure you have installed the packages 813 \texttt{kmod-ppp}, \texttt{ppp} and \texttt{ppp-mod-pppoe}. 783 814 784 815 \subsubsection{DSL} … … 824 855 installed, this is a small daemon that monitors the UMTS-button of the router 825 856 and executes \texttt{ifup umts} or \texttt{ifdown umts} on a button press. 826 You have to set \texttt{watch dog=YES} in /etc/rc.conf to have it start automatically.857 You have to set \texttt{watchbutton=YES} in /etc/rc.conf to have it start automatically. 827 858 828 859 This is totally independent from the \texttt{auto umts} setting. Even if you … … 860 891 Same semantics as above. 861 892 862 \section{Troubleshooting} 863 864 \subsection{Failsafe Mode} 893 \section{FWCF - FreeWRT Configuration Filesystem} 894 895 FWCF is a separate flash partition for all changes made to the /etc directory. 896 There is a small tool named \texttt{fwcf}, which is used to setup the system or 897 to commit changes to the fwcf partition. 898 899 On bootup the script \texttt{/sbin/mount\_root} is executed, which calls \dq{}fwcf 900 setup\dq{} to setup /etc as memory filesystem and overlay the changes committet 901 to the fwcf partition. 902 903 If you change anything in /etc and like to keep the change, it is required to 904 execute \dq{}fwcf commit\dq{}. This will compress all changed or new files in /etc 905 and write the result into the fwcf partition. The fwcf partition is 128 Kb in 906 size. This size is not changeable at the moment. 907 908 If you need more detailed information, please read the specification of FWCF, 909 which can be found 910 here\ref{http://www.freewrt.org/trac/wiki/Documentation/Specs/FwCf} 911 912 If you want to remove all your changes and start your configuration from scratch, 913 use \dq{}fwcf erase\dq{}. This is also required if you switch between compression 914 plugins. Right now LZO plugin is default. 915 916 \section{IPKG - Packagemanagement} 917 918 All software for FreeWRT is available as a IPKG package. IPKG is a package manager 919 very similar to Debian's dpkg/apt-get utilities. It is specially designed for 920 embedded systems and is widely used. The FreeWRT project use a special version, 921 which is embedded to the busybox binary. Normally the command line tool 922 \texttt{ipkg} is pre-installed. 923 924 IPKG uses a configuration file similar to /etc/apt/sources.list, which 925 contains a list of software repositories available via HTTP or FTP. 926 The configuration file \texttt{/etc/ipkg.conf} contains the official 927 FreeWRT 1.0 repository for your board and kernel version. 928 929 To update the list of available packages execute following command as root: 930 \begin{verbatim} 931 # ipkg update 932 \end{verbatim} 933 934 This command requires a working internet connection, because it will fetch a 935 package list from every repository declared in /etc/ipkg.conf. 936 937 To install a new package use following command: 938 \begin{verbatim} 939 # ipkg install tcpdump 940 \end{verbatim} 941 942 This will install the package tcpdump and all dependencies onto the flash. 943 Where the data is saved depends on the root filesystem you decided to use while 944 installing FreeWRT. If you use jffs2 as root filesystem, then the package is 945 installed on the big linux partition. If you use squashfs-overlay, then the 946 package is installed on the mini-fo overlay filesystem which writes its data 947 to the jffs2 data partition. If you use a squashfs-symlinks filesystem, then the 948 package data is directly install into the jffs2 data partition, containing 949 symlinks to the read-only squashfs partition. 950 951 You can also remove packages, but this is only useful if you are using JFFS2 952 as root filesystem: 953 \begin{verbatim} 954 # ipkg remove tcpdump 955 \end{verbatim} 956 957 This will not remove any dependencies, installed earlier. For example, libpcap 958 is still installed after executing this command. 959 On jffs2 root filesystem you should never remove any essential packages like 960 busybox, fwcf or uclibc, otherwise you make the embedded system unusable. 961 962 Nearly the same as for removing packages, counts for ipkg upgrade. Please 963 \textbf{never ever} use ipkg upgrade to update your embedded system. This command 964 is only useful to upgrade single packages on a jffs2 rootfilesystem or data 965 partition. 966 967 \section{Startup scripts} 968 969 Some of the available packages containing software which start services at boot 970 time. For that we provide simple startup scripts, which are installed into the 971 directory \texttt{/etc/init.d}. See following example for 972 the package \texttt{dnsmasq}, a combined dns and dhcp 973 server daemon: 974 975 \begin{verbatim} 976 #!/bin/sh 977 978 . /etc/rc.conf 979 980 case $1 in 981 autostart) 982 test x"${dns_dhcp:-NO}" = x"NO" && exit 0 983 exec $0 start 984 ;; 985 start) 986 [ -f /etc/dnsmasq.conf ] || exit 987 /usr/sbin/dnsmasq 988 ;; 989 stop) 990 killall dnsmasq 991 ;; 992 restart) 993 $0 stop 994 $0 start 995 ;; 996 *) 997 echo "Usage: $0 {start | stop | restart}" 998 ;; 999 esac 1000 exit 0 1001 \end{verbatim} 1002 1003 After installation the package postinst script will add all needed changes to the 1004 /etc directory. For example packages can add new user and groups, add new 1005 variables to /etc/rc.conf or just add new values to existing files as 1006 /etc/services. It is FreeWRT policy to do not start any services after 1007 installation or in case of a new boot. To start services on bootup you need to set 1008 \$servicename=YES in /etc/rc.conf and commit your changes via \dq{}fwcf 1009 commit\dq{}. For every policy exist a exception, we start all essential services 1010 by default, like ssh daemon, syslog and network initialisation. 1011 1012 For some services you can control the startup behavior by modifying 1013 the services\_flags variable in /etc/rc.conf. 1014 1015 For example the variable \$ssh\_opts is provided as argument to the dropbear 1016 ssh daemon to control its behavior. 1017 1018 Having this policy helps you to configure your FreeWRT embedded system without 1019 shooting yourself in the foot. For example if you try to realize a firewall system 1020 and trying to set the rules in /etc/firewall.user, which is read by 1021 /etc/init.d/S45firewall, if the iptables package is installed. You can just 1022 reload the changed ruleset via /etc/init.d/S45firewall restart. If you managed 1023 to kick you out of the system, you can just reboot the system and you gain access 1024 again. As soon as your are ready with the firewall configuration and you decide 1025 to activate the firewall rules on bootup, you set \$firewall=YES in /etc/rc.conf, 1026 commit your changes via \dq{}fwcf commit\dq{} and reboot. Now the firewall 1027 rules will be activated on bootup. 1028 1029 1030 \chapter{Troubleshooting} 1031 1032 \section{Failsafe Mode} 865 1033 866 1034 Failsafe mode is very useful if you misconfigured your embedded system, … … 875 1043 you get straight access (without depending on the installed SSH--daemon). 876 1044 877 \subs ubsection{How It Works}1045 \subsection{How It Works} 878 1046 879 1047 To get FreeWRT into failsafe mode you need physical access to the device and … … 890 1058 For some operating systems we provide ready to go binaries of failsafe. 891 1059 Take a look at http://www.freewrt.org/downloads/tools/failsafe 892 % TODO: \ref fuer link893 1060 894 1061 The tool just opens a network socket and waits for a special UDP packet … … 896 1063 recognized network interface (eth0). 897 1064 898 \subs ubsection{Enabling Failsafe Mode}1065 \subsection{Enabling Failsafe Mode} 899 1066 900 1067 Connect your computer to the embedded system via direct or crossed network … … 931 1098 \end{Verbatim} 932 1099 933 \subs ubsection{Repairing Your FreeWRT Configuration}1100 \subsection{Repairing Your FreeWRT Configuration} 934 1101 935 1102 If you want to repair your configuration, you first need to … … 962 1129 You can either use "reboot -f" or "-r" for mtd to reboot the system. 963 1130 1131 \section{Serial Console} 1132 1133 \section{JTAG} -
docs/handbook/user/cover.tex
r9ba8799 rcd78f74 18 18 \\ 19 19 \rightline{% 20 Revision 1.0 }20 Revision 1.0.1} 21 21 \\ 22 22 \rightline{%
Note:
See TracChangeset
for help on using the changeset viewer.
