5 echo "SYNTAX: $0 <file> <bootfs image> <rootfs image> <bootfs size> <rootfs size>"
18 # Create one empty partitions followed by the swap partition, then the
19 # boot partition with the ./boot/zImage and then the rootfs partition.
20 # The swap partition with type 82 is 128 MB since the DNS-313 has 64 MB of
21 # memory so we assign twice of that as swap.
22 # The boot partition must always be the third partition.
23 # The user should use the first (blank) partition for user data storage,
24 # this will typically be named /dev/sda1
25 set $
(ptgen
-o $OUTPUT -h $head -s $sect -n -t 83 -p 0 -t 82 -p 128M
-t 83 -p ${BOOTFSSIZE}M
-t 83 -p ${ROOTFSSIZE}M
)
27 # Swapoffset and swapsize will be $1 and $2
28 BOOTOFFSET
="$(($3 / 512))"
29 BOOTSIZE
="$(($4 / 512))"
30 ROOTFSOFFSET
="$(($5 / 512))"
31 ROOTFSSIZE
="$(($6 / 512))"
33 dd bs
=512 if="$BOOTFS" of
="$OUTPUT" seek
="$BOOTOFFSET" conv
=notrunc
34 dd bs
=512 if="$ROOTFS" of
="$OUTPUT" seek
="$ROOTFSOFFSET" conv
=notrunc