diff options
author | Len Brown <len.brown@intel.com> | 2009-09-19 00:11:26 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-09-19 00:11:26 -0400 |
commit | c602c65b2f81d14456771d1e3f15d1381f4b7efa (patch) | |
tree | f1f833c8dd6c1519eeb101be32f7fe54a9605af5 /scripts/extract-ikconfig | |
parent | 3834f47291df475be3f0f0fb7ccaa098967cc054 (diff) | |
parent | 78f28b7c555359c67c2a0d23f7436e915329421e (diff) |
Merge branch 'linus' into sfi-release
Conflicts:
arch/x86/kernel/setup.c
drivers/acpi/power.c
init/main.c
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'scripts/extract-ikconfig')
-rwxr-xr-x | scripts/extract-ikconfig | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/extract-ikconfig b/scripts/extract-ikconfig index 72997c353cb3..de233ff43c1c 100755 --- a/scripts/extract-ikconfig +++ b/scripts/extract-ikconfig @@ -17,6 +17,10 @@ dump_config() { return fi end=`$binoffset $file $IKCFG_ED 2>/dev/null` + [ "$?" != "0" ] && end="-1" + if [ "$end" -eq "-1" ]; then + return + fi start=`expr $start + 8` size=`expr $end - $start` @@ -55,6 +59,8 @@ dump_config "$image" GZHDR1="0x1f 0x8b 0x08 0x00" GZHDR2="0x1f 0x8b 0x08 0x08" +ELFHDR="0x7f 0x45 0x4c 0x46" + # vmlinux.gz: Check for a compressed images off=`$binoffset "$image" $GZHDR1 2>/dev/null` [ "$?" != "0" ] && off="-1" @@ -69,6 +75,14 @@ elif [ "$off" -ne "-1" ]; then (dd ibs="$off" skip=1 count=0 && dd bs=512k) <"$image" 2>/dev/null | \ zcat >"$TMPFILE" dump_config "$TMPFILE" + +# check if this is simply an ELF file +else + off=`$binoffset "$image" $ELFHDR 2>/dev/null` + [ "$?" != "0" ] && off="-1" + if [ "$off" -eq "0" ]; then + dump_config "$image" + fi fi echo "ERROR: Unable to extract kernel configuration information." |