Posted: Thu Dec 28, 2006 22:35 Post subject: Openwrt K on la Fonera without serial console...when DD-WRT?
Hi everybody,
I am going to summarize what you have to do to run Openwrt on your Fonera.
At the moment this tutorial is WIP, suggestions are welcome. A few people tested it and it seemed to work. Lately someone had problems at the end of step 3. The procedure MUST be verified on new version of La Fonera
You can also read something here: http://wiki.openwrt.org/OpenWrtDocs/Hardware/Fon/Fonera
I want first to specify a few things:
- Fon paid for the routers to realize their vision. Put Openwrt on the router which they paid is not the right thing to do. If you do, do it with pupouse: so they can improve their OS (already based on OpenWrt) and the advanced users can have more flexibility.
Please don't let me feel like Einstain after the boms on Japan: I don't want to kill FON.
- With firmware 7.1 r1 the Fonera should be good enough for the average user. Remeber that the Fonera come with a firmware that is based on Openwrt Kamikaze and a web interface to configure. Currently Openwrt Kamikaze has NOT ANY web interface, even if X-WRT will come soon.
- Don't come to cry saying "I bricked my Fonera" and, moreover, don't go to Fon saying that your Fonera got broken when you broke it!
Ok... ready to start:
1 - Start with a Fonera with original firmware 7.x (but NOT with 7.1 r2 because step 2 doensn't work).
Don't be mislead by the name of the file. This is actually a FON kernel hacked to write on the mtd partion with read boot. After this step the Fonera should be able to restart without any problem.
4 - It's time to enable Redboot through ethernet connection. After this step you will need a crossover ethernet cable or a switch and 2 normal cables.
Through SSH access write:
5 - Your Fonera could not be able to reboot (because the FIS directory can be erased) but you should have a connection to Redboot. To connect to Redboot you need to:
a) Configure your PC so you have an address like 192.168.1.166.
b) enstablish a ethernet phisical 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 filrst 10 secs you can access to RedBoot throught "telnet 192.168.1.254 9000" (9000 is the port to use)
If everytihnf goes well you should have a "RedBoot>" prompt in your telnet.
It's interesting to note that before before Step 4 when you woite "fis list" the ouptput of Redboot was:
Code:
+PHY ID is 0022:5521
Ethernet eth0: MAC address 00:18:84:10:97:f4
IP: 0.0.0.0/255.255.255.255, Gateway: 0.0.0.0
Default server: 0.0.0.0
RedBoot(tm) bootstrap and debug environment [ROMRAM]
Non-certified release, version v1.3.0 - built 16:57:58, Aug 7 2006
Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
Board: ap51
RAM: 0x80000000-0x81000000, [0x80040450-0x80fe1000] available
FLASH: 0xa8000000 - 0xa87f0000, 128 blocks of 0x00010000 bytes each.
== Executing boot script in 1.000 seconds - enter ^C to abort
^C
RedBoot> ^C
RedBoot>
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 x000B0000 0x80041000
FIS directory 0xA87E0000 0xA87E0000 0x0000F000 0x00000000
RedBoot config 0xA87EF000 0xA87EE000 0x00001000 0x00000000
RedBoot>
Now the output is just:
Code:
RedBoot> fis list
Name FLASH addr Mem addr Length Entry point
Output of these line are in the post below by Heini66.
NOTE: The command "fis init" was missing. Now it should work :wink:
9 - Write "exec"
10 - Connect to your new Fonera/OpenWrt at 192.168.1.1 thought telnet (port 23) and change your password via "passwd root". Next time to connect to the router you will need a SSH access with login "root" and the password you have inserted
If everything went well now your Fonera is running Openwrt Kamikaze, otherwise is bricked :wink:
Camicia
Last edited by Camicia on Thu Mar 01, 2007 7:54; edited 10 times in total
RedBoot(tm) bootstrap and debug environment [ROMRAM]
Non-certified release, version v1.3.0 - built 16:57:58, Aug 7 2006
Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
Board: ap51
RAM: 0x80000000-0x81000000, [0x80040450-0x80fe1000] available
FLASH: 0xa8000000 - 0xa87f0000, 128 blocks of 0x00010000 bytes each.
== Executing boot script in 10.000 seconds - enter ^C to abort
^C
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> load -r -v -b 0x80040450 openwrt-atheros-2.6-root.jffs2-64k
Using default protocol (TFTP)
Raw file loaded 0x80040450-0x8020044f, assumed entry at 0x80040450
RedBoot> fis create -b 0x80040450 -f 0xA8030000 -l 0x00700000 -e 0x00000000 rootfs
... Erase from 0xa8030000-0xa8730000: ...................................................................................
... Program from 0x80040450-0x80740450 at 0xa8030000: ...................................................................
... Erase from 0xa87e0000-0xa87f0000: .
... Program from 0x80ff0000-0x81000000 at 0xa87e0000: .
RedBoot> load -r -b %{FREEMEMLO} openwrt-atheros-2.6-vmlinux.lzma
Using default protocol (TFTP)
Raw file loaded 0x80040800-0x800f07ff, assumed entry at 0x80040800
RedBoot> fis create -r 0x80041000 -e 0x80041000 vmlinux.bin.l7
... Erase from 0xa8730000-0xa87e0000: ...........
... Program from 0x80040800-0x800f0800 at 0xa8730000: ...........
... Erase from 0xa87e0000-0xa87f0000: .
... Program from 0x80ff0000-0x81000000 at 0xa87e0000: .
RedBoot>fis load -l vmlinux.bin.l7
RedBoot>exec
vmlinuz file can be extracted from original firm, or taken from openwrt trunk make from atheros target. _________________ freenode.net #openwrt
RedBoot> fis list
Name FLASH addr Mem addr Length Entry point
RedBoot>
Thanks Goldserve. So Redboot is not going to rewrite the defauld data on itself at startup and on the FIS. What happend if you restart the router again? Same output?
I think we need to rewrite the data. Let me find out how.
vmlinuz file can be extracted from original firm, or taken from openwrt trunk make from atheros target.
Log is very useful to spot what you did.
However I was asking to go through the process step-by-step and see if it is working. If you write something that is not in the tutorial you need to write it down.
I would also like a list of your FIS through command "fis list".
I found a errors:
"fis init" WAS not in step 8. I think this is critical
initially i did not and I loaded the image. It seemed like it froze so I rebooted and did a fis init first. I left it on for 20 mins and it worked after. I don't know if it was the time I waited or the fis init.
initially i did not and I loaded the image. It seemed like it froze so I rebooted and did a fis init first. I left it on for 20 mins and it worked after. I don't know if it was the time I waited or the fis init.