Build Your OpenWrt Firmware in 30 Minutes

 

Now you can build your own customized OpenWrt firmware for GL routers in 30 minutes. Here is how:

Hardware requirement:

  1. Router: you need to have one OpenWrt supported router. For example, all GL routers are supported by OpenWrt and have serial connectors.
  2. Linux: you need to have a Linux PC, you can use Ubuntu, Debian, Centro OS etc. If you only have windows, you can install a virtual machine like virtualbox, which is free. It is quite simple actually.
  3. UART: for advanced development, you cannot avoid to have a USB-UART adapter, like this one.

Software Environment:

We use Ubuntu as an example here, you can refer to OpenWrt guide for more details about other system.

You need to install necessary dev tools:

$ apt-get install subversion build-essential libncurses5-dev zlib1g-dev gawk git ccache gettext libssl-dev xsltproc wget

 You need to download the Image builder for your router. Download it from our website.  All these image builder is compiled with all the kernel modules and software packages, so you can use without compile it by yourself. All our image builder is compiled on the 64bit machine. This may not work on a 32bit machine.

After download you need to unzip the image builder into one folder. For example:

$ tar jxvf OpenWrt-ImageBuilder-ramips-mt7620.Linux-x86_64.tar.bz2

$ cd OpenWrt-ImageBuilder-ramips-mt7620.Linux-x86_64

Start from a clean firmware

You need to download our clean firmware from https://www.gl-inet.com/firmware/ and install on your router. Then you need to configure the firmware as to your own needs. Be sure to remember the settings you made.

Build your firmware

After you have one working firmware, you can proceed to build the same firmware using the imagebuilder. A detailed guidance is here. It is quite simple and quick.

You need to write down the software packages you installed and the files your modified. For example, you install luci-app-upnp and modified /etc/config/wireless, copy the content of wireless and put it in your current folder files/etc/config/wireless, suppose your are building an image for GL-MT300N, do this:

make image PROFILE=GL-MT300N PACKAGES="luci-app-upnp openvpn-openssl kmod-usb-core" FILES=files/

You will have your firmware in several minutes in bin folder.