Sughosh Ganu | 48571ff | 2010-11-30 11:25:01 -0500 | [diff] [blame] | 1 | Summary |
| 2 | ======= |
| 3 | The README is for the boot procedure used for TI's OMAP-L138 based |
| 4 | hawkboard. The hawkboard comes with a 128MiB Nand flash and a 128MiB |
| 5 | DDR SDRAM along with a host of other controllers. |
| 6 | |
| 7 | The hawkboard is booted in three stages. The initial bootloader which |
| 8 | executes upon reset is the Rom Boot Loader(RBL) which sits in the |
| 9 | internal ROM of the omap. The RBL initialises the memory and the nand |
| 10 | controller, and copies the image stored at a predefined location(block |
| 11 | 1) of the nand flash. The image loaded by the RBL to the memory is the |
Sughosh Ganu | 6b873dc | 2012-02-02 00:44:41 +0000 | [diff] [blame] | 12 | AIS signed spl image. This, in turns copies the u-boot binary from the |
| 13 | nand flash to the memory and jumps to the u-boot entry point. |
Sughosh Ganu | 48571ff | 2010-11-30 11:25:01 -0500 | [diff] [blame] | 14 | |
| 15 | AIS is an image format defined by TI for the images that are to be |
| 16 | loaded to memory by the RBL. The image is divided into a series of |
| 17 | sections and the image's entry point is specified. Each section comes |
| 18 | with meta data like the target address the section is to be copied to |
| 19 | and the size of the section, which is used by the RBL to load the |
| 20 | image. At the end of the image the RBL jumps to the image entry |
| 21 | point. |
| 22 | |
Sughosh Ganu | 6b873dc | 2012-02-02 00:44:41 +0000 | [diff] [blame] | 23 | The secondary stage bootloader(spl) which is loaded by the RBL then |
| 24 | loads the u-boot from a predefined location in the nand to the memory |
| 25 | and jumps to the u-boot entry point. |
Sughosh Ganu | 48571ff | 2010-11-30 11:25:01 -0500 | [diff] [blame] | 26 | |
| 27 | The reason a secondary stage bootloader is used is because the ECC |
| 28 | layout expected by the RBL is not the same as that used by |
Sughosh Ganu | 6b873dc | 2012-02-02 00:44:41 +0000 | [diff] [blame] | 29 | u-boot/linux. This also implies that for flashing the spl image,we |
| 30 | need to use the u-boot which uses the ECC layout expected by the |
Sughosh Ganu | 48571ff | 2010-11-30 11:25:01 -0500 | [diff] [blame] | 31 | RBL[1]. Booting u-boot over UART(UART boot) is explained here[2]. |
| 32 | |
| 33 | |
| 34 | Compilation |
| 35 | =========== |
| 36 | Three images might be needed |
| 37 | |
Sughosh Ganu | 6b873dc | 2012-02-02 00:44:41 +0000 | [diff] [blame] | 38 | * spl - This is the secondary bootloader which boots the u-boot |
Sughosh Ganu | 48571ff | 2010-11-30 11:25:01 -0500 | [diff] [blame] | 39 | binary. |
| 40 | |
Sughosh Ganu | 48571ff | 2010-11-30 11:25:01 -0500 | [diff] [blame] | 41 | * u-boot binary - This is the image flashed to the nand and copied to |
Sughosh Ganu | 6b873dc | 2012-02-02 00:44:41 +0000 | [diff] [blame] | 42 | the memory by the spl. |
Sughosh Ganu | 48571ff | 2010-11-30 11:25:01 -0500 | [diff] [blame] | 43 | |
Sughosh Ganu | 6b873dc | 2012-02-02 00:44:41 +0000 | [diff] [blame] | 44 | Both the images get compiled with hawkboard_config, with the TOPDIR |
| 45 | containing the u-boot images, and the spl image under the spl |
| 46 | directory. |
| 47 | |
| 48 | The spl image needs to be processed with the AISGen tool for |
| 49 | generating the AIS signed image to be flashed. Steps for generating |
| 50 | the AIS image are explained here[3]. |
Sughosh Ganu | 48571ff | 2010-11-30 11:25:01 -0500 | [diff] [blame] | 51 | |
| 52 | * u-boot for uart boot - This is same as the u-boot binary generated |
| 53 | above, with the sole difference of the CONFIG_SYS_TEXT_BASE being |
| 54 | 0xc1080000, as expected by the RBL. |
| 55 | |
| 56 | hawkboard_uart_config |
| 57 | |
| 58 | |
| 59 | Flashing the images to Nand |
| 60 | =========================== |
Sughosh Ganu | 6b873dc | 2012-02-02 00:44:41 +0000 | [diff] [blame] | 61 | The spl AIS image needs to be flashed to the block 1 of the Nand |
| 62 | flash, as that is the location the RBL expects the image[4]. For |
| 63 | flashing the spl, boot over the u-boot specified in [1], and flash the |
| 64 | image |
Sughosh Ganu | 48571ff | 2010-11-30 11:25:01 -0500 | [diff] [blame] | 65 | |
| 66 | => tftpboot 0xc0700000 <nand_spl_ais.bin> |
| 67 | => nand erase 0x20000 0x20000 |
| 68 | => nand write.e 0xc0700000 0x20000 <nand_spl_size> |
| 69 | |
| 70 | The u-boot binary is flashed at location 0xe0000(block 6) of the nand |
Sughosh Ganu | 6b873dc | 2012-02-02 00:44:41 +0000 | [diff] [blame] | 71 | flash. The spl loader expects the u-boot at this location. For |
Sughosh Ganu | 48571ff | 2010-11-30 11:25:01 -0500 | [diff] [blame] | 72 | flashing the u-boot binary |
| 73 | |
| 74 | => tftpboot 0xc0700000 u-boot.bin |
| 75 | => nand erase 0xe0000 0x40000 |
| 76 | => nand write.e 0xc0700000 0xe0000 <u-boot-size> |
| 77 | |
| 78 | |
| 79 | Links |
| 80 | ===== |
| 81 | |
| 82 | [1] |
| 83 | http://code.google.com/p/hawkboard/downloads/detail?name=u-boot_uart_ais_v1.bin |
| 84 | |
| 85 | [2] |
| 86 | http://elinux.org/Hawkboard#Booting_u-boot_over_UART |
| 87 | |
| 88 | [3] |
| 89 | http://elinux.org/Hawkboard#Signing_u-boot_for_UART_boot |
| 90 | |
| 91 | [4] |
| 92 | http://processors.wiki.ti.com/index.php/RBL_UBL_and_host_program#RBL_booting_from_NAND_and_ECC.2FBad_blocks |