Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Kernel v2.4.20-rc4-ac1 /scripts/extract-ikconfig

Filename:/scripts/extract-ikconfig
Lines Added:17
Lines Deleted:0
Also changed in: (Previous) 2.4.20-rc2-ac3  2.4.20-rc2-ac2  2.4.20-rc2-ac1  2.4.20-rc1-ac4  2.4.20-rc1-ac3  2.4.20-rc1-ac2 
(Following) 2.4.20-ac1  2.4.20-ac2  2.4.21-pre3-ac1  2.4.21-pre3-ac2  2.4.21-pre3-ac3  2.4.21-pre3-ac4 

Location
[  2.4.20-rc4-ac1
  [  scripts
     o  extract-ikconfig

Patch

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.20rc4/scripts/extract-ikconfig linux.20rc4-ac1/scripts/extract-+
ikconfig
--- linux.20rc4/scripts/extract-ikconfig   1970-01-01 01:00:00.000000000 +0100
+++ linux.20rc4-ac1/scripts/extract-ikconfig   2002-08-06 15:42:22.000000000 +0100
@@ -0,0 +1,17 @@
+#! /bin/bash -x
+# extracts .config info from a [b]zImage file
+# uses: binoffset (new), dd, zcat, strings, grep
+# $arg1 is [b]zImage filename
+
+HDR=`binoffset $1 0x1f 0x8b 0x08 0x0`
+PID=$$
+TMPFILE="$1.vmlin.$PID"
+
+# dd if=$1 bs=1 skip=$HDR | zcat - | strings /dev/stdin \
+# | grep "[A-Za-z_0-9]=[ynm]$" | sed "s/^/CONFIG_/" > $1.oldconfig.$PID
+# exit
+
+dd if=$1 bs=1 skip=$HDR | zcat - > $TMPFILE
+strings $TMPFILE | grep "^[\#[:blank:]]*CONFIG_[A-Za-z_0-9]*" > $1.oldconfig.$PID
+wc $1.oldconfig.$PID
+rm $TMPFILE


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.