summaryrefslogtreecommitdiff
path: root/recipes-images
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-09-05 11:40:44 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-10-03 18:24:20 +0200
commit94f55f144a135c35c7cdef4fb49441861bfee844 (patch)
treea252687081a95c32f0c4af326213655951e22034 /recipes-images
parenta8f4c2f46e8a84fa1252976bcd7b37bc472a6450 (diff)
flash_blk/eth.scr: fix check_configblock
The config block check aka check_configblock may fail during update depending on the size of the hardware area boot partition which may lead to the config block not getting properly migrated or updated if still using parts of the legacy update procedure. This patch fixes this by iterating over various sizes. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'recipes-images')
-rw-r--r--recipes-images/images/files/apalis-t30/apalis-t30_bin/flash_blk.scr5
-rw-r--r--recipes-images/images/files/apalis-t30/apalis-t30_bin/flash_eth.scr5
-rw-r--r--recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/flash_blk.scr5
-rw-r--r--recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/flash_eth.scr5
-rw-r--r--recipes-images/images/files/apalis-tk1/apalis-tk1_bin/flash_blk.scr5
-rw-r--r--recipes-images/images/files/apalis-tk1/apalis-tk1_bin/flash_eth.scr5
-rw-r--r--recipes-images/images/files/colibri-t30/colibri-t30_bin/flash_blk.scr5
-rw-r--r--recipes-images/images/files/colibri-t30/colibri-t30_bin/flash_eth.scr5
-rw-r--r--recipes-images/images/files/library/imx6/flash_blk.scr5
-rw-r--r--recipes-images/images/files/library/imx6/flash_eth.scr5
10 files changed, 10 insertions, 40 deletions
diff --git a/recipes-images/images/files/apalis-t30/apalis-t30_bin/flash_blk.scr b/recipes-images/images/files/apalis-t30/apalis-t30_bin/flash_blk.scr
index 71b73dc..ca51297 100644
--- a/recipes-images/images/files/apalis-t30/apalis-t30_bin/flash_blk.scr
+++ b/recipes-images/images/files/apalis-t30/apalis-t30_bin/flash_blk.scr
@@ -6,10 +6,7 @@ setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt
setenv incr_decimal 'setexpr filenum ${filenum} + 1; setexpr filenrlow1 ${filenum} % 0x100; setexpr filenrlow2 ${filenrlow1} % 0x10; test ${filenrlow1} -eq "9a" && test ${filenrlow2} -ne "9" && setexpr filenum ${filenum} + 0x66; test ${filenrlow1} -ne "9a" && test ${filenrlow2} -eq "a" && setexpr filenum ${filenum} + 0x6; true'
setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}'
-setenv check_1 'setenv conf_blk_offset 0x1fff; mmc read ${loadaddr} ${conf_blk_offset} 1'
-setenv check_2 'setenv conf_blk_offset 0xfff; mmc read ${loadaddr} ${conf_blk_offset} 1'
-setenv check_3 'setenv conf_blk_offset 0x7ff; mmc read ${loadaddr} ${conf_blk_offset} 1'
-setenv check_configblock 'setexpr toradex_oui_addr ${loadaddr} + 8; mmc dev 0 1; run check_1 || run check_2 || run check_3; crc32 -v ${toradex_oui_addr} 3 94305232'
+setenv check_configblock 'setexpr toradex_oui_addr ${loadaddr} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; for off in 7ff fff 1fff 3fff 7fff ffff 1ffff; do mmc read ${loadaddr} ${off} 1 && setenv conf_blk_offset $off; done; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3'
setenv migrate_1 'setexpr conf_blk_addr ${loadaddr} - 8; mmc dev 0 1; mmc read ${conf_blk_addr} 9 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc write ${loadaddr} ${conf_blk_offset} 1'
setenv migrate_2 'mmc dev 0 0; mmc read ${loadaddr} 6000 1; setenv conf_blk_offset 0x1fff; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${loadaddr} ${conf_blk_offset} 1'
diff --git a/recipes-images/images/files/apalis-t30/apalis-t30_bin/flash_eth.scr b/recipes-images/images/files/apalis-t30/apalis-t30_bin/flash_eth.scr
index 0b140f2..f6d5960 100644
--- a/recipes-images/images/files/apalis-t30/apalis-t30_bin/flash_eth.scr
+++ b/recipes-images/images/files/apalis-t30/apalis-t30_bin/flash_eth.scr
@@ -3,10 +3,7 @@ setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt
setenv incr_decimal 'setexpr filenum ${filenum} + 1; setexpr filenrlow1 ${filenum} % 0x100; setexpr filenrlow2 ${filenrlow1} % 0x10; test ${filenrlow1} -eq "9a" && test ${filenrlow2} -ne "9" && setexpr filenum ${filenum} + 0x66; test ${filenrlow1} -ne "9a" && test ${filenrlow2} -eq "a" && setexpr filenum ${filenum} + 0x6; true'
setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}'
-setenv check_1 'setenv conf_blk_offset 0x1fff; mmc read ${loadaddr} ${conf_blk_offset} 1'
-setenv check_2 'setenv conf_blk_offset 0xfff; mmc read ${loadaddr} ${conf_blk_offset} 1'
-setenv check_3 'setenv conf_blk_offset 0x7ff; mmc read ${loadaddr} ${conf_blk_offset} 1'
-setenv check_configblock 'setexpr toradex_oui_addr ${loadaddr} + 8; mmc dev 0 1; run check_1 || run check_2 || run check_3; crc32 -v ${toradex_oui_addr} 3 94305232'
+setenv check_configblock 'setexpr toradex_oui_addr ${loadaddr} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; for off in 7ff fff 1fff 3fff 7fff ffff 1ffff; do mmc read ${loadaddr} ${off} 1 && setenv conf_blk_offset $off; done; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3'
setenv migrate_1 'setexpr conf_blk_addr ${loadaddr} - 8; mmc dev 0 1; mmc read ${conf_blk_addr} 9 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc write ${loadaddr} ${conf_blk_offset} 1'
setenv migrate_2 'mmc dev 0 0; mmc read ${loadaddr} 6000 1; setenv conf_blk_offset 0x1fff; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${loadaddr} ${conf_blk_offset} 1'
diff --git a/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/flash_blk.scr b/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/flash_blk.scr
index 2aef05f..2f1d28d 100644
--- a/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/flash_blk.scr
+++ b/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/flash_blk.scr
@@ -6,10 +6,7 @@ setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt
setenv incr_decimal 'setexpr filenum ${filenum} + 1; setexpr filenrlow1 ${filenum} % 0x100; setexpr filenrlow2 ${filenrlow1} % 0x10; test ${filenrlow1} -eq "9a" && test ${filenrlow2} -ne "9" && setexpr filenum ${filenum} + 0x66; test ${filenrlow1} -ne "9a" && test ${filenrlow2} -eq "a" && setexpr filenum ${filenum} + 0x6; true'
setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}'
-setenv check_1 'setenv conf_blk_offset 0x1fff; mmc read ${loadaddr} ${conf_blk_offset} 1'
-setenv check_2 'setenv conf_blk_offset 0xfff; mmc read ${loadaddr} ${conf_blk_offset} 1'
-setenv check_3 'setenv conf_blk_offset 0x7ff; mmc read ${loadaddr} ${conf_blk_offset} 1'
-setenv check_configblock 'setexpr toradex_oui_addr ${loadaddr} + 8; mmc dev 0 1; run check_1 || run check_2 || run check_3; crc32 -v ${toradex_oui_addr} 3 94305232'
+setenv check_configblock 'setexpr toradex_oui_addr ${loadaddr} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; for off in 7ff fff 1fff 3fff 7fff ffff 1ffff; do mmc read ${loadaddr} ${off} 1 && setenv conf_blk_offset $off; done; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3'
setenv cp_file_chunk 'load ${interface} ${drive}:1 ${loadaddr} ${board_name}/root.ext4-${filenum} || setenv filesize 0; run set_blkcnt; mmc dev 0 0 && mmc write ${loadaddr} ${blkstart} ${blkcnt}'
diff --git a/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/flash_eth.scr b/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/flash_eth.scr
index 27bab62..82e2015 100644
--- a/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/flash_eth.scr
+++ b/recipes-images/images/files/apalis-tk1-mainline/apalis-tk1-mainline_bin/flash_eth.scr
@@ -3,10 +3,7 @@ setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt
setenv incr_decimal 'setexpr filenum ${filenum} + 1; setexpr filenrlow1 ${filenum} % 0x100; setexpr filenrlow2 ${filenrlow1} % 0x10; test ${filenrlow1} -eq "9a" && test ${filenrlow2} -ne "9" && setexpr filenum ${filenum} + 0x66; test ${filenrlow1} -ne "9a" && test ${filenrlow2} -eq "a" && setexpr filenum ${filenum} + 0x6; true'
setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}'
-setenv check_1 'setenv conf_blk_offset 0x1fff; mmc read ${loadaddr} ${conf_blk_offset} 1'
-setenv check_2 'setenv conf_blk_offset 0xfff; mmc read ${loadaddr} ${conf_blk_offset} 1'
-setenv check_3 'setenv conf_blk_offset 0x7ff; mmc read ${loadaddr} ${conf_blk_offset} 1'
-setenv check_configblock 'setexpr toradex_oui_addr ${loadaddr} + 8; mmc dev 0 1; run check_1 || run check_2 || run check_3; crc32 -v ${toradex_oui_addr} 3 94305232'
+setenv check_configblock 'setexpr toradex_oui_addr ${loadaddr} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; for off in 7ff fff 1fff 3fff 7fff ffff 1ffff; do mmc read ${loadaddr} ${off} 1 && setenv conf_blk_offset $off; done; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3'
setenv cp_file_chunk 'tftpboot ${loadaddr} ${board_name}/root.ext4-${filenum} || setenv filesize 0; run set_blkcnt; mmc dev 0 0 && mmc write ${loadaddr} ${blkstart} ${blkcnt}'
diff --git a/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/flash_blk.scr b/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/flash_blk.scr
index 2aef05f..2f1d28d 100644
--- a/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/flash_blk.scr
+++ b/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/flash_blk.scr
@@ -6,10 +6,7 @@ setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt
setenv incr_decimal 'setexpr filenum ${filenum} + 1; setexpr filenrlow1 ${filenum} % 0x100; setexpr filenrlow2 ${filenrlow1} % 0x10; test ${filenrlow1} -eq "9a" && test ${filenrlow2} -ne "9" && setexpr filenum ${filenum} + 0x66; test ${filenrlow1} -ne "9a" && test ${filenrlow2} -eq "a" && setexpr filenum ${filenum} + 0x6; true'
setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}'
-setenv check_1 'setenv conf_blk_offset 0x1fff; mmc read ${loadaddr} ${conf_blk_offset} 1'
-setenv check_2 'setenv conf_blk_offset 0xfff; mmc read ${loadaddr} ${conf_blk_offset} 1'
-setenv check_3 'setenv conf_blk_offset 0x7ff; mmc read ${loadaddr} ${conf_blk_offset} 1'
-setenv check_configblock 'setexpr toradex_oui_addr ${loadaddr} + 8; mmc dev 0 1; run check_1 || run check_2 || run check_3; crc32 -v ${toradex_oui_addr} 3 94305232'
+setenv check_configblock 'setexpr toradex_oui_addr ${loadaddr} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; for off in 7ff fff 1fff 3fff 7fff ffff 1ffff; do mmc read ${loadaddr} ${off} 1 && setenv conf_blk_offset $off; done; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3'
setenv cp_file_chunk 'load ${interface} ${drive}:1 ${loadaddr} ${board_name}/root.ext4-${filenum} || setenv filesize 0; run set_blkcnt; mmc dev 0 0 && mmc write ${loadaddr} ${blkstart} ${blkcnt}'
diff --git a/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/flash_eth.scr b/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/flash_eth.scr
index 27bab62..82e2015 100644
--- a/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/flash_eth.scr
+++ b/recipes-images/images/files/apalis-tk1/apalis-tk1_bin/flash_eth.scr
@@ -3,10 +3,7 @@ setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt
setenv incr_decimal 'setexpr filenum ${filenum} + 1; setexpr filenrlow1 ${filenum} % 0x100; setexpr filenrlow2 ${filenrlow1} % 0x10; test ${filenrlow1} -eq "9a" && test ${filenrlow2} -ne "9" && setexpr filenum ${filenum} + 0x66; test ${filenrlow1} -ne "9a" && test ${filenrlow2} -eq "a" && setexpr filenum ${filenum} + 0x6; true'
setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}'
-setenv check_1 'setenv conf_blk_offset 0x1fff; mmc read ${loadaddr} ${conf_blk_offset} 1'
-setenv check_2 'setenv conf_blk_offset 0xfff; mmc read ${loadaddr} ${conf_blk_offset} 1'
-setenv check_3 'setenv conf_blk_offset 0x7ff; mmc read ${loadaddr} ${conf_blk_offset} 1'
-setenv check_configblock 'setexpr toradex_oui_addr ${loadaddr} + 8; mmc dev 0 1; run check_1 || run check_2 || run check_3; crc32 -v ${toradex_oui_addr} 3 94305232'
+setenv check_configblock 'setexpr toradex_oui_addr ${loadaddr} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; for off in 7ff fff 1fff 3fff 7fff ffff 1ffff; do mmc read ${loadaddr} ${off} 1 && setenv conf_blk_offset $off; done; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3'
setenv cp_file_chunk 'tftpboot ${loadaddr} ${board_name}/root.ext4-${filenum} || setenv filesize 0; run set_blkcnt; mmc dev 0 0 && mmc write ${loadaddr} ${blkstart} ${blkcnt}'
diff --git a/recipes-images/images/files/colibri-t30/colibri-t30_bin/flash_blk.scr b/recipes-images/images/files/colibri-t30/colibri-t30_bin/flash_blk.scr
index a300b66..71c68d4 100644
--- a/recipes-images/images/files/colibri-t30/colibri-t30_bin/flash_blk.scr
+++ b/recipes-images/images/files/colibri-t30/colibri-t30_bin/flash_blk.scr
@@ -6,10 +6,7 @@ setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt
setenv incr_decimal 'setexpr filenum ${filenum} + 1; setexpr filenrlow1 ${filenum} % 0x100; setexpr filenrlow2 ${filenrlow1} % 0x10; test ${filenrlow1} -eq "9a" && test ${filenrlow2} -ne "9" && setexpr filenum ${filenum} + 0x66; test ${filenrlow1} -ne "9a" && test ${filenrlow2} -eq "a" && setexpr filenum ${filenum} + 0x6; true'
setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}'
-setenv check_1 'setenv conf_blk_offset 0x1fff; mmc read ${loadaddr} ${conf_blk_offset} 1'
-setenv check_2 'setenv conf_blk_offset 0xfff; mmc read ${loadaddr} ${conf_blk_offset} 1'
-setenv check_3 'setenv conf_blk_offset 0x7ff; mmc read ${loadaddr} ${conf_blk_offset} 1'
-setenv check_configblock 'setexpr toradex_oui_addr ${loadaddr} + 8; mmc dev 0 1; run check_1 || run check_2 || run check_3; crc32 -v ${toradex_oui_addr} 3 94305232'
+setenv check_configblock 'setexpr toradex_oui_addr ${loadaddr} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; for off in 7ff fff 1fff 3fff 7fff ffff 1ffff; do mmc read ${loadaddr} ${off} 1 && setenv conf_blk_offset $off; done; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3'
setenv migrate_1 'setexpr conf_blk_addr ${loadaddr} - 8; mmc dev 0 1; mmc read ${conf_blk_addr} 9 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc write ${loadaddr} ${conf_blk_offset} 1'
setenv migrate_2 'mmc dev 0 0; mmc read ${loadaddr} 6000 1; setenv conf_blk_offset 0x1fff; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${loadaddr} ${conf_blk_offset} 1'
diff --git a/recipes-images/images/files/colibri-t30/colibri-t30_bin/flash_eth.scr b/recipes-images/images/files/colibri-t30/colibri-t30_bin/flash_eth.scr
index d210397..d8c3513 100644
--- a/recipes-images/images/files/colibri-t30/colibri-t30_bin/flash_eth.scr
+++ b/recipes-images/images/files/colibri-t30/colibri-t30_bin/flash_eth.scr
@@ -3,10 +3,7 @@ setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt
setenv incr_decimal 'setexpr filenum ${filenum} + 1; setexpr filenrlow1 ${filenum} % 0x100; setexpr filenrlow2 ${filenrlow1} % 0x10; test ${filenrlow1} -eq "9a" && test ${filenrlow2} -ne "9" && setexpr filenum ${filenum} + 0x66; test ${filenrlow1} -ne "9a" && test ${filenrlow2} -eq "a" && setexpr filenum ${filenum} + 0x6; true'
setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}'
-setenv check_1 'setenv conf_blk_offset 0x1fff; mmc read ${loadaddr} ${conf_blk_offset} 1'
-setenv check_2 'setenv conf_blk_offset 0xfff; mmc read ${loadaddr} ${conf_blk_offset} 1'
-setenv check_3 'setenv conf_blk_offset 0x7ff; mmc read ${loadaddr} ${conf_blk_offset} 1'
-setenv check_configblock 'setexpr toradex_oui_addr ${loadaddr} + 8; mmc dev 0 1; run check_1 || run check_2 || run check_3; crc32 -v ${toradex_oui_addr} 3 94305232'
+setenv check_configblock 'setexpr toradex_oui_addr ${loadaddr} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; for off in 7ff fff 1fff 3fff 7fff ffff 1ffff; do mmc read ${loadaddr} ${off} 1 && setenv conf_blk_offset $off; done; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3'
setenv migrate_1 'setexpr conf_blk_addr ${loadaddr} - 8; mmc dev 0 1; mmc read ${conf_blk_addr} 9 1; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc write ${loadaddr} ${conf_blk_offset} 1'
setenv migrate_2 'mmc dev 0 0; mmc read ${loadaddr} 6000 1; setenv conf_blk_offset 0x1fff; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${loadaddr} ${conf_blk_offset} 1'
diff --git a/recipes-images/images/files/library/imx6/flash_blk.scr b/recipes-images/images/files/library/imx6/flash_blk.scr
index 6df7797..9b27111 100644
--- a/recipes-images/images/files/library/imx6/flash_blk.scr
+++ b/recipes-images/images/files/library/imx6/flash_blk.scr
@@ -7,10 +7,7 @@ setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt
setenv incr_decimal 'setexpr filenum ${filenum} + 1; setexpr filenrlow1 ${filenum} % 0x100; setexpr filenrlow2 ${filenrlow1} % 0x10; test ${filenrlow1} -eq "9a" && test ${filenrlow2} -ne "9" && setexpr filenum ${filenum} + 0x66; test ${filenrlow1} -ne "9a" && test ${filenrlow2} -eq "a" && setexpr filenum ${filenum} + 0x6; true'
setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}'
-setenv check_1 'setenv conf_blk_offset 0x1fff; mmc read ${loadaddr} ${conf_blk_offset} 1'
-setenv check_2 'setenv conf_blk_offset 0xfff; mmc read ${loadaddr} ${conf_blk_offset} 1'
-setenv check_3 'setenv conf_blk_offset 0x7ff; mmc read ${loadaddr} ${conf_blk_offset} 1'
-setenv check_configblock 'setexpr toradex_oui_addr ${loadaddr} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; run check_1 || run check_2 || run check_3; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3'
+setenv check_configblock 'setexpr toradex_oui_addr ${loadaddr} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; for off in 7ff fff 1fff 3fff 7fff ffff 1ffff; do mmc read ${loadaddr} ${off} 1 && setenv conf_blk_offset $off; done; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3'
setenv migrate_configblock 'run check_configblock; mmc dev 0 0 && mmc read ${loadaddr} 0x500 1 && cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3 && mmc dev 0 1 && mmc write ${loadaddr} ${conf_blk_offset} 1'
diff --git a/recipes-images/images/files/library/imx6/flash_eth.scr b/recipes-images/images/files/library/imx6/flash_eth.scr
index 75ee572..d56f39a 100644
--- a/recipes-images/images/files/library/imx6/flash_eth.scr
+++ b/recipes-images/images/files/library/imx6/flash_eth.scr
@@ -5,10 +5,7 @@ setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt
setenv incr_decimal 'setexpr filenum ${filenum} + 1; setexpr filenrlow1 ${filenum} % 0x100; setexpr filenrlow2 ${filenrlow1} % 0x10; test ${filenrlow1} -eq "9a" && test ${filenrlow2} -ne "9" && setexpr filenum ${filenum} + 0x66; test ${filenrlow1} -ne "9a" && test ${filenrlow2} -eq "a" && setexpr filenum ${filenum} + 0x6; true'
setenv set_nextnum 'run incr_decimal; setexpr blkstart ${blkstart} + ${blkcnt}'
-setenv check_1 'setenv conf_blk_offset 0x1fff; mmc read ${loadaddr} ${conf_blk_offset} 1'
-setenv check_2 'setenv conf_blk_offset 0xfff; mmc read ${loadaddr} ${conf_blk_offset} 1'
-setenv check_3 'setenv conf_blk_offset 0x7ff; mmc read ${loadaddr} ${conf_blk_offset} 1'
-setenv check_configblock 'setexpr toradex_oui_addr ${loadaddr} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; run check_1 || run check_2 || run check_3; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3'
+setenv check_configblock 'setexpr toradex_oui_addr ${loadaddr} + 8; mw.l ${kernel_addr_r} 0x002d1400; mmc dev 0 1; for off in 7ff fff 1fff 3fff 7fff ffff 1ffff; do mmc read ${loadaddr} ${off} 1 && setenv conf_blk_offset $off; done; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3'
setenv migrate_configblock 'run check_configblock; mmc dev 0 0 && mmc read ${loadaddr} 0x500 1 && cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3 && mmc dev 0 1 && mmc write ${loadaddr} ${conf_blk_offset} 1'