RedBoot is what is installed on the AKI-H8 board I have. I put it there myself, taking the image fromĀ http://sourceforge.jp/projects/ecos-h8/ . It can configure its startup behaviour as I know from several routers which use RedBoot. But I’ve never done that. So far no need, but recently I use that board a lot as it has lots of memory and loading a file via network beats XModem upload. But when you want to boot off the microcontroller without a network connection… Time to figure out how RedBoot handles the FLASH memory.
The first test was using fconfig, which is supposed to configure RedBoot:
RedBoot> fconfig -i Initialize non-volatile configuration - continue (y/n)? y Run script at boot: false Use BOOTP for network configuration: false Gateway IP address: 192.168.11.1 Local IP address: 192.168.11.55 Local IP address mask: 255.255.255.0 Default server IP address: 192.168.11.53 GDB connection port: 9000 Force console for special debug messages: false linux boot command: Network debug at boot time: false Default network device: dp83902a_eth0 Update RedBoot non-volatile configuration - continue (y/n)? y
Looked good! But then:
... Erase from 0x00070000-0x00080000: Error erasing FIS directory at 0x00070000: Device/region is write-protected
Well, it’s not that easy it seems. Turns out 2 things are needed first:
- Make the flash not read-only (DIP switch 4 to on I think)
fis init -f
to initialize flash
Afterwards:
RedBoot> fis init -f About to initialize [format] FLASH image system - continue (y/n)? y *** Initialize FLASH Image System ... Erase from 0x00020000-0x00070000: ..... ... Erase from 0x00080000-0x00080000: ... Erase from 0x00070000-0x00080000: . ... Program from 0x005e4000-0x005f4000 at 0x00070000: .
to initialize flash. And then change the boot up configuration to configure the IP address to the one I like:
RedBoot> fconfig Run script at boot: false Use BOOTP for network configuration: false Gateway IP address: 192.168.11.1 Local IP address: 192.168.11.55 Local IP address mask: 255.255.255.0 Default server IP address: 192.168.11.53 GDB connection port: 9000 Force console for special debug messages: false linux boot command: Network debug at boot time: false Default network device: dp83902a_eth0 Update RedBoot non-volatile configuration - continue (y/n)? y ... Erase from 0x00070000-0x00080000: . ... Program from 0x005e4000-0x005f4000 at 0x00070000: .
This sets its own IP address to 192.168.11.55/24 and the TFTP server where to get its programs from to 192.168.11.53. I could even run a script (which is not more than commands I’d otherwise enter manually) at boot time and load a program from the TFTP server or from flash and execute it. See here for examples. I seriously start to like RedBoot. At least if you have plenty of FLASH and a network connection.