tools:mkimage_multidtb: Align less than PAD size
authorInha Song <ideal.song@samsung.com>
Wed, 5 Aug 2015 05:05:03 +0000 (14:05 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Fri, 8 Apr 2016 02:17:34 +0000 (11:17 +0900)
This patch fix align error in mkimage_multidtb tools.
if DTB size is aigned to $PAD, $PAD_CNT should be zero not $PAD.

Change-Id: I2bf8343dae9b2bb71a70abf1df61bd215c2996f8
Signed-off-by: Inha Song <ideal.song@samsung.com>
tools/mkimage_multidtb.sh

index 0405fd6..fc107ac 100755 (executable)
@@ -59,7 +59,7 @@ for I in ${DTB[*]}; do
                touch padding
 
                if [ $CNT -lt $(($DTB_CNT)) ]; then
-                       PAD_CNT=$(($PAD - $(($SIZE % $PAD))))
+                       PAD_CNT=$(($(($PAD - $(($SIZE % $PAD)))) % $PAD))
                        if [ $PAD_CNT -ge 0 ]; then
                                echo -en " | PAD: $PAD_CNT B |"
                                rm padding