X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/9e0a57b449c8575004476f06b8435648fcf44a26..01c56fcc5a201ed84f10f427adf13a1edf688b20:/target/linux/x86-2.6/image/gen_image.sh?ds=sidebyside diff --git a/target/linux/x86-2.6/image/gen_image.sh b/target/linux/x86-2.6/image/gen_image.sh index 21deeee6a..b4845f5a7 100755 --- a/target/linux/x86-2.6/image/gen_image.sh +++ b/target/linux/x86-2.6/image/gen_image.sh @@ -1,60 +1,44 @@ #!/usr/bin/env bash # Copyright (C) 2006 OpenWrt.org - +set -x [ $# == 5 ] || { echo "SYNTAX: $0 " exit 1 } -file="$1" -part1s="$2" -part1d="$3" -part2s="$4" -part2f="$5" +OUTPUT="$1" +KERNELSIZE="$2" +KERNELDIR="$3" +ROOTFSSIZE="$4" +ROOTFSIMAGE="$5" + +rm -f "$OUTPUT" head=16 sect=63 -cyl=$(( ($part1s + $part2s) * 1024 * 1024 / ($head * $sect * 512))) - -dd if=/dev/zero of="$file" bs=1M count=$(($part1s + $part2s)) 2>/dev/null || exit -fdisk -u -C $cyl -H $head -S $sect "$file" > /dev/null 2>/dev/null </dev/null && chpax -zp $(which grub) -grub --device-map=/dev/null <