summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.oss.09@gmail.com>2015-11-05 11:21:47 +0100
committerMax Krummenacher <max.oss.09@gmail.com>2015-11-05 13:32:27 +0100
commit47acc76882cad9d2faceb950c7aeee5b05ce3e0f (patch)
treec16465f01757747cd80ac57cf0eb555a803495dc
parent80c24f583985cc09185e1cc42c60c39c67a2877b (diff)
Apalis/Colibri iMX6: fix and unify update scripts
Don't write the eMMC twice on Apalis in the not migrate case.
-rw-r--r--recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_blk.scr2
-rw-r--r--recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_eth.scr2
-rw-r--r--recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_blk.scr14
-rw-r--r--recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_eth.scr14
4 files changed, 16 insertions, 16 deletions
diff --git a/recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_blk.scr b/recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_blk.scr
index 3643428..e8e6fa9 100644
--- a/recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_blk.scr
+++ b/recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_blk.scr
@@ -26,7 +26,7 @@ setenv update_configblock 'run check_configblock; load ${interface} ${drive}:1 $
setenv update_1 'load ${interface} ${drive}:1 ${loadaddr} ${board_name}/mbr.bin && mmc dev 0 0 && mmc write ${loadaddr} 0x0 0x1'
setenv update_2 'load ${interface} ${drive}:1 ${loadaddr} ${board_name}/boot.vfat && run set_blkcnt && mmc dev 0 0 && mmc write ${loadaddr} 0x2000 ${blkcnt}'
#do it in chunks of 64M to fit into DDR RAM of the smallest module
-setenv update_3 'setenv filesize 4000000; setenv filepos 0; setenv blkstart a000; while test ${filesize} -eq "4000000"; do run cp_file_chunk; run set_nextpos; done'
+setenv update_3 'setenv filesize 4000000; setenv filepos 0; setenv blkstart a000; while test ${filesize} -eq "4000000"; do run cp_file_chunk; run set_nextpos; done; true'
setenv echo_v2.4b1 echo "successfully updated U-Boot, power-cycle and enter \"run setupdate\; run migrate_v2.4b1\" to complete update"
setenv echo_v2.4b1-it echo "successfully updated U-Boot, power-cycle and enter \"run setupdate\; run migrate_v2.4b1_it\" to complete update"
diff --git a/recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_eth.scr b/recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_eth.scr
index f812460..02f6a5b 100644
--- a/recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_eth.scr
+++ b/recipes/images/files/apalis-imx6/apalis-imx6_bin/flash_eth.scr
@@ -25,7 +25,7 @@ setenv update_2 'tftpboot ${loadaddr} ${board_name}/boot.vfat && run set_blkcnt
#do it in chunks of 64M to fit into DDR RAM of the smallest module
#split root.ext3 into multiple 64M chunks before copying to TFTP folder as follows
#split -a 2 -b `expr 64 \* 1024 \* 1024` --numeric-suffixes=10 root.ext3 root.ext3-
-setenv update_3 'setenv filesize 4000000; setenv filenum 10; setenv blkstart a000; while test ${filesize} -eq "4000000"; do run cp_file_chunk; run set_nextnum; done'
+setenv update_3 'setenv filesize 4000000; setenv filenum 10; setenv blkstart a000; while test ${filesize} -eq "4000000"; do run cp_file_chunk; run set_nextnum; done; true'
setenv echo_v2.4b1 echo "successfully updated U-Boot, power-cycle and enter \"run setupdate\; run migrate_v2.4b1\" to complete update"
setenv echo_v2.4b1-it echo "successfully updated U-Boot, power-cycle and enter \"run setupdate\; run migrate_v2.4b1_it\" to complete update"
diff --git a/recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_blk.scr b/recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_blk.scr
index 6985da4..474cab8 100644
--- a/recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_blk.scr
+++ b/recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_blk.scr
@@ -7,9 +7,9 @@ setenv set_nextpos 'setexpr filepos ${filepos} + ${filesize}; setexpr blkstart $
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; run check_1 || run check_2 || run check_3; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3'
-setenv migrate_configblock 'setexpr toradex_oui_addr ${loadaddr} + 8; mmc dev 0 1; run check_1 || run check_2 || run check_3; mmc dev 0 0 && mmc read ${loadaddr} 0x500 1 && crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${loadaddr} ${conf_blk_offset} 1'
+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'
setenv migrate_uboot 'load ${interface} ${drive}:1 ${loadaddr} ${board_name}/u-boot.imx && run set_blkcnt && mmc dev 0 0 && mmc write ${loadaddr} 2 ${blkcnt}; patch_ddr_size'
@@ -26,13 +26,13 @@ setenv update_configblock 'run check_configblock; load ${interface} ${drive}:1 $
setenv update_1 'load ${interface} ${drive}:1 ${loadaddr} ${board_name}/mbr.bin && mmc dev 0 0 && mmc write ${loadaddr} 0x0 0x1'
setenv update_2 'load ${interface} ${drive}:1 ${loadaddr} ${board_name}/boot.vfat && run set_blkcnt && mmc dev 0 0 && mmc write ${loadaddr} 0x2000 ${blkcnt}'
#do it in chunks of 64M to fit into DDR RAM of the smallest module
-setenv update_3 'setenv filesize 4000000; setenv filepos 0; setenv blkstart a000; while test ${filesize} -eq "4000000"; do run cp_file_chunk; run set_nextpos; done'
+setenv update_3 'setenv filesize 4000000; setenv filepos 0; setenv blkstart a000; while test ${filesize} -eq "4000000"; do run cp_file_chunk; run set_nextpos; done; true'
setenv echo_v2.4b1 echo "successfully updated U-Boot, power-cycle and enter \"run setupdate\; run migrate_v2.4b1\" to complete update"
-setenv migrate_v2.4b1 'run migrate_configblock; run update_new'
-setenv update_v2.4b1 'run migrate_uboot && run echo_v2.4b1'
+setenv migrate_v2.4b1 'run migrate_configblock; run update_new; reset'
+setenv update_v2.4b1 'run check_configblock || run migrate_configblock; run migrate_uboot && run echo_v2.4b1'
-setenv update_new 'run check_configblock || run migrate_configblock; run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_3; reset'
-setenv update 'mmc bootbus 0 2 1 2 && run update_new; run update_v2.4b1'
+setenv update_new 'run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_3'
+setenv update 'mmc bootbus 0 2 1 2 && run update_new && reset; run update_v2.4b1'
echo 'enter "run update" to update the entire module'
diff --git a/recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_eth.scr b/recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_eth.scr
index b8d96d7..dee536b 100644
--- a/recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_eth.scr
+++ b/recipes/images/files/colibri-imx6/colibri-imx6_bin/flash_eth.scr
@@ -4,9 +4,9 @@ setenv set_nextnum 'setexpr filenum ${filenum} + 1; setexpr blkstart ${blkstart}
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; run check_1 || run check_2 || run check_3; cmp.b ${kernel_addr_r} ${toradex_oui_addr} 3'
-setenv migrate_configblock 'setexpr toradex_oui_addr ${loadaddr} + 8; mmc dev 0 1; run check_1 || run check_2 || run check_3; mmc dev 0 0 && mmc read ${loadaddr} 0x500 1 && crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${loadaddr} ${conf_blk_offset} 1'
+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'
setenv migrate_uboot 'tftpboot ${loadaddr} ${board_name}/u-boot.imx && run set_blkcnt && mmc dev 0 0 && mmc write ${loadaddr} 2 ${blkcnt}; patch_ddr_size'
@@ -25,13 +25,13 @@ setenv update_2 'tftpboot ${loadaddr} ${board_name}/boot.vfat && run set_blkcnt
#do it in chunks of 64M to fit into DDR RAM of the smallest module
#split root.ext3 into multiple 64M chunks before copying to TFTP folder as follows
#split -a 2 -b `expr 64 \* 1024 \* 1024` --numeric-suffixes=10 root.ext3 root.ext3-
-setenv update_3 'setenv filesize 4000000; setenv filenum 10; setenv blkstart a000; while test ${filesize} -eq "4000000"; do run cp_file_chunk; run set_nextnum; done'
+setenv update_3 'setenv filesize 4000000; setenv filenum 10; setenv blkstart a000; while test ${filesize} -eq "4000000"; do run cp_file_chunk; run set_nextnum; done; true'
setenv echo_v2.4b1 echo "successfully updated U-Boot, power-cycle and enter \"run setupdate\; run migrate_v2.4b1\" to complete update"
-setenv migrate_v2.4b1 'run migrate_configblock; run update_new'
-setenv update_v2.4b1 'run migrate_uboot && run echo_v2.4b1'
+setenv migrate_v2.4b1 'run migrate_configblock; run update_new; reset'
+setenv update_v2.4b1 'run check_configblock || run migrate_configblock; run migrate_uboot && run echo_v2.4b1'
-setenv update_new 'run check_configblock || run migrate_configblock; run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_3; reset'
-setenv update 'mmc bootbus 0 2 1 2 && run update_new; run update_v2.4b1'
+setenv update_new 'run update_uboot; run update_1; run update_2; run update_kernel; run update_fdt; run update_3'
+setenv update 'mmc bootbus 0 2 1 2 && run update_new && reset; run update_v2.4b1'
echo 'enter "run update" to update the entire module'