summaryrefslogtreecommitdiff
path: root/recipes-images/images/files/colibri-t30/colibri-t30_bin/flash_blk.scr
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2017-07-12 16:34:48 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-10-03 18:22:40 +0200
commit49ccf02a0a04607045f560d682df97a341e1170b (patch)
tree02521cf597426e5e62e643d5848030097237608a /recipes-images/images/files/colibri-t30/colibri-t30_bin/flash_blk.scr
parent3ea215d6215bb3250fb4d810c8f78feaffb106d7 (diff)
flash_blk/eth.scr: fix exit condition in the emmc rootfs flashing loop
If an image creates a rootfs which is exactly a multiple of 64 MByte then the scripts never detects that the last chunk has been read and 'run update' never completes. Fix that by explicitely setting filesize to 0 when a file read fails. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Diffstat (limited to 'recipes-images/images/files/colibri-t30/colibri-t30_bin/flash_blk.scr')
-rw-r--r--recipes-images/images/files/colibri-t30/colibri-t30_bin/flash_blk.scr2
1 files changed, 1 insertions, 1 deletions
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 8d5127b..a342a49 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
@@ -19,7 +19,7 @@ setenv migrate_5 'mmc dev 0 0; mmc read ${loadaddr} 36000 1; setenv conf_blk_off
setenv migrate_6 'mmc dev 0 0; mmc read ${loadaddr} 37000 1; setenv conf_blk_offset 0x7ff; crc32 -v ${toradex_oui_addr} 3 94305232 && mmc dev 0 1 && mmc write ${loadaddr} ${conf_blk_offset} 1'
setenv migrate_configblock 'setexpr toradex_oui_addr ${loadaddr} + 8; run migrate_1; run migrate_2; run migrate_3; run migrate_4; run migrate_5; run migrate_6'
-setenv cp_file_chunk 'load ${interface} ${drive}:1 ${loadaddr} ${board_name}/root.ext3-${filenum} ${filesize} ${filepos}; run set_blkcnt; mmc dev 0 0 && mmc write ${loadaddr} ${blkstart} ${blkcnt}'
+setenv cp_file_chunk 'load ${interface} ${drive}:1 ${loadaddr} ${board_name}/root.ext3-${filenum} || setenv filesize 0; run set_blkcnt; mmc dev 0 0 && mmc write ${loadaddr} ${blkstart} ${blkcnt}'
setenv update_uboot 'load ${interface} ${drive}:1 ${loadaddr} ${board_name}/${board_name}.img && run set_blkcnt && mmc dev 0 1 && mmc write ${loadaddr} 0x0 ${blkcnt}'