This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/TMS320DM8168: ECC algorithm(BCH 8) for nand flash

Part Number: TMS320DM8168

Tool/software: Linux

Hi All,

I am using DM8168 custom board and nand flash is Micron-MT29F4G16ABBDA 512MB.

I have wrote the kernel uImage and filesystem ubi image via uboot nand write command in uboot prompt and boot from nand flash successfully.

For mass production, all image will be flashed to nand flash via nand flash programmer before nand flash soldering.

I know that the ECC algorithm is BCH 8 in UBOOT and kernel but I dont know how to calculate.

After searching in the forum, I found that "bin2nand" is a utility to calculate ecc data for raw image.

https://e2e.ti.com/support/arm/sitara_arm/f/791/t/683734?tisearch=e2e-sitesearch&keymatch=nand%20ecc

Where could I found bin2nand and how to use?

BTW,

I have tried to write the image to nand via uboot command and dump the data of nand flash partition with OOB data after rootfs mounted(use nanddump).

Then rewrite the dumped data to nand flash via uboot command again.

But it is fail when mount ubifs filesystem...

It seems that ubifs partition will be modified after filesystem mounted and I could not use the dumped data to write another nand flash again?

Any help will be appreciate!

Thanks!

BR,

Steven