diff options
Diffstat (limited to 'scripts')
29 files changed, 285 insertions, 156 deletions
diff --git a/scripts/.gitignore b/scripts/.gitignore index e2741d23bab8..105b21f08185 100644 --- a/scripts/.gitignore +++ b/scripts/.gitignore | |||
@@ -8,3 +8,4 @@ bin2c | |||
8 | unifdef | 8 | unifdef |
9 | ihex2fw | 9 | ihex2fw |
10 | recordmcount | 10 | recordmcount |
11 | docproc | ||
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index ed2773edfe71..be39cd1c74cf 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include | |||
@@ -118,6 +118,11 @@ cc-option-yn = $(call try-run,\ | |||
118 | cc-option-align = $(subst -functions=0,,\ | 118 | cc-option-align = $(subst -functions=0,,\ |
119 | $(call cc-option,-falign-functions=0,-malign-functions=0)) | 119 | $(call cc-option,-falign-functions=0,-malign-functions=0)) |
120 | 120 | ||
121 | # cc-disable-warning | ||
122 | # Usage: cflags-y += $(call cc-disable-warning,unused-but-set-variable) | ||
123 | cc-disable-warning = $(call try-run,\ | ||
124 | $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -xc /dev/null -o "$$TMP",-Wno-$(strip $(1))) | ||
125 | |||
121 | # cc-version | 126 | # cc-version |
122 | # Usage gcc-ver := $(call cc-version) | 127 | # Usage gcc-ver := $(call cc-version) |
123 | cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC)) | 128 | cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC)) |
@@ -141,6 +146,11 @@ cc-ldoption = $(call try-run,\ | |||
141 | ld-option = $(call try-run,\ | 146 | ld-option = $(call try-run,\ |
142 | $(CC) /dev/null -c -o "$$TMPO" ; $(LD) $(1) "$$TMPO" -o "$$TMP",$(1),$(2)) | 147 | $(CC) /dev/null -c -o "$$TMPO" ; $(LD) $(1) "$$TMPO" -o "$$TMP",$(1),$(2)) |
143 | 148 | ||
149 | # ar-option | ||
150 | # Usage: KBUILD_ARFLAGS := $(call ar-option,D) | ||
151 | # Important: no spaces around options | ||
152 | ar-option = $(call try-run, $(AR) rc$(1) "$$TMP",$(1),$(2)) | ||
153 | |||
144 | ###### | 154 | ###### |
145 | 155 | ||
146 | ### | 156 | ### |
@@ -187,6 +197,8 @@ ifneq ($(KBUILD_NOCMDDEP),1) | |||
187 | # User may override this check using make KBUILD_NOCMDDEP=1 | 197 | # User may override this check using make KBUILD_NOCMDDEP=1 |
188 | arg-check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \ | 198 | arg-check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \ |
189 | $(filter-out $(cmd_$@), $(cmd_$(1))) ) | 199 | $(filter-out $(cmd_$@), $(cmd_$(1))) ) |
200 | else | ||
201 | arg-check = $(if $(strip $(cmd_$@)),,1) | ||
190 | endif | 202 | endif |
191 | 203 | ||
192 | # >'< substitution is for echo to work, | 204 | # >'< substitution is for echo to work, |
diff --git a/scripts/Makefile b/scripts/Makefile index fcea26168bca..df7678febf27 100644 --- a/scripts/Makefile +++ b/scripts/Makefile | |||
@@ -6,6 +6,7 @@ | |||
6 | # pnmttologo: Convert pnm files to logo files | 6 | # pnmttologo: Convert pnm files to logo files |
7 | # conmakehash: Create chartable | 7 | # conmakehash: Create chartable |
8 | # conmakehash: Create arrays for initializing the kernel console tables | 8 | # conmakehash: Create arrays for initializing the kernel console tables |
9 | # docproc: Used in Documentation/DocBook | ||
9 | 10 | ||
10 | hostprogs-$(CONFIG_KALLSYMS) += kallsyms | 11 | hostprogs-$(CONFIG_KALLSYMS) += kallsyms |
11 | hostprogs-$(CONFIG_LOGO) += pnmtologo | 12 | hostprogs-$(CONFIG_LOGO) += pnmtologo |
@@ -16,12 +17,14 @@ hostprogs-$(BUILD_C_RECORDMCOUNT) += recordmcount | |||
16 | always := $(hostprogs-y) $(hostprogs-m) | 17 | always := $(hostprogs-y) $(hostprogs-m) |
17 | 18 | ||
18 | # The following hostprogs-y programs are only build on demand | 19 | # The following hostprogs-y programs are only build on demand |
19 | hostprogs-y += unifdef | 20 | hostprogs-y += unifdef docproc |
20 | 21 | ||
21 | # This target is used internally to avoid "is up to date" messages | 22 | # These targets are used internally to avoid "is up to date" messages |
22 | PHONY += build_unifdef | 23 | PHONY += build_unifdef |
23 | build_unifdef: scripts/unifdef FORCE | 24 | build_unifdef: scripts/unifdef FORCE |
24 | @: | 25 | @: |
26 | build_docproc: scripts/docproc FORCE | ||
27 | @: | ||
25 | 28 | ||
26 | subdir-$(CONFIG_MODVERSIONS) += genksyms | 29 | subdir-$(CONFIG_MODVERSIONS) += genksyms |
27 | subdir-y += mod | 30 | subdir-y += mod |
diff --git a/scripts/Makefile.asm-generic b/scripts/Makefile.asm-generic new file mode 100644 index 000000000000..490122c3e2aa --- /dev/null +++ b/scripts/Makefile.asm-generic | |||
@@ -0,0 +1,23 @@ | |||
1 | # include/asm-generic contains a lot of files that are used | ||
2 | # verbatim by several architectures. | ||
3 | # | ||
4 | # This Makefile reads the file arch/$(SRCARCH)/include/asm/Kbuild | ||
5 | # and for each file listed in this file with generic-y creates | ||
6 | # a small wrapper file in $(obj) (arch/$(SRCARCH)/include/generated/asm) | ||
7 | |||
8 | kbuild-file := $(srctree)/arch/$(SRCARCH)/include/asm/Kbuild | ||
9 | -include $(kbuild-file) | ||
10 | |||
11 | include scripts/Kbuild.include | ||
12 | |||
13 | # Create output directory if not already present | ||
14 | _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj)) | ||
15 | |||
16 | quiet_cmd_wrap = WRAP $@ | ||
17 | cmd_wrap = echo "\#include <asm-generic/$*.h>" >$@ | ||
18 | |||
19 | all: $(patsubst %, $(obj)/%, $(generic-y)) | ||
20 | |||
21 | $(obj)/%.h: | ||
22 | $(call cmd,wrap) | ||
23 | |||
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 6165622c3e29..a0fd5029cfe7 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build | |||
@@ -51,36 +51,52 @@ ifeq ($(KBUILD_NOPEDANTIC),) | |||
51 | endif | 51 | endif |
52 | 52 | ||
53 | # | 53 | # |
54 | # make W=1 settings | 54 | # make W=... settings |
55 | # | 55 | # |
56 | # $(call cc-option... ) handles gcc -W.. options which | 56 | # W=1 - warnings that may be relevant and does not occur too often |
57 | # W=2 - warnings that occur quite often but may still be relevant | ||
58 | # W=3 - the more obscure warnings, can most likely be ignored | ||
59 | # | ||
60 | # $(call cc-option, -W...) handles gcc -W.. options which | ||
57 | # are not supported by all versions of the compiler | 61 | # are not supported by all versions of the compiler |
58 | ifdef KBUILD_ENABLE_EXTRA_GCC_CHECKS | 62 | ifdef KBUILD_ENABLE_EXTRA_GCC_CHECKS |
59 | KBUILD_EXTRA_WARNINGS := -Wextra | 63 | warning- := $(empty) |
60 | KBUILD_EXTRA_WARNINGS += -Wunused -Wno-unused-parameter | 64 | |
61 | KBUILD_EXTRA_WARNINGS += -Waggregate-return | 65 | warning-1 := -Wextra -Wunused -Wno-unused-parameter |
62 | KBUILD_EXTRA_WARNINGS += -Wbad-function-cast | 66 | warning-1 += -Wmissing-declarations |
63 | KBUILD_EXTRA_WARNINGS += -Wcast-qual | 67 | warning-1 += -Wmissing-format-attribute |
64 | KBUILD_EXTRA_WARNINGS += -Wcast-align | 68 | warning-1 += -Wmissing-prototypes |
65 | KBUILD_EXTRA_WARNINGS += -Wconversion | 69 | warning-1 += -Wold-style-definition |
66 | KBUILD_EXTRA_WARNINGS += -Wdisabled-optimization | 70 | warning-1 += $(call cc-option, -Wmissing-include-dirs) |
67 | KBUILD_EXTRA_WARNINGS += -Wlogical-op | 71 | warning-1 += $(call cc-option, -Wunused-but-set-variable) |
68 | KBUILD_EXTRA_WARNINGS += -Wmissing-declarations | 72 | |
69 | KBUILD_EXTRA_WARNINGS += -Wmissing-format-attribute | 73 | warning-2 := -Waggregate-return |
70 | KBUILD_EXTRA_WARNINGS += $(call cc-option, -Wmissing-include-dirs,) | 74 | warning-2 += -Wcast-align |
71 | KBUILD_EXTRA_WARNINGS += -Wmissing-prototypes | 75 | warning-2 += -Wdisabled-optimization |
72 | KBUILD_EXTRA_WARNINGS += -Wnested-externs | 76 | warning-2 += -Wnested-externs |
73 | KBUILD_EXTRA_WARNINGS += -Wold-style-definition | 77 | warning-2 += -Wshadow |
74 | KBUILD_EXTRA_WARNINGS += $(call cc-option, -Woverlength-strings,) | 78 | warning-2 += $(call cc-option, -Wlogical-op) |
75 | KBUILD_EXTRA_WARNINGS += -Wpacked | 79 | |
76 | KBUILD_EXTRA_WARNINGS += -Wpacked-bitfield-compat | 80 | warning-3 := -Wbad-function-cast |
77 | KBUILD_EXTRA_WARNINGS += -Wpadded | 81 | warning-3 += -Wcast-qual |
78 | KBUILD_EXTRA_WARNINGS += -Wpointer-arith | 82 | warning-3 += -Wconversion |
79 | KBUILD_EXTRA_WARNINGS += -Wredundant-decls | 83 | warning-3 += -Wpacked |
80 | KBUILD_EXTRA_WARNINGS += -Wshadow | 84 | warning-3 += -Wpadded |
81 | KBUILD_EXTRA_WARNINGS += -Wswitch-default | 85 | warning-3 += -Wpointer-arith |
82 | KBUILD_EXTRA_WARNINGS += $(call cc-option, -Wvla,) | 86 | warning-3 += -Wredundant-decls |
83 | KBUILD_CFLAGS += $(KBUILD_EXTRA_WARNINGS) | 87 | warning-3 += -Wswitch-default |
88 | warning-3 += $(call cc-option, -Wpacked-bitfield-compat) | ||
89 | warning-3 += $(call cc-option, -Wvla) | ||
90 | |||
91 | warning := $(warning-$(findstring 1, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS))) | ||
92 | warning += $(warning-$(findstring 2, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS))) | ||
93 | warning += $(warning-$(findstring 3, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS))) | ||
94 | |||
95 | ifeq ("$(strip $(warning))","") | ||
96 | $(error W=$(KBUILD_ENABLE_EXTRA_GCC_CHECKS) is unknown) | ||
97 | endif | ||
98 | |||
99 | KBUILD_CFLAGS += $(warning) | ||
84 | endif | 100 | endif |
85 | 101 | ||
86 | include scripts/Makefile.lib | 102 | include scripts/Makefile.lib |
@@ -351,7 +367,7 @@ quiet_cmd_link_o_target = LD $@ | |||
351 | cmd_link_o_target = $(if $(strip $(obj-y)),\ | 367 | cmd_link_o_target = $(if $(strip $(obj-y)),\ |
352 | $(LD) $(ld_flags) -r -o $@ $(filter $(obj-y), $^) \ | 368 | $(LD) $(ld_flags) -r -o $@ $(filter $(obj-y), $^) \ |
353 | $(cmd_secanalysis),\ | 369 | $(cmd_secanalysis),\ |
354 | rm -f $@; $(AR) rcs $@) | 370 | rm -f $@; $(AR) rcs$(KBUILD_ARFLAGS) $@) |
355 | 371 | ||
356 | $(builtin-target): $(obj-y) FORCE | 372 | $(builtin-target): $(obj-y) FORCE |
357 | $(call if_changed,link_o_target) | 373 | $(call if_changed,link_o_target) |
@@ -377,7 +393,7 @@ $(modorder-target): $(subdir-ym) FORCE | |||
377 | # | 393 | # |
378 | ifdef lib-target | 394 | ifdef lib-target |
379 | quiet_cmd_link_l_target = AR $@ | 395 | quiet_cmd_link_l_target = AR $@ |
380 | cmd_link_l_target = rm -f $@; $(AR) rcs $@ $(lib-y) | 396 | cmd_link_l_target = rm -f $@; $(AR) rcs$(KBUILD_ARFLAGS) $@ $(lib-y) |
381 | 397 | ||
382 | $(lib-target): $(lib-y) FORCE | 398 | $(lib-target): $(lib-y) FORCE |
383 | $(call if_changed,link_l_target) | 399 | $(call if_changed,link_l_target) |
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst index f89cb87f5c01..a57f5bd5a13d 100644 --- a/scripts/Makefile.headersinst +++ b/scripts/Makefile.headersinst | |||
@@ -27,8 +27,13 @@ header-y := $(filter-out %/, $(header-y)) | |||
27 | install-file := $(install)/.install | 27 | install-file := $(install)/.install |
28 | check-file := $(install)/.check | 28 | check-file := $(install)/.check |
29 | 29 | ||
30 | # generic-y list all files an architecture uses from asm-generic | ||
31 | # Use this to build a list of headers which require a wrapper | ||
32 | wrapper-files := $(filter $(header-y), $(generic-y)) | ||
33 | |||
30 | # all headers files for this dir | 34 | # all headers files for this dir |
31 | all-files := $(header-y) $(objhdr-y) | 35 | header-y := $(filter-out $(generic-y), $(header-y)) |
36 | all-files := $(header-y) $(objhdr-y) $(wrapper-files) | ||
32 | input-files := $(addprefix $(srctree)/$(obj)/,$(header-y)) \ | 37 | input-files := $(addprefix $(srctree)/$(obj)/,$(header-y)) \ |
33 | $(addprefix $(objtree)/$(obj)/,$(objhdr-y)) | 38 | $(addprefix $(objtree)/$(obj)/,$(objhdr-y)) |
34 | output-files := $(addprefix $(install)/, $(all-files)) | 39 | output-files := $(addprefix $(install)/, $(all-files)) |
@@ -47,6 +52,9 @@ quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\ | |||
47 | cmd_install = \ | 52 | cmd_install = \ |
48 | $(PERL) $< $(srctree)/$(obj) $(install) $(SRCARCH) $(header-y); \ | 53 | $(PERL) $< $(srctree)/$(obj) $(install) $(SRCARCH) $(header-y); \ |
49 | $(PERL) $< $(objtree)/$(obj) $(install) $(SRCARCH) $(objhdr-y); \ | 54 | $(PERL) $< $(objtree)/$(obj) $(install) $(SRCARCH) $(objhdr-y); \ |
55 | for F in $(wrapper-files); do \ | ||
56 | echo "\#include <asm-generic/$$F>" > $(install)/$$F; \ | ||
57 | done; \ | ||
50 | touch $@ | 58 | touch $@ |
51 | 59 | ||
52 | quiet_cmd_remove = REMOVE $(unwanted) | 60 | quiet_cmd_remove = REMOVE $(unwanted) |
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 1c702ca8aac8..93b2b5938a2e 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib | |||
@@ -197,7 +197,7 @@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@ | |||
197 | # --------------------------------------------------------------------------- | 197 | # --------------------------------------------------------------------------- |
198 | 198 | ||
199 | quiet_cmd_gzip = GZIP $@ | 199 | quiet_cmd_gzip = GZIP $@ |
200 | cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -f -9 > $@) || \ | 200 | cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -n -f -9 > $@) || \ |
201 | (rm -f $@ ; false) | 201 | (rm -f $@ ; false) |
202 | 202 | ||
203 | # DTC | 203 | # DTC |
diff --git a/scripts/basic/.gitignore b/scripts/basic/.gitignore index bf8b199ec598..a776371a3502 100644 --- a/scripts/basic/.gitignore +++ b/scripts/basic/.gitignore | |||
@@ -1,3 +1 @@ | |||
1 | hash | ||
2 | fixdep | fixdep | |
3 | docproc | ||
diff --git a/scripts/basic/Makefile b/scripts/basic/Makefile index 4c324a1f1e0e..4fcef87bb875 100644 --- a/scripts/basic/Makefile +++ b/scripts/basic/Makefile | |||
@@ -7,9 +7,8 @@ | |||
7 | # .config is included by main Makefile. | 7 | # .config is included by main Makefile. |
8 | # --------------------------------------------------------------------------- | 8 | # --------------------------------------------------------------------------- |
9 | # fixdep: Used to generate dependency information during build process | 9 | # fixdep: Used to generate dependency information during build process |
10 | # docproc: Used in Documentation/DocBook | ||
11 | 10 | ||
12 | hostprogs-y := fixdep docproc | 11 | hostprogs-y := fixdep |
13 | always := $(hostprogs-y) | 12 | always := $(hostprogs-y) |
14 | 13 | ||
15 | # fixdep is needed to compile other host programs | 14 | # fixdep is needed to compile other host programs |
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index d8670810db65..8657f99bfb2b 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -210,10 +210,10 @@ our $typeTypedefs = qr{(?x: | |||
210 | 210 | ||
211 | our $logFunctions = qr{(?x: | 211 | our $logFunctions = qr{(?x: |
212 | printk| | 212 | printk| |
213 | pr_(debug|dbg|vdbg|devel|info|warning|err|notice|alert|crit|emerg|cont)| | 213 | [a-z]+_(emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)| |
214 | (dev|netdev|netif)_(printk|dbg|vdbg|info|warn|err|notice|alert|crit|emerg|WARN)| | ||
215 | WARN| | 214 | WARN| |
216 | panic | 215 | panic| |
216 | MODULE_[A-Z_]+ | ||
217 | )}; | 217 | )}; |
218 | 218 | ||
219 | our @typeList = ( | 219 | our @typeList = ( |
@@ -1462,7 +1462,7 @@ sub process { | |||
1462 | #80 column limit | 1462 | #80 column limit |
1463 | if ($line =~ /^\+/ && $prevrawline !~ /\/\*\*/ && | 1463 | if ($line =~ /^\+/ && $prevrawline !~ /\/\*\*/ && |
1464 | $rawline !~ /^.\s*\*\s*\@$Ident\s/ && | 1464 | $rawline !~ /^.\s*\*\s*\@$Ident\s/ && |
1465 | !($line =~ /^\+\s*$logFunctions\s*\(\s*(?:(KERN_\S+\s*|[^"]*))?"[X\t]*"\s*(?:,|\)\s*;)\s*$/ || | 1465 | !($line =~ /^\+\s*$logFunctions\s*\(\s*(?:(KERN_\S+\s*|[^"]*))?"[X\t]*"\s*(?:|,|\)\s*;)\s*$/ || |
1466 | $line =~ /^\+\s*"[^"]*"\s*(?:\s*|,|\)\s*;)\s*$/) && | 1466 | $line =~ /^\+\s*"[^"]*"\s*(?:\s*|,|\)\s*;)\s*$/) && |
1467 | $length > 80) | 1467 | $length > 80) |
1468 | { | 1468 | { |
@@ -2748,6 +2748,11 @@ sub process { | |||
2748 | WARN("sizeof(& should be avoided\n" . $herecurr); | 2748 | WARN("sizeof(& should be avoided\n" . $herecurr); |
2749 | } | 2749 | } |
2750 | 2750 | ||
2751 | # check for line continuations in quoted strings with odd counts of " | ||
2752 | if ($rawline =~ /\\$/ && $rawline =~ tr/"/"/ % 2) { | ||
2753 | WARN("Avoid line continuations in quoted strings\n" . $herecurr); | ||
2754 | } | ||
2755 | |||
2751 | # check for new externs in .c files. | 2756 | # check for new externs in .c files. |
2752 | if ($realfile =~ /\.c$/ && defined $stat && | 2757 | if ($realfile =~ /\.c$/ && defined $stat && |
2753 | $stat =~ /^.\s*(?:extern\s+)?$Type\s+($Ident)(\s*)\(/s) | 2758 | $stat =~ /^.\s*(?:extern\s+)?$Type\s+($Ident)(\s*)\(/s) |
diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl index 1afff6658a7d..17e384396705 100755 --- a/scripts/checkstack.pl +++ b/scripts/checkstack.pl | |||
@@ -12,7 +12,7 @@ | |||
12 | # sh64 port by Paul Mundt | 12 | # sh64 port by Paul Mundt |
13 | # Random bits by Matt Mackall <mpm@selenic.com> | 13 | # Random bits by Matt Mackall <mpm@selenic.com> |
14 | # M68k port by Geert Uytterhoeven and Andreas Schwab | 14 | # M68k port by Geert Uytterhoeven and Andreas Schwab |
15 | # AVR32 port by Haavard Skinnemoen <hskinnemoen@atmel.com> | 15 | # AVR32 port by Haavard Skinnemoen (Atmel) |
16 | # PARISC port by Kyle McMartin <kyle@parisc-linux.org> | 16 | # PARISC port by Kyle McMartin <kyle@parisc-linux.org> |
17 | # sparc port by Martin Habets <errandir_news@mph.eclipse.co.uk> | 17 | # sparc port by Martin Habets <errandir_news@mph.eclipse.co.uk> |
18 | # | 18 | # |
diff --git a/scripts/checkversion.pl b/scripts/checkversion.pl index b444e89a0095..5e490a8ceca5 100755 --- a/scripts/checkversion.pl +++ b/scripts/checkversion.pl | |||
@@ -12,6 +12,7 @@ $| = 1; | |||
12 | my $debugging; | 12 | my $debugging; |
13 | 13 | ||
14 | foreach my $file (@ARGV) { | 14 | foreach my $file (@ARGV) { |
15 | next if $file =~ "include/linux/version\.h"; | ||
15 | # Open this file. | 16 | # Open this file. |
16 | open( my $f, '<', $file ) | 17 | open( my $f, '<', $file ) |
17 | or die "Can't open $file: $!\n"; | 18 | or die "Can't open $file: $!\n"; |
diff --git a/scripts/basic/docproc.c b/scripts/docproc.c index 98dec87974d0..98dec87974d0 100644 --- a/scripts/basic/docproc.c +++ b/scripts/docproc.c | |||
diff --git a/scripts/export_report.pl b/scripts/export_report.pl index 04dce7c15f83..8f79b701de87 100644 --- a/scripts/export_report.pl +++ b/scripts/export_report.pl | |||
@@ -25,11 +25,12 @@ sub alphabetically { | |||
25 | sub print_depends_on { | 25 | sub print_depends_on { |
26 | my ($href) = @_; | 26 | my ($href) = @_; |
27 | print "\n"; | 27 | print "\n"; |
28 | while (my ($mod, $list) = each %$href) { | 28 | for my $mod (sort keys %$href) { |
29 | my $list = $href->{$mod}; | ||
29 | print "\t$mod:\n"; | 30 | print "\t$mod:\n"; |
30 | foreach my $sym (sort numerically @{$list}) { | 31 | foreach my $sym (sort numerically @{$list}) { |
31 | my ($symbol, $no) = split /\s+/, $sym; | 32 | my ($symbol, $no) = split /\s+/, $sym; |
32 | printf("\t\t%-25s\t%-25d\n", $symbol, $no); | 33 | printf("\t\t%-25s\n", $symbol); |
33 | } | 34 | } |
34 | print "\n"; | 35 | print "\n"; |
35 | } | 36 | } |
@@ -49,8 +50,14 @@ sub usage { | |||
49 | } | 50 | } |
50 | 51 | ||
51 | sub collectcfiles { | 52 | sub collectcfiles { |
52 | my @file | 53 | my @file; |
53 | = `cat .tmp_versions/*.mod | grep '.*\.ko\$' | sed s/\.ko$/.mod.c/`; | 54 | while (<.tmp_versions/*.mod>) { |
55 | open my $fh, '<', $_ or die "cannot open $_: $!\n"; | ||
56 | push (@file, | ||
57 | grep s/\.ko/.mod.c/, # change the suffix | ||
58 | grep m/.+\.ko/, # find the .ko path | ||
59 | <$fh>); # lines in opened file | ||
60 | } | ||
54 | chomp @file; | 61 | chomp @file; |
55 | return @file; | 62 | return @file; |
56 | } | 63 | } |
@@ -95,6 +102,8 @@ close($module_symvers); | |||
95 | # | 102 | # |
96 | # collect the usage count of each symbol. | 103 | # collect the usage count of each symbol. |
97 | # | 104 | # |
105 | my $modversion_warnings = 0; | ||
106 | |||
98 | foreach my $thismod (@allcfiles) { | 107 | foreach my $thismod (@allcfiles) { |
99 | my $module; | 108 | my $module; |
100 | 109 | ||
@@ -125,7 +134,8 @@ foreach my $thismod (@allcfiles) { | |||
125 | } | 134 | } |
126 | } | 135 | } |
127 | if ($state != 2) { | 136 | if ($state != 2) { |
128 | print "WARNING:$thismod is not built with CONFIG_MODVERSION enabled\n"; | 137 | warn "WARNING:$thismod is not built with CONFIG_MODVERSIONS enabled\n"; |
138 | $modversion_warnings++; | ||
129 | } | 139 | } |
130 | close($module); | 140 | close($module); |
131 | } | 141 | } |
@@ -159,8 +169,12 @@ printf("SECTION 2:\n\tThis section reports export-symbol-usage of in-kernel | |||
159 | modules. Each module lists the modules, and the symbols from that module that | 169 | modules. Each module lists the modules, and the symbols from that module that |
160 | it uses. Each listed symbol reports the number of modules using it\n"); | 170 | it uses. Each listed symbol reports the number of modules using it\n"); |
161 | 171 | ||
172 | print "\nNOTE: Got $modversion_warnings CONFIG_MODVERSIONS warnings\n\n" | ||
173 | if $modversion_warnings; | ||
174 | |||
162 | print "~"x80 , "\n"; | 175 | print "~"x80 , "\n"; |
163 | while (my ($thismod, $list) = each %MODULE) { | 176 | for my $thismod (sort keys %MODULE) { |
177 | my $list = $MODULE{$thismod}; | ||
164 | my %depends; | 178 | my %depends; |
165 | $thismod =~ s/\.mod\.c/.ko/; | 179 | $thismod =~ s/\.mod\.c/.ko/; |
166 | print "\t\t\t$thismod\n"; | 180 | print "\t\t\t$thismod\n"; |
diff --git a/scripts/gen_initramfs_list.sh b/scripts/gen_initramfs_list.sh index e12b1a7525cf..b482f162a18a 100644 --- a/scripts/gen_initramfs_list.sh +++ b/scripts/gen_initramfs_list.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | # Copyright (C) Martin Schlemmer <azarah@nosferatu.za.org> | 2 | # Copyright (C) Martin Schlemmer <azarah@nosferatu.za.org> |
3 | # Copyright (C) 2006 Sam Ravnborg <sam@ravnborg.org> | 3 | # Copyright (C) 2006 Sam Ravnborg <sam@ravnborg.org> |
4 | # | 4 | # |
@@ -105,9 +105,9 @@ list_parse() { | |||
105 | # for links, devices etc the format differs. See gen_init_cpio for details | 105 | # for links, devices etc the format differs. See gen_init_cpio for details |
106 | parse() { | 106 | parse() { |
107 | local location="$1" | 107 | local location="$1" |
108 | local name="${location/${srcdir}//}" | 108 | local name="/${location#${srcdir}}" |
109 | # change '//' into '/' | 109 | # change '//' into '/' |
110 | name="${name//\/\///}" | 110 | name=$(echo "$name" | sed -e 's://*:/:g') |
111 | local mode="$2" | 111 | local mode="$2" |
112 | local uid="$3" | 112 | local uid="$3" |
113 | local gid="$4" | 113 | local gid="$4" |
@@ -117,8 +117,8 @@ parse() { | |||
117 | [ "$root_gid" = "squash" ] && gid=0 || [ "$gid" -eq "$root_gid" ] && gid=0 | 117 | [ "$root_gid" = "squash" ] && gid=0 || [ "$gid" -eq "$root_gid" ] && gid=0 |
118 | local str="${mode} ${uid} ${gid}" | 118 | local str="${mode} ${uid} ${gid}" |
119 | 119 | ||
120 | [ "${ftype}" == "invalid" ] && return 0 | 120 | [ "${ftype}" = "invalid" ] && return 0 |
121 | [ "${location}" == "${srcdir}" ] && return 0 | 121 | [ "${location}" = "${srcdir}" ] && return 0 |
122 | 122 | ||
123 | case "${ftype}" in | 123 | case "${ftype}" in |
124 | "file") | 124 | "file") |
@@ -192,7 +192,7 @@ input_file() { | |||
192 | if [ -f "$1" ]; then | 192 | if [ -f "$1" ]; then |
193 | ${dep_list}header "$1" | 193 | ${dep_list}header "$1" |
194 | is_cpio="$(echo "$1" | sed 's/^.*\.cpio\(\..*\)\?/cpio/')" | 194 | is_cpio="$(echo "$1" | sed 's/^.*\.cpio\(\..*\)\?/cpio/')" |
195 | if [ $2 -eq 0 -a ${is_cpio} == "cpio" ]; then | 195 | if [ $2 -eq 0 -a ${is_cpio} = "cpio" ]; then |
196 | cpio_file=$1 | 196 | cpio_file=$1 |
197 | echo "$1" | grep -q '^.*\.cpio\..*' && is_cpio_compressed="compressed" | 197 | echo "$1" | grep -q '^.*\.cpio\..*' && is_cpio_compressed="compressed" |
198 | [ ! -z ${dep_list} ] && echo "$1" | 198 | [ ! -z ${dep_list} ] && echo "$1" |
@@ -204,7 +204,7 @@ input_file() { | |||
204 | else | 204 | else |
205 | echo "$1 \\" | 205 | echo "$1 \\" |
206 | cat "$1" | while read type dir file perm ; do | 206 | cat "$1" | while read type dir file perm ; do |
207 | if [ "$type" == "file" ]; then | 207 | if [ "$type" = "file" ]; then |
208 | echo "$file \\"; | 208 | echo "$file \\"; |
209 | fi | 209 | fi |
210 | done | 210 | done |
@@ -226,7 +226,7 @@ cpio_list= | |||
226 | output="/dev/stdout" | 226 | output="/dev/stdout" |
227 | output_file="" | 227 | output_file="" |
228 | is_cpio_compressed= | 228 | is_cpio_compressed= |
229 | compr="gzip -9 -f" | 229 | compr="gzip -n -9 -f" |
230 | 230 | ||
231 | arg="$1" | 231 | arg="$1" |
232 | case "$arg" in | 232 | case "$arg" in |
@@ -240,7 +240,7 @@ case "$arg" in | |||
240 | output_file="$1" | 240 | output_file="$1" |
241 | cpio_list="$(mktemp ${TMPDIR:-/tmp}/cpiolist.XXXXXX)" | 241 | cpio_list="$(mktemp ${TMPDIR:-/tmp}/cpiolist.XXXXXX)" |
242 | output=${cpio_list} | 242 | output=${cpio_list} |
243 | echo "$output_file" | grep -q "\.gz$" && compr="gzip -9 -f" | 243 | echo "$output_file" | grep -q "\.gz$" && compr="gzip -n -9 -f" |
244 | echo "$output_file" | grep -q "\.bz2$" && compr="bzip2 -9 -f" | 244 | echo "$output_file" | grep -q "\.bz2$" && compr="bzip2 -9 -f" |
245 | echo "$output_file" | grep -q "\.lzma$" && compr="lzma -9 -f" | 245 | echo "$output_file" | grep -q "\.lzma$" && compr="lzma -9 -f" |
246 | echo "$output_file" | grep -q "\.xz$" && \ | 246 | echo "$output_file" | grep -q "\.xz$" && \ |
@@ -287,8 +287,15 @@ done | |||
287 | # we are careful to delete tmp files | 287 | # we are careful to delete tmp files |
288 | if [ ! -z ${output_file} ]; then | 288 | if [ ! -z ${output_file} ]; then |
289 | if [ -z ${cpio_file} ]; then | 289 | if [ -z ${cpio_file} ]; then |
290 | timestamp= | ||
291 | if test -n "$KBUILD_BUILD_TIMESTAMP"; then | ||
292 | timestamp="$(date -d"$KBUILD_BUILD_TIMESTAMP" +%s || :)" | ||
293 | if test -n "$timestamp"; then | ||
294 | timestamp="-t $timestamp" | ||
295 | fi | ||
296 | fi | ||
290 | cpio_tfile="$(mktemp ${TMPDIR:-/tmp}/cpiofile.XXXXXX)" | 297 | cpio_tfile="$(mktemp ${TMPDIR:-/tmp}/cpiofile.XXXXXX)" |
291 | usr/gen_init_cpio ${cpio_list} > ${cpio_tfile} | 298 | usr/gen_init_cpio $timestamp ${cpio_list} > ${cpio_tfile} |
292 | else | 299 | else |
293 | cpio_tfile=${cpio_file} | 300 | cpio_tfile=${cpio_file} |
294 | fi | 301 | fi |
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index 60dd3eb9366e..487ac6f37ca2 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c | |||
@@ -500,6 +500,8 @@ static void optimize_result(void) | |||
500 | 500 | ||
501 | /* find the token with the breates profit value */ | 501 | /* find the token with the breates profit value */ |
502 | best = find_best_token(); | 502 | best = find_best_token(); |
503 | if (token_profit[best] == 0) | ||
504 | break; | ||
503 | 505 | ||
504 | /* place it in the "best" table */ | 506 | /* place it in the "best" table */ |
505 | best_table_len[i] = 2; | 507 | best_table_len[i] = 2; |
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 368ae306aee4..faa9a4701b6f 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile | |||
@@ -77,14 +77,15 @@ localyesconfig: $(obj)/streamline_config.pl $(obj)/conf | |||
77 | # The symlink is used to repair a deficiency in arch/um | 77 | # The symlink is used to repair a deficiency in arch/um |
78 | update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h | 78 | update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h |
79 | $(Q)echo " GEN config" | 79 | $(Q)echo " GEN config" |
80 | $(Q)xgettext --default-domain=linux \ | 80 | $(Q)xgettext --default-domain=linux \ |
81 | --add-comments --keyword=_ --keyword=N_ \ | 81 | --add-comments --keyword=_ --keyword=N_ \ |
82 | --from-code=UTF-8 \ | 82 | --from-code=UTF-8 \ |
83 | --files-from=scripts/kconfig/POTFILES.in \ | 83 | --files-from=$(srctree)/scripts/kconfig/POTFILES.in \ |
84 | --directory=$(srctree) --directory=$(objtree) \ | ||
84 | --output $(obj)/config.pot | 85 | --output $(obj)/config.pot |
85 | $(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot | 86 | $(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot |
86 | $(Q)ln -fs Kconfig.i386 arch/um/Kconfig.arch | 87 | $(Q)ln -fs Kconfig.x86 arch/um/Kconfig |
87 | $(Q)(for i in `ls arch/*/Kconfig`; \ | 88 | $(Q)(for i in `ls $(srctree)/arch/*/Kconfig`; \ |
88 | do \ | 89 | do \ |
89 | echo " GEN $$i"; \ | 90 | echo " GEN $$i"; \ |
90 | $(obj)/kxgettext $$i \ | 91 | $(obj)/kxgettext $$i \ |
@@ -92,7 +93,7 @@ update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h | |||
92 | done ) | 93 | done ) |
93 | $(Q)msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \ | 94 | $(Q)msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \ |
94 | --output $(obj)/linux.pot | 95 | --output $(obj)/linux.pot |
95 | $(Q)rm -f arch/um/Kconfig.arch | 96 | $(Q)rm -f $(srctree)/arch/um/Kconfig |
96 | $(Q)rm -f $(obj)/config.pot | 97 | $(Q)rm -f $(obj)/config.pot |
97 | 98 | ||
98 | PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig | 99 | PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig |
@@ -168,8 +169,11 @@ conf-objs := conf.o zconf.tab.o | |||
168 | mconf-objs := mconf.o zconf.tab.o $(lxdialog) | 169 | mconf-objs := mconf.o zconf.tab.o $(lxdialog) |
169 | nconf-objs := nconf.o zconf.tab.o nconf.gui.o | 170 | nconf-objs := nconf.o zconf.tab.o nconf.gui.o |
170 | kxgettext-objs := kxgettext.o zconf.tab.o | 171 | kxgettext-objs := kxgettext.o zconf.tab.o |
172 | qconf-cxxobjs := qconf.o | ||
173 | qconf-objs := kconfig_load.o zconf.tab.o | ||
174 | gconf-objs := gconf.o kconfig_load.o zconf.tab.o | ||
171 | 175 | ||
172 | hostprogs-y := conf qconf gconf kxgettext | 176 | hostprogs-y := conf |
173 | 177 | ||
174 | ifeq ($(MAKECMDGOALS),nconfig) | 178 | ifeq ($(MAKECMDGOALS),nconfig) |
175 | hostprogs-y += nconf | 179 | hostprogs-y += nconf |
@@ -179,6 +183,10 @@ ifeq ($(MAKECMDGOALS),menuconfig) | |||
179 | hostprogs-y += mconf | 183 | hostprogs-y += mconf |
180 | endif | 184 | endif |
181 | 185 | ||
186 | ifeq ($(MAKECMDGOALS),update-po-config) | ||
187 | hostprogs-y += kxgettext | ||
188 | endif | ||
189 | |||
182 | ifeq ($(MAKECMDGOALS),xconfig) | 190 | ifeq ($(MAKECMDGOALS),xconfig) |
183 | qconf-target := 1 | 191 | qconf-target := 1 |
184 | endif | 192 | endif |
@@ -188,16 +196,15 @@ endif | |||
188 | 196 | ||
189 | 197 | ||
190 | ifeq ($(qconf-target),1) | 198 | ifeq ($(qconf-target),1) |
191 | qconf-cxxobjs := qconf.o | 199 | hostprogs-y += qconf |
192 | qconf-objs := kconfig_load.o zconf.tab.o | ||
193 | endif | 200 | endif |
194 | 201 | ||
195 | ifeq ($(gconf-target),1) | 202 | ifeq ($(gconf-target),1) |
196 | gconf-objs := gconf.o kconfig_load.o zconf.tab.o | 203 | hostprogs-y += gconf |
197 | endif | 204 | endif |
198 | 205 | ||
199 | clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \ | 206 | clean-files := lkc_defs.h qconf.moc .tmp_qtcheck .tmp_gtkcheck |
200 | .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h | 207 | clean-files += zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h |
201 | clean-files += mconf qconf gconf nconf | 208 | clean-files += mconf qconf gconf nconf |
202 | clean-files += config.pot linux.pot | 209 | clean-files += config.pot linux.pot |
203 | 210 | ||
@@ -321,11 +328,12 @@ $(obj)/%.moc: $(src)/%.h | |||
321 | $(KC_QT_MOC) -i $< -o $@ | 328 | $(KC_QT_MOC) -i $< -o $@ |
322 | 329 | ||
323 | $(obj)/lkc_defs.h: $(src)/lkc_proto.h | 330 | $(obj)/lkc_defs.h: $(src)/lkc_proto.h |
324 | sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/' | 331 | $(Q)sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/' |
325 | 332 | ||
326 | # Extract gconf menu items for I18N support | 333 | # Extract gconf menu items for I18N support |
327 | $(obj)/gconf.glade.h: $(obj)/gconf.glade | 334 | $(obj)/gconf.glade.h: $(obj)/gconf.glade |
328 | intltool-extract --type=gettext/glade $(obj)/gconf.glade | 335 | $(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \ |
336 | $(obj)/gconf.glade | ||
329 | 337 | ||
330 | ### | 338 | ### |
331 | # The following requires flex/bison/gperf | 339 | # The following requires flex/bison/gperf |
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 61c35bf2d9cb..2bafd9a7c8da 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c | |||
@@ -560,8 +560,6 @@ int conf_write(const char *name) | |||
560 | const char *basename; | 560 | const char *basename; |
561 | const char *str; | 561 | const char *str; |
562 | char dirname[PATH_MAX+1], tmpname[PATH_MAX+1], newname[PATH_MAX+1]; | 562 | char dirname[PATH_MAX+1], tmpname[PATH_MAX+1], newname[PATH_MAX+1]; |
563 | time_t now; | ||
564 | int use_timestamp = 1; | ||
565 | char *env; | 563 | char *env; |
566 | 564 | ||
567 | dirname[0] = 0; | 565 | dirname[0] = 0; |
@@ -598,19 +596,11 @@ int conf_write(const char *name) | |||
598 | if (!out) | 596 | if (!out) |
599 | return 1; | 597 | return 1; |
600 | 598 | ||
601 | time(&now); | ||
602 | env = getenv("KCONFIG_NOTIMESTAMP"); | ||
603 | if (env && *env) | ||
604 | use_timestamp = 0; | ||
605 | |||
606 | fprintf(out, _("#\n" | 599 | fprintf(out, _("#\n" |
607 | "# Automatically generated make config: don't edit\n" | 600 | "# Automatically generated make config: don't edit\n" |
608 | "# %s\n" | 601 | "# %s\n" |
609 | "%s%s" | ||
610 | "#\n"), | 602 | "#\n"), |
611 | rootmenu.prompt->text, | 603 | rootmenu.prompt->text); |
612 | use_timestamp ? "# " : "", | ||
613 | use_timestamp ? ctime(&now) : ""); | ||
614 | 604 | ||
615 | if (!conf_get_changed()) | 605 | if (!conf_get_changed()) |
616 | sym_clear_all_valid(); | 606 | sym_clear_all_valid(); |
@@ -784,7 +774,6 @@ int conf_write_autoconf(void) | |||
784 | const char *str; | 774 | const char *str; |
785 | const char *name; | 775 | const char *name; |
786 | FILE *out, *tristate, *out_h; | 776 | FILE *out, *tristate, *out_h; |
787 | time_t now; | ||
788 | int i; | 777 | int i; |
789 | 778 | ||
790 | sym_clear_all_valid(); | 779 | sym_clear_all_valid(); |
@@ -811,22 +800,19 @@ int conf_write_autoconf(void) | |||
811 | return 1; | 800 | return 1; |
812 | } | 801 | } |
813 | 802 | ||
814 | time(&now); | ||
815 | fprintf(out, "#\n" | 803 | fprintf(out, "#\n" |
816 | "# Automatically generated make config: don't edit\n" | 804 | "# Automatically generated make config: don't edit\n" |
817 | "# %s\n" | 805 | "# %s\n" |
818 | "# %s" | ||
819 | "#\n", | 806 | "#\n", |
820 | rootmenu.prompt->text, ctime(&now)); | 807 | rootmenu.prompt->text); |
821 | fprintf(tristate, "#\n" | 808 | fprintf(tristate, "#\n" |
822 | "# Automatically generated - do not edit\n" | 809 | "# Automatically generated - do not edit\n" |
823 | "\n"); | 810 | "\n"); |
824 | fprintf(out_h, "/*\n" | 811 | fprintf(out_h, "/*\n" |
825 | " * Automatically generated C config: don't edit\n" | 812 | " * Automatically generated C config: don't edit\n" |
826 | " * %s\n" | 813 | " * %s\n" |
827 | " * %s" | ||
828 | " */\n", | 814 | " */\n", |
829 | rootmenu.prompt->text, ctime(&now)); | 815 | rootmenu.prompt->text); |
830 | 816 | ||
831 | for_all_symbols(i, sym) { | 817 | for_all_symbols(i, sym) { |
832 | sym_calc_value(sym); | 818 | sym_calc_value(sym); |
diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h index 3d238db49764..16bfae2d3217 100644 --- a/scripts/kconfig/expr.h +++ b/scripts/kconfig/expr.h | |||
@@ -20,12 +20,8 @@ struct file { | |||
20 | struct file *parent; | 20 | struct file *parent; |
21 | const char *name; | 21 | const char *name; |
22 | int lineno; | 22 | int lineno; |
23 | int flags; | ||
24 | }; | 23 | }; |
25 | 24 | ||
26 | #define FILE_BUSY 0x0001 | ||
27 | #define FILE_SCANNED 0x0002 | ||
28 | |||
29 | typedef enum tristate { | 25 | typedef enum tristate { |
30 | no, mod, yes | 26 | no, mod, yes |
31 | } tristate; | 27 | } tristate; |
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c index 455896164d72..a11d5f7b9eeb 100644 --- a/scripts/kconfig/gconf.c +++ b/scripts/kconfig/gconf.c | |||
@@ -253,7 +253,7 @@ void init_left_tree(void) | |||
253 | 253 | ||
254 | gtk_tree_view_set_model(view, model1); | 254 | gtk_tree_view_set_model(view, model1); |
255 | gtk_tree_view_set_headers_visible(view, TRUE); | 255 | gtk_tree_view_set_headers_visible(view, TRUE); |
256 | gtk_tree_view_set_rules_hint(view, FALSE); | 256 | gtk_tree_view_set_rules_hint(view, TRUE); |
257 | 257 | ||
258 | column = gtk_tree_view_column_new(); | 258 | column = gtk_tree_view_column_new(); |
259 | gtk_tree_view_append_column(view, column); | 259 | gtk_tree_view_append_column(view, column); |
@@ -298,7 +298,7 @@ void init_right_tree(void) | |||
298 | 298 | ||
299 | gtk_tree_view_set_model(view, model2); | 299 | gtk_tree_view_set_model(view, model2); |
300 | gtk_tree_view_set_headers_visible(view, TRUE); | 300 | gtk_tree_view_set_headers_visible(view, TRUE); |
301 | gtk_tree_view_set_rules_hint(view, FALSE); | 301 | gtk_tree_view_set_rules_hint(view, TRUE); |
302 | 302 | ||
303 | column = gtk_tree_view_column_new(); | 303 | column = gtk_tree_view_column_new(); |
304 | gtk_tree_view_append_column(view, column); | 304 | gtk_tree_view_append_column(view, column); |
@@ -756,7 +756,6 @@ void on_load_clicked(GtkButton * button, gpointer user_data) | |||
756 | void on_single_clicked(GtkButton * button, gpointer user_data) | 756 | void on_single_clicked(GtkButton * button, gpointer user_data) |
757 | { | 757 | { |
758 | view_mode = SINGLE_VIEW; | 758 | view_mode = SINGLE_VIEW; |
759 | gtk_paned_set_position(GTK_PANED(hpaned), 0); | ||
760 | gtk_widget_hide(tree1_w); | 759 | gtk_widget_hide(tree1_w); |
761 | current = &rootmenu; | 760 | current = &rootmenu; |
762 | display_tree_part(); | 761 | display_tree_part(); |
@@ -782,7 +781,6 @@ void on_split_clicked(GtkButton * button, gpointer user_data) | |||
782 | void on_full_clicked(GtkButton * button, gpointer user_data) | 781 | void on_full_clicked(GtkButton * button, gpointer user_data) |
783 | { | 782 | { |
784 | view_mode = FULL_VIEW; | 783 | view_mode = FULL_VIEW; |
785 | gtk_paned_set_position(GTK_PANED(hpaned), 0); | ||
786 | gtk_widget_hide(tree1_w); | 784 | gtk_widget_hide(tree1_w); |
787 | if (tree2) | 785 | if (tree2) |
788 | gtk_tree_store_clear(tree2); | 786 | gtk_tree_store_clear(tree2); |
@@ -1444,6 +1442,12 @@ static void display_tree(struct menu *menu) | |||
1444 | if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT)) | 1442 | if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT)) |
1445 | || (view_mode == FULL_VIEW) | 1443 | || (view_mode == FULL_VIEW) |
1446 | || (view_mode == SPLIT_VIEW))*/ | 1444 | || (view_mode == SPLIT_VIEW))*/ |
1445 | |||
1446 | /* Change paned position if the view is not in 'split mode' */ | ||
1447 | if (view_mode == SINGLE_VIEW || view_mode == FULL_VIEW) { | ||
1448 | gtk_paned_set_position(GTK_PANED(hpaned), 0); | ||
1449 | } | ||
1450 | |||
1447 | if (((view_mode == SINGLE_VIEW) && (menu->flags & MENU_ROOT)) | 1451 | if (((view_mode == SINGLE_VIEW) && (menu->flags & MENU_ROOT)) |
1448 | || (view_mode == FULL_VIEW) | 1452 | || (view_mode == FULL_VIEW) |
1449 | || (view_mode == SPLIT_VIEW)) { | 1453 | || (view_mode == SPLIT_VIEW)) { |
diff --git a/scripts/kconfig/lex.zconf.c_shipped b/scripts/kconfig/lex.zconf.c_shipped index 6eb039718259..d9182916f724 100644 --- a/scripts/kconfig/lex.zconf.c_shipped +++ b/scripts/kconfig/lex.zconf.c_shipped | |||
@@ -2363,11 +2363,11 @@ void zconf_initscan(const char *name) | |||
2363 | 2363 | ||
2364 | current_file = file_lookup(name); | 2364 | current_file = file_lookup(name); |
2365 | current_file->lineno = 1; | 2365 | current_file->lineno = 1; |
2366 | current_file->flags = FILE_BUSY; | ||
2367 | } | 2366 | } |
2368 | 2367 | ||
2369 | void zconf_nextfile(const char *name) | 2368 | void zconf_nextfile(const char *name) |
2370 | { | 2369 | { |
2370 | struct file *iter; | ||
2371 | struct file *file = file_lookup(name); | 2371 | struct file *file = file_lookup(name); |
2372 | struct buffer *buf = malloc(sizeof(*buf)); | 2372 | struct buffer *buf = malloc(sizeof(*buf)); |
2373 | memset(buf, 0, sizeof(*buf)); | 2373 | memset(buf, 0, sizeof(*buf)); |
@@ -2383,18 +2383,25 @@ void zconf_nextfile(const char *name) | |||
2383 | buf->parent = current_buf; | 2383 | buf->parent = current_buf; |
2384 | current_buf = buf; | 2384 | current_buf = buf; |
2385 | 2385 | ||
2386 | if (file->flags & FILE_BUSY) { | 2386 | for (iter = current_file->parent; iter; iter = iter->parent ) { |
2387 | printf("%s:%d: do not source '%s' from itself\n", | 2387 | if (!strcmp(current_file->name,iter->name) ) { |
2388 | zconf_curname(), zconf_lineno(), name); | 2388 | printf("%s:%d: recursive inclusion detected. " |
2389 | exit(1); | 2389 | "Inclusion path:\n current file : '%s'\n", |
2390 | } | 2390 | zconf_curname(), zconf_lineno(), |
2391 | if (file->flags & FILE_SCANNED) { | 2391 | zconf_curname()); |
2392 | printf("%s:%d: file '%s' is already sourced from '%s'\n", | 2392 | iter = current_file->parent; |
2393 | zconf_curname(), zconf_lineno(), name, | 2393 | while (iter && \ |
2394 | file->parent->name); | 2394 | strcmp(iter->name,current_file->name)) { |
2395 | exit(1); | 2395 | printf(" included from: '%s:%d'\n", |
2396 | iter->name, iter->lineno-1); | ||
2397 | iter = iter->parent; | ||
2398 | } | ||
2399 | if (iter) | ||
2400 | printf(" included from: '%s:%d'\n", | ||
2401 | iter->name, iter->lineno+1); | ||
2402 | exit(1); | ||
2403 | } | ||
2396 | } | 2404 | } |
2397 | file->flags |= FILE_BUSY; | ||
2398 | file->lineno = 1; | 2405 | file->lineno = 1; |
2399 | file->parent = current_file; | 2406 | file->parent = current_file; |
2400 | current_file = file; | 2407 | current_file = file; |
@@ -2404,8 +2411,6 @@ static void zconf_endfile(void) | |||
2404 | { | 2411 | { |
2405 | struct buffer *parent; | 2412 | struct buffer *parent; |
2406 | 2413 | ||
2407 | current_file->flags |= FILE_SCANNED; | ||
2408 | current_file->flags &= ~FILE_BUSY; | ||
2409 | current_file = current_file->parent; | 2414 | current_file = current_file->parent; |
2410 | 2415 | ||
2411 | parent = current_buf->parent; | 2416 | parent = current_buf->parent; |
diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c index db56377393d7..488dd7410787 100644 --- a/scripts/kconfig/nconf.c +++ b/scripts/kconfig/nconf.c | |||
@@ -373,18 +373,18 @@ static void print_function_line(void) | |||
373 | const int skip = 1; | 373 | const int skip = 1; |
374 | 374 | ||
375 | for (i = 0; i < function_keys_num; i++) { | 375 | for (i = 0; i < function_keys_num; i++) { |
376 | wattrset(main_window, attributes[FUNCTION_HIGHLIGHT]); | 376 | (void) wattrset(main_window, attributes[FUNCTION_HIGHLIGHT]); |
377 | mvwprintw(main_window, LINES-3, offset, | 377 | mvwprintw(main_window, LINES-3, offset, |
378 | "%s", | 378 | "%s", |
379 | function_keys[i].key_str); | 379 | function_keys[i].key_str); |
380 | wattrset(main_window, attributes[FUNCTION_TEXT]); | 380 | (void) wattrset(main_window, attributes[FUNCTION_TEXT]); |
381 | offset += strlen(function_keys[i].key_str); | 381 | offset += strlen(function_keys[i].key_str); |
382 | mvwprintw(main_window, LINES-3, | 382 | mvwprintw(main_window, LINES-3, |
383 | offset, "%s", | 383 | offset, "%s", |
384 | function_keys[i].func); | 384 | function_keys[i].func); |
385 | offset += strlen(function_keys[i].func) + skip; | 385 | offset += strlen(function_keys[i].func) + skip; |
386 | } | 386 | } |
387 | wattrset(main_window, attributes[NORMAL]); | 387 | (void) wattrset(main_window, attributes[NORMAL]); |
388 | } | 388 | } |
389 | 389 | ||
390 | /* help */ | 390 | /* help */ |
@@ -953,16 +953,16 @@ static void show_menu(const char *prompt, const char *instructions, | |||
953 | current_instructions = instructions; | 953 | current_instructions = instructions; |
954 | 954 | ||
955 | clear(); | 955 | clear(); |
956 | wattrset(main_window, attributes[NORMAL]); | 956 | (void) wattrset(main_window, attributes[NORMAL]); |
957 | print_in_middle(stdscr, 1, 0, COLS, | 957 | print_in_middle(stdscr, 1, 0, COLS, |
958 | menu_backtitle, | 958 | menu_backtitle, |
959 | attributes[MAIN_HEADING]); | 959 | attributes[MAIN_HEADING]); |
960 | 960 | ||
961 | wattrset(main_window, attributes[MAIN_MENU_BOX]); | 961 | (void) wattrset(main_window, attributes[MAIN_MENU_BOX]); |
962 | box(main_window, 0, 0); | 962 | box(main_window, 0, 0); |
963 | wattrset(main_window, attributes[MAIN_MENU_HEADING]); | 963 | (void) wattrset(main_window, attributes[MAIN_MENU_HEADING]); |
964 | mvwprintw(main_window, 0, 3, " %s ", prompt); | 964 | mvwprintw(main_window, 0, 3, " %s ", prompt); |
965 | wattrset(main_window, attributes[NORMAL]); | 965 | (void) wattrset(main_window, attributes[NORMAL]); |
966 | 966 | ||
967 | set_menu_items(curses_menu, curses_menu_items); | 967 | set_menu_items(curses_menu, curses_menu_items); |
968 | 968 | ||
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 06dd2e33581d..c2796b866f8f 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc | |||
@@ -1489,8 +1489,7 @@ void ConfigMainWindow::saveConfigAs(void) | |||
1489 | QString s = Q3FileDialog::getSaveFileName(conf_get_configname(), NULL, this); | 1489 | QString s = Q3FileDialog::getSaveFileName(conf_get_configname(), NULL, this); |
1490 | if (s.isNull()) | 1490 | if (s.isNull()) |
1491 | return; | 1491 | return; |
1492 | if (conf_write(QFile::encodeName(s))) | 1492 | saveConfig(); |
1493 | QMessageBox::information(this, "qconf", _("Unable to save configuration!")); | ||
1494 | } | 1493 | } |
1495 | 1494 | ||
1496 | void ConfigMainWindow::searchConfig(void) | 1495 | void ConfigMainWindow::searchConfig(void) |
@@ -1643,7 +1642,7 @@ void ConfigMainWindow::closeEvent(QCloseEvent* e) | |||
1643 | mb.setButtonText(QMessageBox::Cancel, _("Cancel Exit")); | 1642 | mb.setButtonText(QMessageBox::Cancel, _("Cancel Exit")); |
1644 | switch (mb.exec()) { | 1643 | switch (mb.exec()) { |
1645 | case QMessageBox::Yes: | 1644 | case QMessageBox::Yes: |
1646 | conf_write(NULL); | 1645 | saveConfig(); |
1647 | case QMessageBox::No: | 1646 | case QMessageBox::No: |
1648 | e->accept(); | 1647 | e->accept(); |
1649 | break; | 1648 | break; |
diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l index 3dbaec185cc4..b22f884f9022 100644 --- a/scripts/kconfig/zconf.l +++ b/scripts/kconfig/zconf.l | |||
@@ -294,11 +294,11 @@ void zconf_initscan(const char *name) | |||
294 | 294 | ||
295 | current_file = file_lookup(name); | 295 | current_file = file_lookup(name); |
296 | current_file->lineno = 1; | 296 | current_file->lineno = 1; |
297 | current_file->flags = FILE_BUSY; | ||
298 | } | 297 | } |
299 | 298 | ||
300 | void zconf_nextfile(const char *name) | 299 | void zconf_nextfile(const char *name) |
301 | { | 300 | { |
301 | struct file *iter; | ||
302 | struct file *file = file_lookup(name); | 302 | struct file *file = file_lookup(name); |
303 | struct buffer *buf = malloc(sizeof(*buf)); | 303 | struct buffer *buf = malloc(sizeof(*buf)); |
304 | memset(buf, 0, sizeof(*buf)); | 304 | memset(buf, 0, sizeof(*buf)); |
@@ -314,18 +314,25 @@ void zconf_nextfile(const char *name) | |||
314 | buf->parent = current_buf; | 314 | buf->parent = current_buf; |
315 | current_buf = buf; | 315 | current_buf = buf; |
316 | 316 | ||
317 | if (file->flags & FILE_BUSY) { | 317 | for (iter = current_file->parent; iter; iter = iter->parent ) { |
318 | printf("%s:%d: do not source '%s' from itself\n", | 318 | if (!strcmp(current_file->name,iter->name) ) { |
319 | zconf_curname(), zconf_lineno(), name); | 319 | printf("%s:%d: recursive inclusion detected. " |
320 | exit(1); | 320 | "Inclusion path:\n current file : '%s'\n", |
321 | } | 321 | zconf_curname(), zconf_lineno(), |
322 | if (file->flags & FILE_SCANNED) { | 322 | zconf_curname()); |
323 | printf("%s:%d: file '%s' is already sourced from '%s'\n", | 323 | iter = current_file->parent; |
324 | zconf_curname(), zconf_lineno(), name, | 324 | while (iter && \ |
325 | file->parent->name); | 325 | strcmp(iter->name,current_file->name)) { |
326 | exit(1); | 326 | printf(" included from: '%s:%d'\n", |
327 | iter->name, iter->lineno-1); | ||
328 | iter = iter->parent; | ||
329 | } | ||
330 | if (iter) | ||
331 | printf(" included from: '%s:%d'\n", | ||
332 | iter->name, iter->lineno+1); | ||
333 | exit(1); | ||
334 | } | ||
327 | } | 335 | } |
328 | file->flags |= FILE_BUSY; | ||
329 | file->lineno = 1; | 336 | file->lineno = 1; |
330 | file->parent = current_file; | 337 | file->parent = current_file; |
331 | current_file = file; | 338 | current_file = file; |
@@ -335,8 +342,6 @@ static void zconf_endfile(void) | |||
335 | { | 342 | { |
336 | struct buffer *parent; | 343 | struct buffer *parent; |
337 | 344 | ||
338 | current_file->flags |= FILE_SCANNED; | ||
339 | current_file->flags &= ~FILE_BUSY; | ||
340 | current_file = current_file->parent; | 345 | current_file = current_file->parent; |
341 | 346 | ||
342 | parent = current_buf->parent; | 347 | parent = current_buf->parent; |
diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h index 50ad317a4bf9..f221ddf69080 100755 --- a/scripts/mkcompile_h +++ b/scripts/mkcompile_h | |||
@@ -42,6 +42,16 @@ if [ -z "$KBUILD_BUILD_TIMESTAMP" ]; then | |||
42 | else | 42 | else |
43 | TIMESTAMP=$KBUILD_BUILD_TIMESTAMP | 43 | TIMESTAMP=$KBUILD_BUILD_TIMESTAMP |
44 | fi | 44 | fi |
45 | if test -z "$KBUILD_BUILD_USER"; then | ||
46 | LINUX_COMPILE_BY=$(whoami | sed 's/\\/\\\\/') | ||
47 | else | ||
48 | LINUX_COMPILE_BY=$KBUILD_BUILD_USER | ||
49 | fi | ||
50 | if test -z "$KBUILD_BUILD_HOST"; then | ||
51 | LINUX_COMPILE_HOST=`hostname` | ||
52 | else | ||
53 | LINUX_COMPILE_HOST=$KBUILD_BUILD_HOST | ||
54 | fi | ||
45 | 55 | ||
46 | UTS_VERSION="#$VERSION" | 56 | UTS_VERSION="#$VERSION" |
47 | CONFIG_FLAGS="" | 57 | CONFIG_FLAGS="" |
@@ -63,20 +73,8 @@ UTS_TRUNCATE="cut -b -$UTS_LEN" | |||
63 | 73 | ||
64 | echo \#define UTS_VERSION \"`echo $UTS_VERSION | $UTS_TRUNCATE`\" | 74 | echo \#define UTS_VERSION \"`echo $UTS_VERSION | $UTS_TRUNCATE`\" |
65 | 75 | ||
66 | echo \#define LINUX_COMPILE_TIME \"`date +%T`\" | 76 | echo \#define LINUX_COMPILE_BY \"`echo $LINUX_COMPILE_BY | $UTS_TRUNCATE`\" |
67 | echo \#define LINUX_COMPILE_BY \"`whoami`\" | 77 | echo \#define LINUX_COMPILE_HOST \"`echo $LINUX_COMPILE_HOST | $UTS_TRUNCATE`\" |
68 | echo \#define LINUX_COMPILE_HOST \"`hostname | $UTS_TRUNCATE`\" | ||
69 | |||
70 | domain=`dnsdomainname 2> /dev/null` | ||
71 | if [ -z "$domain" ]; then | ||
72 | domain=`domainname 2> /dev/null` | ||
73 | fi | ||
74 | |||
75 | if [ -n "$domain" ]; then | ||
76 | echo \#define LINUX_COMPILE_DOMAIN \"`echo $domain | $UTS_TRUNCATE`\" | ||
77 | else | ||
78 | echo \#define LINUX_COMPILE_DOMAIN | ||
79 | fi | ||
80 | 78 | ||
81 | echo \#define LINUX_COMPILER \"`$CC -v 2>&1 | tail -n 1`\" | 79 | echo \#define LINUX_COMPILER \"`$CC -v 2>&1 | tail -n 1`\" |
82 | ) > .tmpcompile | 80 | ) > .tmpcompile |
@@ -91,8 +89,8 @@ UTS_TRUNCATE="cut -b -$UTS_LEN" | |||
91 | # first line. | 89 | # first line. |
92 | 90 | ||
93 | if [ -r $TARGET ] && \ | 91 | if [ -r $TARGET ] && \ |
94 | grep -v 'UTS_VERSION\|LINUX_COMPILE_TIME' $TARGET > .tmpver.1 && \ | 92 | grep -v 'UTS_VERSION' $TARGET > .tmpver.1 && \ |
95 | grep -v 'UTS_VERSION\|LINUX_COMPILE_TIME' .tmpcompile > .tmpver.2 && \ | 93 | grep -v 'UTS_VERSION' .tmpcompile > .tmpver.2 && \ |
96 | cmp -s .tmpver.1 .tmpver.2; then | 94 | cmp -s .tmpver.1 .tmpver.2; then |
97 | rm -f .tmpcompile | 95 | rm -f .tmpcompile |
98 | else | 96 | else |
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 88f3f07205f8..e26e2fb462d4 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c | |||
@@ -702,6 +702,24 @@ static int do_ssb_entry(const char *filename, | |||
702 | return 1; | 702 | return 1; |
703 | } | 703 | } |
704 | 704 | ||
705 | /* Looks like: bcma:mNidNrevNclN. */ | ||
706 | static int do_bcma_entry(const char *filename, | ||
707 | struct bcma_device_id *id, char *alias) | ||
708 | { | ||
709 | id->manuf = TO_NATIVE(id->manuf); | ||
710 | id->id = TO_NATIVE(id->id); | ||
711 | id->rev = TO_NATIVE(id->rev); | ||
712 | id->class = TO_NATIVE(id->class); | ||
713 | |||
714 | strcpy(alias, "bcma:"); | ||
715 | ADD(alias, "m", id->manuf != BCMA_ANY_MANUF, id->manuf); | ||
716 | ADD(alias, "id", id->id != BCMA_ANY_ID, id->id); | ||
717 | ADD(alias, "rev", id->rev != BCMA_ANY_REV, id->rev); | ||
718 | ADD(alias, "cl", id->class != BCMA_ANY_CLASS, id->class); | ||
719 | add_wildcard(alias); | ||
720 | return 1; | ||
721 | } | ||
722 | |||
705 | /* Looks like: virtio:dNvN */ | 723 | /* Looks like: virtio:dNvN */ |
706 | static int do_virtio_entry(const char *filename, struct virtio_device_id *id, | 724 | static int do_virtio_entry(const char *filename, struct virtio_device_id *id, |
707 | char *alias) | 725 | char *alias) |
@@ -968,6 +986,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info, | |||
968 | do_table(symval, sym->st_size, | 986 | do_table(symval, sym->st_size, |
969 | sizeof(struct ssb_device_id), "ssb", | 987 | sizeof(struct ssb_device_id), "ssb", |
970 | do_ssb_entry, mod); | 988 | do_ssb_entry, mod); |
989 | else if (sym_is(symname, "__mod_bcma_device_table")) | ||
990 | do_table(symval, sym->st_size, | ||
991 | sizeof(struct bcma_device_id), "bcma", | ||
992 | do_bcma_entry, mod); | ||
971 | else if (sym_is(symname, "__mod_virtio_device_table")) | 993 | else if (sym_is(symname, "__mod_virtio_device_table")) |
972 | do_table(symval, sym->st_size, | 994 | do_table(symval, sym->st_size, |
973 | sizeof(struct virtio_device_id), "virtio", | 995 | sizeof(struct virtio_device_id), "virtio", |
diff --git a/scripts/package/Makefile b/scripts/package/Makefile index a834b935f536..006960ebbce9 100644 --- a/scripts/package/Makefile +++ b/scripts/package/Makefile | |||
@@ -26,9 +26,9 @@ RPM := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \ | |||
26 | else echo rpm; fi) | 26 | else echo rpm; fi) |
27 | 27 | ||
28 | # Remove hyphens since they have special meaning in RPM filenames | 28 | # Remove hyphens since they have special meaning in RPM filenames |
29 | KERNELPATH := kernel-$(subst -,,$(KERNELRELEASE)) | 29 | KERNELPATH := kernel-$(subst -,_,$(KERNELRELEASE)) |
30 | MKSPEC := $(srctree)/scripts/package/mkspec | 30 | MKSPEC := $(srctree)/scripts/package/mkspec |
31 | PREV := set -e; cd ..; | 31 | PREV := set -e; cd -P ..; |
32 | 32 | ||
33 | # rpm-pkg | 33 | # rpm-pkg |
34 | # --------------------------------------------------------------------------- | 34 | # --------------------------------------------------------------------------- |
diff --git a/scripts/package/mkspec b/scripts/package/mkspec index e1c1d5b8ca70..4bf17ddf7c7f 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec | |||
@@ -22,7 +22,7 @@ if [ "`grep CONFIG_DRM=y .config | cut -f2 -d\=`" = "y" ]; then | |||
22 | fi | 22 | fi |
23 | 23 | ||
24 | PROVIDES="$PROVIDES kernel-$KERNELRELEASE" | 24 | PROVIDES="$PROVIDES kernel-$KERNELRELEASE" |
25 | __KERNELRELEASE=`echo $KERNELRELEASE | sed -e "s/-//g"` | 25 | __KERNELRELEASE=`echo $KERNELRELEASE | sed -e "s/-/_/g"` |
26 | 26 | ||
27 | echo "Name: kernel" | 27 | echo "Name: kernel" |
28 | echo "Summary: The Linux Kernel" | 28 | echo "Summary: The Linux Kernel" |
@@ -47,6 +47,18 @@ echo "" | |||
47 | echo "%description" | 47 | echo "%description" |
48 | echo "The Linux Kernel, the operating system core itself" | 48 | echo "The Linux Kernel, the operating system core itself" |
49 | echo "" | 49 | echo "" |
50 | echo "%package headers" | ||
51 | echo "Summary: Header files for the Linux kernel for use by glibc" | ||
52 | echo "Group: Development/System" | ||
53 | echo "Obsoletes: kernel-headers" | ||
54 | echo "Provides: kernel-headers = %{version}" | ||
55 | echo "%description headers" | ||
56 | echo "Kernel-headers includes the C header files that specify the interface" | ||
57 | echo "between the Linux kernel and userspace libraries and programs. The" | ||
58 | echo "header files define structures and constants that are needed for" | ||
59 | echo "building most standard programs and are also needed for rebuilding the" | ||
60 | echo "glibc package." | ||
61 | echo "" | ||
50 | 62 | ||
51 | if ! $PREBUILT; then | 63 | if ! $PREBUILT; then |
52 | echo "%prep" | 64 | echo "%prep" |
@@ -83,6 +95,7 @@ echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE" | |||
83 | echo "%endif" | 95 | echo "%endif" |
84 | echo "%endif" | 96 | echo "%endif" |
85 | 97 | ||
98 | echo 'make %{?_smp_mflags} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr headers_install' | ||
86 | echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE" | 99 | echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE" |
87 | 100 | ||
88 | echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$KERNELRELEASE" | 101 | echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$KERNELRELEASE" |
@@ -105,3 +118,7 @@ echo "/lib/modules/$KERNELRELEASE" | |||
105 | echo "/lib/firmware" | 118 | echo "/lib/firmware" |
106 | echo "/boot/*" | 119 | echo "/boot/*" |
107 | echo "" | 120 | echo "" |
121 | echo "%files headers" | ||
122 | echo '%defattr (-, root, root)' | ||
123 | echo "/usr/include" | ||
124 | echo "" | ||
diff --git a/scripts/patch-kernel b/scripts/patch-kernel index 46a59cae3a0a..20fb25c23382 100755 --- a/scripts/patch-kernel +++ b/scripts/patch-kernel | |||
@@ -250,7 +250,7 @@ while : # incrementing SUBLEVEL (s in v.p.s) | |||
250 | do | 250 | do |
251 | CURRENTFULLVERSION="$VERSION.$PATCHLEVEL.$SUBLEVEL" | 251 | CURRENTFULLVERSION="$VERSION.$PATCHLEVEL.$SUBLEVEL" |
252 | EXTRAVER= | 252 | EXTRAVER= |
253 | if [ $STOPFULLVERSION = $CURRENTFULLVERSION ]; then | 253 | if [ x$STOPFULLVERSION = x$CURRENTFULLVERSION ]; then |
254 | echo "Stopping at $CURRENTFULLVERSION base as requested." | 254 | echo "Stopping at $CURRENTFULLVERSION base as requested." |
255 | break | 255 | break |
256 | fi | 256 | fi |