aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/kbuild/makefiles.txt6
-rw-r--r--Makefile160
-rw-r--r--arch/m68knommu/Makefile2
-rw-r--r--arch/mips/Makefile2
-rw-r--r--drivers/block/Kconfig42
-rw-r--r--include/asm-generic/vmlinux.lds.h9
-rw-r--r--init/Kconfig22
-rw-r--r--init/Makefile3
-rw-r--r--scripts/Kbuild.include96
-rw-r--r--scripts/Makefile.build7
-rw-r--r--scripts/Makefile.clean14
-rw-r--r--scripts/Makefile.host3
-rw-r--r--scripts/Makefile.lib99
-rw-r--r--scripts/Makefile.modinst2
-rw-r--r--scripts/Makefile.modpost1
-rw-r--r--scripts/conmakehash.c2
-rw-r--r--scripts/kallsyms.c6
-rw-r--r--scripts/kconfig/lkc.h2
-rw-r--r--scripts/kconfig/menu.c4
-rw-r--r--scripts/kconfig/zconf.tab.c_shipped8
-rw-r--r--scripts/kconfig/zconf.y8
-rwxr-xr-xscripts/kernel-doc8
-rw-r--r--scripts/lxdialog/dialog.h2
-rw-r--r--scripts/lxdialog/inputbox.c4
-rwxr-xr-xscripts/mkcompile_h12
-rw-r--r--scripts/mod/sumversion.c8
-rw-r--r--scripts/package/Makefile24
-rw-r--r--scripts/package/builddeb56
-rw-r--r--scripts/package/buildtar111
-rwxr-xr-xscripts/package/mkspec9
-rw-r--r--scripts/reference_discarded.pl1
-rw-r--r--scripts/reference_init.pl1
-rw-r--r--scripts/setlocalversion56
-rw-r--r--usr/Kconfig46
-rw-r--r--usr/Makefile2
35 files changed, 547 insertions, 291 deletions
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
index 2616a58a5a4b..9a1586590d82 100644
--- a/Documentation/kbuild/makefiles.txt
+++ b/Documentation/kbuild/makefiles.txt
@@ -872,7 +872,13 @@ When kbuild executes the following steps are followed (roughly):
872 Assignments to $(targets) are without $(obj)/ prefix. 872 Assignments to $(targets) are without $(obj)/ prefix.
873 if_changed may be used in conjunction with custom commands as 873 if_changed may be used in conjunction with custom commands as
874 defined in 6.7 "Custom kbuild commands". 874 defined in 6.7 "Custom kbuild commands".
875
875 Note: It is a typical mistake to forget the FORCE prerequisite. 876 Note: It is a typical mistake to forget the FORCE prerequisite.
877 Another common pitfall is that whitespace is sometimes
878 significant; for instance, the below will fail (note the extra space
879 after the comma):
880 target: source(s) FORCE
881 #WRONG!# $(call if_changed, ld/objcopy/gzip)
876 882
877 ld 883 ld
878 Link target. Often LDFLAGS_$@ is used to set specific options to ld. 884 Link target. Often LDFLAGS_$@ is used to set specific options to ld.
diff --git a/Makefile b/Makefile
index 2d68adbcfa28..63e5c9f0bc7a 100644
--- a/Makefile
+++ b/Makefile
@@ -109,10 +109,9 @@ $(if $(KBUILD_OUTPUT),, \
109.PHONY: $(MAKECMDGOALS) 109.PHONY: $(MAKECMDGOALS)
110 110
111$(filter-out _all,$(MAKECMDGOALS)) _all: 111$(filter-out _all,$(MAKECMDGOALS)) _all:
112 $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \ 112 $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \
113 KBUILD_SRC=$(CURDIR) KBUILD_VERBOSE=$(KBUILD_VERBOSE) \ 113 KBUILD_SRC=$(CURDIR) \
114 KBUILD_CHECK=$(KBUILD_CHECK) KBUILD_EXTMOD="$(KBUILD_EXTMOD)" \ 114 KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile $@
115 -f $(CURDIR)/Makefile $@
116 115
117# Leave processing to above invocation of make 116# Leave processing to above invocation of make
118skip-makefile := 1 117skip-makefile := 1
@@ -233,7 +232,7 @@ ifeq ($(MAKECMDGOALS),)
233 KBUILD_MODULES := 1 232 KBUILD_MODULES := 1
234endif 233endif
235 234
236export KBUILD_MODULES KBUILD_BUILTIN KBUILD_VERBOSE 235export KBUILD_MODULES KBUILD_BUILTIN
237export KBUILD_CHECKSRC KBUILD_SRC KBUILD_EXTMOD 236export KBUILD_CHECKSRC KBUILD_SRC KBUILD_EXTMOD
238 237
239# Beautify output 238# Beautify output
@@ -309,6 +308,9 @@ cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh \
309# Look for make include files relative to root of kernel src 308# Look for make include files relative to root of kernel src
310MAKEFLAGS += --include-dir=$(srctree) 309MAKEFLAGS += --include-dir=$(srctree)
311 310
311# We need some generic definitions
312include $(srctree)/scripts/Kbuild.include
313
312# For maximum performance (+ possibly random breakage, uncomment 314# For maximum performance (+ possibly random breakage, uncomment
313# the following) 315# the following)
314 316
@@ -348,7 +350,7 @@ LINUXINCLUDE := -Iinclude \
348 350
349CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE) 351CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE)
350 352
351CFLAGS := -Wall -Wstrict-prototypes -Wno-trigraphs \ 353CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
352 -fno-strict-aliasing -fno-common \ 354 -fno-strict-aliasing -fno-common \
353 -ffreestanding 355 -ffreestanding
354AFLAGS := -D__ASSEMBLY__ 356AFLAGS := -D__ASSEMBLY__
@@ -367,11 +369,6 @@ export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
367# even be read-only. 369# even be read-only.
368export MODVERDIR := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_versions 370export MODVERDIR := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_versions
369 371
370# The temporary file to save gcc -MD generated dependencies must not
371# contain a comma
372comma := ,
373depfile = $(subst $(comma),_,$(@D)/.$(@F).d)
374
375# Files to ignore in find ... statements 372# Files to ignore in find ... statements
376 373
377RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS -o -name .pc -o -name .hg \) -prune -o 374RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS -o -name .pc -o -name .hg \) -prune -o
@@ -551,6 +548,26 @@ export KBUILD_IMAGE ?= vmlinux
551# images. Default is /boot, but you can set it to other values 548# images. Default is /boot, but you can set it to other values
552export INSTALL_PATH ?= /boot 549export INSTALL_PATH ?= /boot
553 550
551# If CONFIG_LOCALVERSION_AUTO is set, we automatically perform some tests
552# and try to determine if the current source tree is a release tree, of any sort,
553# or if is a pure development tree.
554#
555# A 'release tree' is any tree with a git TAG associated
556# with it. The primary goal of this is to make it safe for a native
557# git/CVS/SVN user to build a release tree (i.e, 2.6.9) and also to
558# continue developing against the current Linus tree, without having the Linus
559# tree overwrite the 2.6.9 tree when installed.
560#
561# Currently, only git is supported.
562# Other SCMs can edit scripts/setlocalversion and add the appropriate
563# checks as needed.
564
565
566ifdef CONFIG_LOCALVERSION_AUTO
567 localversion-auto := $(shell $(PERL) $(srctree)/scripts/setlocalversion $(srctree))
568 LOCALVERSION := $(LOCALVERSION)$(localversion-auto)
569endif
570
554# 571#
555# INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory 572# INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory
556# relocations required by build roots. This is not defined in the 573# relocations required by build roots. This is not defined in the
@@ -691,8 +708,10 @@ endef
691 708
692# Update vmlinux version before link 709# Update vmlinux version before link
693# Use + in front of this rule to silent warning about make -j1 710# Use + in front of this rule to silent warning about make -j1
711# First command is ':' to allow us to use + in front of this rule
694cmd_ksym_ld = $(cmd_vmlinux__) 712cmd_ksym_ld = $(cmd_vmlinux__)
695define rule_ksym_ld 713define rule_ksym_ld
714 :
696 +$(call cmd,vmlinux_version) 715 +$(call cmd,vmlinux_version)
697 $(call cmd,vmlinux__) 716 $(call cmd,vmlinux__)
698 $(Q)echo 'cmd_$@ := $(cmd_vmlinux__)' > $(@D)/.$(@F).cmd 717 $(Q)echo 'cmd_$@ := $(cmd_vmlinux__)' > $(@D)/.$(@F).cmd
@@ -722,6 +741,16 @@ quiet_cmd_kallsyms = KSYM $@
722# Needs to visit scripts/ before $(KALLSYMS) can be used. 741# Needs to visit scripts/ before $(KALLSYMS) can be used.
723$(KALLSYMS): scripts ; 742$(KALLSYMS): scripts ;
724 743
744# Generate some data for debugging strange kallsyms problems
745debug_kallsyms: .tmp_map$(last_kallsyms)
746
747.tmp_map%: .tmp_vmlinux% FORCE
748 ($(OBJDUMP) -h $< | $(AWK) '/^ +[0-9]/{print $$4 " 0 " $$2}'; $(NM) $<) | sort > $@
749
750.tmp_map3: .tmp_map2
751
752.tmp_map2: .tmp_map1
753
725endif # ifdef CONFIG_KALLSYMS 754endif # ifdef CONFIG_KALLSYMS
726 755
727# vmlinux image - including updated kernel symbols 756# vmlinux image - including updated kernel symbols
@@ -757,7 +786,7 @@ $(vmlinux-dirs): prepare-all scripts
757prepare2: 786prepare2:
758ifneq ($(KBUILD_SRC),) 787ifneq ($(KBUILD_SRC),)
759 @echo ' Using $(srctree) as source for kernel' 788 @echo ' Using $(srctree) as source for kernel'
760 $(Q)if [ -h $(srctree)/include/asm -o -f $(srctree)/.config ]; then \ 789 $(Q)if [ -f $(srctree)/.config ]; then \
761 echo " $(srctree) is not clean, please run 'make mrproper'";\ 790 echo " $(srctree) is not clean, please run 'make mrproper'";\
762 echo " in the '$(srctree)' directory.";\ 791 echo " in the '$(srctree)' directory.";\
763 /bin/false; \ 792 /bin/false; \
@@ -769,7 +798,8 @@ endif
769# prepare1 creates a makefile if using a separate output directory 798# prepare1 creates a makefile if using a separate output directory
770prepare1: prepare2 outputmakefile 799prepare1: prepare2 outputmakefile
771 800
772prepare0: prepare1 include/linux/version.h include/asm include/config/MARKER 801prepare0: prepare1 include/linux/version.h include/asm \
802 include/config/MARKER
773ifneq ($(KBUILD_MODULES),) 803ifneq ($(KBUILD_MODULES),)
774 $(Q)rm -rf $(MODVERDIR) 804 $(Q)rm -rf $(MODVERDIR)
775 $(Q)mkdir -p $(MODVERDIR) 805 $(Q)mkdir -p $(MODVERDIR)
@@ -875,7 +905,7 @@ modules_install: _modinst_ _modinst_post
875 905
876.PHONY: _modinst_ 906.PHONY: _modinst_
877_modinst_: 907_modinst_:
878 @if [ -z "`$(DEPMOD) -V | grep module-init-tools`" ]; then \ 908 @if [ -z "`$(DEPMOD) -V 2>/dev/null | grep module-init-tools`" ]; then \
879 echo "Warning: you may need to install module-init-tools"; \ 909 echo "Warning: you may need to install module-init-tools"; \
880 echo "See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt";\ 910 echo "See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt";\
881 sleep 1; \ 911 sleep 1; \
@@ -1159,37 +1189,49 @@ else
1159__srctree = $(srctree)/ 1189__srctree = $(srctree)/
1160endif 1190endif
1161 1191
1192ALLSOURCE_ARCHS := $(ARCH)
1193
1162define all-sources 1194define all-sources
1163 ( find $(__srctree) $(RCS_FIND_IGNORE) \ 1195 ( find $(__srctree) $(RCS_FIND_IGNORE) \
1164 \( -name include -o -name arch \) -prune -o \ 1196 \( -name include -o -name arch \) -prune -o \
1165 -name '*.[chS]' -print; \ 1197 -name '*.[chS]' -print; \
1166 find $(__srctree)arch/$(ARCH) $(RCS_FIND_IGNORE) \ 1198 for ARCH in $(ALLSOURCE_ARCHS) ; do \
1167 -name '*.[chS]' -print; \ 1199 find $(__srctree)arch/$${ARCH} $(RCS_FIND_IGNORE) \
1200 -name '*.[chS]' -print; \
1201 done ; \
1168 find $(__srctree)security/selinux/include $(RCS_FIND_IGNORE) \ 1202 find $(__srctree)security/selinux/include $(RCS_FIND_IGNORE) \
1169 -name '*.[chS]' -print; \ 1203 -name '*.[chS]' -print; \
1170 find $(__srctree)include $(RCS_FIND_IGNORE) \ 1204 find $(__srctree)include $(RCS_FIND_IGNORE) \
1171 \( -name config -o -name 'asm-*' \) -prune \ 1205 \( -name config -o -name 'asm-*' \) -prune \
1172 -o -name '*.[chS]' -print; \ 1206 -o -name '*.[chS]' -print; \
1173 find $(__srctree)include/asm-$(ARCH) $(RCS_FIND_IGNORE) \ 1207 for ARCH in $(ALLSOURCE_ARCHS) ; do \
1174 -name '*.[chS]' -print; \ 1208 find $(__srctree)include/asm-$${ARCH} $(RCS_FIND_IGNORE) \
1209 -name '*.[chS]' -print; \
1210 done ; \
1175 find $(__srctree)include/asm-generic $(RCS_FIND_IGNORE) \ 1211 find $(__srctree)include/asm-generic $(RCS_FIND_IGNORE) \
1176 -name '*.[chS]' -print ) 1212 -name '*.[chS]' -print )
1177endef 1213endef
1178 1214
1179quiet_cmd_cscope-file = FILELST cscope.files 1215quiet_cmd_cscope-file = FILELST cscope.files
1180 cmd_cscope-file = $(all-sources) > cscope.files 1216 cmd_cscope-file = (echo \-k; echo \-q; $(all-sources)) > cscope.files
1181 1217
1182quiet_cmd_cscope = MAKE cscope.out 1218quiet_cmd_cscope = MAKE cscope.out
1183 cmd_cscope = cscope -k -b -q 1219 cmd_cscope = cscope -b
1184 1220
1185cscope: FORCE 1221cscope: FORCE
1186 $(call cmd,cscope-file) 1222 $(call cmd,cscope-file)
1187 $(call cmd,cscope) 1223 $(call cmd,cscope)
1188 1224
1189quiet_cmd_TAGS = MAKE $@ 1225quiet_cmd_TAGS = MAKE $@
1190cmd_TAGS = $(all-sources) | etags - 1226define cmd_TAGS
1227 rm -f $@; \
1228 ETAGSF=`etags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_GPL --extra=+f"`; \
1229 $(all-sources) | xargs etags $$ETAGSF -a
1230endef
1231
1232TAGS: FORCE
1233 $(call cmd,TAGS)
1191 1234
1192# Exuberant ctags works better with -I
1193 1235
1194quiet_cmd_tags = MAKE $@ 1236quiet_cmd_tags = MAKE $@
1195define cmd_tags 1237define cmd_tags
@@ -1198,9 +1240,6 @@ define cmd_tags
1198 $(all-sources) | xargs ctags $$CTAGSF -a 1240 $(all-sources) | xargs ctags $$CTAGSF -a
1199endef 1241endef
1200 1242
1201TAGS: FORCE
1202 $(call cmd,TAGS)
1203
1204tags: FORCE 1243tags: FORCE
1205 $(call cmd,tags) 1244 $(call cmd,tags)
1206 1245
@@ -1268,82 +1307,11 @@ ifneq ($(cmd_files),)
1268 include $(cmd_files) 1307 include $(cmd_files)
1269endif 1308endif
1270 1309
1271# Execute command and generate cmd file
1272if_changed = $(if $(strip $? \
1273 $(filter-out $(cmd_$(1)),$(cmd_$@))\
1274 $(filter-out $(cmd_$@),$(cmd_$(1)))),\
1275 @set -e; \
1276 $(if $($(quiet)cmd_$(1)),echo ' $(subst ','\'',$($(quiet)cmd_$(1)))';) \
1277 $(cmd_$(1)); \
1278 echo 'cmd_$@ := $(subst $$,$$$$,$(subst ','\'',$(cmd_$(1))))' > $(@D)/.$(@F).cmd)
1279
1280
1281# execute the command and also postprocess generated .d dependencies
1282# file
1283if_changed_dep = $(if $(strip $? $(filter-out FORCE $(wildcard $^),$^)\
1284 $(filter-out $(cmd_$(1)),$(cmd_$@))\
1285 $(filter-out $(cmd_$@),$(cmd_$(1)))),\
1286 $(Q)set -e; \
1287 $(if $($(quiet)cmd_$(1)),echo ' $(subst ','\'',$($(quiet)cmd_$(1)))';) \
1288 $(cmd_$(1)); \
1289 scripts/basic/fixdep $(depfile) $@ '$(subst $$,$$$$,$(subst ','\'',$(cmd_$(1))))' > $(@D)/.$(@F).tmp; \
1290 rm -f $(depfile); \
1291 mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd)
1292
1293# Usage: $(call if_changed_rule,foo)
1294# will check if $(cmd_foo) changed, or any of the prequisites changed,
1295# and if so will execute $(rule_foo)
1296
1297if_changed_rule = $(if $(strip $? \
1298 $(filter-out $(cmd_$(1)),$(cmd_$(@F)))\
1299 $(filter-out $(cmd_$(@F)),$(cmd_$(1)))),\
1300 $(Q)$(rule_$(1)))
1301
1302# If quiet is set, only print short version of command
1303
1304cmd = @$(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))' &&) $(cmd_$(1))
1305
1306# filechk is used to check if the content of a generated file is updated.
1307# Sample usage:
1308# define filechk_sample
1309# echo $KERNELRELEASE
1310# endef
1311# version.h : Makefile
1312# $(call filechk,sample)
1313# The rule defined shall write to stdout the content of the new file.
1314# The existing file will be compared with the new one.
1315# - If no file exist it is created
1316# - If the content differ the new file is used
1317# - If they are equal no change, and no timestamp update
1318
1319define filechk
1320 @set -e; \
1321 echo ' CHK $@'; \
1322 mkdir -p $(dir $@); \
1323 $(filechk_$(1)) < $< > $@.tmp; \
1324 if [ -r $@ ] && cmp -s $@ $@.tmp; then \
1325 rm -f $@.tmp; \
1326 else \
1327 echo ' UPD $@'; \
1328 mv -f $@.tmp $@; \
1329 fi
1330endef
1331
1332# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj=dir
1333# Usage:
1334# $(Q)$(MAKE) $(build)=dir
1335build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj
1336
1337# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.clean obj=dir 1310# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.clean obj=dir
1338# Usage: 1311# Usage:
1339# $(Q)$(MAKE) $(clean)=dir 1312# $(Q)$(MAKE) $(clean)=dir
1340clean := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.clean obj 1313clean := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.clean obj
1341 1314
1342# $(call descend,<dir>,<target>)
1343# Recursively call a sub-make in <dir> with target <target>
1344# Usage is deprecated, because make does not see this as an invocation of make.
1345descend =$(Q)$(MAKE) -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj=$(1) $(2)
1346
1347endif # skip-makefile 1315endif # skip-makefile
1348 1316
1349FORCE: 1317FORCE:
diff --git a/arch/m68knommu/Makefile b/arch/m68knommu/Makefile
index 97022ed0da38..7ce5e55b2401 100644
--- a/arch/m68knommu/Makefile
+++ b/arch/m68knommu/Makefile
@@ -114,7 +114,7 @@ libs-y += arch/m68knommu/lib/
114prepare: include/asm-$(ARCH)/asm-offsets.h 114prepare: include/asm-$(ARCH)/asm-offsets.h
115 115
116archclean: 116archclean:
117 $(call descend arch/$(ARCH)/boot, subdirclean) 117 $(Q)$(MAKE) $(clean)=arch/m68knommu/boot
118 118
119include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.s \ 119include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.s \
120 include/asm include/linux/version.h \ 120 include/asm include/linux/version.h \
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index d27b82595485..b0fdaee8d8d9 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -673,7 +673,7 @@ drivers-$(CONFIG_OPROFILE) += arch/mips/oprofile/
673 673
674ifdef CONFIG_LASAT 674ifdef CONFIG_LASAT
675rom.bin rom.sw: vmlinux 675rom.bin rom.sw: vmlinux
676 $(call descend,arch/mips/lasat/image,$@) 676 $(Q)$(MAKE) $(build)=arch/mips/lasat/image $@
677endif 677endif
678 678
679# 679#
diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
index 879036d4b30b..6b736364cc5b 100644
--- a/drivers/block/Kconfig
+++ b/drivers/block/Kconfig
@@ -408,48 +408,6 @@ config BLK_DEV_INITRD
408 "real" root file system, etc. See <file:Documentation/initrd.txt> 408 "real" root file system, etc. See <file:Documentation/initrd.txt>
409 for details. 409 for details.
410 410
411config INITRAMFS_SOURCE
412 string "Initramfs source file(s)"
413 default ""
414 help
415 This can be either a single cpio archive with a .cpio suffix or a
416 space-separated list of directories and files for building the
417 initramfs image. A cpio archive should contain a filesystem archive
418 to be used as an initramfs image. Directories should contain a
419 filesystem layout to be included in the initramfs image. Files
420 should contain entries according to the format described by the
421 "usr/gen_init_cpio" program in the kernel tree.
422
423 When multiple directories and files are specified then the
424 initramfs image will be the aggregate of all of them.
425
426 See <file:Documentation/early-userspace/README for more details.
427
428 If you are not sure, leave it blank.
429
430config INITRAMFS_ROOT_UID
431 int "User ID to map to 0 (user root)"
432 depends on INITRAMFS_SOURCE!=""
433 default "0"
434 help
435 This setting is only meaningful if the INITRAMFS_SOURCE is
436 contains a directory. Setting this user ID (UID) to something
437 other than "0" will cause all files owned by that UID to be
438 owned by user root in the initial ramdisk image.
439
440 If you are not sure, leave it set to "0".
441
442config INITRAMFS_ROOT_GID
443 int "Group ID to map to 0 (group root)"
444 depends on INITRAMFS_SOURCE!=""
445 default "0"
446 help
447 This setting is only meaningful if the INITRAMFS_SOURCE is
448 contains a directory. Setting this group ID (GID) to something
449 other than "0" will cause all files owned by that GID to be
450 owned by group root in the initial ramdisk image.
451
452 If you are not sure, leave it set to "0".
453 411
454#XXX - it makes sense to enable this only for 32-bit subarch's, not for x86_64 412#XXX - it makes sense to enable this only for 32-bit subarch's, not for x86_64
455#for instance. 413#for instance.
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index b3bb326ae5b6..3fa94288aa93 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -6,6 +6,9 @@
6#define VMLINUX_SYMBOL(_sym_) _sym_ 6#define VMLINUX_SYMBOL(_sym_) _sym_
7#endif 7#endif
8 8
9/* Align . to a 8 byte boundary equals to maximum function alignment. */
10#define ALIGN_FUNCTION() . = ALIGN(8)
11
9#define RODATA \ 12#define RODATA \
10 .rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \ 13 .rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \
11 *(.rodata) *(.rodata.*) \ 14 *(.rodata) *(.rodata.*) \
@@ -79,12 +82,18 @@
79 VMLINUX_SYMBOL(__security_initcall_end) = .; \ 82 VMLINUX_SYMBOL(__security_initcall_end) = .; \
80 } 83 }
81 84
85/* sched.text is aling to function alignment to secure we have same
86 * address even at second ld pass when generating System.map */
82#define SCHED_TEXT \ 87#define SCHED_TEXT \
88 ALIGN_FUNCTION(); \
83 VMLINUX_SYMBOL(__sched_text_start) = .; \ 89 VMLINUX_SYMBOL(__sched_text_start) = .; \
84 *(.sched.text) \ 90 *(.sched.text) \
85 VMLINUX_SYMBOL(__sched_text_end) = .; 91 VMLINUX_SYMBOL(__sched_text_end) = .;
86 92
93/* spinlock.text is aling to function alignment to secure we have same
94 * address even at second ld pass when generating System.map */
87#define LOCK_TEXT \ 95#define LOCK_TEXT \
96 ALIGN_FUNCTION(); \
88 VMLINUX_SYMBOL(__lock_text_start) = .; \ 97 VMLINUX_SYMBOL(__lock_text_start) = .; \
89 *(.spinlock.text) \ 98 *(.spinlock.text) \
90 VMLINUX_SYMBOL(__lock_text_end) = .; 99 VMLINUX_SYMBOL(__lock_text_end) = .;
diff --git a/init/Kconfig b/init/Kconfig
index 05a75c4f5ce2..d5a1a1228fab 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -77,6 +77,22 @@ config LOCALVERSION
77 object and source tree, in that order. Your total string can 77 object and source tree, in that order. Your total string can
78 be a maximum of 64 characters. 78 be a maximum of 64 characters.
79 79
80config LOCALVERSION_AUTO
81 bool "Automatically append version information to the version string"
82 default y
83 help
84 This will try to automatically determine if the current tree is a
85 release tree by looking for git tags that
86 belong to the current top of tree revision.
87
88 A string of the format -gxxxxxxxx will be added to the localversion
89 if a git based tree is found. The string generated by this will be
90 appended after any matching localversion* files, and after the value
91 set in CONFIG_LOCALVERSION
92
93 Note: This requires Perl, and a git repository, but not necessarily
94 the git or cogito tools to be installed.
95
80config SWAP 96config SWAP
81 bool "Support for paging of anonymous memory (swap)" 97 bool "Support for paging of anonymous memory (swap)"
82 depends on MMU 98 depends on MMU
@@ -238,6 +254,8 @@ config CPUSETS
238 254
239 Say N if unsure. 255 Say N if unsure.
240 256
257source "usr/Kconfig"
258
241menuconfig EMBEDDED 259menuconfig EMBEDDED
242 bool "Configure standard kernel features (for small systems)" 260 bool "Configure standard kernel features (for small systems)"
243 help 261 help
@@ -260,8 +278,8 @@ config KALLSYMS_ALL
260 help 278 help
261 Normally kallsyms only contains the symbols of functions, for nicer 279 Normally kallsyms only contains the symbols of functions, for nicer
262 OOPS messages. Some debuggers can use kallsyms for other 280 OOPS messages. Some debuggers can use kallsyms for other
263 symbols too: say Y here to include all symbols, and you 281 symbols too: say Y here to include all symbols, if you need them
264 don't care about adding 300k to the size of your kernel. 282 and you don't care about adding 300k to the size of your kernel.
265 283
266 Say N. 284 Say N.
267 285
diff --git a/init/Makefile b/init/Makefile
index 93a53fbdbe79..a2300078f2b7 100644
--- a/init/Makefile
+++ b/init/Makefile
@@ -25,4 +25,5 @@ $(obj)/version.o: include/linux/compile.h
25 25
26include/linux/compile.h: FORCE 26include/linux/compile.h: FORCE
27 @echo ' CHK $@' 27 @echo ' CHK $@'
28 @$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CC) $(CFLAGS)" 28 $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \
29 "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" "$(CC) $(CFLAGS)"
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
new file mode 100644
index 000000000000..9087273abf91
--- /dev/null
+++ b/scripts/Kbuild.include
@@ -0,0 +1,96 @@
1####
2# kbuild: Generic definitions
3
4# Convinient variables
5comma := ,
6empty :=
7space := $(empty) $(empty)
8
9###
10# The temporary file to save gcc -MD generated dependencies must not
11# contain a comma
12depfile = $(subst $(comma),_,$(@D)/.$(@F).d)
13
14###
15# filechk is used to check if the content of a generated file is updated.
16# Sample usage:
17# define filechk_sample
18# echo $KERNELRELEASE
19# endef
20# version.h : Makefile
21# $(call filechk,sample)
22# The rule defined shall write to stdout the content of the new file.
23# The existing file will be compared with the new one.
24# - If no file exist it is created
25# - If the content differ the new file is used
26# - If they are equal no change, and no timestamp update
27# - stdin is piped in from the first prerequisite ($<) so one has
28# to specify a valid file as first prerequisite (often the kbuild file)
29define filechk
30 $(Q)set -e; \
31 echo ' CHK $@'; \
32 mkdir -p $(dir $@); \
33 $(filechk_$(1)) < $< > $@.tmp; \
34 if [ -r $@ ] && cmp -s $@ $@.tmp; then \
35 rm -f $@.tmp; \
36 else \
37 echo ' UPD $@'; \
38 mv -f $@.tmp $@; \
39 fi
40endef
41
42###
43# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj=
44# Usage:
45# $(Q)$(MAKE) $(build)=dir
46build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj
47
48# If quiet is set, only print short version of command
49cmd = @$(if $($(quiet)cmd_$(1)),\
50 echo ' $(subst ','\'',$($(quiet)cmd_$(1)))' &&) $(cmd_$(1))
51
52###
53# if_changed - execute command if any prerequisite is newer than
54# target, or command line has changed
55# if_changed_dep - as if_changed, but uses fixdep to reveal dependencies
56# including used config symbols
57# if_changed_rule - as if_changed but execute rule instead
58# See Documentation/kbuild/makefiles.txt for more info
59
60ifneq ($(KBUILD_NOCMDDEP),1)
61# Check if both arguments has same arguments. Result in empty string if equal
62# User may override this check using make KBUILD_NOCMDDEP=1
63arg-check = $(strip $(filter-out $(1), $(2)) $(filter-out $(2), $(1)) )
64endif
65
66# echo command. Short version is $(quiet) equals quiet, otherwise full command
67echo-cmd = $(if $($(quiet)cmd_$(1)), \
68 echo ' $(subst ','\'',$($(quiet)cmd_$(1)))';)
69
70# function to only execute the passed command if necessary
71# >'< substitution is for echo to work, >$< substitution to preserve $ when reloading .cmd file
72# note: when using inline perl scripts [perl -e '...$$t=1;...'] in $(cmd_xxx) double $$ your perl vars
73#
74if_changed = $(if $(strip $? $(call arg-check, $(cmd_$(1)), $(cmd_$@)) ), \
75 @set -e; \
76 $(echo-cmd) \
77 $(cmd_$(1)); \
78 echo 'cmd_$@ := $(subst $$,$$$$,$(subst ','\'',$(cmd_$(1))))' > $(@D)/.$(@F).cmd)
79
80# execute the command and also postprocess generated .d dependencies
81# file
82if_changed_dep = $(if $(strip $? $(filter-out FORCE $(wildcard $^),$^)\
83 $(call arg-check, $(cmd_$(1)), $(cmd_$@)) ), \
84 @set -e; \
85 $(echo-cmd) \
86 $(cmd_$(1)); \
87 scripts/basic/fixdep $(depfile) $@ '$(subst $$,$$$$,$(subst ','\'',$(cmd_$(1))))' > $(@D)/.$(@F).tmp; \
88 rm -f $(depfile); \
89 mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd)
90
91# Usage: $(call if_changed_rule,foo)
92# will check if $(cmd_foo) changed, or any of the prequisites changed,
93# and if so will execute $(rule_foo)
94if_changed_rule = $(if $(strip $? $(call arg-check, $(cmd_$(1)), $(cmd_$@)) ),\
95 @set -e; \
96 $(rule_$(1)))
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 76ba6be3dfc9..506e3f3befe3 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -10,8 +10,11 @@ __build:
10# Read .config if it exist, otherwise ignore 10# Read .config if it exist, otherwise ignore
11-include .config 11-include .config
12 12
13include $(if $(wildcard $(obj)/Kbuild), $(obj)/Kbuild, $(obj)/Makefile) 13# The filename Kbuild has precedence over Makefile
14kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
15include $(if $(wildcard $(kbuild-dir)/Kbuild), $(kbuild-dir)/Kbuild, $(kbuild-dir)/Makefile)
14 16
17include scripts/Kbuild.include
15include scripts/Makefile.lib 18include scripts/Makefile.lib
16 19
17ifdef host-progs 20ifdef host-progs
@@ -169,7 +172,7 @@ cmd_modversions = \
169 -T $(@D)/.tmp_$(@F:.o=.ver); \ 172 -T $(@D)/.tmp_$(@F:.o=.ver); \
170 rm -f $(@D)/.tmp_$(@F) $(@D)/.tmp_$(@F:.o=.ver); \ 173 rm -f $(@D)/.tmp_$(@F) $(@D)/.tmp_$(@F:.o=.ver); \
171 else \ 174 else \
172 mv $(@D)/.tmp_$(@F) $@; \ 175 mv -f $(@D)/.tmp_$(@F) $@; \
173 fi; 176 fi;
174endif 177endif
175 178
diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean
index ff3e87dbf387..8974ea5fc878 100644
--- a/scripts/Makefile.clean
+++ b/scripts/Makefile.clean
@@ -7,7 +7,14 @@ src := $(obj)
7.PHONY: __clean 7.PHONY: __clean
8__clean: 8__clean:
9 9
10include $(if $(wildcard $(obj)/Kbuild), $(obj)/Kbuild, $(obj)/Makefile) 10# Shorthand for $(Q)$(MAKE) scripts/Makefile.clean obj=dir
11# Usage:
12# $(Q)$(MAKE) $(clean)=dir
13clean := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.clean obj
14
15# The filename Kbuild has precedence over Makefile
16kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
17include $(if $(wildcard $(kbuild-dir)/Kbuild), $(kbuild-dir)/Kbuild, $(kbuild-dir)/Makefile)
11 18
12# Figure out what we need to build from the various variables 19# Figure out what we need to build from the various variables
13# ========================================================================== 20# ==========================================================================
@@ -87,8 +94,3 @@ $(subdir-ymn):
87# If quiet is set, only print short version of command 94# If quiet is set, only print short version of command
88 95
89cmd = @$(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))' &&) $(cmd_$(1)) 96cmd = @$(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))' &&) $(cmd_$(1))
90
91# Shorthand for $(Q)$(MAKE) scripts/Makefile.clean obj=dir
92# Usage:
93# $(Q)$(MAKE) $(clean)=dir
94clean := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.clean obj
diff --git a/scripts/Makefile.host b/scripts/Makefile.host
index 2821a2b83bbb..2d519704b8fd 100644
--- a/scripts/Makefile.host
+++ b/scripts/Makefile.host
@@ -98,7 +98,8 @@ hostcxx_flags = -Wp,-MD,$(depfile) $(__hostcxx_flags)
98# Create executable from a single .c file 98# Create executable from a single .c file
99# host-csingle -> Executable 99# host-csingle -> Executable
100quiet_cmd_host-csingle = HOSTCC $@ 100quiet_cmd_host-csingle = HOSTCC $@
101 cmd_host-csingle = $(HOSTCC) $(hostc_flags) $(HOST_LOADLIBES) -o $@ $< 101 cmd_host-csingle = $(HOSTCC) $(hostc_flags) -o $@ $< \
102 $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
102$(host-csingle): %: %.c FORCE 103$(host-csingle): %: %.c FORCE
103 $(call if_changed_dep,host-csingle) 104 $(call if_changed_dep,host-csingle)
104 105
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 7cf75cc4f849..0f81dcfd6909 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -1,13 +1,3 @@
1# ===========================================================================
2# kbuild: Generic definitions
3# ===========================================================================
4
5# Standard vars
6
7comma := ,
8empty :=
9space := $(empty) $(empty)
10
11# Backward compatibility - to be removed... 1# Backward compatibility - to be removed...
12extra-y += $(EXTRA_TARGETS) 2extra-y += $(EXTRA_TARGETS)
13# Figure out what we need to build from the various variables 3# Figure out what we need to build from the various variables
@@ -84,10 +74,6 @@ multi-objs-m := $(addprefix $(obj)/,$(multi-objs-m))
84subdir-ym := $(addprefix $(obj)/,$(subdir-ym)) 74subdir-ym := $(addprefix $(obj)/,$(subdir-ym))
85obj-dirs := $(addprefix $(obj)/,$(obj-dirs)) 75obj-dirs := $(addprefix $(obj)/,$(obj-dirs))
86 76
87# The temporary file to save gcc -MD generated dependencies must not
88# contain a comma
89depfile = $(subst $(comma),_,$(@D)/.$(@F).d)
90
91# These flags are needed for modversions and compiling, so we define them here 77# These flags are needed for modversions and compiling, so we define them here
92# already 78# already
93# $(modname_flags) #defines KBUILD_MODNAME as the name of the module it will 79# $(modname_flags) #defines KBUILD_MODNAME as the name of the module it will
@@ -179,89 +165,4 @@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@
179quiet_cmd_gzip = GZIP $@ 165quiet_cmd_gzip = GZIP $@
180cmd_gzip = gzip -f -9 < $< > $@ 166cmd_gzip = gzip -f -9 < $< > $@
181 167
182# ===========================================================================
183# Generic stuff
184# ===========================================================================
185
186ifneq ($(KBUILD_NOCMDDEP),1)
187# Check if both arguments has same arguments. Result in empty string if equal
188# User may override this check using make KBUILD_NOCMDDEP=1
189arg-check = $(strip $(filter-out $(1), $(2)) $(filter-out $(2), $(1)) )
190
191endif
192
193# echo command. Short version is $(quiet) equals quiet, otherwise full command
194echo-cmd = $(if $($(quiet)cmd_$(1)), \
195 echo ' $(subst ','\'',$($(quiet)cmd_$(1)))';)
196
197# function to only execute the passed command if necessary
198# >'< substitution is for echo to work, >$< substitution to preserve $ when reloading .cmd file
199# note: when using inline perl scripts [perl -e '...$$t=1;...'] in $(cmd_xxx) double $$ your perl vars
200#
201if_changed = $(if $(strip $? $(call arg-check, $(cmd_$(1)), $(cmd_$@)) ), \
202 @set -e; \
203 $(echo-cmd) \
204 $(cmd_$(1)); \
205 echo 'cmd_$@ := $(subst $$,$$$$,$(subst ','\'',$(cmd_$(1))))' > $(@D)/.$(@F).cmd)
206
207
208# execute the command and also postprocess generated .d dependencies
209# file
210
211if_changed_dep = $(if $(strip $? $(filter-out FORCE $(wildcard $^),$^)\
212 $(call arg-check, $(cmd_$(1)), $(cmd_$@)) ), \
213 @set -e; \
214 $(echo-cmd) \
215 $(cmd_$(1)); \
216 scripts/basic/fixdep $(depfile) $@ '$(subst $$,$$$$,$(subst ','\'',$(cmd_$(1))))' > $(@D)/.$(@F).tmp; \
217 rm -f $(depfile); \
218 mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd)
219
220# Usage: $(call if_changed_rule,foo)
221# will check if $(cmd_foo) changed, or any of the prequisites changed,
222# and if so will execute $(rule_foo)
223
224if_changed_rule = $(if $(strip $? $(call arg-check, $(cmd_$(1)), $(cmd_$@)) ),\
225 @set -e; \
226 $(rule_$(1)))
227
228# If quiet is set, only print short version of command
229
230cmd = @$(if $($(quiet)cmd_$(1)),echo ' $(subst ','\'',$($(quiet)cmd_$(1)))' &&) $(cmd_$(1))
231
232# $(call descend,<dir>,<target>)
233# Recursively call a sub-make in <dir> with target <target>
234# Usage is deprecated, because make do not see this as an invocation of make.
235descend =$(Q)$(MAKE) -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj=$(1) $(2)
236
237# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj=
238# Usage:
239# $(Q)$(MAKE) $(build)=dir
240build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj
241
242# filechk is used to check if the content of a generated file is updated.
243# Sample usage:
244# define filechk_sample
245# echo $KERNELRELEASE
246# endef
247# version.h : Makefile
248# $(call filechk,sample)
249# The rule defined shall write to stdout the content of the new file.
250# The existing file will be compared with the new one.
251# - If no file exist it is created
252# - If the content differ the new file is used
253# - If they are equal no change, and no timestamp update
254
255define filechk
256 $(Q)set -e; \
257 echo ' CHK $@'; \
258 mkdir -p $(dir $@); \
259 $(filechk_$(1)) $(2) > $@.tmp; \
260 if [ -r $@ ] && cmp -s $@ $@.tmp; then \
261 rm -f $@.tmp; \
262 else \
263 echo ' UPD $@'; \
264 mv -f $@.tmp $@; \
265 fi
266endef
267 168
diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst
index 85d6494e3c24..23fd1bdc25ce 100644
--- a/scripts/Makefile.modinst
+++ b/scripts/Makefile.modinst
@@ -5,7 +5,7 @@
5.PHONY: __modinst 5.PHONY: __modinst
6__modinst: 6__modinst:
7 7
8include scripts/Makefile.lib 8include scripts/Kbuild.include
9 9
10# 10#
11 11
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index 94b550e21be8..0c4f3a9f2ea9 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -36,6 +36,7 @@
36_modpost: __modpost 36_modpost: __modpost
37 37
38include .config 38include .config
39include scripts/Kbuild.include
39include scripts/Makefile.lib 40include scripts/Makefile.lib
40 41
41symverfile := $(objtree)/Module.symvers 42symverfile := $(objtree)/Module.symvers
diff --git a/scripts/conmakehash.c b/scripts/conmakehash.c
index 93dd23f21ec9..e0c6891a9ad4 100644
--- a/scripts/conmakehash.c
+++ b/scripts/conmakehash.c
@@ -33,7 +33,7 @@ void usage(char *argv0)
33 33
34int getunicode(char **p0) 34int getunicode(char **p0)
35{ 35{
36 unsigned char *p = *p0; 36 char *p = *p0;
37 37
38 while (*p == ' ' || *p == '\t') 38 while (*p == ' ' || *p == '\t')
39 p++; 39 p++;
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index d3d2e5341051..9be41a9f5aff 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -207,9 +207,9 @@ symbol_valid(struct sym_entry *s)
207 * move then they may get dropped in pass 2, which breaks the 207 * move then they may get dropped in pass 2, which breaks the
208 * kallsyms rules. 208 * kallsyms rules.
209 */ 209 */
210 if ((s->addr == _etext && strcmp(s->sym + offset, "_etext")) || 210 if ((s->addr == _etext && strcmp((char*)s->sym + offset, "_etext")) ||
211 (s->addr == _einittext && strcmp(s->sym + offset, "_einittext")) || 211 (s->addr == _einittext && strcmp((char*)s->sym + offset, "_einittext")) ||
212 (s->addr == _eextratext && strcmp(s->sym + offset, "_eextratext"))) 212 (s->addr == _eextratext && strcmp((char*)s->sym + offset, "_eextratext")))
213 return 0; 213 return 0;
214 } 214 }
215 215
diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
index 8b84c42b49b5..c3d25786a64d 100644
--- a/scripts/kconfig/lkc.h
+++ b/scripts/kconfig/lkc.h
@@ -59,7 +59,7 @@ void menu_add_entry(struct symbol *sym);
59void menu_end_entry(void); 59void menu_end_entry(void);
60void menu_add_dep(struct expr *dep); 60void menu_add_dep(struct expr *dep);
61struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep); 61struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep);
62void menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep); 62struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep);
63void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep); 63void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep);
64void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep); 64void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep);
65void menu_finalize(struct menu *parent); 65void menu_finalize(struct menu *parent);
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 8c59b212722d..5cfa6c405cf0 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -136,9 +136,9 @@ struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *e
136 return prop; 136 return prop;
137} 137}
138 138
139void menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep) 139struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep)
140{ 140{
141 menu_add_prop(type, prompt, NULL, dep); 141 return menu_add_prop(type, prompt, NULL, dep);
142} 142}
143 143
144void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep) 144void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep)
diff --git a/scripts/kconfig/zconf.tab.c_shipped b/scripts/kconfig/zconf.tab.c_shipped
index f163d8d2d9ef..ff4fcc09720e 100644
--- a/scripts/kconfig/zconf.tab.c_shipped
+++ b/scripts/kconfig/zconf.tab.c_shipped
@@ -1531,7 +1531,7 @@ yyreduce:
1531 1531
1532 { 1532 {
1533 menu_add_entry(NULL); 1533 menu_add_entry(NULL);
1534 menu_add_prop(P_MENU, yyvsp[-1].string, NULL, NULL); 1534 menu_add_prompt(P_MENU, yyvsp[-1].string, NULL);
1535 printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); 1535 printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno());
1536;} 1536;}
1537 break; 1537 break;
@@ -1586,7 +1586,7 @@ yyreduce:
1586 1586
1587 { 1587 {
1588 menu_add_entry(NULL); 1588 menu_add_entry(NULL);
1589 menu_add_prop(P_COMMENT, yyvsp[-1].string, NULL, NULL); 1589 menu_add_prompt(P_COMMENT, yyvsp[-1].string, NULL);
1590 printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno()); 1590 printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno());
1591;} 1591;}
1592 break; 1592 break;
@@ -1640,7 +1640,7 @@ yyreduce:
1640 case 86: 1640 case 86:
1641 1641
1642 { 1642 {
1643 menu_add_prop(P_PROMPT, yyvsp[-1].string, NULL, yyvsp[0].expr); 1643 menu_add_prompt(P_PROMPT, yyvsp[-1].string, yyvsp[0].expr);
1644;} 1644;}
1645 break; 1645 break;
1646 1646
@@ -1925,7 +1925,7 @@ void conf_parse(const char *name)
1925 sym_init(); 1925 sym_init();
1926 menu_init(); 1926 menu_init();
1927 modules_sym = sym_lookup("MODULES", 0); 1927 modules_sym = sym_lookup("MODULES", 0);
1928 rootmenu.prompt = menu_add_prop(P_MENU, "Linux Kernel Configuration", NULL, NULL); 1928 rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL);
1929 1929
1930 //zconfdebug = 1; 1930 //zconfdebug = 1;
1931 zconfparse(); 1931 zconfparse();
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
index 54460f8d3696..e1a0f455d4a8 100644
--- a/scripts/kconfig/zconf.y
+++ b/scripts/kconfig/zconf.y
@@ -342,7 +342,7 @@ if_block:
342menu: T_MENU prompt T_EOL 342menu: T_MENU prompt T_EOL
343{ 343{
344 menu_add_entry(NULL); 344 menu_add_entry(NULL);
345 menu_add_prop(P_MENU, $2, NULL, NULL); 345 menu_add_prompt(P_MENU, $2, NULL);
346 printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); 346 printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno());
347}; 347};
348 348
@@ -392,7 +392,7 @@ source_stmt: source
392comment: T_COMMENT prompt T_EOL 392comment: T_COMMENT prompt T_EOL
393{ 393{
394 menu_add_entry(NULL); 394 menu_add_entry(NULL);
395 menu_add_prop(P_COMMENT, $2, NULL, NULL); 395 menu_add_prompt(P_COMMENT, $2, NULL);
396 printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno()); 396 printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno());
397}; 397};
398 398
@@ -443,7 +443,7 @@ prompt_stmt_opt:
443 /* empty */ 443 /* empty */
444 | prompt if_expr 444 | prompt if_expr
445{ 445{
446 menu_add_prop(P_PROMPT, $1, NULL, $2); 446 menu_add_prompt(P_PROMPT, $1, $2);
447}; 447};
448 448
449prompt: T_WORD 449prompt: T_WORD
@@ -487,7 +487,7 @@ void conf_parse(const char *name)
487 sym_init(); 487 sym_init();
488 menu_init(); 488 menu_init();
489 modules_sym = sym_lookup("MODULES", 0); 489 modules_sym = sym_lookup("MODULES", 0);
490 rootmenu.prompt = menu_add_prop(P_MENU, "Linux Kernel Configuration", NULL, NULL); 490 rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL);
491 491
492 //zconfdebug = 1; 492 //zconfdebug = 1;
493 zconfparse(); 493 zconfparse();
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 0835dc2a8aa9..8aaf74e64183 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1665,11 +1665,17 @@ sub xml_escape($) {
1665} 1665}
1666 1666
1667sub process_file($) { 1667sub process_file($) {
1668 my ($file) = "$ENV{'SRCTREE'}@_"; 1668 my $file;
1669 my $identifier; 1669 my $identifier;
1670 my $func; 1670 my $func;
1671 my $initial_section_counter = $section_counter; 1671 my $initial_section_counter = $section_counter;
1672 1672
1673 if (defined($ENV{'SRCTREE'})) {
1674 $file = "$ENV{'SRCTREE'}" . "/" . "@_";
1675 }
1676 else {
1677 $file = "@_";
1678 }
1673 if (defined($source_map{$file})) { 1679 if (defined($source_map{$file})) {
1674 $file = $source_map{$file}; 1680 $file = $source_map{$file};
1675 } 1681 }
diff --git a/scripts/lxdialog/dialog.h b/scripts/lxdialog/dialog.h
index c571548daa82..eb63e1bb63a3 100644
--- a/scripts/lxdialog/dialog.h
+++ b/scripts/lxdialog/dialog.h
@@ -163,7 +163,7 @@ int dialog_menu (const char *title, const char *prompt, int height, int width,
163int dialog_checklist (const char *title, const char *prompt, int height, 163int dialog_checklist (const char *title, const char *prompt, int height,
164 int width, int list_height, int item_no, 164 int width, int list_height, int item_no,
165 const char * const * items, int flag); 165 const char * const * items, int flag);
166extern unsigned char dialog_input_result[]; 166extern char dialog_input_result[];
167int dialog_inputbox (const char *title, const char *prompt, int height, 167int dialog_inputbox (const char *title, const char *prompt, int height,
168 int width, const char *init); 168 int width, const char *init);
169 169
diff --git a/scripts/lxdialog/inputbox.c b/scripts/lxdialog/inputbox.c
index fa7bebc693b9..074d2d68bd31 100644
--- a/scripts/lxdialog/inputbox.c
+++ b/scripts/lxdialog/inputbox.c
@@ -21,7 +21,7 @@
21 21
22#include "dialog.h" 22#include "dialog.h"
23 23
24unsigned char dialog_input_result[MAX_LEN + 1]; 24char dialog_input_result[MAX_LEN + 1];
25 25
26/* 26/*
27 * Print the termination buttons 27 * Print the termination buttons
@@ -48,7 +48,7 @@ dialog_inputbox (const char *title, const char *prompt, int height, int width,
48{ 48{
49 int i, x, y, box_y, box_x, box_width; 49 int i, x, y, box_y, box_x, box_width;
50 int input_x = 0, scroll = 0, key = 0, button = -1; 50 int input_x = 0, scroll = 0, key = 0, button = -1;
51 unsigned char *instr = dialog_input_result; 51 char *instr = dialog_input_result;
52 WINDOW *dialog; 52 WINDOW *dialog;
53 53
54 /* center dialog box on screen */ 54 /* center dialog box on screen */
diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
index 8d118d181950..d7b8a384b4a7 100755
--- a/scripts/mkcompile_h
+++ b/scripts/mkcompile_h
@@ -1,7 +1,8 @@
1TARGET=$1 1TARGET=$1
2ARCH=$2 2ARCH=$2
3SMP=$3 3SMP=$3
4CC=$4 4PREEMPT=$4
5CC=$5
5 6
6# If compile.h exists already and we don't own autoconf.h 7# If compile.h exists already and we don't own autoconf.h
7# (i.e. we're not the same user who did make *config), don't 8# (i.e. we're not the same user who did make *config), don't
@@ -26,8 +27,10 @@ fi
26 27
27 28
28UTS_VERSION="#$VERSION" 29UTS_VERSION="#$VERSION"
29if [ -n "$SMP" ] ; then UTS_VERSION="$UTS_VERSION SMP"; fi 30CONFIG_FLAGS=""
30UTS_VERSION="$UTS_VERSION `LC_ALL=C LANG=C date`" 31if [ -n "$SMP" ] ; then CONFIG_FLAGS="SMP"; fi
32if [ -n "$PREEMPT" ] ; then CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT"; fi
33UTS_VERSION="$UTS_VERSION $CONFIG_FLAGS `LC_ALL=C LANG=C date`"
31 34
32# Truncate to maximum length 35# Truncate to maximum length
33 36
@@ -37,7 +40,8 @@ UTS_TRUNCATE="sed -e s/\(.\{1,$UTS_LEN\}\).*/\1/"
37# Generate a temporary compile.h 40# Generate a temporary compile.h
38 41
39( echo /\* This file is auto generated, version $VERSION \*/ 42( echo /\* This file is auto generated, version $VERSION \*/
40 43 if [ -n "$CONFIG_FLAGS" ] ; then echo "/* $CONFIG_FLAGS */"; fi
44
41 echo \#define UTS_MACHINE \"$ARCH\" 45 echo \#define UTS_MACHINE \"$ARCH\"
42 46
43 echo \#define UTS_VERSION \"`echo $UTS_VERSION | $UTS_TRUNCATE`\" 47 echo \#define UTS_VERSION \"`echo $UTS_VERSION | $UTS_TRUNCATE`\"
diff --git a/scripts/mod/sumversion.c b/scripts/mod/sumversion.c
index 1112347245c0..43271a1ca01e 100644
--- a/scripts/mod/sumversion.c
+++ b/scripts/mod/sumversion.c
@@ -252,9 +252,9 @@ static int parse_comment(const char *file, unsigned long len)
252} 252}
253 253
254/* FIXME: Handle .s files differently (eg. # starts comments) --RR */ 254/* FIXME: Handle .s files differently (eg. # starts comments) --RR */
255static int parse_file(const signed char *fname, struct md4_ctx *md) 255static int parse_file(const char *fname, struct md4_ctx *md)
256{ 256{
257 signed char *file; 257 char *file;
258 unsigned long i, len; 258 unsigned long i, len;
259 259
260 file = grab_file(fname, &len); 260 file = grab_file(fname, &len);
@@ -332,7 +332,7 @@ static int parse_source_files(const char *objfile, struct md4_ctx *md)
332 Sum all files in the same dir or subdirs. 332 Sum all files in the same dir or subdirs.
333 */ 333 */
334 while ((line = get_next_line(&pos, file, flen)) != NULL) { 334 while ((line = get_next_line(&pos, file, flen)) != NULL) {
335 signed char* p = line; 335 char* p = line;
336 if (strncmp(line, "deps_", sizeof("deps_")-1) == 0) { 336 if (strncmp(line, "deps_", sizeof("deps_")-1) == 0) {
337 check_files = 1; 337 check_files = 1;
338 continue; 338 continue;
@@ -458,7 +458,7 @@ out:
458 close(fd); 458 close(fd);
459} 459}
460 460
461static int strip_rcs_crap(signed char *version) 461static int strip_rcs_crap(char *version)
462{ 462{
463 unsigned int len, full_len; 463 unsigned int len, full_len;
464 464
diff --git a/scripts/package/Makefile b/scripts/package/Makefile
index 3b1f2eff2584..f3e7e8e4a500 100644
--- a/scripts/package/Makefile
+++ b/scripts/package/Makefile
@@ -59,7 +59,7 @@ $(objtree)/binkernel.spec: $(MKSPEC) $(srctree)/Makefile
59 $(CONFIG_SHELL) $(MKSPEC) prebuilt > $@ 59 $(CONFIG_SHELL) $(MKSPEC) prebuilt > $@
60 60
61binrpm-pkg: $(objtree)/binkernel.spec 61binrpm-pkg: $(objtree)/binkernel.spec
62 $(MAKE) 62 $(MAKE) KBUILD_SRC=
63 set -e; \ 63 set -e; \
64 $(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version 64 $(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version
65 set -e; \ 65 set -e; \
@@ -74,16 +74,30 @@ clean-files += $(objtree)/binkernel.spec
74# 74#
75.PHONY: deb-pkg 75.PHONY: deb-pkg
76deb-pkg: 76deb-pkg:
77 $(MAKE) 77 $(MAKE) KBUILD_SRC=
78 $(CONFIG_SHELL) $(srctree)/scripts/package/builddeb 78 $(CONFIG_SHELL) $(srctree)/scripts/package/builddeb
79 79
80clean-dirs += $(objtree)/debian/ 80clean-dirs += $(objtree)/debian/
81 81
82 82
83# tarball targets
84# ---------------------------------------------------------------------------
85.PHONY: tar%pkg
86tar%pkg:
87 $(MAKE)
88 $(CONFIG_SHELL) $(srctree)/scripts/package/buildtar $@
89
90clean-dirs += $(objtree)/tar-install/
91
92
83# Help text displayed when executing 'make help' 93# Help text displayed when executing 'make help'
84# --------------------------------------------------------------------------- 94# ---------------------------------------------------------------------------
85help: 95help:
86 @echo ' rpm-pkg - Build the kernel as an RPM package' 96 @echo ' rpm-pkg - Build the kernel as an RPM package'
87 @echo ' binrpm-pkg - Build an rpm package containing the compiled kernel & modules' 97 @echo ' binrpm-pkg - Build an rpm package containing the compiled kernel'
88 @echo ' deb-pkg - Build the kernel as an deb package' 98 @echo ' and modules'
99 @echo ' deb-pkg - Build the kernel as an deb package'
100 @echo ' tar-pkg - Build the kernel as an uncompressed tarball'
101 @echo ' targz-pkg - Build the kernel as a gzip compressed tarball'
102 @echo ' tarbz2-pkg - Build the kernel as a bzip2 compressed tarball'
89 103
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index c279b6310f02..6edb29f2b4a6 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -14,18 +14,38 @@ set -e
14# Some variables and settings used throughout the script 14# Some variables and settings used throughout the script
15version=$KERNELRELEASE 15version=$KERNELRELEASE
16tmpdir="$objtree/debian/tmp" 16tmpdir="$objtree/debian/tmp"
17packagename=linux-$version
18
19if [ "$ARCH" == "um" ] ; then
20 packagename=user-mode-linux-$version
21fi
17 22
18# Setup the directory structure 23# Setup the directory structure
19rm -rf "$tmpdir" 24rm -rf "$tmpdir"
20mkdir -p "$tmpdir/DEBIAN" "$tmpdir/lib" "$tmpdir/boot" 25mkdir -p "$tmpdir/DEBIAN" "$tmpdir/lib" "$tmpdir/boot"
26if [ "$ARCH" == "um" ] ; then
27 mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/share/doc/$packagename" "$tmpdir/usr/bin"
28fi
21 29
22# Build and install the kernel 30# Build and install the kernel
23cp System.map "$tmpdir/boot/System.map-$version" 31if [ "$ARCH" == "um" ] ; then
24cp .config "$tmpdir/boot/config-$version" 32 $MAKE linux
25cp $KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version" 33 cp System.map "$tmpdir/usr/lib/uml/modules/$version/System.map"
34 cp .config "$tmpdir/usr/share/doc/$packagename/config"
35 gzip "$tmpdir/usr/share/doc/$packagename/config"
36 cp $KBUILD_IMAGE "$tmpdir/usr/bin/linux-$version"
37else
38 cp System.map "$tmpdir/boot/System.map-$version"
39 cp .config "$tmpdir/boot/config-$version"
40 cp $KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version"
41fi
26 42
27if grep -q '^CONFIG_MODULES=y' .config ; then 43if grep -q '^CONFIG_MODULES=y' .config ; then
28 INSTALL_MOD_PATH="$tmpdir" make modules_install 44 INSTALL_MOD_PATH="$tmpdir" make KBUILD_SRC= modules_install
45 if [ "$ARCH" == "um" ] ; then
46 mv "$tmpdir/lib/modules/$version"/* "$tmpdir/usr/lib/uml/modules/$version/"
47 rmdir "$tmpdir/lib/modules/$version"
48 fi
29fi 49fi
30 50
31# Install the maintainer scripts 51# Install the maintainer scripts
@@ -53,6 +73,8 @@ linux ($version) unstable; urgency=low
53EOF 73EOF
54 74
55# Generate a control file 75# Generate a control file
76if [ "$ARCH" == "um" ]; then
77
56cat <<EOF > debian/control 78cat <<EOF > debian/control
57Source: linux 79Source: linux
58Section: base 80Section: base
@@ -60,12 +82,34 @@ Priority: optional
60Maintainer: $name 82Maintainer: $name
61Standards-Version: 3.6.1 83Standards-Version: 3.6.1
62 84
63Package: linux-$version 85Package: $packagename
86Architecture: any
87Description: User Mode Linux kernel, version $version
88 User-mode Linux is a port of the Linux kernel to its own system call
89 interface. It provides a kind of virtual machine, which runs Linux
90 as a user process under another Linux kernel. This is useful for
91 kernel development, sandboxes, jails, experimentation, and
92 many other things.
93 .
94 This package contains the Linux kernel, modules and corresponding other
95 files version $version
96EOF
97
98else
99cat <<EOF > debian/control
100Source: linux
101Section: base
102Priority: optional
103Maintainer: $name
104Standards-Version: 3.6.1
105
106Package: $packagename
64Architecture: any 107Architecture: any
65Description: Linux kernel, version $version 108Description: Linux kernel, version $version
66 This package contains the Linux kernel, modules and corresponding other 109 This package contains the Linux kernel, modules and corresponding other
67 files version $version. 110 files version $version
68EOF 111EOF
112fi
69 113
70# Fix some ownership and permissions 114# Fix some ownership and permissions
71chown -R root:root "$tmpdir" 115chown -R root:root "$tmpdir"
diff --git a/scripts/package/buildtar b/scripts/package/buildtar
new file mode 100644
index 000000000000..d8fffe6f8906
--- /dev/null
+++ b/scripts/package/buildtar
@@ -0,0 +1,111 @@
1#!/bin/sh
2
3#
4# buildtar 0.0.3
5#
6# (C) 2004-2005 by Jan-Benedict Glaw <jbglaw@lug-owl.de>
7#
8# This script is used to compile a tarball from the currently
9# prepared kernel. Based upon the builddeb script from
10# Wichert Akkerman <wichert@wiggy.net>.
11#
12
13set -e
14
15#
16# Some variables and settings used throughout the script
17#
18version="${VERSION}.${PATCHLEVEL}.${SUBLEVEL}${EXTRAVERSION}${EXTRANAME}"
19tmpdir="${objtree}/tar-install"
20tarball="${objtree}/linux-${version}.tar"
21
22
23#
24# Figure out how to compress, if requested at all
25#
26case "${1}" in
27 tar-pkg)
28 compress="cat"
29 file_ext=""
30 ;;
31 targz-pkg)
32 compress="gzip -c9"
33 file_ext=".gz"
34 ;;
35 tarbz2-pkg)
36 compress="bzip2 -c9"
37 file_ext=".bz2"
38 ;;
39 *)
40 echo "Unknown tarball target \"${1}\" requested, please add it to ${0}." >&2
41 exit 1
42 ;;
43esac
44
45
46#
47# Clean-up and re-create the temporary directory
48#
49rm -rf -- "${tmpdir}"
50mkdir -p -- "${tmpdir}/boot"
51
52
53#
54# Try to install modules
55#
56if ! make INSTALL_MOD_PATH="${tmpdir}" modules_install; then
57 echo "" >&2
58 echo "Ignoring error at module_install time, since that could be" >&2
59 echo "a result of missing local modutils/module-init-tools," >&2
60 echo "or you just didn't compile in module support at all..." >&2
61 echo "" >&2
62fi
63
64
65#
66# Install basic kernel files
67#
68cp -v -- System.map "${tmpdir}/boot/System.map-${version}"
69cp -v -- .config "${tmpdir}/boot/config-${version}"
70cp -v -- vmlinux "${tmpdir}/boot/vmlinux-${version}"
71
72
73#
74# Install arch-specific kernel image(s)
75#
76case "${ARCH}" in
77 i386)
78 [ -f arch/i386/boot/bzImage ] && cp -v -- arch/i386/boot/bzImage "${tmpdir}/boot/vmlinuz-${version}"
79 ;;
80 alpha)
81 [ -f arch/alpha/boot/vmlinux.gz ] && cp -v -- arch/alpha/boot/vmlinux.gz "${tmpdir}/boot/vmlinuz-${version}"
82 ;;
83 vax)
84 [ -f vmlinux.SYS ] && cp -v -- vmlinux.SYS "${tmpdir}/boot/vmlinux-${version}.SYS"
85 [ -f vmlinux.dsk ] && cp -v -- vmlinux.dsk "${tmpdir}/boot/vmlinux-${version}.dsk"
86 ;;
87 *)
88 [ -f "${KBUILD_IMAGE}" ] && cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinux-kbuild-${version}"
89 echo "" >&2
90 echo '** ** ** WARNING ** ** **' >&2
91 echo "" >&2
92 echo "Your architecture did not define any architecture-dependant files" >&2
93 echo "to be placed into the tarball. Please add those to ${0} ..." >&2
94 echo "" >&2
95 sleep 5
96 ;;
97esac
98
99
100#
101# Create the tarball
102#
103(
104 cd "${tmpdir}"
105 tar cf - . | ${compress} > "${tarball}${file_ext}"
106)
107
108echo "Tarball successfully created in ${tarball}${file_ext}"
109
110exit 0
111
diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 6e7a58f145ad..0b1038737548 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -62,10 +62,19 @@ echo ""
62fi 62fi
63 63
64echo "%install" 64echo "%install"
65echo "%ifarch ia64"
66echo 'mkdir -p $RPM_BUILD_ROOT/boot/efi $RPM_BUILD_ROOT/lib $RPM_BUILD_ROOT/lib/modules'
67echo "%else"
65echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib $RPM_BUILD_ROOT/lib/modules' 68echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib $RPM_BUILD_ROOT/lib/modules'
69echo "%endif"
66 70
67echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{_smp_mflags} modules_install' 71echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{_smp_mflags} modules_install'
72echo "%ifarch ia64"
73echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/efi/vmlinuz-$KERNELRELEASE"
74echo 'ln -s '"efi/vmlinuz-$KERNELRELEASE" '$RPM_BUILD_ROOT'"/boot/"
75echo "%else"
68echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE" 76echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE"
77echo "%endif"
69 78
70echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE" 79echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE"
71 80
diff --git a/scripts/reference_discarded.pl b/scripts/reference_discarded.pl
index d5cabb81bd1b..f04f62736851 100644
--- a/scripts/reference_discarded.pl
+++ b/scripts/reference_discarded.pl
@@ -96,6 +96,7 @@ foreach $object (keys(%object)) {
96 $from !~ /\.debug_ranges$/ && 96 $from !~ /\.debug_ranges$/ &&
97 $from !~ /\.debug_line$/ && 97 $from !~ /\.debug_line$/ &&
98 $from !~ /\.debug_frame$/ && 98 $from !~ /\.debug_frame$/ &&
99 $from !~ /\.debug_loc$/ &&
99 $from !~ /\.exitcall\.exit$/ && 100 $from !~ /\.exitcall\.exit$/ &&
100 $from !~ /\.eh_frame$/ && 101 $from !~ /\.eh_frame$/ &&
101 $from !~ /\.stab$/)) { 102 $from !~ /\.stab$/)) {
diff --git a/scripts/reference_init.pl b/scripts/reference_init.pl
index 9a2408453869..7f6960b175a2 100644
--- a/scripts/reference_init.pl
+++ b/scripts/reference_init.pl
@@ -98,6 +98,7 @@ foreach $object (sort(keys(%object))) {
98 $from !~ /\.pdr$/ && 98 $from !~ /\.pdr$/ &&
99 $from !~ /\__param$/ && 99 $from !~ /\__param$/ &&
100 $from !~ /\.altinstructions/ && 100 $from !~ /\.altinstructions/ &&
101 $from !~ /\.eh_frame/ &&
101 $from !~ /\.debug_/)) { 102 $from !~ /\.debug_/)) {
102 printf("Error: %s %s refers to %s\n", $object, $from, $line); 103 printf("Error: %s %s refers to %s\n", $object, $from, $line);
103 } 104 }
diff --git a/scripts/setlocalversion b/scripts/setlocalversion
new file mode 100644
index 000000000000..7c805c8fccd2
--- /dev/null
+++ b/scripts/setlocalversion
@@ -0,0 +1,56 @@
1#!/usr/bin/perl
2# Copyright 2004 - Ryan Anderson <ryan@michonline.com> GPL v2
3
4use strict;
5use warnings;
6use Digest::MD5;
7require 5.006;
8
9if (@ARGV != 1) {
10 print <<EOT;
11Usage: setlocalversion <srctree>
12EOT
13 exit(1);
14}
15
16my ($srctree) = @ARGV;
17chdir($srctree);
18
19my @LOCALVERSIONS = ();
20
21# We are going to use the following commands to try and determine if this
22# repository is at a Version boundary (i.e, 2.6.10 vs 2.6.10 + some patches) We
23# currently assume that all meaningful version boundaries are marked by a tag.
24# We don't care what the tag is, just that something exists.
25
26# Git/Cogito store the top-of-tree "commit" in .git/HEAD
27# A list of known tags sits in .git/refs/tags/
28#
29# The simple trick here is to just compare the two of these, and if we get a
30# match, return nothing, otherwise, return a subset of the SHA-1 hash in
31# .git/HEAD
32
33sub do_git_checks {
34 open(H,"<.git/HEAD") or return;
35 my $head = <H>;
36 chomp $head;
37 close(H);
38
39 opendir(D,".git/refs/tags") or return;
40 foreach my $tagfile (grep !/^\.{1,2}$/, readdir(D)) {
41 open(F,"<.git/refs/tags/" . $tagfile) or return;
42 my $tag = <F>;
43 chomp $tag;
44 close(F);
45 return if ($tag eq $head);
46 }
47 closedir(D);
48
49 push @LOCALVERSIONS, "g" . substr($head,0,8);
50}
51
52if ( -d ".git") {
53 do_git_checks();
54}
55
56printf "-%s\n", join("-",@LOCALVERSIONS) if (scalar @LOCALVERSIONS > 0);
diff --git a/usr/Kconfig b/usr/Kconfig
new file mode 100644
index 000000000000..07727f3c7cea
--- /dev/null
+++ b/usr/Kconfig
@@ -0,0 +1,46 @@
1#
2# Configuration for initramfs
3#
4
5config INITRAMFS_SOURCE
6 string "Initramfs source file(s)"
7 default ""
8 help
9 This can be either a single cpio archive with a .cpio suffix or a
10 space-separated list of directories and files for building the
11 initramfs image. A cpio archive should contain a filesystem archive
12 to be used as an initramfs image. Directories should contain a
13 filesystem layout to be included in the initramfs image. Files
14 should contain entries according to the format described by the
15 "usr/gen_init_cpio" program in the kernel tree.
16
17 When multiple directories and files are specified then the
18 initramfs image will be the aggregate of all of them.
19
20 See <file:Documentation/early-userspace/README for more details.
21
22 If you are not sure, leave it blank.
23
24config INITRAMFS_ROOT_UID
25 int "User ID to map to 0 (user root)"
26 depends on INITRAMFS_SOURCE!=""
27 default "0"
28 help
29 This setting is only meaningful if the INITRAMFS_SOURCE is
30 contains a directory. Setting this user ID (UID) to something
31 other than "0" will cause all files owned by that UID to be
32 owned by user root in the initial ramdisk image.
33
34 If you are not sure, leave it set to "0".
35
36config INITRAMFS_ROOT_GID
37 int "Group ID to map to 0 (group root)"
38 depends on INITRAMFS_SOURCE!=""
39 default "0"
40 help
41 This setting is only meaningful if the INITRAMFS_SOURCE is
42 contains a directory. Setting this group ID (GID) to something
43 other than "0" will cause all files owned by that GID to be
44 owned by group root in the initial ramdisk image.
45
46 If you are not sure, leave it set to "0".
diff --git a/usr/Makefile b/usr/Makefile
index 248d5551029d..e2129cb570bb 100644
--- a/usr/Makefile
+++ b/usr/Makefile
@@ -27,7 +27,7 @@ quotefixed_initramfs_source := $(shell echo $(CONFIG_INITRAMFS_SOURCE))
27filechk_initramfs_list = $(CONFIG_SHELL) \ 27filechk_initramfs_list = $(CONFIG_SHELL) \
28 $(srctree)/scripts/gen_initramfs_list.sh $(gen_initramfs_args) $(quotefixed_initramfs_source) 28 $(srctree)/scripts/gen_initramfs_list.sh $(gen_initramfs_args) $(quotefixed_initramfs_source)
29 29
30$(obj)/initramfs_list: FORCE 30$(obj)/initramfs_list: $(obj)/Makefile FORCE
31 $(call filechk,initramfs_list) 31 $(call filechk,initramfs_list)
32 32
33quiet_cmd_cpio = CPIO $@ 33quiet_cmd_cpio = CPIO $@