VoltServer / uboot-bootcount

Read and reset the u-boot 'bootcount' register on various ARM platforms
GNU General Public License v3.0
2 stars 5 forks source link

Force `altbootcmd` by setting a very high value #1

Closed thom-nic closed 6 years ago

thom-nic commented 6 years ago

We can reset to 0 by calling bootcount -r but if we want to force "recovery mode" (e.g. altbootcmd) we could set bootcount=0xFFFF ?

Usage:

bootcount -f        Set bootcount to 0xFFFF to force altbootcmd to run

Need to verify, if bootcount is incremented first (e.g. always at least 1) we don't want it to roll over to 0. However we can use this to force it to rollover back to 0 after booting into recovery. Meaning, altbootcmd will run once, then a subsequent reboot will rollover the value to 0, and boot normally the next time.

thom-nic commented 6 years ago

Fixed in 657b244c