diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-29 06:46:14 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-29 06:46:14 -0500 |
commit | 5ea293a9048d3a58cb0c840fa719d85ad14cba47 (patch) | |
tree | 88d1dd1eece2cfcbd858ff2c00fb0240dcfab3c7 /scripts/patch-kernel | |
parent | 03bc26cfefd6db756e6bc7fcda11dc17ada7be16 (diff) | |
parent | d3883ecebbf9e095b9e379dabbbe8b2c1ee7a41c (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (79 commits)
Remove references to "make dep"
kconfig: document use of HAVE_*
Introduce new section reference annotations tags: __ref, __refdata, __refconst
kbuild: warn about ld added unique sections
kbuild: add verbose option to Section mismatch reporting in modpost
kconfig: tristate choices with mixed tristate and boolean values
asm-generic/vmlix.lds.h: simplify __mem{init,exit}* dependencies
remove __attribute_used__
kbuild: support ARCH=x86 in buildtar
kconfig: remove "enable"
kbuild: simplified warning report in modpost
kbuild: introduce a few helpers in modpost
kbuild: use simpler section mismatch warnings in modpost
kbuild: link vmlinux.o before kallsyms passes
kbuild: introduce new option to enhance section mismatch analysis
Use separate sections for __dev/__cpu/__mem code/data
compiler.h: introduce __section()
all archs: consolidate init and exit sections in vmlinux.lds.h
kbuild: check section names consistently in modpost
kbuild: introduce blacklisting in modpost
...
Diffstat (limited to 'scripts/patch-kernel')
-rwxr-xr-x | scripts/patch-kernel | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/scripts/patch-kernel b/scripts/patch-kernel index 67e4b1868e50..ece46ef0ba54 100755 --- a/scripts/patch-kernel +++ b/scripts/patch-kernel | |||
@@ -65,7 +65,7 @@ sourcedir=${1-/usr/src/linux} | |||
65 | patchdir=${2-.} | 65 | patchdir=${2-.} |
66 | stopvers=${3-default} | 66 | stopvers=${3-default} |
67 | 67 | ||
68 | if [ "$1" == -h -o "$1" == --help -o ! -r "$sourcedir/Makefile" ]; then | 68 | if [ "$1" = -h -o "$1" = --help -o ! -r "$sourcedir/Makefile" ]; then |
69 | cat << USAGE | 69 | cat << USAGE |
70 | usage: $PNAME [-h] [ sourcedir [ patchdir [ stopversion ] [ -acxx ] ] ] | 70 | usage: $PNAME [-h] [ sourcedir [ patchdir [ stopversion ] [ -acxx ] ] ] |
71 | source directory defaults to /usr/src/linux, | 71 | source directory defaults to /usr/src/linux, |
@@ -182,10 +182,12 @@ reversePatch () { | |||
182 | } | 182 | } |
183 | 183 | ||
184 | # set current VERSION, PATCHLEVEL, SUBLEVEL, EXTRAVERSION | 184 | # set current VERSION, PATCHLEVEL, SUBLEVEL, EXTRAVERSION |
185 | TMPFILE=`mktemp .tmpver.XXXXXX` || { echo "cannot make temp file" ; exit 1; } | 185 | # force $TMPFILEs below to be in local directory: a slash character prevents |
186 | # the dot command from using the search path. | ||
187 | TMPFILE=`mktemp ./.tmpver.XXXXXX` || { echo "cannot make temp file" ; exit 1; } | ||
186 | grep -E "^(VERSION|PATCHLEVEL|SUBLEVEL|EXTRAVERSION)" $sourcedir/Makefile > $TMPFILE | 188 | grep -E "^(VERSION|PATCHLEVEL|SUBLEVEL|EXTRAVERSION)" $sourcedir/Makefile > $TMPFILE |
187 | tr -d [:blank:] < $TMPFILE > $TMPFILE.1 | 189 | tr -d [:blank:] < $TMPFILE > $TMPFILE.1 |
188 | source $TMPFILE.1 | 190 | . $TMPFILE.1 |
189 | rm -f $TMPFILE* | 191 | rm -f $TMPFILE* |
190 | if [ -z "$VERSION" -o -z "$PATCHLEVEL" -o -z "$SUBLEVEL" ] | 192 | if [ -z "$VERSION" -o -z "$PATCHLEVEL" -o -z "$SUBLEVEL" ] |
191 | then | 193 | then |
@@ -202,11 +204,7 @@ echo "Current kernel version is $VERSION.$PATCHLEVEL.$SUBLEVEL${EXTRAVERSION} ($ | |||
202 | EXTRAVER= | 204 | EXTRAVER= |
203 | if [ x$EXTRAVERSION != "x" ] | 205 | if [ x$EXTRAVERSION != "x" ] |
204 | then | 206 | then |
205 | if [ ${EXTRAVERSION:0:1} == "." ]; then | 207 | EXTRAVER=${EXTRAVERSION#.} |
206 | EXTRAVER=${EXTRAVERSION:1} | ||
207 | else | ||
208 | EXTRAVER=$EXTRAVERSION | ||
209 | fi | ||
210 | EXTRAVER=${EXTRAVER%%[[:punct:]]*} | 208 | EXTRAVER=${EXTRAVER%%[[:punct:]]*} |
211 | #echo "$PNAME: changing EXTRAVERSION from $EXTRAVERSION to $EXTRAVER" | 209 | #echo "$PNAME: changing EXTRAVERSION from $EXTRAVERSION to $EXTRAVER" |
212 | fi | 210 | fi |
@@ -251,16 +249,16 @@ while : # incrementing SUBLEVEL (s in v.p.s) | |||
251 | do | 249 | do |
252 | CURRENTFULLVERSION="$VERSION.$PATCHLEVEL.$SUBLEVEL" | 250 | CURRENTFULLVERSION="$VERSION.$PATCHLEVEL.$SUBLEVEL" |
253 | EXTRAVER= | 251 | EXTRAVER= |
254 | if [ $stopvers == $CURRENTFULLVERSION ]; then | 252 | if [ $stopvers = $CURRENTFULLVERSION ]; then |
255 | echo "Stopping at $CURRENTFULLVERSION base as requested." | 253 | echo "Stopping at $CURRENTFULLVERSION base as requested." |
256 | break | 254 | break |
257 | fi | 255 | fi |
258 | 256 | ||
259 | SUBLEVEL=$((SUBLEVEL + 1)) | 257 | SUBLEVEL=$(($SUBLEVEL + 1)) |
260 | FULLVERSION="$VERSION.$PATCHLEVEL.$SUBLEVEL" | 258 | FULLVERSION="$VERSION.$PATCHLEVEL.$SUBLEVEL" |
261 | #echo "#___ trying $FULLVERSION ___" | 259 | #echo "#___ trying $FULLVERSION ___" |
262 | 260 | ||
263 | if [ $((SUBLEVEL)) -gt $((STOPSUBLEVEL)) ]; then | 261 | if [ $(($SUBLEVEL)) -gt $(($STOPSUBLEVEL)) ]; then |
264 | echo "Stopping since sublevel ($SUBLEVEL) is beyond stop-sublevel ($STOPSUBLEVEL)" | 262 | echo "Stopping since sublevel ($SUBLEVEL) is beyond stop-sublevel ($STOPSUBLEVEL)" |
265 | exit 1 | 263 | exit 1 |
266 | fi | 264 | fi |
@@ -297,7 +295,7 @@ fi | |||
297 | if [ x$gotac != x ]; then | 295 | if [ x$gotac != x ]; then |
298 | # Out great user wants the -ac patches | 296 | # Out great user wants the -ac patches |
299 | # They could have done -ac (get latest) or -acxx where xx=version they want | 297 | # They could have done -ac (get latest) or -acxx where xx=version they want |
300 | if [ $gotac == "-ac" ]; then | 298 | if [ $gotac = "-ac" ]; then |
301 | # They want the latest version | 299 | # They want the latest version |
302 | HIGHESTPATCH=0 | 300 | HIGHESTPATCH=0 |
303 | for PATCHNAMES in $patchdir/patch-${CURRENTFULLVERSION}-ac*\.* | 301 | for PATCHNAMES in $patchdir/patch-${CURRENTFULLVERSION}-ac*\.* |