LaFonera (en)

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 23:18, 11 January 2007 (edit)
Wildblue (Talk | contribs)

← Previous diff
Revision as of 23:19, 11 January 2007 (edit) (undo)
Wildblue (Talk | contribs)
(Resetting Nvram)
Next diff →
Line 113: Line 113:
-Reflash fon.com Firmware+== Reflash fon.com Firmware ==
Download Firmware from Fon.com Download Firmware from Fon.com
Line 126: Line 126:
enter: enter:
 +<pre>
ip_address -l 192.168.1.1/24 -h 192.168.1.2 ip_address -l 192.168.1.1/24 -h 192.168.1.2
Line 143: Line 144:
exec exec
- +</pre>
now you have the factory-default for the fonera. now you have the factory-default for the fonera.

Revision as of 23:19, 11 January 2007

Flashing DD-WRT

Taking info from Camicia's post and the instructions that BrainSlayer released I decided to make a wiki page.

If you have a serial connection to Fonera skip to step 6.

1 - Start with a Fonera with original firmware 7.x

2 - Hack the Fonera to have SSH connection (see here: http://blog.blase16.de/index.php?url=2006/11/28/Hacking-Fonera)

3 - Run these commands in SSH. After last command Fonera will reboot.

cd /tmp
wget http://coppercore.net/~kevin/fon/openwrt-ar531x-2.4-vmlinux-CAMICIA.lzma
mtd -e vmlinux.bin.l7 write openwrt-ar531x-2.4-vmlinux-CAMICIA.lzma vmlinux.bin.l7
reboot

(Don't be mislead by the name of the file. This is actually a FON kernel hacked to write on the mtd partion with RedBoot. After this step the Fonera should be able to restart without any problem.)

4 - Run these commands in SSH. After last command Fonera will reboot. [NOTE Your Fonera will not boot past RedBoot anymore after this step]

cd /tmp
wget http://coppercore.net/~kevin/fon/out.hex
mtd -e "RedBoot config" write out.hex "RedBoot config"
reboot 

5 - Your Fonera should not be able to reboot (because the FIS directory will be erased) but you should be able to connect to Redboot. To connect to Redboot you need to:

a) Configure your PC so you have an address like 192.168.1.166.

b) Establish a ethernet physical connection between your PC and the Fonera through a crossover ethernet cable or a switch and 2 normal cables.

c) Disconnect and reconnect the power to your Fonera. In the first 10 secs you can access to RedBoot thought "telnet 192.168.1.254 9000" (9000 is the port to use)

If everything goes well you should have a "RedBoot>" prompt in telnet.

6 - Download the latest root.fs and vmlinux.bin.l7 from: http://www.dd-wrt.com/dd-wrtv2/down.php?path=downloads%2Fbeta+releases%2Ffonera+builds/

7 - Copy root.fs and vmlinux.bin.l7 to your tftp server directory (simple tftp server for windows: http://kin.klever.net/pumpkin/ )

8 - Configure RedBoot for local ip and tftp server enter in telnet.

ip_address -l [local ip address] -h [remote server address]

(if the local ip address changes from 192.168.1.254 your telnet session will die and you will need to reconnect to the newly enter ip address)

9 - Run these commands in telnet.

fis init
load -r -v -b 0x80041000 root.fs
fis create -b 0x80041000 -f 0xA8030000 -l 0x002C0000 -e 0x00000000 rootfs
load -r -v -b 0x80041000 vmlinux.bin.l7
fis create -r 0x80041000 -e 0x80041000 vmlinux.bin.l7
fis create -f 0xA83D0000 -l 0x00010000 -n nvram

the "fis create" commands take about 10-20 min to complete so be patient!

a) This is a sample of the output you will see.

RedBoot> fis init
About to initialize [format] FLASH image system - continue (y/n)? y
*** Initialize FLASH Image System
... Erase from 0xa83e0000-0xa83f0000: .
... Program from 0x80ff0000-0x81000000 at 0xa83e0000: .

load -r -v -b 0x80041000 root.fs
Using default protocol (TFTP)
Raw file loaded 0x80041000-0x802e3fff, assumed entry at 0x80041000
RedBoot> fis create -b 0x80041000 -f 0xA8030000 -l 0x002C0000 -e 0x00000000 rootfs
... Erase from 0xa8030000-0xa82f0000: ............................................
... Program from 0x80041000-0x80301000 at 0xa8030000: ............................................
... Erase from 0xa83e0000-0xa83f0000: .
... Program from 0x80ff0000-0x81000000 at 0xa83e0000: .

RedBoot> load -r -v -b 0x80041000 vmlinux.bin.l7
Using default protocol (TFTP)
Raw file loaded 0x80041000-0x80120fff, assumed entry at 0x80041000

RedBoot> fis create -r 0x80041000 -e 0x80041000 vmlinux.bin.l7
... Erase from 0xa82f0000-0xa83d0000: ..............
... Program from 0x80041000-0x80121000 at 0xa82f0000: ..............
... Erase from 0xa83e0000-0xa83f0000: .
... Program from 0x80ff0000-0x81000000 at 0xa83e0000: .

RedBoot> fis create -f 0xA83D0000 -l 0x00010000 -n nvram
... Erase from 0xa83e0000-0xa83f0000: .
... Program from 0x80ff0000-0x81000000 at 0xa83e0000: .

b) Run this command in telnet to reboot.

reset

Thats it. Your Fonera should reboot and start DD-WRT. It by default will dhcp an ip address and have management on port 8080.

Resetting Nvram

1 - Reset the Fonera and telnet into redboot follow step 5 in Flashing Fonera above.

2 - Enter the following in telnet to erase the nvram partition.

fis erase -f 0xA83D0000 -l 0x00010000

3 - Run this command in telnet to reboot.

reset

Your all done DD-WRT will rebuild the nvram and it will be like it was just loaded.


Reflash fon.com Firmware

Download Firmware from Fon.com cut off the first 512 Bytes rename the resulting file with the extension .tar.gz unzip it now you have 2 files (kernel.lzma and rootfs.squashfs) put these to your tftp-server-directory

then connect to redboot

enter:

ip_address -l 192.168.1.1/24 -h 192.168.1.2

fis init

Nun folgende Befehle abarbeiten:

load -r -v -b 0x80040450 rootfs.squashfs

fis create -b 0x80040450 -f 0xA8030000 -l 0x00700000 -e 0x00000000 rootfs

load -r -b %{FREEMEMLO} kernel.lzma

fis create -r 0x80041000 -e 0x80041000 vmlinux.bin.l7

fis load -l vmlinux.bin.l7

exec

now you have the factory-default for the fonera.