Differences

This shows you the differences between two versions of the page.

doc:howto:generic.flashing [2012/10/12 15:33]
mitch Installing OpenWrt
doc:howto:generic.flashing [2013/09/08 17:02] (current)
grabbel
Line 1: Line 1:
-====== Installing OpenWrt (generic) ====== +====== Installing OpenWrt ====== 
-The Installation of OpenWrt is quite device specific. A detailed procedure should be found on the device-pages in this wiki: [[toh:start|Table of Hardware]]. If none is found you should read on here. Definitelymi have a look at the ->[[doc:techref:Flash Layout]].+The installation of OpenWrt is device specific. 
 +A detailed procedure should be found in the wiki-page for your device. See [[toh:start|Table of Hardware]] for available ones. If your device is not listed, read on... Definitely have a look at the [[doc:techref:Flash Layout]].
{{page>meta:infobox:dangerous&noheader&nofooter&noeditbtn}} {{page>meta:infobox:dangerous&noheader&nofooter&noeditbtn}}
Line 6: Line 7:
:!: If your attempt to install OpenWrt fails, [[doc/howto/generic.debrick]] could help you. :!: If your attempt to install OpenWrt fails, [[doc/howto/generic.debrick]] could help you.
-:!: This HowTo is VERY generic. You cannot just use it, but you have to adapt values and other stuff to you hardware+:!: This Howto is VERY generic. You cannot just use it, but you have to adapt values and other stuff to your hardware. Look at the [[toh:start|supported hardware page]] for your device-specific documentation.
Generally, you have three options: Generally, you have three options:
Line 13: Line 14:
  * **''Option_3:''** boot OpenWrt over the network: [[inbox:netboot|Netbooting]] is not supported by all [[doc:techref:bootloader|bootloaders]]!   * **''Option_3:''** boot OpenWrt over the network: [[inbox:netboot|Netbooting]] is not supported by all [[doc:techref:bootloader|bootloaders]]!
-===== Four Methods =====+===== Four Installation Methods =====
There are four ways to install OpenWrt on a device: There are four ways to install OpenWrt on a device:
-==== 1. via original firmware ==== +==== Method 1: via OEM firmware ==== 
-Open the WebUI of the //original firmware// with your web browser and install the OpenWrt firmware image file using the //"Firmware Upgrade"// option of the original firmware. Done.+Open the WebUI of the **OEM firmware** with your web browser and install the OpenWrt **factory** firmware image file using the //"Firmware Upgrade"// option. Done.
-**''NOTE:''** Sometimes the upgrade functionality of the original firmware contains some mechanism to make sure you do not inadvertently flash a wrong firmware-file. If that is the case, it will prevent you from installing OpenWrt this way.+**''NOTE:''** Sometimes the OEM firmware will only allow you to flash your device with a specific firmware file. If that is the case, you will not be able to install OpenWrt using this method. However, for some devices the build bots prepare tagged builds such that they are compliant with the firmwares from the manufacturer. This should be documented on the device specific page for your model.
 +==== Method 2: via Bootloader and an Ethernet port ====
 +Most, if not all [[doc:techref:bootloader|bootloaders]] provide built-in functionality for this purpose. Some use a [[wp>Trivial File Transfer Protocol|TFTP]]-client, others a TFTP-server, others a [[wp>File Transfer Protocol|FTP]]-client, some an FTP-server, some a web server and some use the [[wp>XMODEM]]-protocol.
-==== 2. via Bootloader and Ethernet port ==== +Before proceeding you need to determine the following:
-To facilitate exactly this, namely to allow flashing of a firmware, most if not all [[doc:techref:bootloader]]s contain a build-in functionality for this purpose. Some contain a [[wp>Trivial File Transfer Protocol|TFTP]]-client, others a TFTP-server, others a [[wp>File Transfer Protocol|FTP]]-client and some even a FTP-server. You need to know:+
-  * the preset IP address in the bootloader (this is not necessarily the same IP address the device has after it has booted the original firmware!) +  * the preset IP address of the bootloader (not necessarily identical to the IP address the device has after it has booted the original firmware!) 
-  * which of the above protocols is used +  * the protocol and whether the bootloader acts as client or as server 
-  * whether the bootloader acts as client or as server +  * the correct port number (if not [[wp>List of TCP and UDP port numbers|default]])
-  * the preset port number for the service, if not [[wp>List of TCP and UDP port numbers|default]]+
  * the interface you need to connect to   * the interface you need to connect to
