Create Your Own Firmware

It is possible to create your own firmware using the scripts developed for this project and the OpenWRT build system. This will allow you to add features that may not be available in the firmware on this site and to create firmware for routers not yet supported.

Setting Up Linux

To build the ROOter firmware you need to have a system that is running Linux. This can be a computer that runs Linux either solo or in a dual-boot with Windows. Or it can be Linux running in a Virtual Machine like VirtualBox or VMWare Player.

Almost any distribution of Linux will work as a build system so you can use your favorite distro. The ROOter firmware is built on Linux Mint 12 and that will be the version that will be used in this tutorial.

If you are using a Virtual Machine then the easiest route is to download a premade image of Linux with all the bells and whistles already installed.

For VirtualBox this Linux Mint build is available and for VMWare Player this Linux Mint build is available.

Very little is needed in the Linux system since everything is done from the File Manager and the command line terminal.

Setting Up OpenWRT

When you log into your Linux system you must do so as a non-root user. Linux Mint automatically does this for you.

Open the File Manager (called Computer in Linux Mint) and open the base folder for the user you are logged in as. In Linux Mint this is called user. The Directory Tree will look like this.

Right click on an open space on the right side of the Manager and select Create New -> Folder and create a folder called openwrt

This will be the folder that contains the ROOter build systems.

If you are using a computer running Linux you must now download the Zip file that contains the GoldenOrb scripts and place it in the openwrt folder. If you are using a Virtual Machine then download the file to the host machine and copy the Zip file from the host computer into the VM. Do not unzip the file in Windows and copy the files individually.

The Zip file containing the GoldenOrb scripts is available here.

Use the Linux Archiver program (Xarchive in Linux Mint) to extract the files from the Zip and place them in the openwrt folder. You can delete the goldenorg.zip file after this is done.

You will now have 2 folders in the openwrt folder, trunk and chaoscalmer. GoldenOrb requires 2 build systems in order to make images for all the supported routers. One is based on the OpenWRT revision named Chaos Calmer and the other is based on the most recent development revision called Trunk. If you are making an image for a single router then you only need to create a single build system that supports that router.

The following routers use the Trunk build system to create their images.

  • Raspberry Pi and Pi 2
  • Netgear WNR3500L
  • Netgear WNR3400
  • Netgear DGND3700
  • Asus RT-N16
  • Asus RT-N66
  • Asus RT-AC56U
  • Linksys E3000
  • Linksys E4200v2
  • Linksys EA4500
  • Huawei HG553
  • Huawei HG556

All other routers use the Chaos Calmer build system.

If desired you can have both build systems present on a single Linux system as they are totally separate from each other.

We will look at the Chaos Calmer build system here. The Trunk build system is identical so you can use the same steps there.

Go to the chaoscalmer folder using the File Manager.

Go to Tools and Open the Current Folder in Terminal.

In the terminal type

./setup

and press Enter.

This will create the OpenWRT build system, copy all the needed GoldenOrb files and modify other files to suit the ROOter needs.

This will take some time and requires an Internet connection so it can download all the necessary files.

Once this has completed you can close the Terminal. You will see that a new folder named openwrt has been created. This contains the build system.

Use the File Manager to go to this folder.

This folder contains everything needed to create an image using the Chaos Calmer revision of OpenWRT and the GoldenOrb ROOter package.

Creating Configuration Files

The OpenWRT build system uses a configuration file to determine what packages are added to the image when you build it. This file is name .config and is found in the root of the folder containing the build system.

ROOter manipulates this file to allow the creation of images for many routers by using different scripts specifically desgined for this purpose.

The method used to create a ROOter image uses the normal OpenWRT programs to create the necessary .config file, then renames it and moves it to the configfiles folder. A script is then used to do the actual building of the image.

Let's look at how you create a .config file using the OpenWRT build system. The GoldenOrb build system comes with predefined .config files for all of the supported routers but these may not be up to date with the OpenWRT revision you are using. Creating a new .config file is best all around.

In order to ease the work required to create a new .config file there is the RouterList.pdf document included in the goldenorb.zip package. This contains the information needed when creating and renaming the .config file.

In this document you have the Router Model, the name of the .config file for that router that is saved in the configfiles folder, the script used to build the image and the packages required by ROOter.

Plus there is the Target information required when creating the .config file using the OpenWRT programs.

Routers that use the Trunk build are marked as such.

For a more detailed look at this information we'll examine the A5-V11 router.

After the .config file is created we will rename it to .config_a5-v11 and move it into the configfiles folder. The specific script associated with the building of an image for this router is mka5v11.

The package that must be included in the .config file to make a ROOter image is ext-rooter4.

When creating the .config file using the OpenWRT build programs, we must know some information about the router's processor and the router itself. This is the Target and Subtarget information.

Now create a .config file for this router.

Go to Tools and Open the Current Folder in Terminal. This will be the /openwrt/chaoscalmer folder.

Enter the following into the Terminal.

make menuconfig

The configuration creation program will then run.

Use the cursor keys to navigate through the menus and use Enter to enter the submenus. There is no mouse in this program.

Use the information from RouterList.pdf to select the correct Target settings for this router.

After doing that, use the cursor keys to scroll down to the ROOter menu and use Enter to go to its submenu.

Scroll down to the ext-rooter4 package and press Y to select it. Use the left/right cursor keys to exit this submenu and then to exit the configuration program.

You will then be asked if you wish to save the changes you have made. Save the changes.

Go back to the File Manager and locate the .config file. This now contains the need information to build an image for the A5-V11 router.

Copy this file into the configfiles folder and rename it to .config_a5-v11 as indicated in the RouterList.pdf document. You may need to delete the old file by this name before the renaming.

In the File manager go back to the /openwrt/chaoscalmer folder.

Right click on the mkonce file and open it with a text editor, Leafpad in Linux Mint.

Change line 18 so it is the script file associated with this router. Save the file.

You can change the Date or Name of the firmware as well in this script.

Go back to the Terminal program and type the following.

./mkonce

and the image will be built for the A5-V11 router.

The mka5v11 script conatins all the needed commands to do the actual building of the image and create the Zip file that contains it. When the build process is complete, and this can take several hours, the Zip file containing the image will be found in the images folder.

By changing line 18 in mkonce you can build images for all the supported routers quite easily. Create a .config file with the wanted packages and build a new image.

The above procedure works for both the Chaos Calmer version and the Trunk version of GoldenOrb.