summaryrefslogtreecommitdiff
path: root/recipes/images/files/apalis-t30/apalis-t30_bin/flash_eth.scr
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2016-01-22 16:11:41 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2016-03-14 14:26:12 +0100
commit1dafec98e978fc3514a1a24457a181b272d8ee01 (patch)
tree0db6d0090332ca3f8ab068aff716b2696c9058a6 /recipes/images/files/apalis-t30/apalis-t30_bin/flash_eth.scr
parent09743c03c8a488656ccc20474ce7204d32d8f465 (diff)
flash_eth.scr: allow image sizes > 640M for eMMC modules
When using TFTP update, the rootfs must be in decimal numbered chunks on the tftp server. U-Boot reads the chunks, but does count hexadecimal thus limiting the number of chunks to 10. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Diffstat (limited to 'recipes/images/files/apalis-t30/apalis-t30_bin/flash_eth.scr')
-rw-r--r--recipes/images/files/apalis-t30/apalis-t30_bin/flash_eth.scr4
1 files changed, 3 insertions, 1 deletions
diff --git a/recipes/images/files/apalis-t30/apalis-t30_bin/flash_eth.scr b/recipes/images/files/apalis-t30/apalis-t30_bin/flash_eth.scr
index 16d8073..3fe5a45 100644
--- a/recipes/images/files/apalis-t30/apalis-t30_bin/flash_eth.scr
+++ b/recipes/images/files/apalis-t30/apalis-t30_bin/flash_eth.scr
@@ -1,5 +1,7 @@
setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200'
-setenv set_nextnum 'setexpr filenum ${filenum} + 1; setexpr blkstart ${blkstart} + ${blkcnt}'
+#workaround U-Boot counting in hex and split did in decimal
+setenv incr_decimal 'setexpr filenum ${filenum} + 1; setexpr filenrlow ${filenum} % 0x10; test ${filenrlow} -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'