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