I will use the Serial Port to connect La Fonera, there are also other methods to flash Openwrt on La Fonera but my Router was bricked somehow I just had this solution (RedBoot) left..
This method is completely soldering less; I used some old CD-Rom audio cables to connect the serial Pins on La Fonera. The serial signals are 3.3v so you need a level shifter. I already wrote this guide about serial connections…

Configure you Serial settings: 9600–8-N (no flow control).
Important note ripped from http://www.easy2design.de/bla/?page_id=98:
As pointed out by DarkBlade (I also experienced this, but thought I just built my serial cable to crappy(ly)…): It seems that the Fonera sometimes (or always?) doens’t want to boot when connected to serial. I narrowd it down to the connected TX at the Fonera side. If you don’t see anything and the little sucker apparently isn’t booting at all, disconnect the TX from the Fonera and boot with RX connected only. Once you see the first line of output running over your screen, quickly connect TX line, too. Other people just tried booting and connecting the serial cable only 5sec later, though i suppose you will need some practice, as the point where you need to activate the RedBoot bootloader will come after only a few lines of serial output. Just play a little and be quick :)
I just connected the power cable to La Fonera and 1-2s later I connected the TX and RX lines (GND was already connected). This worked like a charm.
Ok, let’s flash Openwrt on La Fonera:
STEP 1, Prepare:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | RedBoot> fconfig bootp_my_ip_mask 255.255.0.0 bootp_my_ip_mask: Setting to 255.255.0.0 Update RedBoot non-volatile configuration — continue (y/n)? y … Erase from 0xa87e0000-0xa87f0000: . … Program from 0x80ff0000-0x81000000 at 0xa87e0000: . RedBoot> fconfig bootp_my_ip 192.168.1.2 bootp_my_ip: Setting to 192.168.1.2 Update RedBoot non-volatile configuration — continue (y/n)? y … Erase from 0xa87e0000-0xa87f0000: . … Program from 0x80ff0000-0x81000000 at 0xa87e0000: . RedBoot> fconfig bootp_server_ip: Setting to 192.168.1.10 Update RedBoot non-volatile configuration — continue (y/n)? y … Erase from 0xa87e0000-0xa87f0000: . … Program from 0x80ff0000-0x81000000 at 0xa87e0000: . RedBoot> fconfig boot_script_timeout 10 boot_script_timeout: Setting to 10 Update RedBoot non-volatile configuration — continue (y/n)? y … Erase from 0xa87e0000-0xa87f0000: . … Program from 0x80ff0000-0x81000000 at 0xa87e0000: RedBoot> fconfig net_debug true net_debug: Setting to true Update RedBoot non-volatile configuration — continue (y/n)? y … Erase from 0xa87e0000-0xa87f0000: . … Program from 0x80ff0000-0x81000000 at 0xa87e0000: . RedBoot> reset |
The reset is needed to accept your settings!
WARNING: the option “fconfig net_debug true” will enable RedBoot LAN access BUT your network performance will be arround 2500 b/s! So do NOT use it when you have a serial connection! You can enable this option when Openwrt runs on this beast so you don’t need to attach the serial cables anymore.
STEP 2, init flash image system:
1 | # fis init — Initialize Flash Image System (FIS) |
Output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | RedBoot> fis list Name FLASH addr Mem addr Length Entry point RedBoot 0xA8000000 0xA8000000 0x00030000 0x00000000 rootfs 0xA8030000 0xA8030000 0x00700000 0x00000000 vmlinux.bin.l7 0xA8730000 0x80041000 0x000B0000 0x80041000 FIS directory 0xA87E0000 0xA87E0000 0x0000F000 0x00000000 RedBoot config 0xA87EF000 0xA87EF000 0x00001000 0x00000000 RedBoot> fis init About to initialize [format] FLASH image system — continue (y/n)? y *** Initialize FLASH Image System … Erase from 0xa87e0000-0xa87f0000: . … Program from 0x80ff0000-0x81000000 at 0xa87e0000: . RedBoot> fis list Name FLASH addr Mem addr Length Entry point RedBoot 0xA8000000 0xA8000000 0x00030000 0x00000000 FIS directory 0xA87E0000 0xA87E0000 0x0000F000 0x00000000 RedBoot config 0xA87EF000 0xA87EF000 0x00001000 0x00000000 |
Now La Fonera is clean, the Kernel and the Root-Filesystem are deleted.
STEP 3, load image vmlinux into ramdisk:
Now we need to transfer the Kernel to La Fonera. You could use different protocols like TFTP, HTTP, Xmodem and Ymodem, but I use TFTP. I use tftpd32 from Ph. Jounin (http://tftpd32.jounin.net/). Place tftpd32.exe and your files (kernel: openwrt-atheros-2.6-vmlinux.lzma, rootfs: openwrt-atheros-2.6-root.squashfs) in a directory and start tftpd32.exe.
1 2 | fis load — Load flash image # load –r –b %{FREEMEMLO} openwrt-atheros-vmlinux.lzma |
Hint about %{FREEMEMLO}: Additionally, nicknames can be used like aliases via the format %{nickname}. This allows the values stored by fconfig to be used directly by scripts and commands.
Output (took about 1s to load the file):
1 2 3 | RedBoot> load –r –b %{FREEMEMLO} openwrt-atheros-vmlinux.lzma Using default protocol (TFTP) Raw file loaded 0x80040800-0x801007ff, assumed entry at 0x80040800 |
STEP 4, store vmlinux.bin.l7 partition:
1 2 | fis create — Create flash image # fis create –e 0x80041000 –r 0x80041000 vmlinux.bin.l7 |
Output (took about 2mins to store the file into the flash):
1 2 3 4 5 | RedBoot> fis create –e 0x80041000 –r 0x80041000 vmlinux.bin.l7 … Erase from 0xa8030000-0xa80f0000: .….….… … Program from 0x80040800-0x80100800 at 0xa8030000: .….….… … Erase from 0xa87e0000-0xa87f0000: . … Program from 0x80ff0000-0x81000000 at 0xa87e0000: . |
STEP 5, get free block’s:
1 | # fis free — Free flash image |
now calculate, subtract the two numbers, result is 0x0LENGTH
output:
1 2 | RedBoot> fis free 0xA80E0000 .. 0xA87E0000 |
according to my calculator, 0xA87E0000 — 0xA80E0000 should be 0x0700000..
STEP 6, load rootfs into ramdisk:
1 | # load –r –b %{FREEMEMLO} openwrt-atheros-root.squashfs |
output:
1 2 3 | RedBoot> load –r –b %{FREEMEMLO} openwrt-atheros-root.squashfs Using default protocol (TFTP) Raw file loaded 0x80040800-0x801607ff, assumed entry at 0x80040800 |
STEP 7, store rootfs:
1 | # fis create –l 0x0LENGTH rootfs |
output (took about 4mins to store):
1 2 3 4 5 | RedBoot> fis create –l 0x0700000 rootfs … Erase from 0xa80e0000-0xa87e0000: .… … … … Program from 0x80040800-0x80220800 at 0xa80e0000: .….….….….….….….. … Erase from 0xa87e0000-0xa87f0000: . … Program from 0x80ff0000-0x81000000 at 0xa87e0000: . |
STEP 8, reboot
1 | # reset |
output:
1 | RedBoot> <span style=“font-weight: bold;”>reset</span> |
STEP 9, wait until fs is created
1 2 3 4 5 6 7 8 9 10 | … br-lan: port 1(eth0) entering learning state br-lan: topology change detected, propagating br-lan: port 1(eth0) entering forwarding state PPP generic driver version 2.4.2 jffs2_scan_eraseblock(): End of filesystem marker found at 0x0 jffs2_build_filesystem(): unlocking the mtd device… done. jffs2_build_filesystem(): erasing all blocks after the end marker… done. mini_fo: using base directory: / mini_fo: using storage directory: /jffs |
Now Openwrt should be running on your fonera.
Some handy Red Boot information:
Documentation: http://ecos.sourceware.org/docs-latest/redboot/redboot-guide.html
Command overview:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ip_address — Set IP addresses load — Download programs or data to the RedBoot platform fis init — Initialize Flash Image System (FIS) fis create — Create flash image fis free — Free flash image fis load — Load flash image disks — List available disk partitions. ping — Verify network connectivity (ping –h 192.168.1.10 –v –n 4) baudrate — Set the baud rate for the system serial console reset — Reset the device .. this will be equivalent to a power-on reset condition. version — Display RedBoot version information go — Execute a program exec — Execute a Linux kernel |
Thanks to those HowTo’s:
http://www.easy2design.de/bla/?page_id=98
http://wiki.x-wrt.org/index.php/Kamikaze_Installation#Configuring_RedBoot
http://wiki.openwrt.org/OpenWrtDocs/Hardware/Fon/Fonera?highlight=%28fonera%29
.. and some more…
EDIT, 30.11.07:
I had several strange errors on my Fonera router, examples:
While the wifi command was working, I received an error:
SQUASHFS error: lzma returned unexpected result 0x1
SQUASHFS error: Unable to read page, block 1740c3, size 591b
I also noticed random freeze and / or kernel oops, especially when I tried to get the wireless working (the wifi command).
I bought my Fonera router 2nd hand and there was a replacement AC/DC adapter included and THIS was the bastard! La Fonera needed more current but my cheap AC/DC adapter provided only 500mA where on the Fonera a sticker told me, that he need 2A! I tried it with a 1A adapter and so far I didn’t recognize any errors!
I also used my voltmeter on the JTAG pins GND and VCC. While the wifi command worked, the voltage dropped from 3.28V to 3.17V with the old adapter. With the new adapter the voltage drops to 3.24V so I guess I try to get another AC/DC adapter.
4 Comments
1 KillerDAN wrote:
You failed to clean/ correct the bootscript
2 martin wrote:
hey, funny to see new pingbacks on my fonera howto after all these years :D mine is still up and runnin and being used eeevery day…
see ya,
.martin
3 michu wrote:
hehe I just moved my blog, thats why you receieved a pingback!
4 flip wrote:
… still very useful info’s — thanks!