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

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.

Dear Tom Evans,
In message 49ADB5E7.8060604@ceos.com.au you wrote:
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
This is not correct. It is at least supported on 8xx, 8260 and 5200, and easy to add to other processors.
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.
And you think a writable EEPROM is a reliable way to store data? I say only this: Good luck!
Best regards,
Wolfgang Denk
participants (2)
-
Tom Evans
-
Wolfgang Denk