Flameman/redboot

= Booting Linux Using RedBoot =

RedBoot> fis list and see whether you get a useful list of flash images. If not, do: RedBoot> fis init -f y RedBoot> fconfig -i -l y RedBoot> load -r -b 0xd1000000 zImage.redboot (use the proper pathname for accessing the file over TFTP instead of zImage.redboot, as needed). RedBoot> exec -w 3 0xd1000000 RedBoot> fis create -b 0xd1000000 -l 0xNNNNNN -e 0xd1000000 -r 0xd1000000 linux where 0xNNNNNN is the size of the downloaded image and "linux" is just some name for the image. (You can have multiple images with different names, as flash space allows; use the same name in the fis load  command below.) RedBoot> fis list Name             FLASH addr  Mem addr    Length      Entry point RedBoot          0xF8000000  0xF8000000  0x00020000  0x00000000 RedBoot[backup]  0xF8020000  0xF8020000  0x00020000  0x00000000 RedBoot config   0xF83E0000  0xF83E0000  0x00001000  0x00000000 FIS directory    0xF83F0000  0xF83F0000  0x00010000  0x00000000 linux            0xF8020000  0xD1000000  0x001C0000  0xD1000000 RedBoot> RedBoot> fis load linux RedBoot> fconfig Run script at boot: true Boot script: Enter script, terminate with empty line >> fis load linux >> exec -w 3 0xd1000000 >> Boot script timeout (1000ms resolution): 5 Use BOOTP for network configuration: true Console baud rate: 38400 GDB connection port: 9000 Network debug at boot time: false Update RedBoot non-volatile configuration - are you sure (y/n)? y ... Erase from 0xf83e0000-0xf83e1000:. ... Program from 0xd3f6e000-0xd3f6f000 at 0xf83e0000:. RedBoot> (although I left BOOTP enabled above, you might not need it if always loading from flash)
 * Flash RedBoot on the board.
 * Reset the board.
 * Wait for RedBoot to boot to its prompt.
 * The Tensilica docs show two methods of putting RedBoot into flash using OCD. If you used RedBoot to flash itself, the flash filesystem is probably already initialized.  Otherwise you have to init the flash filesystem.  To check just do:
 * Download the kernel image  /arch/xtensa/boot/zImage.redboot to address 0xd1000000. For example, put that file on a TFTP server, and load it using RedBoot like this:
 * Now that the kernel image is in memory, you can execute it directly:
 * Or, you can instead put the image in flash so you can boot it multiple times without loading again:
 * You might double check that the image is now there. Something like:
 * You can reload the image from flash to memory using:
 * Now the fun part. You can setup RedBoot with a script to load the image (from network or flash) and execute it, automatically at reset.  Here is an example that loads from flash, with a timeout set to 5 seconds so that you can Ctrl-C to avoid booting Linux if you want a boot prompt:
 * Now you should be able to reset the board, and see RedBoot booting, and see Linux automatically booting afterwards.
 * At the Linux login prompt, login as root as usual