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:






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?










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:





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.






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:





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:




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).




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


Message: 58221   




Load things with JTAG, and then use the netconsole.






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


Message: 58222   




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




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).






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.




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


Message: 58266   




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.