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.

Restore UBL and u-boot on dm368-leopardboard

I found out that "nand erase" erases everything, and doesn't print out argument help.  Now I am in a situation where the UBL and u-boot are gone and I'd like to restore them.  Even the DM365 UBL and u-boot from the DM365-evm should flash, even though a few things such as ethernet will likely not.


I can boot from a SD card, but flashing UBL and u-boot fails.  Even writing u-boot's environment fails:

 

DM365 LEOPARD # saveenv
Saving Environment to NAND...
Erasing Nand...
Erasing at 0x3e0000 -- 100% complete.
Writing to Nand... FAILED!


DM365 LEOPARD # tftp 0x82000000 ubl_nand.nandbin.davinci.LeopardBoardDM365sdkEVAL2011Q2.leopard
Using DaVinci-EMAC device
TFTP from server 10.5.1.3; our IP address is 10.5.1.91
Filename 'ubl_nand.nandbin.davinci.LeopardBoardDM365sdkEVAL2011Q2.leopard'.
Load address: 0x82000000
Loading: ####
done
Bytes transferred = 16384 (4000 hex)
DM365 LEOPARD # nand erase 0x20000 0x20000

NAND erase: device 0 offset 0x20000, size 0x20000
Erasing at 0x20000 -- 100% complete.
OK
DM365 LEOPARD # nand write.ubl 0x82000000 0x20000 0x20000

NAND write: device 0 offset 0x20000, size 0x20000
NAND write to offset 20000 failed -5
 0 bytes written: ERROR

 

However, writing the uImage / root filesystem works fine.

 

My bad block table is still intact, and does not include any of the addresses I'm trying to write to.  Is it possible that my NAND is somehow locked?  Using Constantine's SD flash program, every UBL copy fails to write, as does u-boot.

 

Any ideas?

 

edit: nand dump of the ubl address (0x20000) shows that it is writing the first 24 bytes.

Page 00020000 dump:
00 ed ac a1 00 01 00 00  07 00 00 00 01 00 00 00
01 00 00 00 20 00 00 00  ff ff ff ff ff ff ff ff

 

  • It may be necessary to perform a "nand erase" when booting from SD, before attempting to reflash the board.  The worst case scenario is you may be required to perform a "nand scrub" and this allow u-boot to rebuilt the bad block table upon boot.