I have a custom board with a i.MX8MP and a KIOKXIA TH58NVG4S0HTAK0 which should be used as boot device.
Boot device:NAND FLASH 2GB (2 chip select, 1chip select is 1GB)
brunch:imx-linux-hardknott
manifesto:imx-5.10.35 2.0.0.xml
DISTRO:fsl-imx-wayland
MACHINE:mx8mpevk
uuu ver :1.5.21
Writing images to nand flash uses uuu.
In this process, some boards succeed in writing and others fail.
From the errors, it looks like it is failing to skip bad blocks.
Why does it fail to skip bad blocks?
The logs for each are attached.
They are shown side by side, the left is for failure and the right is for success.
Best regards.
Few words in a less academic, but pragmatic way.
nand without bad blocks is a dream. And bad block table exists to track bad blocks. The problem is typical of nand devices, that are known to be error-prone. So nand needs to be accessed with proper ECC support from the driver.
If you flash through uuu, the access may be done by u-boot, please verify to have recent u-boot/fastboot and updated drivers for the device.
As file system, ubifs is an option for quite relaible fs now a day.
Hi @junya,
Bad Block is an area of storing media that is no longer reliable for the storage of data because it is completely damaged or corrupted. Bad blocks may be present when the device is shipped, or may develop during the lifetime of the device. Click on this link for: Bad block management in NAND flash memory
The following command will clear the list of bad clusters on the volume specified and re-scans all allocated and free clusters for errors.
NOTE: Execute this command only on the machine that was being backed up. Specifying the volume for which the warning occurred.
Type the following command to unmount the drive you want to check: sudo umount /dev/sdb
Replace "/dev/sdb" with the device name for the drive you want to check.
Type the following command to check the drive: sudo fsck /dev/sdb
Run the "fsck" command a second time if any number other than zero appears. This ensures that all errors are corrected.
Reboot the system or type the command "sudo mount /dev/sdb" to remount the drive.
You can also go through a conversation here, it might help you with a hint: https://community.nxp.com/t5/
Hi, @Dhruvit .
Thank you for your reply.
I guess your advice is that we can do well on the kernel.
But i still don't understand it.
I attach the script of uuu.
Please advise how to modify this script to skip bad blocks.
Hi @junya,
Hi @Dhruvit ,
We removed the NAND flash from the problematic board and had it analyzed by Kioxia. As a result, the component was determined to be good. Additionally, there were no acquired bad blocks, and the bad blocks that were identified matched the ones that were skipped during writing with uuu.
This means that while bad blocks can be skipped during flashing, they are not being skipped during reading. We have limited experience with NAND flash and are unsure how to address this issue.
Best regards,