README.hawkboard 3.3 KB

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