2010-05-25 16:04:34     Upgrade u-boot post install on the bf52x w/boot ECC

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

2010-05-25 16:04:34     Upgrade u-boot post install on the bf52x w/boot ECC

Reggy Perrin (UNITED STATES)

Message: 89839   

 

Hey folks,

 

Using booting expects different ECC layout, we have a board now with the correct u-boot programmed.  However, we would like to upgrade this u-boot to a newer version, one that changes the boot parameters.

 

I need to figure out a creative way to upgrade.  Currently, the board is configured for NAND boot, and loads the existing u-boot w/o an issue.  I need to erase/write the portion of NAND with that u-boot, but with a tool that understands boot-ecc, not the standard ecc.

 

I can't (easily) switch the board into serial boot, so the instant I turn it on, the existing u-boot starts.

 

I'm trying to use JTAG (with a gnICE+) to load, but I'm not getting what I expect.  Since u-boot has already started, I assume that the memory is correctly configured.  My thought is that I can use gdbproxy to assume control, use gdb to restore the u-boot that understands the correct ECC, and execute that u-boot from memory to load/program the new u-boot.

 

I also tried compiling nandwrite (in mtd-utils), to see if I could actually program via the running system, but I'm not sure how to call nandwrite in such a way as to write the u-boot.ldr with the correct ECC.

 

Any suggestions?  I'm scratching my head trying to think of a process that might work.  If all else fails, I *could* load an eval version of Visual DSP, and use it to program (we've determined how to do this).  But, that's not an ideal solution.

 

I can think of these ways to maybe accomplish this:

 

    Determine how to use gdbproxy+JTAG to load a temporary u-boot into memory which and program u-boot correctly with the right ECC.

    See if nandwrite from mtd-utils can be changed/tweaked to write the correct ECC

    Find a JTAG tool which can use gnICE+ to correctly erase/write the NAND

    Use VisualDSP

 

Can anybody think of another way?

 

    

 

 

 

Thanks much,

RP

QuoteReplyEditDelete

 

 

2010-05-25 16:09:18     Re: Upgrade u-boot post install on the bf52x w/boot ECC

Mike Frysinger (UNITED STATES)

Message: 89840   

 

having JTAG wont help with programming NAND flashes.

 

i dont understand why you cant have u-boot itself program NAND ?  or load a different version of u-boot into external memory like normal and execute that ?

 

http://docs.blackfin.uclinux.org/doku.php?id=bootloaders:u-boot:upgrading

QuoteReplyEditDelete

 

 

2010-05-25 16:35:07     Re: Upgrade u-boot post install on the bf52x w/boot ECC

Reggy Perrin (UNITED STATES)

Message: 89841   

 

Hi Mike,

 

We built 2 versions of u-boot:  1 that understood boot-ecc, and 1 that understood standard ecc.  We used #1 to program #2.  So, I now need to get a running copy of #1 into memory to program #2.1

 

Maybe I'm missing something, but if I try this:

 

bfin> loady

## Ready for binary (ymodem) download to 0x01000000 at 115200 bps...

CC## Total Size = 0x00028010 = 163856 Bytes

bfin> go 0x01000000

## Starting application at 0x01000000 ...

 

and do a ymodem transfer of the new u-boot.bin, it freezes. 

 

Am I on the right track?

 

RP

QuoteReplyEditDelete

 

 

2010-05-25 16:35:26     Re: Upgrade u-boot post install on the bf52x w/boot ECC

Robin Getz (UNITED STATES)

Message: 89842   

 

Reggy:

 

Yeah, - Mike is correct - just load the new u-boot.bin up, and "go address". It should start the new and improved U-Boot, then you can use that to program the NAND.

 

-Robin

QuoteReplyEditDelete

 

 

2010-05-25 16:41:20     Re: Upgrade u-boot post install on the bf52x w/boot ECC

Mike Frysinger (UNITED STATES)

Message: 89843   

 

the question is why not use boot-ecc all the time ?  the linux kernel should work just fine with it.

QuoteReplyEditDelete

 

 

2010-05-25 16:43:27     Re: Upgrade u-boot post install on the bf52x w/boot ECC

Reggy Perrin (UNITED STATES)

Message: 89844   

 

That actually would be great -- but I don't know the config setting to have linux switch modes.  Can you point me to documentation on changing that?

QuoteReplyEditDelete

 

 

2010-05-25 16:44:16     Re: Upgrade u-boot post install on the bf52x w/boot ECC

Reggy Perrin (UNITED STATES)

Message: 89845   

 

OK, Instead of "go 0x01000000", I had to issue "bootldr 0x01000000"  (flat-forehead....)

QuoteReplyEditDelete

 

 

2010-05-25 16:57:14     Re: Upgrade u-boot post install on the bf52x w/boot ECC

Mike Frysinger (UNITED STATES)

Message: 89846   

 

it depends ... if you loaded the ldr, then obviously you'd want 'bootldr'.  but if you loaded the bin, then you want 'go'.  typically we use the 'go' step as that works on all Blackfin parts.

QuoteReplyEditDelete

 

 

2010-05-25 16:58:04     Re: Upgrade u-boot post install on the bf52x w/boot ECC

Mike Frysinger (UNITED STATES)

Message: 89847   

 

it's just the one kernel config option:

http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:bf5xx_nand

Attachments

    Outcomes