diff options
author | Markus Niebel <Markus.Niebel@tq-group.com> | 2017-02-03 15:14:02 (GMT) |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2017-02-19 16:16:51 (GMT) |
commit | e7203d77f64296338ce3773cebd5d1a23a776b5e (patch) | |
tree | d0565137e7ba32dccb1113ddfddd4a970abaa737 /include/configs | |
parent | 34713901ad19561caca7cef23a9a720a5adb188b (diff) | |
download | u-boot-e7203d77f64296338ce3773cebd5d1a23a776b5e.tar.xz |
tqma6: fix rounding in env
need to add before div in mmc update scripts. Otherwise we could
write one block more ba acident
Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
Diffstat (limited to 'include/configs')
-rw-r--r-- | include/configs/tqma6.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h index 311221d..9225bc1 100644 --- a/include/configs/tqma6.h +++ b/include/configs/tqma6.h @@ -133,8 +133,8 @@ "update_uboot=if tftp ${uboot}; then " \ "if itest ${filesize} > 0; then " \ "mmc dev ${mmcdev}; mmc rescan; " \ - "setexpr blkc ${filesize} / 0x200; " \ - "setexpr blkc ${blkc} + 1; " \ + "setexpr blkc ${filesize} + 0x1ff; " \ + "setexpr blkc ${blkc} / 0x200; " \ "if itest ${blkc} <= ${uboot_size}; then " \ "mmc write ${loadaddr} ${uboot_start} " \ "${blkc}; " \ @@ -145,8 +145,8 @@ "if tftp ${kernel}; then " \ "if itest ${filesize} > 0; then " \ "mmc dev ${mmcdev}; mmc rescan; " \ - "setexpr blkc ${filesize} / 0x200; " \ - "setexpr blkc ${blkc} + 1; " \ + "setexpr blkc ${filesize} + 0x1ff; " \ + "setexpr blkc ${blkc} / 0x200; " \ "if itest ${blkc} <= ${kernel_size}; then " \ "mmc write ${loadaddr} " \ "${kernel_start} ${blkc}; " \ @@ -157,8 +157,8 @@ "update_fdt=if tftp ${fdt_file}; then " \ "if itest ${filesize} > 0; then " \ "mmc dev ${mmcdev}; mmc rescan; " \ - "setexpr blkc ${filesize} / 0x200; " \ - "setexpr blkc ${blkc} + 1; " \ + "setexpr blkc ${filesize} + 0x1ff; " \ + "setexpr blkc ${blkc} / 0x200; " \ "if itest ${blkc} <= ${fdt_size}; then " \ "mmc write ${loadaddr} ${fdt_start} ${blkc}; " \ "fi; " \ |