can we have 2 u-boot images on the same NAND flash? How can we tell the Pre-loader which u-boot to boot from?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

can we have 2 u-boot images on the same NAND flash? How can we tell the Pre-loader which u-boot to boot from?

Jump to solution
964 Views
samirsamaha
Contributor II

can we have 2 u-boot images on the same NAND flash? How can we tell the Pre-loader which u-boot to boot from?

0 Kudos
1 Solution
781 Views
lunminliang
NXP Employee
NXP Employee

Hi,

I am afraid no. See the boot block loading steps:

The process for booting is as follows:

1. Following negation of HRESET_B , eLBC is released from reset and commences automatic boot block loading if FCM is selected as the boot ROM location. Small page or large-page, 8-bit NAND Flash devices can be used for boot loading when enabled with LCS0_B. eLBC drives LFWP_B low during boot accesses to prevent accidental erasure of the NAND Flash boot ROM.

2. FCM starts searching for a valid boot block at block index 0.

3. FCM reads the spare regions of the first two pages of the current block, checking the bad block indication (BI) bytes to validate the block for reading. BI bytes must all hold the value 0xFF for the page to be considered readable.

• For small-page devices, BI is a single byte read from spare region byte offset 5.

• For large-page devices, BI is a single byte read from spare region byte offset 0.

If either of the first two pages of the current block are marked invalid, then the boot block index is incremented by 1, and FCM repeats step 3. eLBC will continue searching for a bootable block indefinitely, therefore at least one block must be marked valid for boot loading to proceed. At the conclusion of the boot block search,the value of FBAR[BLK] points to the boot block.

It will always load the first valid U-boot image in the NAND.

View solution in original post

1 Reply
782 Views
lunminliang
NXP Employee
NXP Employee

Hi,

I am afraid no. See the boot block loading steps:

The process for booting is as follows:

1. Following negation of HRESET_B , eLBC is released from reset and commences automatic boot block loading if FCM is selected as the boot ROM location. Small page or large-page, 8-bit NAND Flash devices can be used for boot loading when enabled with LCS0_B. eLBC drives LFWP_B low during boot accesses to prevent accidental erasure of the NAND Flash boot ROM.

2. FCM starts searching for a valid boot block at block index 0.

3. FCM reads the spare regions of the first two pages of the current block, checking the bad block indication (BI) bytes to validate the block for reading. BI bytes must all hold the value 0xFF for the page to be considered readable.

• For small-page devices, BI is a single byte read from spare region byte offset 5.

• For large-page devices, BI is a single byte read from spare region byte offset 0.

If either of the first two pages of the current block are marked invalid, then the boot block index is incremented by 1, and FCM repeats step 3. eLBC will continue searching for a bootable block indefinitely, therefore at least one block must be marked valid for boot loading to proceed. At the conclusion of the boot block search,the value of FBAR[BLK] points to the boot block.

It will always load the first valid U-boot image in the NAND.