xjtuecho / EBAZ4205

A 5$ Xilinx ZYNQ development board.
MIT License
627 stars 164 forks source link

Bad blocks in nand flash. Coincidence? #60

Closed jcdevel closed 10 months ago

jcdevel commented 10 months ago

Hello Everybody,

I recently got an EBAZ4205 board. U-Boot reports the last 5 sectors of the nand flash as bad blocks:

zynq-uboot> nand bad 0

Device 0 bad blocks:
  07f60000
  07f80000
  07fa0000
  07fc0000
  07fe0000

I wouldn't give it too much importance if it weren't because it seems that all boards have exactly the same sectors marked as bad blocks. I do not believe in coincidences, even less in this one.

Does someone know if there is any particular reason for which all boards seem to have these bad blocks? Or are there lucky people who got an ebaz4205 with a healthy nand flash?

Thank you very much for your time and your support!

nic3-14159 commented 10 months ago

If I recall correctly the bad block information is essentially just a table on the NAND that uboot itself maintains. So if the same NAND image is copied to all boards they would list the same bad blocks information. NAND flash is pretty basic, it doesn't keep info about bad blocks itself. It's up to the controller/code to maintain that information somewhere.

jcdevel commented 10 months ago

I see. Thanks for the clarification! So I should be able to recover and use those bad blocks using U-Boot commands and store data of my own, right?