2 # Copyright (C) 2006 OpenWrt.org
5 echo "SYNTAX: $0 <file> <kernel size> <kernel directory> <rootfs size> <rootfs image>"
17 cyl
=$
(( ($part1s + $part2s) * 1024 * 1024 / ($head * $sect * 512)))
19 dd if=/dev
/zero of
="$file" bs
=1M count
=$
(($part1s + $part2s)) 2>/dev
/null ||
exit
20 fdisk
-u -C $cyl -H $head -S $sect "$file" > /dev
/null
2>/dev
/null
<<EOF
36 echo -e 'p\nq' | fdisk
-u -C $cyl -H $head -S $sect "$file" |
awk -v file="$file$1" -v n
="$(($2 + 2))" '
44 blocks
="$(( ($end - $start) / 1024 ))"
46 genext2fs
-d "$part1d" -b "$blocks" "$file.kernel"
47 dd if="$file.kernel" of
="$file" bs
=512 seek
="$(($start / 512))" conv
=notrunc
51 dd if="$part2f" of
="$file" bs
=512 seek
="$(($start / 512))" conv
=notrunc
53 which chpax
>/dev
/null
&& chpax
-zp $
(which grub
)
54 grub
--device-map=/dev
/null
<<EOF
56 geometry (hd0) $cyl $head $sect
This page took 0.054225 seconds and 5 git commands to generate.