User Tools

Site Tools


meta:playground

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Previous revision
meta:playground [2013/10/16 22:24]
meta:playground [2015/12/31 08:57] (current)
tmomas
Line 1: Line 1:
 +====== Playground ======
  
 +The playground is for testing. Play around as you like!\\
 +Add your content below the line and leave this note in place.
 +
 +----
 +
 +The below page is WIP.  --- //tmomas 2015/12/30 15:28//
 +
 +====== How to get OpenWrt support for a particular router ======
 +
 +OpenWrt support doesn'​t fall from heaven. It is not sufficient to create empty devicepages or empty dataentries in the ToH and then hope, that somehow magically a firmware image for your router is created shortly after. Nobody cares for orphaned devicepages with insufficient hardware information,​ and the sole presence of a router in the ToH does not trigger any development work.
 +
 +Therefore, if you want to get a device supported by OpenWrt, first **you** need to do some work and deliver information,​ that enables the creation of a firmware image.
 +
 +++++More|
 +  - Check [[toh:​start|ToH]] for OpenWrt support and available information (see dataentry + devicepage)
 +    - If device is **listed**, but not supported -> See devicepage for more info and ask the forum
 +      - forum thread available? -> search the OpenWrt forum
 +        - Yes -> Ask what's missing, get people involved
 +        - No -> Start a new thread in the OpenWrt forum, provide as much hardware info as possible
 +      - devicepage available?
 +        - Yes
 +          - minimum hardware info available?
 +            - Yes -> Ask the forum (see above)
 +            - No -> add minimum hardware info
 +        - No -> create new devicepage, add minimum hardware info
 +    - If device is **not listed** (and not supported)
 +      - forum thread available? -> search the OpenWrt forum
 +        - Yes -> Ask what's missing, get people involved
 +        - No -> Start a new thread in the OpenWrt forum, provide as much info as possible
 +      - devicepage available?
 +        - Yes
 +          - minimum hardware info available?
 +            - Yes -> Ask the forum (see above)
 +            - No -> add minimum hardware info
 +        - No -> create new devicepage, add minimum hardware info
 +++++
 +
 +++++OLD|
 +  * If router ABCD isn't already [[toh:​start|supported by OpenWrt]] and it isn't a work-in-progress either, then you can help to get the work started. ​
 +  * If router ABCD is already listed in the [[toh:​start|Table of Hardware]] then check the Wiki page for ABCD to see whether all of the required information is already present.
 +  * If there'​s no Wiki page, consider creating one.
 +  * If it's not known whether the router can run third-party firmware, you may need to start by assuming that OpenWrt support is at least possible. Available memory is an issue, with some devices having less that 16MB RAM. However note that in [[http://​forum.openwrt.org/​viewtopic.php?​id=33908|Sept 2012]] the minimum RAM was stated to be 32MB.
 +++++
 +
 +===== Required information =====
 + 
 +Certain information on router ABCD needs to be collected before it can be worked on. The device template has been created so that all of this information (and more) can be recorded in a consistent fashion.
 +
 +The required information includes
 +  * the type of CPU
 +  * available GNU/Linux drivers for that hardware
 +  * the type of Flash memory chip
 +  * [[meta/​adding_images_to_openwrt_wiki|quality photograph of the PCB]]
 +  * OEM boot log
 +  * the type of [[doc:​techref:​bootloader|bootloader]]
 +  * the precise [[doc:​techref:​flash.layout|flash layout]]
 +
 +See [[doc:​devel:​hw.hacking.first.steps|Hardware Hacking First Steps]] how to get the required information.\\
 +See [[doc:​devel:​add.new.device|Adding new device support]] for further detail on the process of creating a new firmware.
 +
 +One thing to check as soon as the CPU type is known, is whether support for the CPU (platform) has already been [[https://​dev.openwrt.org/​wiki/​platforms|added to OpenWrt]].
 +Adding support for a platform is documented on the OpenWrt site but the process is significantly longer than adding support for a specific router whose CPU is already supported.
 +
 +
 +===== Further considerations =====
 +
 +A few additional comments
 +  * In order to obtain the OEM boot log and precise flash layout it's likely that a connection to the router'​s serial console will need to be set up. This will probably require soldering to be done.
 +  * A router that's currently unsupported may very well require a connection to its serial console during development or testing
 +
 +Note that opening up the router and soldering wires to the serial console will both void the manufacturer'​s warranty. If this is contrary to your needs then you will need to rely on others to get router ABCD supported in the OpenWrt project. (But bear in mind that if the task is not sufficiently interesting it's less likely that others will get involved.)
 +
 +In the device template there'​s a link to a Wiki page which discusses how to set up a link from a PC to the serial console of a router.
 +
 +  * Creating OpenWrt firmware for router ABCD will require the OpenWrt code to be compiled specifically for that device, in a Linux environment
 +  * At some stage someone will need to flash the OpenWrt firmware onto router ABCD for the first time
 +
 +Both of the above place requirements on the owner of the router. Some knowledge needs to be acquired.
 +
 +It sometimes happens that an OpenWrt developer will take an interest in router ABCD but this cannot be guaranteed. If they happen to have access to router ABCD that makes things easier, so hardware donations can definitely help.
 +
 +The only way that an owner of router ABCD can //​guarantee//​ that an attempt to produce an OpenWrt firmware will be made is if they undertake that work.
 +
 +A guide to understanding what an OpenWrt development environment consists of is provided [[doc:​howto:​buildroot.exigence|here]]. Some further comments about OpenWrt BuildRoot have been provided [[about:​toolchain| here]].
 +
 +How to set up an OpenWrt build environment on a Windows PC in a virtual machine is discussed [[http://​forum.openwrt.org/​viewtopic.php?​id=8410)| here]]. Another tutorial discussing the same but written in 2013, with more detail is [[http://​linksprite.com/​wiki/​index.php5?​title=Tutorial_of_compiling_OpenWRT
 +|here]].
 +
 +A PC that's used to produce OpenWrt firmware will need up to 2GB of free disk space and that's just for the OpenWrt code (a stable branch). The total requirement could be 4GB. Some articles suggest that a newcomer could build a custom OpenWrt firmware as a weekend project but this assumes that someone else has already provided device-specific instructions. ​
 +
 +Flashing OpenWrt to a router without //​device-specific instructions//​ (i.e. taken from the device wiki page) contains a significant element of risk. For example, some (many) routers have to be flashed with a specific version of OpenWrt, otherwise you end up with a brick. The chances of bricking your router when you flash it the first time are very real.
 +
 +The problems are most likely to derive from:
 +  * overwriting the bootloader
 +  * including too many packages in the [[https://​forum.openwrt.org/​viewtopic.php?​id=19281|custom firmware]]
 +  * Flashing with wrong method e.g. TFTP instead of WebGUI; or vice-versa
 +  * code inserted into the bootloader by the manufacturer,​ designed to stop third-party firmware from running
 +
 +If you **do** brick your router the problem can be made worse by:
 +  * not having a backup of the bootloader and ART/NVRAM partitions
 +  * shorting pins together as a way to unbrick the device
 +
 +The device-specific instructions in the Wiki give some reasons for bricking various routers; see for example the [[toh/​tp-link/​tl-wr941nd|TL-WR941ND]],​ that can be bricked in several ways. A dedicated page helps you [[doc/​howto/​generic.debrick|debricking your router]].