User Tools

Site Tools



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.



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

See Hardware Hacking First Steps how to get the required information.
See 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 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 here. Some further comments about OpenWrt BuildRoot have been provided here.

How to set up an OpenWrt build environment on a Windows PC in a virtual machine is discussed here. Another tutorial discussing the same but written in 2013, with more detail is 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 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 TL-WR941ND, that can be bricked in several ways. A dedicated page helps you debricking your router.

meta/playground.txt · Last modified: 2015/12/31 08:57 by tmomas