U-Boot Bootstrapping process¶
Chapter 5 of the AM62x TRM describes the boot process in detail.
In the diagram below, u-Boot is the "Initial Software"
The ROM code in the AM62x checks the boot mode pins at startup (or reset) and based on their configuration attempts to load the "Initial Software (u-Boot)" from the associated device.
The actual boot devices available will depend on the model of the MitySOM-AM62 in use. All models support booting from UART, MMCSD, and USB.
Boot Mode | Boot Media/Host | SoC Peripheral | Backup(1) | Notes |
---|---|---|---|---|
No-boot/Dev-boot | No media or host | None | N | No boot or development boot – debug modes |
OSPI | OSPI flash | FSS0_OSPI0 | N | On OSPI port |
QSPI | QSPI flash | FSS0_OSPI0 | N | On OSPI port |
SPI | SPI flash | FSS0_OSPI0 | Y | On OSPI port |
Ethernet | External host | CPSW0 | Y | In BOOTP mode. RGMII or RMII PHY |
I2C | I2C EEPROM | I2C0 | Y | I2C target boot is not supported |
UART | External host | UART0 | Y | XMODEM protocol |
MMCSD | eMMC flash or SD card | MMCSD0 (8bit) or MMCSD1 (4bit) | Y | Boot from User Data Area (UDA) in raw or file system mode |
eMMC | eMMC flash | MMCSD0 (8bit) | N | Boot from boot partition |
USB - target | USB boot from external host | USB0 | Y | USB device mode boot using DFU (device firmware upgrade). Boot is running on USB2.0 speeds. |
USB - host | USB mass storage | USB0 | Y | USB2.0 host mode. boot from FAT32 filesystem |
Serial Flash | Serial Flash | FSS0_OSPI0 | N | On OSPI port |
xSPI | xSPI flash | FSS0_OSPI0 | N | On OSPI port |
GPMC | NOR flash NAND flash | GPMC0 | N | CSn0 connected. 8 bit NAND flash only. 16-bit non-mux NOR flash only |
(1) The peripheral can be selected also as a backup boot mode. A backup mode is tried if primary boot mode fails.
BOOTMODE Pin Mapping
Pins 0-2 [ PLL config ] are fixed on the SoM and not configurable by the carrier card.
Boot Process¶
The actual process of booting the MitySOM-AM62x is fairly involved due to its support for secure boot. There are several processors that (re)load and run code before the main A53 CPU is started. End users do not normally have to deal with the early boot unless they are using the SoM in a special configuration.
- The Boot ROM code loads the R5 SPL image (tiboot3.bin) [ this is a 32bit ARM executable version of the u-Boot SPL ]
- The R5 SPL image configures DDR and loads the A53 SPL image [ tispl.bin ].This image is a FIT image file containing
- Image 0 (atf) : ARM Trusted Firmware
- Image 1 (tee) : OPTEE
- Image 2 (dm) : DM binary
- Image 3 (spl) : SPL (64-bit)
- Image 4 (k3-am62x-mitysom-devkit.dtb) : k3-am62x-mitysom-devkit device tree blob
- Image 0 (firmware-1) : U-Boot bootloader
- Image 1 (fdt-1) : k3-am62x-mitysom-devkit flattened device tree
u-Boot can then take whatever action needed to boot the system.
Stopping in U-boot¶
When the board is booting up, there is a window in U-boot during which if no key is hit, then the application is loaded and started. If a key is hit, then U-boot stops and issues the u-boot prompt. This lets you look at or make changes to the environment variables if you wish. When you are finished, you can simply type boot and then u-boot will run the "bootcmd" environment variable. The length of the window is the value of the "bootdelay" environment variable in seconds and is 2 by default. You can change the value of the bootdelay to make the window longer if you wish.
To look at the environment variables, use printenv.
After making changes to the environment variables, use saveenv to save the changes.
Use "help" to see what other commands are available. Additional information about the commands can be found on the internet.
The Bootloader Files¶
In the development kit, the bootloader files are in the first partition on the SD card and can be accessed from Linux, U-boot, or anything that can access the SD card. The application files are in the second partition of the SD card.- tiboot3.bin
- tispl.bin
- u-boot.img
These three images are required to get to u-Boot (and thus load the OS / application). If you boot from different media, they are written to specific offsets depending upon the media. See the Boot_options page for details.
If you rebuild u-boot or the secondary bootloader, you can copy the files to the SD-card using whatever method you are most comfortable with (save the originals just in case) and then try the new programs. If you need to go back to the original files, you can remove the SD-card, restore the original files, insert the SD-card back in, and then reboot.
Go to top