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
Zeile 10: Zeile 10:
 
'''1. Set IP address of your Mac:'''
 
'''1. Set IP address of your Mac:'''
 
<pre>
 
<pre>
sudo ifconfig en0 192.168.1.166
+
sudo ifconfig en0 192.168.1.254
 
</pre>
 
</pre>
  
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.
+
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.254. Then select that location as your current location.
  
 
'''2. Enable tftp'''
 
'''2. Enable tftp'''
Zeile 52: Zeile 52:
 
'''Flash new kernel and filesystem images in RedBoot:'''
 
'''Flash new kernel and filesystem images in RedBoot:'''
  
In RedBoot (assuming you configured the machine with the tftp server to 192.168.1.166):
+
In RedBoot (assuming you configured the machine with the tftp server to 192.168.1.254):
 
<pre>
 
<pre>
ip_address -h 192.168.1.166
 
 
fis init
 
fis init
 
load -r -b 0x80041000 openwrt-atheros-2.6-vmlinux.lzma
 
load -r -b 0x80041000 openwrt-atheros-2.6-vmlinux.lzma
Zeile 69: Zeile 68:
 
====Flashing automatically (the lazy approach)====
 
====Flashing automatically (the lazy approach)====
  
Get this expect script: [http://boinkor.net/misc/flashit.expect 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
+
Get this expect script (written by [[Benutzer:Antifuchs|Antifuchs]] and [[Benutzer:MariusKintel|Marius]]):
<pre>
+
https://whatever.metalab.at/user/kintel/fonera/flashit.expect
$ expect flashit.expect
+
 
</pre>
+
Usage:<br/>
 +
1. Start script: ./flashit.expect<br/>
 +
Optionally, you can give kernel and squashfs files as parameters if they don't have the default filenames
 +
2. Connect and power up the Fonera<br/>
 +
3. When you see stuff happening, go for lunch.<br/
  
 
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
 
 
Caution: You need to add the following line after line 29 in Marius' script to actually make it work.
 
<pre>expect timeout abort $prompt { send "ip_address -h 192.168.1.166\n" }</pre>
 
I kept the IP common to this article. Adjust the IP to your reality if needed.
 
--[[Benutzer:Pepi|Pepi]] 00:08, 24. Mär. 2008 (CET)
 
  
 
=== Windows/Linux (easyflash): ===
 
=== Windows/Linux (easyflash): ===

Version vom 28. März 2008, 15:36 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.254

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.254. 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.254):

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 (written by Antifuchs and Marius): https://whatever.metalab.at/user/kintel/fonera/flashit.expect

Usage:
1. Start script: ./flashit.expect
Optionally, you can give kernel and squashfs files as parameters if they don't have the default filenames 2. Connect and power up the Fonera
3. When you see stuff happening, go for lunch.<br/

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

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