RedBoot™ User's Guide: Document Version 1.9, February 2003 | ||
---|---|---|
Prev | Chapter 5. Installation and Testing | Next |
RedBoot uses the single LAKI serial port. The default serial port settings are 38400,8,N,1.
Management of onboard flash is also supported.
Three basic RedBoot configurations are supported:
RedBoot running from the board's flash boot sector. (“ROM” startup)
RedBoot running at a higher address in the flash (“POST” startup) - for cooperation with customer POST code or other boot image.
RedBoot running in RAM (“RAM” startup).
By default ROM startup lives at the base of flash at 0xBFC00000; POST at 0xBFC80000 and RAM applications including RedBoot are loaded at 0x80020000. Suitable default entries are provided by fis init as usual.
Configuration fragment “.ecm” files are provided to build RedBoot in each of these startup types.
This assumes that you will install all 3 variants. Should you wish to preserve the customer bootloader behaviour, don't bother with any mention of ROM startup RedBoot below; just install POST and RAM startup. You would then have to use the customer bootloader to start RedBoot if/when you want to use RedBoot and eCos.
The ASCOM boot image supports SRecord downloading over the serial line (as does RedBoot itself). Obtain SRecord versions of each RedBoot image using commands such as mips64vr4100el-elf-objcopy -O srec install/bin/redboot.elf /tftpboot/redboot-RAM.srec
See below for information about rebuilding RedBoot from sources.
Load an SRecord RAM-startup RedBoot using the “SRecord download and execute” option in the ASCOM Boot image menu.
This is the initial splashscreen:
ascom PLC Bootloader [Ver. 2.0] Jul 04 2001 - 14:51:39 System Information Top Memory address : 0xA07FFFE0 Top Flash address : 0xBFFFFF80 ************************************************** Press any key to enter menu, or wait for countdown to start your default application! ************************************************** 2 |
So press a key, to get the menu screen. Navigate to start S3 download and execute thus, then press enter:
PLC Bootloader [Ver. 2.0] Jul 04 2001 - 14:51:39 Boot Menu ========= Configuration view memory jump in memory boot from sdram [START S3 DOWNLOAD AND EXECUTE] start S3 download start gdb-stub jump at 0xbfc20000 (start Green Hills monserv) [use : n or N - next, p or P - previous, x, X or enter - valid] |
The bootloader will show this screen, with a rotating caret as is usual when the download starts:
ascom PLC Bootloader [Ver. 2.0] Jul 04 2001 - 14:51:39 Bootloader starts ... |
Send the SRecord version of RedBoot down the serial line. On LINUX cat /tftpboot/redboot-RAM.srec > /dev/ttyS0 for example.
You should now have a running RedBoot.
Initialize the flash image system and RedBoot's flash configuration data.
RedBoot> fis init .... |
Place a valid fconfig record in the flash:
RedBoot> fco .... |
(just change something, say yes to update, then change it back and say yes to update to make it go into the flash)
For more information about these commands, see the Section called Flash Image System (FIS) in Chapter 2 and the Section called Persistent State Flash-based Configuration and Control in Chapter 2.
Load a POST-startup RedBoot into RAM then save it in flash:
RedBoot> load -m y -b 0x80100000 |
Use minicom's “send” function ^AS with ymodem to send your file eg./tftpboot/redboot-POST.srec
See the Section called Download Process in Chapter 2 for details of the load command.
RedBoot> fis cre RedBoot[post] -b 0x80100000 -r 0x9fc80000 An image named 'RedBoot[post]' exists - are you sure (y/n)? y * CAUTION * about to program 'RedBoot[post]' at 0xbfc80000..0xbfcbffff from 0x80100000 - are you sure (y/n)? y |
Load a ROM-startup RedBoot into RAM then save it in flash:
RedBoot> load -m y -b 0x80100000 |
Use minicom's “send” function ^AS with ymodem to send your file eg./tftpboot/redboot-ROM.srec
See the Section called Download Process in Chapter 2 for details of the load command.
RedBoot> fis cre RedBoot -b 0x80100000 -r 0x9fc00000 An image named 'RedBoot' exists - are you sure (y/n)? y * CAUTION * about to program 'RedBoot' at 0xbfc00000..0xbfc3ffff from 0x80100000 - are you sure (y/n)? y |
Reset RedBoot which should run the flash-based RedBoot:
RedBoot> reset .... |
To check that all is well in the fis, you can use the fis list command. You should see something like this:
RedBoot> fis lis Name FLASH addr Mem addr Length Entry point RedBoot 0xBFC00000 0xBFC00000 0x00040000 0x9FC00000 RedBoot[post] 0xBFC80000 0xBFC80000 0x00040000 0x9FC80000 RedBoot[backup] 0xBFCC0000 0x80020000 0x00040000 0x800200A4 RedBoot config 0xBFFC0000 0xBFFC0000 0x00020000 0x00000000 FIS directory 0xBFFE0000 0xBFFE0000 0x00020000 0x00000000 RedBoot> |
For more information about the fis, see the Section called Flash Image System (FIS) in Chapter 2.
NOTE: If you chose not to load a ROM-startup RedBoot, rather than reset above, type go 0xbfc80000 to jump into the POST-startup RedBoot.
You can now set up RedBoot's networking parameters following the instructions in the Section called Target Network Configuration in Chapter 1 and then use standard methods to update RedBoot in flash, including the RAM-startup RedBoot image called RedBoot[backup]. See the next section and the Section called Update the primary RedBoot flash image in Chapter 4 for details.
To update the primary RedBoot images, follow the procedures detailed in the Section called Update the primary RedBoot flash image in Chapter 4, but the actual numbers used with the flags in the sample commands should be:
-f 0xbfc00000 -b 0x80100000 -l 0x40000 -r 0x9fc00000 |
To update the secondary RedBoot images, follow the procedures detailed in the Section called Load and start a different version of RedBoot, running from RAM in Chapter 4, but the actual numbers used with the flags in the sample commands should be:
-f 0xbfcc0000 -b 0x80100000 -l 0x40000 -r 0x80020000 |
To update the POST RedBoot image, follow the procedures detailed in the Section called Update the primary RedBoot flash image in Chapter 4, but use a POST RedBoot image and the actual numbers used with the flags in the sample commands should be (also see above for example):
-f 0xbfc80000 -b 0x80100000 -l 0x40000 -r 0x9fc80000 |
If you chose not to load a ROM-startup RedBoot, then you will need to select “Jump in Memory” and type in bfc80000 (Bee Eff Cee Eight oh oh oh oh, not the default) then “yes” to confirm. RedBoot should start, all happy.
PLC Bootloader [Ver. 2.0] Jul 04 2001 - 14:51:39 Boot Menu ========= Configuration view memory [JUMP IN MEMORY] boot from sdram start S3 download and execute start S3 download start gdb-stub jump at 0xbfc20000 (start Green Hills monserv) [use : n or N - next, p or P - previous, x, X or enter - valid] |
You will need to do this every time the board is power cycled.
Serial, Ethernet.
The default serial setup is 38400 8N1.
The ethernet acquires its ESA from the Serial EEPROM that is automatically managed by the uPD985xx MicroWire subsystem.
None. But this board is unusual in that it might be fitted with an oversized Intel StrataFlash device. In this case the flash device driver takes special care to use the flash correctly, and reports as such during startup:
FLASH: Oversized device! End addr 0xc0400000 changed to 0xc0000000 FLASH: 0xbfc00000 - 0xc0000000, 32 blocks of 0x00020000 bytes each. .... |
The CPU is unable to address the upper half of the flash device which would live in addresses 0xc0000000 - 0xc0400000 so it adjusts the description of the flash device to accommodate this limitation.
This is all dictated by the MIPS architecture of the VR4120 MIPS Core at the heart of the uPD985xx devices. Addresses 0x80000000 - 0x9fffffff are cachable access to physical address space, and addresses 0xa0000000 - 0xbfffffff are non-cachable access to physical address space. RedBoot and eCos uses only these two areas. Flash and I/O areas are accessed through the non-cachable area; RAM is accessed (mainly) through the cachable space.
The flash based RedBoot image occupies flash addresses 0xbfc00000 - 0xbfc3ffff. It also reserves the first 128K bytes of RAM for runtime uses. The RAM based RedBoot image occupies RAM addresses 0x80020000 - 0x8003ffff. RAM addresses from 0x40000 to the end of RAM are available for general use such as a temporary scratchpad for downloaded images before they are written to flash.
The instructions in Chapter 3 should be followed. The values for TARGET, ARCH_DIR and PLATFORM_DIR on this platform are “laki1”, “mips” and “laki1” respectively. Note that the configuration export files supplied in the hal/mips/laki1/VERSION/misc directory in the RedBoot source tree should be used.