Startup Analysis of am335x
Reference document: process Analysis of Sitara AM335x Bootload
After am335x is powered on, it starts running from Rom code, and the Rom code address is 0x4000_0000.
Rom code is a boot program solidified on the chip, see "AM335x and AMIC110 Sitara." Chapter 26 of Processors Technical Reference Manual.
After the Rom code is running, according to the imported configuration of sysboot, go through the startup list to find the startup Image. The boot list is mainly divided into memory devices and peripherals. Booting from the memory device requires an Image header that contains the entry address and Image size to start the Image.
Sysboot configuration, SYSBOOT [4:0] = 10011, then the boot sequence is NAND- > NANDI2C- > MMMC0- > UART0.
After power on, the serial port output 8 "C", that is, the Rom code program jumps to UART to start.
The size of the internal RAM in the AM335X is 128KB, where the final 18KB is used by the ROM code. In addition, 1 KB (0x402f0000-0x402f0400) cannot be accessed at startup, so the size of the U-Boot is limited to less than 109KB. If you can no longer 109KB all the functions of U-Boot, divide the u-boot into two parts.
MLO file-initializes the required boot device (NAND,MMC,I2C, etc.).
UmurBoot.imgMury-initializes all other devices. After adding header information to u-boot.bin, U-boot.img can be booted by MLO.