Generic Flashing over the Serial Port
- → Platform ar71xx bootloader Das U-Boot: TL-WR1043ND
Examples
Requirements:
- terminal program (e.g. minicom) set to 115200 8N1, no flow control
- file named code.bin containing openwrt firmware.
- tftpd server with an address 192.168.0.5 (configurable with
setenvcommand,printenvfirst if unsure)
DO NOT USE THESE VALUES. FIND OUT THE RIGHT ONES! NO, NOT KIDDING.
Commands:
erase 0xbf020000 +7c0000 # 7c0000: size of the firmware (be aware that you may have a different size thus bricking your router) tftpboot 0x81000000 code.bin cp.b 0x81000000 0xbf020000 0x7c0000 bootm 0xbf020000
Kermit
You can use a client using the Kermit (protocol) to transfer the new image. It may take forever and a half (15-20min) to copy. But it's easier and more secure than running a tftpd server. These instructions assume you're using a Linux system, but they will give you all you need to do the same on a Windows box.
Requirements:
- terminal program (e.g. minicom) set to 115200 8N1, no flow control
- file named code.bin containing openwrt firmware.
- Kermit client (these instructions will involve using C-Kermit under Linux)
DO NOT USE THESE VALUES. FIND OUT THE RIGHT ONES! NO, NOT KIDDING.
erase 0xbf020000 +7c0000 # 7c0000: size of the firmware (be aware that you may have a different size thus bricking your router) loadb 0x81000000
Fire up C-Kermit and run the following commands (or configure your Kermit client to these parameters):
set line /dev/ttyUSB0 # Just make sure you got the right USB interface set speed 115200 set carrier-watch off set handshake none set flow-control none robust set file type bin set file name lit set rec pack 1000 set send pack 1000 set window 5 send code.bin # Make sure you include a proper path to the file. That's why I just kept it in /home/$user
After the 15-20min file transfer, the new firmware should be on your router and you can continue in terminal:
DO NOT USE THESE VALUES. FIND OUT THE RIGHT ONES! NO, NOT KIDDING.
cp.b 0x81000000 0xbf020000 0x7c0000 bootm 0xbf020000
Note: This serial transfer method doesn't solve the "chicken or the egg" dilemma (if your Ethernet port is not working on U-Boot) because you cannot use tftpboot to transfer code.bin to u-boot. Fortunately U-Boot supports serial transfer using modem protocol: http://acassis.wordpress.com/2009/10/23/transfering-file-to-u-boot-over-serial/
doc/howto/generic.flashing.serial.txt · Last modified: 2012/01/08 18:10 by acassis