I will use the Ser­ial Port to con­nect La Fon­era, there are also other meth­ods to flash Open­wrt on La Fon­era but my Router was bricked some­how I just had this solu­tion (Red­Boot) left..

This method is com­pletely sol­der­ing less; I used some old CD-Rom audio cables to con­nect the ser­ial Pins on La Fon­era. The ser­ial sig­nals are 3.3v so you need a level shifter. I already wrote this guide about ser­ial connections…

Con­fig­ure you Ser­ial set­tings: 9600–8-N (no flow control).

Impor­tant note ripped from http://www.easy2design.de/bla/?page_id=98:
As pointed out by Dark­Blade (I also expe­ri­enced this, but thought I just built my ser­ial cable to crappy(ly)…): It seems that the Fon­era some­times (or always?) doens’t want to boot when con­nected to ser­ial. I nar­rowd it down to the con­nected TX at the Fon­era side. If you don’t see any­thing and the lit­tle sucker appar­ently isn’t boot­ing at all, dis­con­nect the TX from the Fon­era and boot with RX con­nected only. Once you see the first line of out­put run­ning over your screen, quickly con­nect TX line, too. Other peo­ple just tried boot­ing and con­nect­ing the ser­ial cable only 5sec later, though i sup­pose you will need some prac­tice, as the point where you need to acti­vate the Red­Boot boot­loader will come after only a few lines of ser­ial out­put. Just play a lit­tle and be quick :)
I just con­nected the power cable to La Fon­era and 1-2s later I con­nected the TX and RX lines (GND was already con­nected). This worked like a charm.

Ok, let’s flash Open­wrt 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
Red­Boot> fcon­fig bootp_my_ip_mask 255.255.0.0
bootp_my_ip_mask: Set­ting to 255.255.0.0
Update Red­Boot non-volatile con­fig­u­ra­tion — con­tinue (y/n)? y
… Erase from 0xa87e0000-0xa87f0000: .
… Pro­gram from 0x80ff0000-0x81000000 at 0xa87e0000: .
Red­Boot> fcon­fig bootp_my_ip 192.168.1.2
bootp_my_ip: Set­ting to 192.168.1.2
Update Red­Boot non-volatile con­fig­u­ra­tion — con­tinue (y/n)? y
… Erase from 0xa87e0000-0xa87f0000: .
… Pro­gram from 0x80ff0000-0x81000000 at 0xa87e0000: .
Red­Boot> fcon­fig bootp_server_ip: Set­ting to 192.168.1.10
Update Red­Boot non-volatile con­fig­u­ra­tion — con­tinue (y/n)? y
… Erase from 0xa87e0000-0xa87f0000: .
… Pro­gram from 0x80ff0000-0x81000000 at 0xa87e0000: .
Red­Boot> fcon­fig boot_script_timeout 10
boot_script_timeout: Set­ting to 10
Update Red­Boot non-volatile con­fig­u­ra­tion — con­tinue (y/n)? y
… Erase from 0xa87e0000-0xa87f0000: .
… Pro­gram from 0x80ff0000-0x81000000 at 0xa87e0000:
Red­Boot> fcon­fig net_debug true
net_debug: Set­ting to true
Update Red­Boot non-volatile con­fig­u­ra­tion — con­tinue (y/n)? y
… Erase from 0xa87e0000-0xa87f0000: .
… Pro­gram from 0x80ff0000-0x81000000 at 0xa87e0000: .
Red­Boot> reset

The reset is needed to accept your set­tings!
WARNING: the option “fcon­fig net_debug true” will enable Red­Boot LAN access BUT your net­work per­for­mance will be arround 2500 b/s! So do NOT use it when you have a ser­ial con­nec­tion! You can enable this option when Open­wrt runs on this beast so you don’t need to attach the ser­ial cables anymore.


STEP 2, init flash image system:

1
# fis init — Ini­tial­ize Flash Image Sys­tem (FIS)

Out­put:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Red­Boot> fis list
Name              FLASH addr  Mem addr    Length      Entry point
Red­Boot           0xA8000000  0xA8000000  0x00030000  0x00000000
rootfs            0xA8030000  0xA8030000  0x00700000  0x00000000
vmlinux.bin.l7    0xA8730000  0x80041000  0x000B0000  0x80041000
FIS direc­tory     0xA87E0000  0xA87E0000  0x0000F000  0x00000000
Red­Boot con­fig    0xA87EF000  0xA87EF000  0x00001000  0x00000000

Red­Boot> fis init
About to ini­tial­ize [for­mat] FLASH image sys­tem — con­tinue (y/n)? y
*** Ini­tial­ize FLASH Image Sys­tem
… Erase from 0xa87e0000-0xa87f0000: .
… Pro­gram from 0x80ff0000-0x81000000 at 0xa87e0000: .

Red­Boot> fis list
Name              FLASH addr  Mem addr    Length      Entry point
Red­Boot           0xA8000000  0xA8000000  0x00030000  0x00000000
FIS direc­tory     0xA87E0000  0xA87E0000  0x0000F000  0x00000000
Red­Boot con­fig    0xA87EF000  0xA87EF000  0x00001000  0x00000000

Now La Fon­era is clean, the Ker­nel and the Root-Filesystem are deleted.


