[Avila] Redboot via ethernet

David Acker dacker at roinet.com
Thu May 24 15:10:17 EDT 2007


Jim Thompson wrote:
> David Boreham wrote:
>> Probably a very dumb question (it's been 15 years since
>> I last worked with embedded systems...) but on a from-the-factory
>> board flashed with redboot and uclinux is there a way
>> to either force redboot to talk via ethernet ? Mine boots all
>> the way into Linux and I can telnet to it in that state.
>> I'd like to tell it to drop back to redboot, or alternatively
>> have some way to force redboot to halt before it boots
>> linux.
>>
>> Can this be done, or do I need to break out my serial cable
>> from behind the glass panel on the wall ?
> 
> in theory you can re-write the redboot configuration area from linux and 
> eliminate the 'startup script' that actually loads and boots linux.
> 
> The format is pretty simple, just a series of tagged data with a header 
> and checksum.
> 
> The linux that comes loaded on flash reports:
> 
> IXP4XX-Flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
>  Intel/Sharp Extended Query Table at 0x0031
> Using buffer write method
> cfi_cmdset_0001: Erase suspend on write enabled
> Searching for RedBoot partition table in IXP4XX-Flash.0 at offset 0x7e0000
> 6 RedBoot partitions found on MTD device IXP4XX-Flash.0
> Creating 6 MTD partitions on "IXP4XX-Flash.0":
> 0x00000000-0x00080000 : "RedBoot"
> 0x00080000-0x001c0000 : "zimage"
> 0x001c0000-0x004e0000 : "ramdisk"
> 0x004e0000-0x007e0000 : "unallocated"
> 0x007e0000-0x007ff000 : "FIS directory"
> 0x007ff000-0x00800000 : "RedBoot config"
> 
> and...
> 
> # ls -l /dev/mtd*
> crw-rw-rw-    1 0        0         90,   0 /dev/mtd0
> crw-rw-rw-    1 0        0         90,   2 /dev/mtd1
> crw-rw-rw-    1 0        0         90,   4 /dev/mtd2
> crw-rw-rw-    1 0        0         90,   6 /dev/mtd3
> brw-rw-rw-    1 0        0         31,   0 /dev/mtdblock0
> brw-rw-rw-    1 0        0         31,   1 /dev/mtdblock1
> brw-rw-rw-    1 0        0         31,   2 /dev/mtdblock2
> brw-rw-rw-    1 0        0         31,   3 /dev/mtdblock3
> crw-rw-rw-    1 0        0         90,   1 /dev/mtdr0
> crw-rw-rw-    1 0        0         90,   3 /dev/mtdr1
> crw-rw-rw-    1 0        0         90,   5 /dev/mtdr2
> crw-rw-rw-    1 0        0         90,   7 /dev/mtdr3
> # mknod /dev/mtd4 c 90 8
> # mknod /dev/mtdr4 c 90 9
> # mknod /dev/mtd5 c 90 10
> # mknod /dev/mtdr5 c 90 11
> # cat /dev/mtd5
> 
> -zN
>    boot_script
>               boot_script_databoot_scriptfis load ramdisk
> fis load zimage
> exec
> 
> boot_script_timeoutboot_scriptbootpbootp_my_gateway_ipbootp
> 
> bootp_my_ipbootp@(bootp
> _my_ip_maskbootpbootp_server_ip@(console_baud_rateB 
> gdb_port#(info_console_for
> ceinfo_console_numberinfo_console_force
> net_debug
> #        net_devicenpe_eth0h0^-^-1
> 
> 
> You'll need to write the little utility that properly configures the 
> area, of course.
> 
See http://lists.unixstudios.net/avila/2007/02/751 for info on such 
utility and what you need to do to make it work.  We use it to change 
the boot line between a failsafe image and a production image.

I would recommend breaking out that serial cable if you plan on changing 
the code on this board.  It is always nice to have the console output 
when you screw something up.
-Ack





More information about the Avila mailing list