From 9e0a57b449c8575004476f06b8435648fcf44a26 Mon Sep 17 00:00:00 2001 From: mbm Date: Tue, 28 Nov 2006 20:14:41 +0000 Subject: move target/image/platform to target/linux/platform/image platform directories are now self contained git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5669 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/x86-2.6/image/gen_image.sh | 60 +++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100755 target/linux/x86-2.6/image/gen_image.sh (limited to 'target/linux/x86-2.6/image/gen_image.sh') diff --git a/target/linux/x86-2.6/image/gen_image.sh b/target/linux/x86-2.6/image/gen_image.sh new file mode 100755 index 000000000..21deeee6a --- /dev/null +++ b/target/linux/x86-2.6/image/gen_image.sh @@ -0,0 +1,60 @@ +#!/usr/bin/env bash +# Copyright (C) 2006 OpenWrt.org + +[ $# == 5 ] || { + echo "SYNTAX: $0 " + exit 1 +} + +file="$1" +part1s="$2" +part1d="$3" +part2s="$4" +part2f="$5" + +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 <