STEP 3, load image vmlinux into ramdisk:
Now we need to trans­fer the Ker­nel to La Fon­era. You could use dif­fer­ent pro­to­cols like TFTP, HTTP, Xmo­dem and Ymo­dem, but I use TFTP. I use tftpd32 from Ph. Jounin (http://tftpd32.jounin.net/). Place tftpd32.exe and your files (ker­nel: openwrt-atheros-2.6-vmlinux.lzma, rootfs: openwrt-atheros-2.6-root.squashfs) in a direc­tory and start tftpd32.exe.

1
2
fis load — Load flash image
# load –r –b %{FREEMEMLO} openwrt-atheros-vmlinux.lzma

Hint about %{FREEMEMLO}: Addi­tion­ally, nick­names can be used like aliases via the for­mat %{nick­name}. This allows the val­ues stored by fcon­fig to be used directly by scripts and commands.

Out­put (took about 1s to load the file):

1
2
3
Red­Boot> load –r –b %{FREEMEMLO} openwrt-atheros-vmlinux.lzma
Using default pro­to­col (TFTP)
Raw file loaded 0x80040800-0x801007ff, assumed entry at 0x80040800

STEP 4, store vmlinux.bin.l7 par­ti­tion:

1
2
fis cre­ate — Cre­ate flash image
# fis cre­ate –e 0x80041000 –r 0x80041000 vmlinux.bin.l7

Out­put (took about 2mins to store the file into the flash):

1
2
3
4
5
Red­Boot> fis cre­ate –e 0x80041000 –r 0x80041000 vmlinux.bin.l7
… Erase from 0xa8030000-0xa80f0000: .….….…
… Pro­gram from 0x80040800-0x80100800 at 0xa8030000: .….….…
… Erase from 0xa87e0000-0xa87f0000: .
… Pro­gram from 0x80ff0000-0x81000000 at 0xa87e0000: .

STEP 5, get free block’s:

1
# fis free — Free flash image

now cal­cu­late, sub­tract the two num­bers, result is 0x0LENGTH

out­put:

1
2
Red­Boot> fis free
0xA80E0000 .. 0xA87E0000

accord­ing to my cal­cu­la­tor, 0xA87E0000 — 0xA80E0000 should be 0x0700000..


STEP 6, load rootfs into ramdisk:

1
# load –r –b %{FREEMEMLO} openwrt-atheros-root.squashfs

out­put:

1
2
3
Red­Boot> load –r –b %{FREEMEMLO} openwrt-atheros-root.squashfs
Using default pro­to­col (TFTP)
Raw file loaded 0x80040800-0x801607ff, assumed entry at 0x80040800

STEP 7, store rootfs:

1
# fis cre­ate –l 0x0LENGTH rootfs

out­put (took about 4mins to store):

1
2
3
4
5
Red­Boot> fis cre­ate –l 0x0700000 rootfs
… Erase from 0xa80e0000-0xa87e0000: .… … …
… Pro­gram from 0x80040800-0x80220800 at 0xa80e0000: .….….….….….….…..
… Erase from 0xa87e0000-0xa87f0000: .
… Pro­gram from 0x80ff0000-0x81000000 at 0xa87e0000: .

STEP 8, reboot

1
# reset

out­put:

1
Red­Boot> <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) enter­ing learn­ing state
br-lan: topol­ogy change detected, prop­a­gat­ing
br-lan: port 1(eth0) enter­ing for­ward­ing state
PPP generic dri­ver ver­sion 2.4.2
jffs2_scan_eraseblock(): End of filesys­tem marker found at 0x0
jffs2_build_filesystem(): unlock­ing the mtd device… done.
jffs2_build_filesystem(): eras­ing all blocks after the end marker… done.
mini_fo: using base direc­tory: /
mini_fo: using stor­age direc­tory: /jffs

Now Open­wrt should be run­ning on your fonera.

Some handy Red Boot infor­ma­tion:
Doc­u­men­ta­tion: http://ecos.sourceware.org/docs-latest/redboot/redboot-guide.html

Com­mand overview:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
ip_address — Set IP addresses
load — Down­load pro­grams or data to the Red­Boot plat­form
fis init — Ini­tial­ize Flash Image Sys­tem (FIS)
fis cre­ate — Cre­ate flash image
fis free — Free flash image
fis load — Load flash image
disks — List avail­able disk par­ti­tions.
ping — Ver­ify net­work con­nec­tiv­ity (ping –h 192.168.1.10 –v –n 4)
bau­drate — Set the baud rate for the sys­tem ser­ial con­sole
reset — Reset the device
.. this will be equiv­a­lent to a power-on reset con­di­tion.
ver­sion — Dis­play Red­Boot ver­sion infor­ma­tion
go — Exe­cute a pro­gram
exec — Exe­cute 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 sev­eral strange errors on my Fon­era router, examples:

While the wifi com­mand was work­ing, I received an error:
SQUASHFS error: lzma returned unex­pected result 0x1
SQUASHFS error: Unable to read page, block 1740c3, size 591b

I also noticed ran­dom freeze and / or ker­nel oops, espe­cially when I tried to get the wire­less work­ing (the wifi command).

I bought my Fon­era router 2nd hand and there was a replace­ment AC/DC adapter included and THIS was the bas­tard! La Fon­era needed more cur­rent but my cheap AC/DC adapter pro­vided only 500mA where on the Fon­era a sticker told me, that he need 2A! I tried it with a 1A adapter and so far I didn’t rec­og­nize any errors!

I also used my volt­meter on the JTAG pins GND and VCC. While the wifi com­mand worked, the volt­age dropped from 3.28V to 3.17V with the old adapter. With the new adapter the volt­age drops to 3.24V so I guess I try to get another AC/DC adapter.