This shows you the differences between two versions of the page.
midge:bootloader-with-tftp [2018/04/09 15:36] |
midge:bootloader-with-tftp [2018/04/09 15:36] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ==== Abstract ==== | ||
+ | There is a bootloader with tftp support which can be useful for many developers. This binary is taken from the unknown VoIP device based on the ADM5120. I've decided to publish it after some patching. | ||
+ | |||
+ | I tested it on the Edimax BR6104K it works for me. \\ | ||
+ | **Warning:** do not use this bootloader with standard firmwares, because this bootloader has size over 32K. Standard firmwares will damage some parts of bootloader for own system variables. \\ | ||
+ | |||
+ | ==== Upgrade ==== | ||
+ | For upgrading bootloader you should make following steps: | ||
+ | - Download [[http://midge.vlad.org.ua/firmware/rd/vmlinuz-rd-bootloader-20050912.bin|vmlinuz-rd-bootloader-20050912.bin]] to your PC, not to your router. This image is a small temporary midge system with all data for bootloader upgrade included. | ||
+ | - Upload it to SDRAM an start from SDRAM if not done automatic | ||
+ | - Login as User root, password midge | ||
+ | - Make following: <code> | ||
+ | |||
+ | midge# cd /bootloader/ | ||
+ | midge# ./update-bootloader bootloader-tftp-20050912.bin | ||
+ | WARNING: THIS OPERATION IS VERY DANGEROUS, | ||
+ | DON'T TRY UNLESS YOU KNOW WHAT YOU ARE DOING | ||
+ | |||
+ | press enter to continue or Ctrl-C to quit | ||
+ | |||
+ | Do you want to backup current bootloader to /dev/mtdblock4 ? | ||
+ | current firmware will be corrupted: (y/any key): y | ||
+ | backuping first 0x10000 bytes to /dev/mtdblock4 (started at 0x100000)... | ||
+ | 1+0 records in | ||
+ | 1+0 records out | ||
+ | Do you want continue? (y/any key): y | ||
+ | flashing bootloader-tftp-20050912.bin to /dev/mtdblock0 | ||
+ | 103+1 records in | ||
+ | 103+1 records out | ||
+ | </code> | ||
+ | - pray and reboot | ||
+ | - After upgrading you should see following picture: <code> | ||
+ | |||
+ | ADM5120 Boot: | ||
+ | |||
+ | |||
+ | Evolution version.Only for testing | ||
+ | CPU: ADM5120-175MHz | ||
+ | SDRAM: 2x16MB | ||
+ | Flash: NOR-2MB | ||
+ | Boot System: ADM5120-Linux | ||
+ | Loader Version: 1.00.05 | ||
+ | Creation Date: 2004.12.20 | ||
+ | |||
+ | Press <space> key tree times to enter boot menu.. | ||
+ | 3 | ||
+ | </code> | ||
+ | - After pressing space three times, you should see:<code> | ||
+ | Loader Menu | ||
+ | ============0.04=============== | ||
+ | [1] Xmodem Download to SDRAM (4M) | ||
+ | [2] TFTP Client Download to SDRAM (4M) | ||
+ | [3] Print Boot Params | ||
+ | [4] Set Boot Params | ||
+ | [5] Update bootloader to FLASH (Xmodem) | ||
+ | [6] Start from SDRAM | ||
+ | [7] Write SDRAM to flash (2M) | ||
+ | |||
+ | Please enter your number: | ||
+ | </code> | ||
+ | <note warning> | ||
+ | **This operation is VERY DANGEROUS!\\ | ||
+ | DON'T TRY UNLESS YOU KNOW WHAT YOU ARE DOING!** \\ | ||
+ | \\ | ||
+ | **USE ON YOUR OWN RISK! DISTRIBUTED WITHOUT ANY WARRANTY** | ||
+ | </note> | ||
+ | \\ | ||
+ | <note warning> | ||
+ | Do not use this bootloader with standard firmwares. | ||
+ | </note> | ||
+ | \\ | ||
+ | You can setup mac and ip: <code> | ||
+ | Please enter your number:4 | ||
+ | |||
+ | Set Boot Parameters. | ||
+ | ========================== | ||
+ | Enter new serial number: | ||
+ | Serial Number unchanged. | ||
+ | Enter new hardware version: | ||
+ | Hardware version unchanged. | ||
+ | |||
+ | Current mac addres: 00-00-01-02-03-04 | ||
+ | Number of mac address: 8 | ||
+ | Enter new mac address (AA-AA-AA-AA-AA-AA): 00-00-01-02-03-04 | ||
+ | Enter new number of mac address (between 1-8): 8 | ||
+ | Mac address updated successfully. | ||
+ | Enter new IP address for this board: 10.1.120.86 | ||
+ | IP updated successfully. | ||
+ | </code> | ||
+ | After pressing '2' you can see:<code> | ||
+ | Please enter your number:2 | ||
+ | TFTP Client Menu | ||
+ | =============================== | ||
+ | [D]: start download | ||
+ | [S]: set parameters | ||
+ | [X]: exit | ||
+ | Enter your option: | ||
+ | </code> | ||
+ | Setup tftp parameters: <code> | ||
+ | Enter your option:s | ||
+ | |||
+ | Please Enter TFTP Server IP : 10.1.120.85 | ||
+ | Enter Remote File Name : midge.bin | ||
+ | |||
+ | Server IP: 10.1.120.85 | ||
+ | Remote File: midge.bin | ||
+ | </code> | ||
+ | Downloading: <code> | ||
+ | TFTP Client Menu | ||
+ | =============================== | ||
+ | [D]: start download | ||
+ | [S]: set parameters | ||
+ | [X]: exit | ||
+ | Enter your option:d | ||
+ | Starting the TFTP download(ESC to stop).................................PASS | ||
+ | Image Total Length: 001F0000 Starting Address: A0820000 | ||
+ | </code> | ||
+ | <note tip> | ||
+ | I have some troubles with standart tftp server. When i switch to atftpd all works fine. </note> | ||
+ | Start linux: <code> | ||
+ | Loader Menu | ||
+ | ============0.04=============== | ||
+ | [1] Xmodem Download to SDRAM (4M) | ||
+ | [2] TFTP Client Download to SDRAM (4M) | ||
+ | [3] Print Boot Params | ||
+ | [4] Set Boot Params | ||
+ | [5] Update bootloader to FLASH (Xmodem) | ||
+ | [6] Start from SDRAM | ||
+ | [7] Write SDRAM to flash (2M) | ||
+ | |||
+ | Please enter your number:6 | ||
+ | Booting Linux... | ||
+ | Kernel decompress ... PASS | ||
+ | LINUX started... | ||
+ | </code> | ||