From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Evans Date: Wed, 04 Mar 2009 09:57:43 +1100 Subject: [U-Boot] U-Boot Scripting suggestions to decrement, counter in EEPROM. In-Reply-To: References: Message-ID: <49ADB5E7.8060604@ceos.com.au> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Jean-Christophe PLAGNIOL-VILLARD 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