diff options
Diffstat (limited to 'scripts/extract-ikconfig')
-rwxr-xr-x | scripts/extract-ikconfig | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/extract-ikconfig b/scripts/extract-ikconfig index d9f9f34b22ab..8187e6f0dc2f 100755 --- a/scripts/extract-ikconfig +++ b/scripts/extract-ikconfig | |||
@@ -4,6 +4,7 @@ | |||
4 | # $arg1 is [b]zImage filename | 4 | # $arg1 is [b]zImage filename |
5 | 5 | ||
6 | binoffset="./scripts/binoffset" | 6 | binoffset="./scripts/binoffset" |
7 | test -e $binoffset || cc -o $binoffset ./scripts/binoffset.c || exit 1 | ||
7 | 8 | ||
8 | IKCFG_ST="0x49 0x4b 0x43 0x46 0x47 0x5f 0x53 0x54" | 9 | IKCFG_ST="0x49 0x4b 0x43 0x46 0x47 0x5f 0x53 0x54" |
9 | IKCFG_ED="0x49 0x4b 0x43 0x46 0x47 0x5f 0x45 0x44" | 10 | IKCFG_ED="0x49 0x4b 0x43 0x46 0x47 0x5f 0x45 0x44" |
@@ -20,7 +21,7 @@ function dump_config { | |||
20 | let start="$start + 8" | 21 | let start="$start + 8" |
21 | let size="$end - $start" | 22 | let size="$end - $start" |
22 | 23 | ||
23 | head --bytes="$end" "$file" | tail --bytes="$size" | zcat | 24 | dd if="$file" ibs=1 skip="$start" count="$size" 2>/dev/null | zcat |
24 | 25 | ||
25 | clean_up | 26 | clean_up |
26 | exit 0 | 27 | exit 0 |
@@ -45,7 +46,7 @@ then | |||
45 | exit 1 | 46 | exit 1 |
46 | fi | 47 | fi |
47 | 48 | ||
48 | TMPFILE="/tmp/ikconfig-$$" | 49 | TMPFILE=`mktemp -t ikconfig-XXXXXX` || exit 1 |
49 | image="$1" | 50 | image="$1" |
50 | 51 | ||
51 | # vmlinux: Attempt to dump the configuration from the file directly | 52 | # vmlinux: Attempt to dump the configuration from the file directly |