kernel: Set CONFIG_RCU_CPU_STALL_TIMEOUT=21
[openwrt/openwrt.git] / target / linux / gemini / image / dns313_gen_hdd_img.sh
1 #!/bin/sh
2
3 set -x
4 [ $# -eq 5 ] || {
5 echo "SYNTAX: $0 <file> <bootfs image> <rootfs image> <bootfs size> <rootfs size>"
6 exit 1
7 }
8
9 OUTPUT="$1"
10 BOOTFS="$2"
11 ROOTFS="$3"
12 BOOTFSSIZE="$4"
13 ROOTFSSIZE="$5"
14
15 head=4
16 sect=63
17
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)
26
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))"
32
33 dd bs=512 if="$BOOTFS" of="$OUTPUT" seek="$BOOTOFFSET" conv=notrunc
34 dd bs=512 if="$ROOTFS" of="$OUTPUT" seek="$ROOTFSOFFSET" conv=notrunc