[U-Boot] U-Boot Scripting suggestions to decrement, counter in EEPROM.

Tom Evans tom at ceos.com.au
Tue Mar 3 23:57:43 CET 2009


Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com> wrote:
> On 17:40 Tue 03 Mar     , Tom Evans wrote:
>> I'm implementing a rather complex boot that involves flags
 >> and counters in EEPROM.
> 
> in which case do you need this?
> 
> update?

Yes, it is when updating the Linux Kernel and Sysroot images.

These are both duplicated. The "alternate" set is updated, then an 
"alternate boot" (a boot from the designated alternate set) is commanded 
with a count limit. If this expires the boot reverts to the original 
boot, otherwise the OS scripts switch "Alternate" and "Active" then 
update the other one. It is more complex involving two sets of counters 
and multiple run-levels etc.

> in u-boot you have better system that involve watchdog and bootcount

It is only currently supported on the PPC8260, requires spare words in a 
CPM SCC (or equivalent by writing bootcount_load() and bootcount_store() 
functions) and is too simplistic for what I need to do. It might work if 
the OS (after boot) could update the U-Boot Environment, but that's way 
too much linking (between Linux and U-Boot) and I don't have a writeable 
environment either.

I was hoping for a suggestion for reading memory locations into shell 
variables. It looks like I'll have to add one of these.

Thank you Jean-Christophe.

-- 
===
Tom Evans      Tom.Evans at ceos.com.au
CEOS Pty Ltd   www.ceos.com.au
3/17 Burgundy St, Heidelberg,
Victoria 3084, Australia


More information about the U-Boot mailing list