aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/extract-ikconfig
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/extract-ikconfig')
-rwxr-xr-xscripts/extract-ikconfig5
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
6binoffset="./scripts/binoffset" 6binoffset="./scripts/binoffset"
7test -e $binoffset || cc -o $binoffset ./scripts/binoffset.c || exit 1
7 8
8IKCFG_ST="0x49 0x4b 0x43 0x46 0x47 0x5f 0x53 0x54" 9IKCFG_ST="0x49 0x4b 0x43 0x46 0x47 0x5f 0x53 0x54"
9IKCFG_ED="0x49 0x4b 0x43 0x46 0x47 0x5f 0x45 0x44" 10IKCFG_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
46fi 47fi
47 48
48TMPFILE="/tmp/ikconfig-$$" 49TMPFILE=`mktemp -t ikconfig-XXXXXX` || exit 1
49image="$1" 50image="$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