mvebu: image: don't create unnecessarily shell variables
[openwrt/staging/wigyori.git] / target / linux / mvebu / image / gen_mvebu_sdcard_img.sh
index 67416ed80cfaa6c04d6a33bb85f8125b30a9e6ce..e0230e48b64b7ba7c5cceb42d5275d4c965787e8 100755 (executable)
@@ -18,7 +18,7 @@
 #
 
 usage() {
-       echo "$0 <outfile> [<bootloader> <type_partitionN> <sectors_partitionN> <img_partitionN>]?"
+       echo "$0 <outfile> [<bootloader> <type_partitionN> <size_partitionN> <img_partitionN>]?"
 }
 
 # always require first 2 or 3 arguments
@@ -46,7 +46,7 @@ dd if=/dev/zero of="$OUTFILE" bs=512 count=1 >/dev/null
 printf "Done\n"
 
 while [ "$#" -ge 3 ]; do
-       ptgen_args="$ptgen_args -t $1 -p $(($2 / 2 + 256))"
+       ptgen_args="$ptgen_args -t $1 -p $(($2 * 1024 + 256))"
        parts="$parts$3 "
        shift; shift; shift
 done