
PDF: 09005aef81fd5f2d / Source: 09005aef81fd5ecd Micron Technology, Inc., reserves the right to change products or specifications without notice.
tn2916_boot_from_nand_omap2420.fm - Rev. D 6/07 EN 7©2006 Micron Technology, Inc. All rights reserved.
TN-29-16: Boot-from-NAND with the TI OMAP2420 Processor
Stage 2: Bootstrap
Stage 2: Bootstrap
Stage 2 of the boot processis dependent on NAND Flash in the sensethat the X-Loader
is stored in the NAND Flash. It is important to remember that this X-Loader is executed
in the OMAP processor SRAM, so the image must fit in the available SRAM.
In a Linux-based system, the stage 2 boot consists of an X-Loader that bootstraps
U-Boot. This bootstrap includes:
• Information for each supported CPU architecture
• A configuration file for each supported board
• NAND Flash driver code
• Serial driver code (to support debug and development efforts)
Building the X-Loader
Building the X-Loader is a critical step in developing a boot-from-NAND system.
Figure 5 on page 8 shows the process for converting source code to a raw binary
X-Loader that can be stored in the Micron NAND Flash device. The “Boot_image” prefix
in the file names is provided only as an example; actual file names can be designated by
the system designer. Figure 6 on page 8 illustrates how the Boot_image.bin code is laid
out in the NAND Flash.
1. Compile the X-Loader source code into an executable format. The example in
Figure 5 on page 8 shows how the source code comprises Boot_image.c and
Boot_image.h; the executable is Boot_image.out.
2. Execute the OST Tools to sign the target file Boot_image.out. When this process is
complete, an 8-byte header is included in the Boot_image.ift file. Bytes 1 through 4 of
Boot_image.ift contain the file size. Bytes 5 through 8 contain the OMAP processor
SRAM address where the X-Loader will be loaded and executed (see Figure 6 on
page 8).OSTTools areavailablefromTI. (SeeOST Toolsdocumentationforadditional
details.)
3. Format the Boot_image.ift file resulting from step 2 for 2KB/page NAND Flash. Code
must be developed for this purpose if it is not available from TI.
To format the Boot_image.ift file, calculate the ECC for each 512-byte sector. Then
storethe resultin theappropriateareaof thefile.SeeFigure 7onpage 9 forboot code,
bad block marking, and ECC storage in a typical page of an MT29F1G08ABB NAND
Flash device programmed for boot-from-NAND in an OMAP2420-based system.
4. Program a copy of the Boot_image.bin file to each of the first four good blocks of the
NAND Flash device. The MT29F1G08ABB device identifies a good block as one that
has 0xFF data at byte 0x800 in both page 0 and page 1.