2008-08-22 14:46:28     Boot from NAND flash on BF548 EZ-KIT

Document created by Aaronwu Employee on Sep 18, 2013
Version 1Show Document
  • View in full screen mode

2008-08-22 14:46:28     Boot from NAND flash on BF548 EZ-KIT

Rutger Hofman (NETHERLANDS)

Message: 60927   


'Nevening list,


I saw references in the commit logs and NEWS to support for booting from NAND flash on the BF548 EZ-KIT. Now, I am unsure how to get this done.


I think the steps are:


1) build u-boot with #define CONFIG_BFIN_BOOT_MODE BFIN_BOOT_NAND


If that's all on the u-boot side, I can manage that


2) upload u-boot.ldr through tftpboot


I can manage that


3) Burn u-boot into the right place in my NAND


I have no inkling how I do that, I don't even understand the help message for nand write. Can anybody please guide me?


4) Check that I have Silicon Revision >= 0.1. That's fine. I can read DSPID and have 0x1 in the lower 16 bits, as per BF54x Anomaly document. BTW, I saw that u-boot doesn't read DSPID for this, but CHIPID = 0xffc00014, which I can find nowhere in the BlackFin documentation. What is CHIPID? Where is it described?


5) Turn the boot screw to 0b1101 = 13 and lo and behold.


6) I will report back for guidance because I want to play with the NAND flash, e.g. run a YAFFS or something on top of it :-)


Thanks for helping me out,


Rutger Hofman


VU Amsterdam


P.S. None of the u-boot.bin varieties as built from svn work for this board, they maintain stony silence after the go 0x01000000 from a u-boot/UART. It doesn't matter much to me since the u-boot/UART build and the flashed u-boot.ldr do work, but maybe you are interested.




2008-08-22 15:28:56     Re: Boot from NAND flash on BF548 EZ-KIT

Mike Frysinger (UNITED STATES)

Message: 60929   


the u-boot documentation explains how to use nand flash:





2008-11-28 10:21:11     Re: Boot from NAND flash on BF548 EZ-KIT

Rutger Hofman (NETHERLANDS)

Message: 65967   


OK, I managed to get it done. It was easy. But there are a few steps that might be spelled out in the docs on that page (http://docs.blackfin.uclinux.org/doku.php?id=bootloaders:u-boot:nand-flash)




- build u-boot along the lines of http://docs.blackfin.uclinux.org/doku.php?id=bootloaders:u-boot:nand-flash (both the UART boot with modified ECC codings and NAND boot)


- boot via UART, then upload NAND u-boot.ldr:


bfin> tftpboot 0x01000000 u-boot.ldr


bfin> nand erase 0 60000


bfin> nand write 0x01000000 0 60000


Rotate the switch to 0xd, reboot, and lo and behold! the penguin appears from NAND flash!


2 questions:


= Shouldn't the NAND u-boot use the standard MTD ECC codings after it has booted?


= Should this nand programming be 'nand write' or 'nand write.jffs2' ? The blocks here aren't bad, so my guess is it doesn't matter for me here and right now. But who knows for the next copy of the board.










2008-11-28 13:58:53     Re: Boot from NAND flash on BF548 EZ-KIT

Mike Frysinger (UNITED STATES)

Message: 65979   


the MTD infra doesnt really allow for swapping ECC layouts on the fly.  the bootrom requires a different ECC layout so it's up to you ... have one u-boot which uses the bootrom layout to program, but boot a different one out of nand flash.


"nand write" doesnt handle bad blocks, but the default behavior at the moment with the bootrom is to not handle them either.  this behavior is of course controllable, but we havent had a part yet to test with.