The LB000021 Linux Router Mod - Going FurtherHaving worked with the standard 'Midge' software for a while, One thing became clear, getting software for a plain 'Midge' flashed router is a task for someone familiar with the linux / uClibc / Bootloader software. Since the stable version of 'Midge' was created, its author has moved on to a new port - called Kamikaze. Installing Kamikaze required the replacement of the routers Bootloader software. Any mistakes doing this will turn your router into a 'brick' - Up to this point, any of the software compiles and 'un-stable' distributions I had tried - if anything had gone wrong - could also have bricked the router! Eventualy, I found a thread on the 'forum called 'USB Support' where Vlad explains that the Bootloader+TFTP required for Kamikaze can be used for all other 'Midge' software, It can also be reversed if you wish to use other distributions. I grabbed the bootloader and latest binary files. All went well(!) I had to ifconfig the ethernet port that my lan cable was plugged into and add a default route for the gate way (route add default gw 'router ip address' ). Using 'vi', I added a nameserver line to /etc/resolve.conf - nameserver = 'routers ip address' and I was then able to ping google and download packages. USB Hard DriveOne of the things I want to be able to do is transfer files and programs to the router via a usb drive. The Kamikaze software will allow you to install kernel modules for usb hardware, but I wanted the router to 'boot' and know what it was doing. I also want to be able to compile my own software for the router.I downloaded the latest Kamikaze source and unpacked it. The 'make menuconfig' menu includes all sorts of useful things, but the aim is to select the very minimum on the disk and make anything else as a Module. I then ran 'make'. This downloaded all necessary files and built them. If you go through this loop several times, then before deleting the 'trunk/openwrt' directory, copy the 'trunk/openwrt/dl' directory, this contains all of the downloaded files and will save you some bandwidth / time. If you use 'make V=99' instead of 'make', you will see all the messages as the software compiles - or you could go and get a meal (you have plenty of time)! This all went fine, I ended up with a '.bin' image that I flashed to the router (serial upload with X-Modem, Write to Flash, Reboot). I tried a few things - going through the above several times before realizing that once I have used the command 'Flash Save' to save things like ip address (/etc/net) and /etc.resolve.conf to Flash, they were not resetting when a new build was flashed. This meant that parts of the new build got ignored Clearing the settings Flash MemoryThe problem is that when Kamikaze starts for the first time, it initialises the 'Flash save' area. Next time - even if the router is re-flashed, it will see this initialised area and not repeat the initialisation (preserving the settings - normaly a good thing). I found the simplest way of clearing the 'Flash save' area is to upload a copy of the older 'Midge stable'. This clears the flash using it's own settings. Next time you upload and boot your own image, it will see an invalid 'Flash save' area and initialise itMidge/Kamekazi Native Build ToolsI wanted to be able to make software and alter the running system without the support of Buildroot and the processing power of the PC. I wanted the router to boot and let me download and compile simple programs (using a usb hard drive for workspace). I also wanted other tools and programs that were not in the Kamikaze buildroot.
|
![]()
A PIC, Linux and a Router |