Boot sequence (Naon)

From DAVE Developer's Wiki
Jump to: navigation, search
Info Box
Naon am387x-dm814x.png Applies to Naon
Dido-main.png Applies to Dido

Default boot sequence[edit | edit source]

DM814x provides several boot sequences selectable via BTMODE[4:0] bootstrap pins. In order to fully understand how boot work on Naon platform, please read Memory organization first.

For a detailed explanation of DM814x/AM387x see chapter ROM Code Memory and Peripheral Booting of DM8148 Technical Reference Manual.

By default, Naon provides the following configuration:

  • BTMODE[15]: 0
  • BTMODE[14:13]: 10
  • BTMODE[12]: 1
  • BTMODE[11]: 0
  • BTMODE[10]: 0
  • BTMODE[9:8]: 01
  • BTMODE[7:5]: 000
  • BTMODE[4:0]: 10111.

Thus default boot sequence is:

  1. MMC
  2. SPI
  3. UART
  4. EMAC

Bootrom tries each boot mode in sequence and stops when it finds a valid boot code.

Assuming that:

  • default configuration is not changed,
  • no boot MMC card is connected to processor's MMC1 interface,
  • and there's a valid boot code programmed in SPI memory

the actual boot sequence performed by ARM core will be:

  1. bootrom: this is executed from internal ROM code memory
  2. U-Boot bootloader (1st stage)
    • copied from on-board NOR flash memory connected to SPI0 port to on-chip SRAM by bootrom
    • executed from on-chip SRAM
  3. U-Boot bootloader (2nd stage)
    • copied by U-Boot 1st stage from NOR flash memory connected to SPI0 port to SDRAM
    • executed from SDRAM.

If no boot code is available in SPI NOR flash (for the bootrom this means that the first sector read returns 0xFFFFFFFF) the bootrom tries UART and EMAC peripheral booting.

Boot sequence options[edit | edit source]

Boot sequence can be changed by optional external circuitry implemented on carrier board as described by Integration guide.

Memory boot details[edit | edit source]

MMC Booting[edit | edit source]

When MMC boot option is selected, bootrom looks for a valid boot sector on MMC1.

To properly program a SD/MMC card so it's recognized by bootrom, please follow this guide from TI wiki.

In brief:

  • the first (if more that one is available) partition of MMC must be formatted as FAT12/16 or FAT32 (the partition must also be marked as primary and active)
  • inside this partition there must be a file named MLO which is the U-Boot 1st stage, a file named u-boot (which is the second stage) and the uImage binary file (which is the kernel image)
  • the second partition of the MMC must be formatted as ext3 and must contain a plain root file system

Once the system boots from the SD and U-Boot is running, the following commands can be launched from the U-Boot shell to start the system, reading the kernel from the card boot partition and mounting the root file system stored in the second partition (/dev/mmcblk0p2):

mmc rescan 0
fatload mmc 0 81000000 uImage
setenv mmcargs 'setenv bootargs root=/dev/mmcblk0p2 rw'
run mmcargs addip addcons addmem
bootm 81000000

NAND Booting[edit | edit source]


Peripheral boot details[edit | edit source]

UART Booting[edit | edit source]

When UART boot is selected the bootrom output a sequence of CCC characters on serial console (as usual 115200 8N1). While the C are being written, bootrom waits for a XMODEM transfer for the 1st stage. Once the first stage is downloaded, bootrom execute it and the user should download the second stage via one of the available U-Boot command.

Bootrom waits for nearly 3 seconds before timeout the XMODEM transaction and go to the next step in the configured boot sequence.

A detailed explanation of UART booting is available into the U-Boot section on TI wiki.