File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -464,10 +464,7 @@ static int RAMFUNCTION wolfBoot_update(int fallback_allowed)
464464 if (flag != SECT_FLAG_NEW &&
465465 wolfBoot_get_partition_state (PART_UPDATE , & st ) == 0 &&
466466 st == IMG_STATE_UPDATING ) {
467- if (cur_v == up_v ) {
468- inverse = 0 ;
469- }
470- else if (cur_v < up_v ) {
467+ if ((cur_v == 0 ) || (cur_v == up_v )) {
471468 inverse = 1 ;
472469 inverse_resume = 1 ;
473470 }
Original file line number Diff line number Diff line change @@ -38,8 +38,13 @@ if [ "x$V" != "x1" ]; then
3838fi
3939
4040if [ " x$V " != " x1" ]; then
41- echo " Failed fallback (V: $V )"
42- exit 1
41+ echo " Did not fallback (V: $V )"
42+ echo " Retrying get_version after reboot..."
43+ V=` ./wolfboot.elf get_version 2> /dev/null`
44+ if [ " x$V " != " x1" ]; then
45+ echo " Error: failed fallback (V: $V )"
46+ exit 1
47+ fi
4348fi
4449
4550echo Test successful.
You can’t perform that action at this time.
0 commit comments