OpenWRT Kamikaze Build

Building your own OpenWRT firmware from SVN: Kamikaze

Using OpenWRT from the the downloads.openwrt.org means you are bound to a slow release and testing cycle: White Russian RC6 is the most current release at time of writing

This means that you are stuck with an older kernel 2.4.30 and older builds of the software that is based on that kernel

Also the configuration and management system is a generation behind

The alternative is to use Kamikaze, this is downloaded from a developers site

Anybody with some basic programming skills and some linux experience will have no trouble building the source directly from the Subversion Repository

Take this guide as a glossary, refer to https://dev.openwrt.org/ as your bible

Target build Linux Operating System

You will need a linux operating system that is installed rather than a live cd as you will need to write to disk and have permissions to build software

I reccomend Gentoo Linux, but Ubuntu and Fedora Core are good forgiving Linux Operating Systems for a new user

SVN client

In order to download the source from the repository you will need svn

Use your package management system to install svn

http://subversion.tigris.org/project_packages.html

Standard Command line tools: wget, gunzip, make

I would be surprised if your linux install didnt have this but avoid a barebones linux like slackware which may lack some of the more standard command line tools

Working gcc C++ compiler

Although the OpenWrt creates a tool chain, this tool chain needs to be compiled itself, before it can be compiled for the target platform

This may mean choosing a “Development” suite of tools for your linux operating system

But I would imagine this would be installed already if you are used to compling your own software

Disk Requirements

Make sure you have about 3 gigabytes of free disk space

So if you are putting this on a spare system dig out a 20Gb drive

Bandwidth Requirements

Im not sure of the exact amount, but this will download a lot of data, this requires a broadband connection, without a excess cost scheme

The total amount of data is less than a gigabyte but the disk usage is a lot higher due to decompression

Also the download isnt over once the svn download is done, there will be further wget downloads

SVN download of source

Now you have your svn client installed, open a shell, navigate to a location on the disks with 3GB of free space and paste the following command

svn co https://svn.openwrt.org/openwrt/trunk/

Menuconfig

Now in the same folder issue the command below

make menuconfig

Intially you can choose the hardware platform you are building for ie broadcom xxxxx for kernel 2.4.32 or broadcom xxxx for kernel 2.6.17

This will allow you to choose what will be put into the firmware you want to make
Anything that is chosen as a [M] will be installed via ipkg, or will be a kernel module
Anything that is chosen as a [*] will be complied into the kernel or will be in the firmware itself
Anything that is chosen as [ ] will not be complied

This is the time to choose that Atheros based kernel for madwifi that you always wanted to run 802.11a under OpenWRT

watch for debug messages as they will help you solve dependancy issues

Build tool chain

Once you have locked in all your choices, you simply have to build the firmware ready to install

Unforetunately you are developing for a system that isnt x86 like the system you are compiling on for this you need a special complier called a toolchain

The developers are OpenWRT have taken care of this and it is part of the make file to compile the tool chain for you

make

Initally there will be a massive download and compile cycle to build all the complier tool chains for the various ulibc firmware for the different CPU types you have chosen

Just hang in there and wait, it might be worth doing this on your fastest system if you are in a hurry

Wait

Build firmware image

Once the tool chain is built, it can go ahead and compile all the kernel, kernel modules, and software (busybox etc) you need for your openwrt device

Wait

Build additional packages

Some packages are chosen by default and they will be compiled and bundled into the firmware or packed into thier own .ipkg files ready to be installed

as outline on the https://dev.openwrt.org page:

Note: Kamikaze only contains the essential set of packages, extra packages can be found in the 'Kamikaze packages' directory above. To use these packages simply symlink them into Kamikaze's package directory.

So if you want quagga, Kismet, olsr etc, you will need to symlink the directories and thier dependancies and hope like hell all the .ipkg files will fit into the flash

you also need to point to a web server where you will host the .ipkg files this will be in the /etc/ipkg.conf on the new install

Wait

Output

find the

bin

folder and install it onto your openwrt device, and give yourself a leet pat on the back

Celebrate