From e69a489a502e224a5ab50dfb9aaa2308652d2b5f Mon Sep 17 00:00:00 2001 From: Felix Fietkau 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') diff --git a/target/linux/x86-2.6/image/Makefile b/target/linux/x86-2.6/image/Makefile index 7aa03b2d27..7e76523d91 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 21deeee6ac..795a46b710 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 <