public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Evans <tom@ceos.com.au>
To: u-boot@lists.denx.de
Subject: [U-Boot] U-Boot Scripting suggestions to decrement, counter in EEPROM.
Date: Wed, 04 Mar 2009 09:57:43 +1100	[thread overview]
Message-ID: <49ADB5E7.8060604@ceos.com.au> (raw)
In-Reply-To: <mailman.3.1236078002.3349.u-boot@lists.denx.de>

Jean-Christophe PLAGNIOL-VILLARD <plagnioj@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

       reply	other threads:[~2009-03-03 22:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.3.1236078002.3349.u-boot@lists.denx.de>
2009-03-03 22:57 ` Tom Evans [this message]
2009-03-05 23:57   ` [U-Boot] U-Boot Scripting suggestions to decrement, counter in EEPROM Wolfgang Denk
2009-03-04  0:19 ` [U-Boot] Alignment bug in itest on ARM & doesn't work on big-endian either? Tom Evans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49ADB5E7.8060604@ceos.com.au \
    --to=tom@ceos.com.au \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox