[Trac #185] Need better SPI FLASH recovery procedure

Zarro Boogs per Child bugtracker at laptop.org
Fri Oct 13 04:26:07 EDT 2006


#185: Need better SPI FLASH recovery procedure
-------------------------------+--------------------------------------------
 Reporter:  wmb at firmworks.com  |       Owner:  wmb at firmworks.com
     Type:  task               |      Status:  new              
 Priority:  high               |   Milestone:  BTest-1          
Component:  linuxbios          |    Keywords:                   
-------------------------------+--------------------------------------------
 If you brick a B-test board by writing bad data to the SPI FLASH, the
 recovery procedure is painful, involving figuring out how to boot DOS,
 then running a DOS program that takes a long time (the Quanta HW engineer
 says from 15 minutes to an hour).  A better approach would be useful.

 I think I know how to do it faster, without using DOS.

 I now have a Forth program that talks the EC serial recovery protocol.
 I'm currently running it on another OLPC board, but it can also be booted
 on a PC from a LiveCD or USB key.  I have verified it by reading out the
 SPI FLASH contents on an A-test board.

 I am pretty sure that the DOS program does extra work that can be avoided.
 With the procedure that is documented in the EC recovery spec, it takes
 10+ minutes to read out the entire 1 MiB FLASH.  But I can do it in 2/3
 that time by avoiding some unnecessary steps, and I get the same data
 back.  Thus I think the time can be cut down to about 7 minutes.  But with
 the Open Firmware payload, only half of the FLASH is used, so the time
 would be just over 3 minutes.  And if we wanted to go even faster, we
 could make a custom payload that just has the reflash code plus a serial
 downloader.  That would get it down to about a minute, plus the time it
 takes for the serial downloader to do the rest (about half a minute).

 If we needed to, we could go even faster.  The serial line speed
 limitation is not in the EC, but rather in the host PC, whose baud rate
 tops out at 115200.  I have a couple of little tester boxes that I build
 in my previous job that can run a serial line at 500K.  They run Forth, so
 the code I have written so far would "just work" on them.

-- 
Ticket URL: <http://dev.laptop.org/ticket/185>
One Laptop Per Child <http://laptop.org/>



More information about the Devel mailing list