diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-11-03 02:57:41 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-11-03 02:57:41 -0500 |
| commit | db5935001a43528e673ad26ffec9d98c60a496a9 (patch) | |
| tree | 8e735327a97beccabb5d94ef93df25d2bacda705 /scripts | |
| parent | 34f3a814eef8069a24e5b3ebcf27aba9dabac2ea (diff) | |
| parent | 45beca08dd8b6d6a65c5ffd730af2eac7a2c7a03 (diff) | |
Merge commit 'v2.6.28-rc3' into sched/core
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/Makefile.modpost | 2 | ||||
| -rwxr-xr-x | scripts/checksyscalls.sh | 4 | ||||
| -rw-r--r-- | scripts/headers_check.pl | 10 | ||||
| -rw-r--r-- | scripts/headers_install.pl | 17 | ||||
| -rw-r--r-- | scripts/mod/sumversion.c | 12 | ||||
| -rwxr-xr-x | scripts/package/mkspec | 5 | ||||
| -rwxr-xr-x | scripts/setlocalversion | 6 |
7 files changed, 36 insertions, 20 deletions
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index 9ee9783aea57..f4053dc7b5d6 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost | |||
| @@ -82,7 +82,7 @@ modpost = scripts/mod/modpost \ | |||
| 82 | $(if $(CONFIG_MODULE_SRCVERSION_ALL),-a,) \ | 82 | $(if $(CONFIG_MODULE_SRCVERSION_ALL),-a,) \ |
| 83 | $(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \ | 83 | $(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \ |
| 84 | $(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \ | 84 | $(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \ |
| 85 | $(if $(KBUILD_EXTRA_SYMBOLS), $(patsubst %, -e %,$(EXTRA_SYMBOLS))) \ | 85 | $(if $(KBUILD_EXTRA_SYMBOLS), $(patsubst %, -e %,$(KBUILD_EXTRA_SYMBOLS))) \ |
| 86 | $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \ | 86 | $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \ |
| 87 | $(if $(CONFIG_DEBUG_SECTION_MISMATCH),,-S) \ | 87 | $(if $(CONFIG_DEBUG_SECTION_MISMATCH),,-S) \ |
| 88 | $(if $(CONFIG_MARKERS),-K $(kernelmarkersfile)) \ | 88 | $(if $(CONFIG_MARKERS),-K $(kernelmarkersfile)) \ |
diff --git a/scripts/checksyscalls.sh b/scripts/checksyscalls.sh index 41564b142c04..60d00d1c4eee 100755 --- a/scripts/checksyscalls.sh +++ b/scripts/checksyscalls.sh | |||
| @@ -113,10 +113,10 @@ EOF | |||
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | syscall_list() { | 115 | syscall_list() { |
| 116 | sed -n -e '/^\#define/ { s/[^_]*__NR_\([^[:space:]]*\).*/\ | 116 | sed -n -e '/^\#define/ s/[^_]*__NR_\([^[:space:]]*\).*/\ |
| 117 | \#if !defined \(__NR_\1\) \&\& !defined \(__IGNORE_\1\)\ | 117 | \#if !defined \(__NR_\1\) \&\& !defined \(__IGNORE_\1\)\ |
| 118 | \#warning syscall \1 not implemented\ | 118 | \#warning syscall \1 not implemented\ |
| 119 | \#endif/p }' $1 | 119 | \#endif/p' $1 |
| 120 | } | 120 | } |
| 121 | 121 | ||
| 122 | (ignore_list && syscall_list ${srctree}/arch/x86/include/asm/unistd_32.h) | \ | 122 | (ignore_list && syscall_list ${srctree}/arch/x86/include/asm/unistd_32.h) | \ |
diff --git a/scripts/headers_check.pl b/scripts/headers_check.pl index 15d53a6b1a1f..488a3b1f760f 100644 --- a/scripts/headers_check.pl +++ b/scripts/headers_check.pl | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl | 1 | #!/usr/bin/perl -w |
| 2 | # | 2 | # |
| 3 | # headers_check.pl execute a number of trivial consistency checks | 3 | # headers_check.pl execute a number of trivial consistency checks |
| 4 | # | 4 | # |
| @@ -17,7 +17,6 @@ | |||
| 17 | # 2) TODO: check for leaked CONFIG_ symbols | 17 | # 2) TODO: check for leaked CONFIG_ symbols |
| 18 | 18 | ||
| 19 | use strict; | 19 | use strict; |
| 20 | use warnings; | ||
| 21 | 20 | ||
| 22 | my ($dir, $arch, @files) = @ARGV; | 21 | my ($dir, $arch, @files) = @ARGV; |
| 23 | 22 | ||
| @@ -27,14 +26,15 @@ my $lineno = 0; | |||
| 27 | my $filename; | 26 | my $filename; |
| 28 | 27 | ||
| 29 | foreach my $file (@files) { | 28 | foreach my $file (@files) { |
| 29 | local *FH; | ||
| 30 | $filename = $file; | 30 | $filename = $file; |
| 31 | open(my $fh, '<', "$filename") or die "$filename: $!\n"; | 31 | open(FH, "<$filename") or die "$filename: $!\n"; |
| 32 | $lineno = 0; | 32 | $lineno = 0; |
| 33 | while ($line = <$fh>) { | 33 | while ($line = <FH>) { |
| 34 | $lineno++; | 34 | $lineno++; |
| 35 | check_include(); | 35 | check_include(); |
| 36 | } | 36 | } |
| 37 | close $fh; | 37 | close FH; |
| 38 | } | 38 | } |
| 39 | exit $ret; | 39 | exit $ret; |
| 40 | 40 | ||
diff --git a/scripts/headers_install.pl b/scripts/headers_install.pl index 68591cd08731..7d2b4146e02f 100644 --- a/scripts/headers_install.pl +++ b/scripts/headers_install.pl | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/usr/bin/perl | 1 | #!/usr/bin/perl -w |
| 2 | # | 2 | # |
| 3 | # headers_install prepare the listed header files for use in | 3 | # headers_install prepare the listed header files for use in |
| 4 | # user space and copy the files to their destination. | 4 | # user space and copy the files to their destination. |
| @@ -17,28 +17,29 @@ | |||
| 17 | # 3) Drop all sections defined out by __KERNEL__ (using unifdef) | 17 | # 3) Drop all sections defined out by __KERNEL__ (using unifdef) |
| 18 | 18 | ||
| 19 | use strict; | 19 | use strict; |
| 20 | use warnings; | ||
| 21 | 20 | ||
| 22 | my ($readdir, $installdir, $arch, @files) = @ARGV; | 21 | my ($readdir, $installdir, $arch, @files) = @ARGV; |
| 23 | 22 | ||
| 24 | my $unifdef = "scripts/unifdef -U__KERNEL__"; | 23 | my $unifdef = "scripts/unifdef -U__KERNEL__"; |
| 25 | 24 | ||
| 26 | foreach my $file (@files) { | 25 | foreach my $file (@files) { |
| 26 | local *INFILE; | ||
| 27 | local *OUTFILE; | ||
| 27 | my $tmpfile = "$installdir/$file.tmp"; | 28 | my $tmpfile = "$installdir/$file.tmp"; |
| 28 | open(my $infile, '<', "$readdir/$file") | 29 | open(INFILE, "<$readdir/$file") |
| 29 | or die "$readdir/$file: $!\n"; | 30 | or die "$readdir/$file: $!\n"; |
| 30 | open(my $outfile, '>', "$tmpfile") or die "$tmpfile: $!\n"; | 31 | open(OUTFILE, ">$tmpfile") or die "$tmpfile: $!\n"; |
| 31 | while (my $line = <$infile>) { | 32 | while (my $line = <INFILE>) { |
| 32 | $line =~ s/([\s(])__user\s/$1/g; | 33 | $line =~ s/([\s(])__user\s/$1/g; |
| 33 | $line =~ s/([\s(])__force\s/$1/g; | 34 | $line =~ s/([\s(])__force\s/$1/g; |
| 34 | $line =~ s/([\s(])__iomem\s/$1/g; | 35 | $line =~ s/([\s(])__iomem\s/$1/g; |
| 35 | $line =~ s/\s__attribute_const__\s/ /g; | 36 | $line =~ s/\s__attribute_const__\s/ /g; |
| 36 | $line =~ s/\s__attribute_const__$//g; | 37 | $line =~ s/\s__attribute_const__$//g; |
| 37 | $line =~ s/^#include <linux\/compiler.h>//; | 38 | $line =~ s/^#include <linux\/compiler.h>//; |
| 38 | printf $outfile "%s", $line; | 39 | printf OUTFILE "%s", $line; |
| 39 | } | 40 | } |
| 40 | close $outfile; | 41 | close OUTFILE; |
| 41 | close $infile; | 42 | close INFILE; |
| 42 | system $unifdef . " $tmpfile > $installdir/$file"; | 43 | system $unifdef . " $tmpfile > $installdir/$file"; |
| 43 | unlink $tmpfile; | 44 | unlink $tmpfile; |
| 44 | } | 45 | } |
diff --git a/scripts/mod/sumversion.c b/scripts/mod/sumversion.c index d9cc6901d680..aadc5223dcdb 100644 --- a/scripts/mod/sumversion.c +++ b/scripts/mod/sumversion.c | |||
| @@ -290,6 +290,15 @@ static int parse_file(const char *fname, struct md4_ctx *md) | |||
| 290 | release_file(file, len); | 290 | release_file(file, len); |
| 291 | return 1; | 291 | return 1; |
| 292 | } | 292 | } |
| 293 | /* Check whether the file is a static library or not */ | ||
| 294 | static int is_static_library(const char *objfile) | ||
| 295 | { | ||
| 296 | int len = strlen(objfile); | ||
| 297 | if (objfile[len - 2] == '.' && objfile[len - 1] == 'a') | ||
| 298 | return 1; | ||
| 299 | else | ||
| 300 | return 0; | ||
| 301 | } | ||
| 293 | 302 | ||
| 294 | /* We have dir/file.o. Open dir/.file.o.cmd, look for deps_ line to | 303 | /* We have dir/file.o. Open dir/.file.o.cmd, look for deps_ line to |
| 295 | * figure out source file. */ | 304 | * figure out source file. */ |
| @@ -420,7 +429,8 @@ void get_src_version(const char *modname, char sum[], unsigned sumlen) | |||
| 420 | while ((fname = strsep(&sources, " ")) != NULL) { | 429 | while ((fname = strsep(&sources, " ")) != NULL) { |
| 421 | if (!*fname) | 430 | if (!*fname) |
| 422 | continue; | 431 | continue; |
| 423 | if (!parse_source_files(fname, &md)) | 432 | if (!(is_static_library(fname)) && |
| 433 | !parse_source_files(fname, &md)) | ||
| 424 | goto release; | 434 | goto release; |
| 425 | } | 435 | } |
| 426 | 436 | ||
diff --git a/scripts/package/mkspec b/scripts/package/mkspec index ffd61fe0c1ad..2500886fb90a 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec | |||
| @@ -57,15 +57,17 @@ fi | |||
| 57 | echo "%build" | 57 | echo "%build" |
| 58 | 58 | ||
| 59 | if ! $PREBUILT; then | 59 | if ! $PREBUILT; then |
| 60 | echo "make clean && make %{_smp_mflags}" | 60 | echo "make clean && make %{?_smp_mflags}" |
| 61 | echo "" | 61 | echo "" |
| 62 | fi | 62 | fi |
| 63 | 63 | ||
| 64 | echo "%install" | 64 | echo "%install" |
| 65 | echo "%ifarch ia64" | 65 | echo "%ifarch ia64" |
| 66 | echo 'mkdir -p $RPM_BUILD_ROOT/boot/efi $RPM_BUILD_ROOT/lib/modules' | 66 | echo 'mkdir -p $RPM_BUILD_ROOT/boot/efi $RPM_BUILD_ROOT/lib/modules' |
| 67 | echo 'mkdir -p $RPM_BUILD_ROOT/lib/firmware' | ||
| 67 | echo "%else" | 68 | echo "%else" |
| 68 | echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib/modules' | 69 | echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib/modules' |
| 70 | echo 'mkdir -p $RPM_BUILD_ROOT/lib/firmware' | ||
| 69 | echo "%endif" | 71 | echo "%endif" |
| 70 | 72 | ||
| 71 | echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{_smp_mflags} modules_install' | 73 | echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{_smp_mflags} modules_install' |
| @@ -92,5 +94,6 @@ echo "%files" | |||
| 92 | echo '%defattr (-, root, root)' | 94 | echo '%defattr (-, root, root)' |
| 93 | echo "%dir /lib/modules" | 95 | echo "%dir /lib/modules" |
| 94 | echo "/lib/modules/$KERNELRELEASE" | 96 | echo "/lib/modules/$KERNELRELEASE" |
| 97 | echo "/lib/firmware" | ||
| 95 | echo "/boot/*" | 98 | echo "/boot/*" |
| 96 | echo "" | 99 | echo "" |
diff --git a/scripts/setlocalversion b/scripts/setlocalversion index 83b75126c9f7..72d233528ade 100755 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion | |||
| @@ -9,11 +9,13 @@ usage() { | |||
| 9 | cd "${1:-.}" || usage | 9 | cd "${1:-.}" || usage |
| 10 | 10 | ||
| 11 | # Check for git and a git repo. | 11 | # Check for git and a git repo. |
| 12 | if head=`git rev-parse --verify HEAD 2>/dev/null`; then | 12 | if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then |
| 13 | # Do we have an untagged version? | 13 | # Do we have an untagged version? |
| 14 | if git name-rev --tags HEAD | grep -E '^HEAD[[:space:]]+(.*~[0-9]*|undefined)$' > /dev/null; then | 14 | if git name-rev --tags HEAD | grep -E '^HEAD[[:space:]]+(.*~[0-9]*|undefined)$' > /dev/null; then |
| 15 | if tag=`git describe 2>/dev/null`; then | 15 | if tag=`git describe 2>/dev/null`; then |
| 16 | echo $tag | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}' | 16 | echo $tag | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}' |
| 17 | else | ||
| 18 | printf '%s%s' -g $head | ||
| 17 | fi | 19 | fi |
| 18 | fi | 20 | fi |
| 19 | 21 | ||
| @@ -55,7 +57,7 @@ if rev=`svn info 2>/dev/null | grep '^Revision'`; then | |||
| 55 | 57 | ||
| 56 | # Are there uncommitted changes? | 58 | # Are there uncommitted changes? |
| 57 | if [ $changes != 0 ]; then | 59 | if [ $changes != 0 ]; then |
| 58 | printf -- '-svn%s%s%s' "$rev" -dirty "$changes" | 60 | printf -- '-svn%s%s' "$rev" -dirty |
| 59 | else | 61 | else |
| 60 | printf -- '-svn%s' "$rev" | 62 | printf -- '-svn%s' "$rev" |
| 61 | fi | 63 | fi |
