how to boot from a Nand flash in i.MX6?

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

how to boot from a Nand flash in i.MX6?

1,682 Views
liangcheng
Contributor I

I'm developing a board with i.MX6S.

I want to boot from a Nand flash, such as  MT29F1G08ABADAWP. But <<i.MX 6Solo/6DualLite Applications Processor Reference Manual>> said that boot need FCB block. And the FCB data structure is protected using software ECC (SEC-DED Hamming Codes). Driver reads raw 2112 bytes of first sector and runs through software ECC engine that determines whether FCB data is valid or not.

How about the payout of this software ECC?

I need to write the right FCB data into Nand Flash chip.

Of course, if someone can give me the sample code, I 'm very appreciative

Labels (2)
0 Kudos
4 Replies

811 Views
Yuri
NXP Employee
NXP Employee

The following may be helpful

https://community.freescale.com/message/379149#379149


Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

811 Views
Sebster
Contributor II

Hi Yuri,

I.MX6:

1) Could you confirm that when I Boot from NAND, the i.MX6 NAND controller uses the ECC engine?

2) What sort of boot takes place from NAND; I assumed it’s not any sort of file system but just a straight copy from NAND to DDR or perhaps internal RAM, then jump to a start location?

3) My customer is wondering if the NAND boot loader can unload a large amount or is it restricted to a few blocks? (I can see from the post you referenced: 379149#379149 that, u-boot, but also the kernel can be paced in the Boot NAND. Can a file system be placed there are well?

Apologies, I'm NOT very versed in Linux.

Regards

SPA

0 Kudos

811 Views
Yuri
NXP Employee
NXP Employee

Please look at my comments below.

1.

  From section 8.5.2 (NAND Flash) of the i.MX6 D/Q Reference Manual :

“The boot ROM supports a number of MLC/SLC NAND Flash devices from different

vendors and LBA NAND Flash devices. The Error Correction and Control (ECC)

subblock (BCH) is used to detect the errors.”

2.
Your understanding is correct :
“just a straight copy from NAND to […] internal RAM, then jump to a start location”.

3.
The boot ROM uses information of IVT header and Boot Data Structure about length

of data to be read from boot media. In this sense it is possible to load U-boot and kernel
with internal bootloader help.

Regards,

Yuri.

0 Kudos

811 Views
liangcheng
Contributor I

I have read them. But my board does not run linux. So i am not clear that MFG tool can burn my boot into Nand flash.

However, i will try MFG tools...

0 Kudos