From a1f92f4320b0e28dc07f333bd7667d9ba57e2a5b Mon Sep 17 00:00:00 2001 From: nbd Date: Thu, 7 Dec 2006 02:51:35 +0000 Subject: clean up x86-2.6 partitioning stuff git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5705 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/x86-2.6/image/Makefile | 4 --- target/linux/x86-2.6/image/gen_image.sh | 57 +++++++++++---------------------- 2 files changed, 19 insertions(+), 42 deletions(-) (limited to 'target/linux/x86-2.6/image') diff --git a/target/linux/x86-2.6/image/Makefile b/target/linux/x86-2.6/image/Makefile index 7aa03b2d2..7e76523d9 100644 --- a/target/linux/x86-2.6/image/Makefile +++ b/target/linux/x86-2.6/image/Makefile @@ -56,7 +56,3 @@ define Image/Build endef $(eval $(call BuildImage)) - -$(eval $(call RequireCommand,fdisk, \ - Please install fdisk \ -)) diff --git a/target/linux/x86-2.6/image/gen_image.sh b/target/linux/x86-2.6/image/gen_image.sh index 21deeee6a..795a46b71 100755 --- a/target/linux/x86-2.6/image/gen_image.sh +++ b/target/linux/x86-2.6/image/gen_image.sh @@ -1,58 +1,39 @@ #!/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 <