Please sign in to comment.
u-boot: Add support to boot previous rootfs if rolling back
This patch adds a simple check in env_resin.h. If bootcount is found to be greater than bootlimit, switch the partitions. Both bootcount and bootlimit are standard u-boot env variables. To enable rollback in devices, devices have to do the following in their u-boot Enable CONFIG_CMD_SETEXPR, CONFIG_BOOTCOUNT_LIMIT and depending on the device, save the bootcount in some persistant location whether that is an area in the SoC or an ext partition etc. If you are using the CONFIG_BOOTCOUNT_EXT driver, use only the boot partition and use the filename "bootcount.env" E.g. for rpi3 CONFIG_CMD_SETEXPR=y CONFIG_BOOTCOUNT_LIMIT=y CONFIG_SYS_BOOTCOUNT_ADDR=0x02300000 CONFIG_BOOTCOUNT_EXT=y CONFIG_SYS_BOOTCOUNT_EXT_DEVPART=0:1 CONFIG_SYS_BOOTCOUNT_EXT_NAME="bootcount.env" Change-type: minor Changelog-entry: Add Automated Rollback support in u-boot env_resin.h Signed-off-by: Zubair Lutfullah Kakakhel <firstname.lastname@example.org>
- Loading branch information...
Showing with 15 additions and 0 deletions.