"boot_counter=sf probe; sf read $loadaddr 0xe0000 1; if itest.b *$loadaddr -eq 0; then run boot_count_good; elif itest.b *$loadaddr -eq 99; then run boot_count_bad; else run boot_count_inc; fi\0" \
"boot_count_inc=if itest.b *$loadaddr -eq 3; then mw.b $loadaddr 99; elif itest.b *$loadaddr -eq 2; then mw.b $loadaddr 3; elif itest.b *$loadaddr -eq 1; then mw.b $loadaddr 2; fi; sf update $loadaddr 0xe0000 1; run boot_count_good\0" \
"boot_count_bad=sf read $loadaddr 0xf0002 2; run boot_chk_kernel; run boot_chk_fs\0" \
"boot_count_good=sf read $loadaddr 0xf0000 2; run boot_chk_kernel; run boot_chk_fs\0" \
"mmc dev 1 1; run boot_counter; run loadimage; run loadfdt; run mmcboot;\0" \
"loadaddr_2=0x80800002\0" \
"loadaddr_3=0x80800003\0" \
"boot_counter=mmc read $loadaddr 0x7fe 1; if itest.b *$loadaddr -eq 0; then run boot_count_good; elif itest.b *$loadaddr -eq 99; then run boot_count_bad; else run boot_count_inc; fi\0" \
"boot_count_inc=if itest.b *$loadaddr -eq 3; then mw.b $loadaddr 99; elif itest.b *$loadaddr -eq 2; then mw.b $loadaddr 3; elif itest.b *$loadaddr -eq 1; then mw.b $loadaddr 2; fi; mmc write $loadaddr 0x7fe 1; run boot_count_good\0" \
"boot_count_bad=mmc read $loadaddr 0x7ff 1; run boot_chk_kernel_prev; run boot_chk_fs_prev\0" \
"boot_count_good=mmc read $loadaddr 0x7ff 1; run boot_chk_kernel; run boot_chk_fs\0" \
"boot_chk_kernel_prev=if itest.b *loadaddr_3 -eq 31; then setenv mmcpart ${alt_kernel_location}; fi;"
#else
#define CONFIG_BOOTCOMMAND \
"run boot_counter; run spiboot;"
"run boot_counter; run spiboot;\0" \
"boot_counter=sf probe; sf read $loadaddr 0xe0000 1; if itest.b *$loadaddr -eq 0; then run boot_count_good; elif itest.b *$loadaddr -eq 99; then run boot_count_bad; else run boot_count_inc; fi\0" \
"boot_count_inc=if itest.b *$loadaddr -eq 3; then mw.b $loadaddr 99; elif itest.b *$loadaddr -eq 2; then mw.b $loadaddr 3; elif itest.b *$loadaddr -eq 1; then mw.b $loadaddr 2; fi; sf update $loadaddr 0xe0000 1; run boot_count_good\0" \
"boot_count_bad=sf read $loadaddr 0xf0002 2; run boot_chk_kernel; run boot_chk_fs\0" \
"boot_count_good=sf read $loadaddr 0xf0000 2; run boot_chk_kernel; run boot_chk_fs\0" \