-  * possibly a user name and a password to login +  * a user name and login password (if necessary) 
-  * it is useful to know the **time window** you have after starting the device to obtain a connection to it, e.g. a 1 sec time windows 5 sec after start +  * the time window you have after starting the device to obtain a connection 
- +Once you know all of the above parameters, you may proceed. 
-Once you know all of the above parameters, you may proceed: +  - Install the appropriate software on your PC (i.e. if the bootloader uses an FTP-server, you need a FTP-client). 
-  - install the corresponding software on your PC (i.e. in case the bootloader contains a FTP-server, you need a FTP-client) +  - Read the appropriate manual page ie: ''[[http://linux.die.net/man/1/tftp|tftp]]'', ''[[http://linux.die.net/man/8/tftpd|tftpd]]'', ''[[http://linux.die.net/man/1/ftp|ftp]]'', ''[[http://linux.die.net/man/1/ncftp|ncftp]]'', ''[[http://linux.die.net/man/8/ftpd|ftpd]]'', ''[[http://linux.die.net/man/8/pure-ftpd|pure-ftpd]]'', etc ... 
-  - read the manual pages for that software! e.g. ''[[http://linux.die.net/man/1/tftp|man tftp]]'', ''[[http://linux.die.net/man/8/tftpd|man tftpd]]'', ''[[http://linux.die.net/man/1/ftp|man ftp]]'', ''[[http://linux.die.net/man/1/ncftp|man ncftp]]'', ''[[http://linux.die.net/man/8/ftpd|man ftpd]]'', ''[[http://linux.die.net/man/8/pure-ftpd|man pure-ftpd]]'' or .. +  - Configure a static IP address for your PC interface in the same IP address block as pre-configured in the bootloader. 
-  - give your PC a static IP address in the same network as pre-configured in the bootloader +  - Connect your PC to the device. 
-  - connect your PC with the correct port +  - Power cycle the device. 
-  - power cycle the device +  - Connect to the bootloader using the software you chose 
- +  - Install the OpenWrt firmware file.
-  - obtain a connection to the bootloader +
-  - follow specific procedures to overwrite original firmware with OpenWrt firmware file+
  - **<color red>Do not overwrite or alter the bootloader</color>** until explicitly instructed to do so!   - **<color red>Do not overwrite or alter the bootloader</color>** until explicitly instructed to do so!
-**''NOTE:''** Sometimes even the bootloader prevents you from flashing a non-OEM firmware, e.g. the [[toh/inventel/dv4210|Inventel DV4210 (AKA Livebox)]]\\ +**''NOTES:''** Sometimes even the bootloader prevents you from flashing a non-OEM firmware. 
-**''Time window:''** To be able to use the entire time window, the connection between host and router needs to be established quickly. To make this as quick possible, you could disable auto-negotiation of your [[wp>Network interface controller|NIC]] and especially [[http://support.microsoft.com/kb/239924|disable media sensing]] of your OS.+If you have a short time window, the connection between your computer and device needs to be established quickly. To make this as quick possible, you can disable auto-negotiation on your [[wp>Network interface controller|NIC]] and/or [[http://support.microsoft.com/kb/239924|disable media sensing]].
=== Specific Howtos === === Specific Howtos ===
-  * -> [[doc:howto:generic.flashing.tftp]] +  * [[doc:howto:generic.flashing.tftp]] 
-  * -> [[doc:howto:generic.flashing.ftp]] +  * [[doc:howto:generic.flashing.ftp]] 
-  * -> [[doc:howto:generic.flashing.xmodem]]+  * [[doc:howto:generic.flashing.xmodem]]
-==== 3. via Bootloader and Serial port ==== +==== Method 3: via Bootloader and Serial port ==== 
-  * -> [[doc:howto:generic.flashing.serial]]+  * [[doc:howto:generic.flashing.serial]]
-==== 4. via JTAG ==== +==== Method 4: via JTAG ==== 
--> [[doc/hardware/port.jtag]]+ * [[doc/hardware/port.jtag]]
- +==== Install a ramdisk-image into main memory ====
----- +
-==== 5. install a ramdisk-image into main memory ====+
This step shows you howto upload a new ramdisk image to the device. The existing firmware on the flash remains unchanged! You require a working serial cable to do the ramdisk upload. This step shows you howto upload a new ramdisk image to the device. The existing firmware on the flash remains unchanged! You require a working serial cable to do the ramdisk upload.
Line 88: Line 85:
Concrete examples: [[toh/netgear/wnr2000]], ... Concrete examples: [[toh/netgear/wnr2000]], ...
 +Don't forget to consult the other [[doc:howto:generic.overview|Generic Basic Howtos for OpenWrt]]
 +
 +
 +===== Installation Checklist =====
 +//This checklist cannot and does not completely cover all the ways you can install OpenWrt.//
----- +<html> 
-Don't forgett to consult the other [[doc:howto:generic.overview|Generic Basic Howtos for OpenWrt]]+  <head> 
-----+    <style type="text/css"> 
 +      .checklist {background:rgba(255,255,255,0.50); padding:1em;} 
 +      label:after {content:"\A"; white-space:pre;} 
 +      .lvl1 {margin-left:1em; font-weight:bold; margin-top:1em;} 
 +      .lvl2 {margin-left:2em;} 
 +      .lvl3 {margin-left:4em; font-style:italic;} 
 +    </style> 
 +  </head> 
 +  <body> 
 +    <form class="checklist"> 
 +      <label class="lvl1"><input type="checkbox"> Pre-Installation</label> 
 +        <label class="lvl2"><input type="checkbox"> Say hello in <a href="http://webchat.freenode.net/?channels=#openwrt">#openwrt</a> channel at freenode.</label> 
 +        <label class="lvl2"><input type="checkbox"> Make sure that the router has currently stock/original firmware installed.</label> 
 +       <label class="lvl2"><input type="checkbox"> Configure your computer to use static IP address.</label> 
 +        <label class="lvl2"><input type="checkbox"> Connect to the router with wire, not WiFi.</label> 
 +        <label class="lvl2"><input type="checkbox"> Do your own research and read all the resources about installing OpenWRT on your router:</label> 
 +          <label class="lvl3"><input type="checkbox"> <a href="http://wiki.openwrt.org/doc/faq/before.installation">FAQ before installation</a></label> 
 +          <label class="lvl3"><input type="checkbox"> <a href="http://wiki.openwrt.org/toh/start">Table of Hardware</a></label> 
 +          <label class="lvl3"><input type="checkbox"> <a href="https://forum.openwrt.org/">OpenWRT forum</a></label> 
 +        <label class="lvl2"><input type="checkbox"> Print or save those pages for offline reading:</label> 
 +          <label class="lvl3"><input type="checkbox"> <a href="http://wiki.openwrt.org/doc/howto/firstlogin">First login</a></label> 
 +          <label class="lvl3"><input type="checkbox"> <a href="http://wiki.openwrt.org/doc/howto/generic.failsafe">Failsafe</a></label> 
 +        <label class="lvl2"><input type="checkbox"> (optional) <a href="http://wiki.openwrt.org/doc/howto/generic.backup">Backup flash of your router.</a></label> 
 +      <label class="lvl1"><input type="checkbox"> <b>Installation</b></label> 
 +        <label class="lvl2"><input type="checkbox"> Reboot router.</label> 
 +        <label class="lvl2"><input type="checkbox"> Download OpenWRT image in proper location.</label> 
 +          <label class="lvl3"><input type="checkbox"> In case of <a href="http://wiki.openwrt.org/doc/howto/generic.sysupgrade">upgrading</a> existing OpenWrt system, the proper location is RAM (usually /tmp).</label> 
 +       <label class="lvl2"><input type="checkbox"> Verify MD5 checksum of the OpenWRT image you downloaded.</label> 
 +        <label class="lvl2"><input type="checkbox"> Make sure that there is at least as much free RAM as the size of OpenWRT image you have downloaded.</label> 
 +      <label class="lvl1"><input type="checkbox"> <b>Post-Installation</b></label> 
 +        <label class="lvl2"><input type="checkbox"> Set root password.</label> 
 +        <label class="lvl2"><input type="checkbox"> <a href="http://wiki.openwrt.org/doc/howto/generic.backup">Backup flash of your router.</a></label> 
 +        <label class="lvl2"><input type="checkbox"> Make yourself comfortable with the failsafe mode.</label> 
 +    </form> 
 +  </body> 
 +</html>

Back to top

doc/howto/generic.flashing.1350048800.txt.bz2 · Last modified: 2012/10/12 15:33 by mitch