OpenWrt – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 #!/usr/bin/env bash
2  
3 OUTPUT_FILE=$1
4 KERNEL_FILE=$2
5 RECOVERY_FILE=$3
6 ROOTFS_FILE=$4
7  
8 BS=512
9  
10 #These to offsets are relative to the absolute location of the kernel on the mmc
11 #(0xA00), so their position in the image is -2560 blocks
12 RECOVERY_OFFSET=67072
13 ROOTFS_OFFSET=87552
14  
15 dd bs="$BS" of="$OUTPUT_FILE" if="$KERNEL_FILE"
16 dd bs="$BS" of="$OUTPUT_FILE" if="$RECOVERY_FILE" seek="$RECOVERY_OFFSET"
17 dd bs="$BS" of="$OUTPUT_FILE" if="$ROOTFS_FILE" seek="$ROOTFS_OFFSET"
18 dd if=/dev/zero of="$OUTPUT_FILE" bs=128k count=1 oflag=append conv=notrunc