2008-07-01 14:17:28     loading u-boot to SPI flash

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

2008-07-01 14:17:28     loading u-boot to SPI flash

Kyle Schlansker (UNITED STATES)

Message: 58163   

 

We're finishing up schematics for a custom board that uses the bf548 and we're running out of UARTS so I'm trying to find an alternative to bootstrapping u-boot via a UART.

 

We're planning on using SPI flash.  Will we be able to flash u-boot to the SPI flash using JTAG?  The comments here give me pause:

 

https://blackfin.uclinux.org/gf/project/u-boot/forum/?action=ForumBrowse&forum_id=51&_forum_action=ForumMessageBrowse&thread_id=27604

 

 

 

If not, is there any other way to flash u-boot to SPI flash other than via a UART?  Finally, does the existing UART boot method require a UART with hardware flow control?

 

 

 

Thanks!

 

 

QuoteReplyEditDelete

 

 

2008-07-01 14:34:26     Re: loading u-boot to SPI flash

Mike Frysinger (UNITED STATES)

Message: 58164   

 

no Blackfin has required hardware flow control support to boot via the UART ... it's always been optional

 

the statement you refer to is still true (after all, that comment was made less than a month ago) ... urjtag will get SPI flash support at some point, but it doesnt have it today

 

if you dont have a UART available for u-boot, then what are you going to use for a console ?

 

you can use JTAG to just load u-boot up into external memory.  read this page:

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

QuoteReplyEditDelete

 

 

2008-07-01 15:02:43     Re: loading u-boot to SPI flash

Kyle Schlansker (UNITED STATES)

Message: 58165   

 

I incorrectly assumed that both a console and boot via UART required hardware flow control, which I need for my RS485 port and for a bluetooth chip.  I was going to somehow try and make the RS485 port my console, but hearing that no hardware flow control is needed makes my life easier.

 

Theoretically I could use JTAG to load u-boot into memory, and then use the u-boot serial flash driver to write itself to flash right?  I guess that's another way to go if I don't have a console.

 

 

 

How much effort, and what's involved, in getting urjtag to support SPI flash?  If it's not too much, then I could take a look at adding support myself.

 

 

 

Thanks for your help Mike.

 

 

QuoteReplyEditDelete

 

 

2008-07-01 15:37:08     Re: loading u-boot to SPI flash

Mike Frysinger (UNITED STATES)

Message: 58166   

 

well, if you dont have a UART console, it's pretty hard to interact with u-boot at all and tell it to program the serial flash.  but that would be the method ... make u-boot your flash programmer.

 

an old patch for spi flash was posted, but i dont know how cleanly it'll apply to current sources and whether it even works:

http://blackfin.uclinux.org/gf/tracker/4039

QuoteReplyEditDelete

 

 

2008-07-02 01:20:29     Re: loading u-boot to SPI flash

Frank Van Hooft (CANADA)

Message: 58175   

 

Kyle, we've been looking at doing the same thing for our next boards. Take a look at this thread regarding urjtag download speeds:

 

https://blackfin.uclinux.org/gf/project/toolchain/forum/?action=ForumBrowse&forum_id=44&_forum_action=ForumMessageBrowse&thread_id=28189

 

Also, choose your serial flash carefully. Specifically, be careful with the Atmel Dataflash, because the standard products come from the factory with non-power-of-two default pagesizes, which the blackfin cannot boot from (unless the flash is reprogrammed to a power-of-two pagesize before use).

QuoteReplyEditDelete

 

 

2008-07-02 08:43:26     Re: loading u-boot to SPI flash

Robin Getz (UNITED STATES)

Message: 58221   

 

Mike:

 

Load things with JTAG, and then use the netconsole.

 

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

QuoteReplyEditDelete

 

 

2008-07-02 08:44:37     Re: loading u-boot to SPI flash

Robin Getz (UNITED STATES)

Message: 58222   

 

Kyle:

 

Mike and I have been playing with U-Boot console over JTAG - as a proof of concept of this:

 

https://docs.blackfin.uclinux.org/doku.php?id=bfin:jtag:comm

 

This should allow you (as Mike indicated you can do today) to load U-Boot over JTAG - and then interact with it (console I/O) over JTAG (today's U-Boot console solutions are serial(UART) and ethernet).

 

The proof of concept is done (and we know enough to say it can be done, and write all the documnetation), but there is still some implmentation details to be finished, and we don't have a specific schedule of when it will be committed into svn trunk - I am just checking to see if you think that would help solve your issues? (and if that does sound like a good thing - when you need it - although we can't make any commitments).

 

-Robin

QuoteReplyEditDelete

 

 

2008-07-02 10:54:51     Re: loading u-boot to SPI flash

Kyle Schlansker (UNITED STATES)

Message: 58225   

 

Thank you all for the great info and links.  I plan on testing out the JTAG/uboot/console to use for our final board which is schedule for early August.  For the first rev (development board) I'm going to simply use UART0 to bootstrap the board...it will be nice to have a console to debug the first rev board

 

Frank: Thanks for the heads up on the flash; that's definitely something I would have missed.

 

Robin: I'm working on 2008R1-RC8 right now, but I could change to use the trunk if you think that would be the best way to test out the jtag console proof of concept.

QuoteReplyEditDelete

 

 

2008-07-03 08:08:17     Re: loading u-boot to SPI flash

Robin Getz (UNITED STATES)

Message: 58266   

 

Kyle:

 

I don't know if it we will have everything complete by end of the month (most likely not) - since it involved so many pieces of many different places (U-Boot driver, gdbproxy, kernel driver, gdb) - which requires many different people's time...

 

If you can stick with UART0 for the first version - it might be the best.

 

I'll keep you posted.

Attachments

    Outcomes