Flashing your FON to OpenWRT
Yes! It’s OpenWRT (kamikaze). Since it doesn’t come with webif (web interface) at the moment hence you will need to do all configuration through SSH. <caution>It is not for the faint hearted.</caution>
Preparation Steps
* You must be able to access SSH on your FON (code injection trick will work fine)
* You need a working TFTP server installed on your PC
* Putty
* Cross ethernet cable
* The required firmwares for OpenWRT (kamikaze) [firmware version] [changelog]
* http://ipkg.fonera.info/flasheo/openwrt-atheros-2.6-root.jffs2-64k
* http://ipkg.fonera.info/flasheo/openwrt-atheros-2.6-vmlinux.lzma
Step 0
Connect your FON router to the internet at the same time able to connect to the SSH of your FON. e.g. Placing the FON behind your current router. Or connecting through wireless.
Step 1
SSH into the FON router and execute the following commands
root@OpenWrt: ~# cd /tmp
root@OpenWrt: ~# wget http://fonera.info/camicia/openwrt-ar531x-2.4-vmlinux-CAMICIA.lzma
root@OpenWrt: ~# mtd -e vmlinux.bin.l7 write openwrt-ar531x-2.4-vmlinux-CAMICIA.lzma vmlinux.bin.l7
root@OpenWrt: ~# reboot
Wait for FON to boot.
Step 2
SSH into the FON router (again) and execute the following commands. The following commands configures your RedBoot for access via the ethernet port so that you can flash without a RS232-to-TTL convertor.
root@OpenWrt: ~# cd /tmp
root@OpenWrt: ~# wget http://fonera.info/camicia/out.hex
root@OpenWrt: ~# mtd -e “RedBoot config” write out.hex “RedBoot config”
root@OpenWrt: ~# reboot
Once the above procedures are completed, you can unplug the power cord of FON and connect your Fonera to your PC via a cross ethernet cable.
Configure your system to use an Internet Protocol (IP) address on the 192.168.1.0/24 network (but not 192.168.1.254 as your Fonera is configured to use this address for RedBoot). e.g. configure your system to use 192.168.1.100 and subnetmask 255.255.255.0. (for this guide I will use 192.168.1.100).
Test the connectivity by pinging 192.168.1.254, if everything is connected correctly, you would be able to get ping replies from the Fonera. Open up Putty and connect to 192.168.1.254, port 9000 using Telnet. If it goes well, you would see the “RedBoot>” prompt and you can proceed to the next step.
Make sure you have set up the TFTP server by now and the 2 files for flashing the firmware is located in the root folder of your TFTP server. It simply means that if you selected “C:\Downloads\” as the root folder for TFTP server, the 2 files you have downloaded earlier should be in “C:\Downloads\” as well. (C:\Downloads\openwrt-atheros-2.6-root.jffs2-64k and C:\Downloads\openwrt-atheros-2.6-vmlinux.lzma)
Step 3
After you see “RedBoot>”, the next step is to configure where it loads the firmware from. Issue the following command:
RedBoot> ip_address -l 192.168.1.254/24 -h 192.168.1.100
Now with all the configurations done, it is time to start flashing the router! Flashing will take 10 to 20 minutes so don’t be alarmed if it seems to be hanging.
Step 4
With your telnet connection you have established earlier on using Putty (connected to 192.168.1.254, port 9000), we will issue a few more commands to instruct the router to get the files from your TFTP server and start flashing. Do take note the 3rd command takes a very long time to complete and the leds on the router will stay on and hence gives the impression that the FON hung, but it isn’t. Take a break and go down to get some coffee, who knows it might be done when you are back.
RedBoot> fis init
RedBoot> load -r -v -b 0x80040450 openwrt-atheros-2.6-root.jffs2-64k
RedBoot> fis create -b 0x80040450 -f 0xA8030000 -l 0x00700000 -e 0x00000000 rootfs
RedBoot> load -r -b %{FREEMEMLO} openwrt-atheros-2.6-vmlinux.lzma
RedBoot> fis create -r 0x80041000 -e 0x80041000 vmlinux.bin.l7
RedBoot> fis load -l vmlinux.bin.l7
RedBoot> exec
Final step would be setting your system network to use DHCP instead of 192.168.1.100/24 earlier on. Wait for the FON to fully bootup and then connect your system to the FON through a cross cable. Check your IP configurations and FON should be using 192.168.1.1. So do a telnet to 192.168.1.1 and set the password for root account.
root@OpenWrt: ~# passwd root
So what’s next? SSH to your FON, logging in as root with the password you just set. Start doing the configurations you need by editing the files in “/etc/config”
Check out the trackbacks, a guide to add webif (web interface) to the OpenWRT has been written.