Fonera: Unterschied zwischen den Versionen

aus Metalab Wiki, dem offenen Zentrum für meta-disziplinäre Magier und technisch-kreative Enthusiasten.
Zur Navigation springenZur Suche springen
(→‎Mac OS X: lazy approach to flashing.)
Zeile 75: Zeile 75:
  
 
When the script exits (and you see no error message), you can safely reboot the box and telnet to 192.168.1.1
 
When the script exits (and you see no error message), you can safely reboot the box and telnet to 192.168.1.1
 +
 +
I added some error and cmd-line parameter handling to the script, and updated it to use the default IP addresses.
 +
NB! Not very well tested, use at your own risk for now. [[Benutzer:MariusKintel|MariusKintel]] 19:14, 9. Mär. 2008 (CET)
 +
https://whatever.metalab.at/user/kintel/fonera/flashit.expect
  
 
=== Windows/Linux (easyflash): ===
 
=== Windows/Linux (easyflash): ===

Version vom 9. März 2008, 18:14 Uhr

Fonera

FLASHING

Mac OS X

Since EasyFlash isn't available for Max OS X, we do this manually (FON2200 + ethernet only):

1. Set IP address of your Mac:

sudo ifconfig en0 192.168.1.166

antifuchs says: this does not work reliably on Leopard. What does work is: In Network.prefpane, Make a new network location, make inactive every device except ethernet; set ethernet config to "Manual", configure IP address 192.168.1.166. Then select that location as your current location.

2. Enable tftp

Get TFTPServer, point it to the directory that contains the firmware; it needs to be world-read/writable; you can let that program fix permissions for you.

3. Copy OpenWRT files to tftp dir:

These files are typically what you want to use:

  • openwrt-atheros-2.6-vmlinux.lzma
  • openwrt-atheros-2.6-root.squashfs


4. Upload the firmware

Two methods here: The lazy approach, and flashing it manually. I recommend doing it by hand at least once to be able to debug the lazy approach if it goes wrong.

Flashing manually

Get access to RedBoot

See also http://forum.openwrt.org/viewtopic.php?pid=63402.

echo -e "\003" > break

fonera an den strom, wenn das 2te led zu blinken beginnt:

nc -vvv 192.168.1.254 9000 < break;

danach ctrl+c

telnet 192.168.1.254 9000

-> You should now have a "RedBoot>" prompt. If not, rinse and repeat.

Flash new kernel and filesystem images in RedBoot:

In RedBoot (assuming you configured the machine with the tftp server to 192.168.1.166):

ip_address -h 192.168.1.166
fis init
load -r -b 0x80041000 openwrt-atheros-2.6-vmlinux.lzma
fis create -e 0x80041000 -r 0x80041000 vmlinux.bin.l7
load -r -b 0x80041000 openwrt-atheros-2.6-root.squashfs
fis create -l 0x06F0000 rootfs

Reboot

You are now where EasyFlash ends. Wait for the boot to finish and telnet to 192.168.1.1 and set a root password.

Flashing automatically (the lazy approach)

Get this expect script: flashit.expect, make sure your ethernet device is configured to use 192.168.1.166 (or edit the script to reflect your reality), plug in the box, wait for the second light to flash + 2 seconds, then run

 $ expect flashit.expect

When the script exits (and you see no error message), you can safely reboot the box and telnet to 192.168.1.1

I added some error and cmd-line parameter handling to the script, and updated it to use the default IP addresses. NB! Not very well tested, use at your own risk for now. MariusKintel 19:14, 9. Mär. 2008 (CET) https://whatever.metalab.at/user/kintel/fonera/flashit.expect

Windows/Linux (easyflash):

http://downloads.berlin.freifunk.net/fonera/

[ ]	ap51-flash-fonera-1.0-38	18-Dec-2007 19:10 	3.3M
[ ]	ap51-flash-fonera-gui-1.0-38.exe	18-Dec-2007 19:12 	3.3M

Passendes Tool runterladen.


http://downloads.openwrt.org/kamikaze/7.09/atheros-2.6/
 [   ] openwrt-atheros-2.6-root.jffs2-64k                 30-Sep-2007 20:16  1.6M  
 [   ] openwrt-atheros-2.6-vmlinux.lzma                   30-Sep-2007 20:16  768K   

die beiden runterladen.



Jetzt kommts..
1. Fonera mit ETHERNETKABEL an eth0 anstecken.
2. ./ap51-flash-fonera-1.0-38 eth0 openwrt-atheros-2.6-root.jffs2-64k  openwrt-atheros-2.6-vmlinux.lzma 
3. Strom an den Fonera anstecken 


Der Fonera schickt nun beim hochfahren einen ARP request raus, das Flashtool wartet darauf und tut dann seine Magie.
Der ganze Flashvorgang dauert rund _15_ Minuten.
Zuerst sieht man die IP vom Router 
Dann steht da was von 
Loading RootFS ..
Writing RootFS..  (10 Minuten)
Loading Kernel ..
Writing Kernel.. 
Rebooting Device..


Fertig.

Danach hat der Fonero die IP 192.168.1.1 und ist über TELNET erreichbar.
Happy hacking.











SOFTWARE

software zum flashen + packages .. http://download.berlin.freifunk.net/fonera/


Buildchain http://wiki.openwrt.org/BuildingPackagesHowTo

svn co https://svn.openwrt.org/openwrt/tags/kamikaze_7.09

http://forum.openwrt.org/viewtopic.php?pid=31794#p31794


Fettes ipkg repository http://downloads.openwrt.org/kamikaze/packages/mips/

HARDWARE

LCD am fonera? http://www.lefinnois.net/wpen/index.php/2007/11/11/lcd-screen-for-la-fonera/

I2C bus? http://www.lefinnois.net/wpen/index.php/2007/05/13/i2c-bus-for-la-fonera/

SD card am fonera? http://www.larsen-b.com/Article/262.html http://phrozen.org/fonera.html


GPIO kernel modul http://mobileaccess.de/fonera/gpio/ http://daubau.net/proc_gpio/

Fertig compiliertes GPIO kernelmodul im feschen .ipk + src Media:Kamikaze_7.09_GPIOkmod.tar.gz