summaryrefslogtreecommitdiff
path: root/target/image/x86
diff options
context:
space:
mode:
authorTim Yardley <lst@openwrt.org>2006-10-25 23:51:48 +0000
committerTim Yardley <lst@openwrt.org>2006-10-25 23:51:48 +0000
commit22e8c9d05e632c67c3f042dbdadf1580f1ffe009 (patch)
tree34918be59dd2cb83b3d910226791b6d69811a3fe /target/image/x86
parent97e54a19322dbcdc8788e92a8b861985ffde85eb (diff)
downloadmtk-20170518-22e8c9d05e632c67c3f042dbdadf1580f1ffe009.zip
mtk-20170518-22e8c9d05e632c67c3f042dbdadf1580f1ffe009.tar.gz
mtk-20170518-22e8c9d05e632c67c3f042dbdadf1580f1ffe009.tar.bz2
fix partition issue with x86, leveraging the default size on the second partition (all of the remaining drive) in order to get around size differences
SVN-Revision: 5293
Diffstat (limited to 'target/image/x86')
-rwxr-xr-xtarget/image/x86/gen_image.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/target/image/x86/gen_image.sh b/target/image/x86/gen_image.sh
index 95be6cc..21deeee 100755
--- a/target/image/x86/gen_image.sh
+++ b/target/image/x86/gen_image.sh
@@ -2,8 +2,8 @@
# Copyright (C) 2006 OpenWrt.org
[ $# == 5 ] || {
- echo "SYNTAX: $0 <file> <kernel size> <kernel directory> <rootfs size> <rootfs image>"
- exit 1
+ echo "SYNTAX: $0 <file> <kernel size> <kernel directory> <rootfs size> <rootfs image>"
+ exit 1
}
file="$1"
@@ -22,20 +22,20 @@ n
p
1
-+${part1s}M
++$(($part1s * 1024))K
n
p
2
-+${part2s}M
+
w
q
EOF
block() {
- echo -e 'p\nq' | fdisk -u -C $cyl -H $head -S $sect "$file" | awk -v file="$file$1" -v n="$(($2 + 2))" '
+ echo -e 'p\nq' | fdisk -u -C $cyl -H $head -S $sect "$file" | awk -v file="$file$1" -v n="$(($2 + 2))" '
$1 == file {
- print $n * 512
+ print $n * 512
}'
}