Zum Inhalt springen

Fonera: Unterschied zwischen den Versionen

MariusKintel (Diskussion | Beiträge)
Antifuchs (Diskussion | Beiträge)
Mac OS X: lazy approach to flashing.
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.254
sudo ifconfig en0 192.168.1.166
</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.


'''2. Enable tftp'''
'''2. Enable tftp'''


Either temporarily enable tftpd serving files from /private/tftpboot/:
Get [http://ww2.unime.it/flr/tftpserver/ 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.
<pre>
sudo launchctl load -F /System/Library/LaunchDaemons/tftp.plist
</pre>
 
..or permanently enable tftpd serving files from custom directory:
<pre>
tftpserver config in /System/Library/LaunchDaemons/tftp.plist
 
disabled auf false
directory auf irgendein worldreadable dir
$sudo launchctl
load -F /System/Library/LaunchDaemons/tftp.plist
start com.apple.tftpd
</pre>


'''3. Copy OpenWRT files to tftp dir:'''
'''3. Copy OpenWRT files to tftp dir:'''
Zeile 38: Zeile 25:
* openwrt-atheros-2.6-root.squashfs
* openwrt-atheros-2.6-root.squashfs


'''4. Get access to the RedBoot bootloader:'''
 
'''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.
See also http://forum.openwrt.org/viewtopic.php?pid=63402.
Zeile 47: Zeile 41:
fonera an den strom, wenn das 2te led zu blinken beginnt:
fonera an den strom, wenn das 2te led zu blinken beginnt:
<pre>
<pre>
nc -vvv 192.168.1.1 9000 < break;
nc -vvv 192.168.1.254 9000 < break;
</pre>
</pre>
danach ctrl+c
danach ctrl+c
<pre>
<pre>
telnet 192.168.1.1 9000
telnet 192.168.1.254 9000
</pre>
</pre>


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


'''5. Flash new kernel and filesystem images in RedBoot:'''
'''Flash new kernel and filesystem images in RedBoot:'''


In RedBoot:
In RedBoot (assuming you configured the machine with the tftp server to 192.168.1.166):
<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 67: Zeile 62:
</pre>
</pre>


'''6. Reboot'''
'''Reboot'''


You are now where EasyFlash ends.
You are now where EasyFlash ends.
Wait for the boot to finish and telnet to 192.168.1.1 and set a root password.
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: [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
<pre>
$ expect flashit.expect
</pre>
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): ===
=== Windows/Linux (easyflash): ===