URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 1275 |
Rev 1765 |
#! /bin/bash -x
|
#! /bin/bash -x
|
# extracts .config info from a [b]zImage file
|
# extracts .config info from a [b]zImage file
|
# uses: binoffset (new), dd, zcat, strings, grep
|
# uses: binoffset (new), dd, zcat, strings, grep
|
# $arg1 is [b]zImage filename
|
# $arg1 is [b]zImage filename
|
|
|
HDR=`binoffset $1 0x1f 0x8b 0x08 0x0`
|
HDR=`binoffset $1 0x1f 0x8b 0x08 0x0`
|
PID=$$
|
PID=$$
|
TMPFILE="$1.vmlin.$PID"
|
TMPFILE="$1.vmlin.$PID"
|
|
|
# dd if=$1 bs=1 skip=$HDR | zcat - | strings /dev/stdin \
|
# dd if=$1 bs=1 skip=$HDR | zcat - | strings /dev/stdin \
|
# | grep "[A-Za-z_0-9]=[ynm]$" | sed "s/^/CONFIG_/" > $1.oldconfig.$PID
|
# | grep "[A-Za-z_0-9]=[ynm]$" | sed "s/^/CONFIG_/" > $1.oldconfig.$PID
|
# exit
|
# exit
|
|
|
dd if=$1 bs=1 skip=$HDR | zcat - > $TMPFILE
|
dd if=$1 bs=1 skip=$HDR | zcat - > $TMPFILE
|
strings $TMPFILE | grep "^[\#[:blank:]]*CONFIG_[A-Za-z_0-9]*" > $1.oldconfig.$PID
|
strings $TMPFILE | grep "^[\#[:blank:]]*CONFIG_[A-Za-z_0-9]*" > $1.oldconfig.$PID
|
wc $1.oldconfig.$PID
|
wc $1.oldconfig.$PID
|
rm $TMPFILE
|
rm $TMPFILE
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.