From 3566ec49fd64bc7ffff03e0cb1a8c44d65ed0c89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=B6hmke?= Date: Thu, 30 Jan 2020 22:17:35 +0100 Subject: [PATCH] fixed partition switch --- resources/boot.cmd | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/resources/boot.cmd b/resources/boot.cmd index 37b4004..db36296 100644 --- a/resources/boot.cmd +++ b/resources/boot.cmd @@ -30,8 +30,14 @@ if itest *0x103FC -ne *0x10400; then mw.b ${addr_boot_partition} ${boot_partition_a} fi +setexpr.b boot_counter *${addr_boot_counter} +setexpr.b boot_partition *${addr_boot_partition} +echo "> boot counter: ${boot_counter}" +echo "> boot partition: ${boot_partition}" + # ensure boot partition is valid -if itest.b *${addr_boot_partition} -ne ${boot_partition_a} && test.b *${addr_boot_partition} -ne ${boot_partition_b}; then +if itest.b *${addr_boot_partition} -ne ${boot_partition_a} && itest.b *${addr_boot_partition} -ne ${boot_partition_b}; then + echo "switched to valid partition -> A" mw.b ${addr_boot_partition} ${boot_partition_a} fi