From: Felix Fietkau Date: Thu, 7 Dec 2006 02:51:35 +0000 (+0000) Subject: clean up x86-2.6 partitioning stuff X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=75e5315f5f623089c6268b9db8e4b7c2e7055a16;p=openwrt%2Fstaging%2Fjow.git clean up x86-2.6 partitioning stuff SVN-Revision: 5705 --- 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 <