[U-Boot] boot count feature with eMMC booting

Tom Rini trini at ti.com
Mon Sep 15 15:59:35 CEST 2014


On Fri, Sep 12, 2014 at 02:52:05PM +0530, jags gediya wrote:

> I want to implement fail-safe booting feature in my project. Basically
> my logic is, i will increase any u-boot environment variable each time
> and up on successful bring up, i want to decrease the value of that
> again. If the value of u-boot environment variable is more than 5, it
> will boot from the other image. As i am using the eMMC for booting, i
> am not getting how i will access the u-boot environment variable from
> the linux application. I also dont know whether i can save the
> environment variable in the eMMC or not? What mechanism i should use
> to achieve this feature. I have read about the fw_printenv and
> fw_savenv, but from where this utility will access the variable.

Yes, this is possible using some combination of the existing bootcount
driver, CONFIG_BOOTCOUNT_LIMIT and altbootcmd.  You'll also want a
driver in Linux to clear the count so you know when you have
successfully booted up.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140915/687fb019/attachment.pgp>


More information about the U-Boot mailing list