diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2017-07-12 16:34:48 +0200 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2017-10-03 18:22:40 +0200 |
commit | 49ccf02a0a04607045f560d682df97a341e1170b (patch) | |
tree | 02521cf597426e5e62e643d5848030097237608a /recipes-images/images/files/apalis-t30/apalis-t30_bin/flash_eth.scr | |
parent | 3ea215d6215bb3250fb4d810c8f78feaffb106d7 (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/apalis-t30/apalis-t30_bin/flash_eth.scr')
-rw-r--r-- | recipes-images/images/files/apalis-t30/apalis-t30_bin/flash_eth.scr | 2 |
1 files changed, 1 insertions, 1 deletions
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 56b2821..7766131 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 @@ -16,7 +16,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 'tftpboot ${loadaddr} ${board_name}/root.ext3-${filenum}; run set_blkcnt; mmc dev 0 0 && mmc write ${loadaddr} ${blkstart} ${blkcnt}' +setenv cp_file_chunk 'tftpboot ${loadaddr} ${board_name}/root.ext3-${filenum} || setenv filesize 0; run set_blkcnt; mmc dev 0 0 && mmc write ${loadaddr} ${blkstart} ${blkcnt}' setenv update_uboot 'tftpboot ${loadaddr} ${board_name}/${board_name}.img && run set_blkcnt && mmc dev 0 1 && mmc write ${loadaddr} 0x0 ${blkcnt}' |