[Openec] fail-safe startup code?

Richard A. Smith richard at laptop.org
Fri Aug 3 12:49:39 EDT 2007


Frieder Ferlemann wrote:

> the openec repository now has a first go at this kind of routine at:
> http://dev.laptop.org/git.do?p=projects/openec;a=blob;f=main.c;hb=c6492dfd4ab6eae7b9d4c58750ea43b26a4a9e46

I'll point out that the minimum erase size of the SPI flash is 64k and 
we don't have any boot block protection so every time you update the EC 
code you have to erase all of it.

Thus this will never be 100% safe. If you fail a flash you are stuck

But I really like the idea.  Right now openfirmware depends on the EC 
responding to the 6c/68 commands.  I've gacked up my XO a couple of 
times by screwing up the 6c protocol.  I so far I've been able to use 
the 'i' to interact and patch out the 6c stuff.  This let me get OFW up 
to a point where I could use the 'flash' command.

We could use some sort of RAM location or unused register to indicate 
that the EC is in failsafe mode and open firmware can only do a minimum 
init to get the serial port up and USB. So that you could use the 
'flash' command to recover.

Then the XO would only be bricked by a failed or corrupted flash.

-- 
Richard Smith  <richard at laptop.org>
One Laptop Per Child


More information about the Openec mailing list