Memory Map
The illustration below shows the memory map of the boot loader.ROM boot code resides in the top 128 K address space. The boot code uses the top 16 K of OCRAM for MMU first level page table. The lowest 60 K of OCRAM is used for loading application data. The 42 KB of OCRAM region called “ROM Data” is used for data by ROM code.If a system uses external memory, then a boot image may be created which first loads a small SDRAM initialization program into OCRAM. The program will set up the SDRAM,and then the rest of the boot image may continue to load, overwriting the initialization program in OCRAM。
General Boot Procedure
During ROM startup, the boot mode is sampled by boot pins, and then the ROM loader will take control. The ROM loader first calls an initialization function for the selected boot driver, which initializes the hardware port and external device corresponding to the boot mode. After that, the loader requests for the stream of boot image data from the driver. The boot image contains a stream of boot commands, such as LOAD, LOAD DCD, SKIP, HAB JUMP and HAB CALL commands. The loader implemented in ROM code will interpret these commands and load the boot image into memory and execute HAB JUMP or HAB CALL command. In the case of HAB JUMP, the ROM will pass control to the boot image and will leave the ROM context.
USB Boot Driver
The USB Boot Driver is implemented as a USB HID class and is referred to as the Recovery HID, or RHID. The RHID serves as a fail-safe mechanism for downloading and communicating with application-specific code.The system is based on two HID Application collections: the Boot Loader Transfer Controller (BLTC) and the Plug-in Transfer Controller (PITC). Each collection has its own set of HID reports.
NAND Flash擦除过程
配置开发板为USB-BOOT的启动方式,开发板连接电脑后,将会作为HID设备进行指令传输,电脑CMD发出指令后,Flash被擦除,之后被写入imx28_ivt_uboot.sb
串口终端显示进入U-BOOT模式
NAND Flash写入过程
配置开发板为USB-BOOT的启动方式,连接电脑后,使用提供的MfgTool软件进行烧写,烧写完毕,配置开发板为NAND Flash 启动,按下RST键复位,即可启动Linux系统。