From 7a48bdd01b5cab9c043b4d42a3f377624d6259f2 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Wed, 6 Aug 2008 21:56:53 +0200 Subject: [PATCH 1/4] kbuild: fix O=.. build with arm With a make O=... build kbuild would only create the include2/asm symlink for archs that not yet had moved headers to include/$ARCH/include There is no longer any reason to avoid the symlink for archs that has moved their headers so create it unconditionally. This fixes arm because kbuild checked for include/asm-$ARCH/errno.h and that file was not present for arm but the platform files are not yet moved. Signed-off-by: Sam Ravnborg Cc: Russell King --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index ea413fa03e4e..343ec4774b55 100644 --- a/Makefile +++ b/Makefile @@ -929,10 +929,10 @@ ifneq ($(KBUILD_SRC),) echo " in the '$(srctree)' directory.";\ /bin/false; \ fi; - $(Q)if [ ! -d include2 ]; then mkdir -p include2; fi; - $(Q)if [ -e $(srctree)/include/asm-$(SRCARCH)/errno.h ]; then \ + $(Q)if [ ! -d include2 ]; then \ + mkdir -p include2; \ ln -fsn $(srctree)/include/asm-$(SRCARCH) include2/asm; \ - fi + fi endif # prepare2 creates a makefile if using a separate output directory From 0758416325dc75e203ab974aa5e937bef7d2afef Mon Sep 17 00:00:00 2001 From: Erkki Lintunen Date: Wed, 6 Aug 2008 22:11:33 +0200 Subject: [PATCH 2/4] bugfix for scripts/patch-kernel in 2.6 sublevel stepping scripts/patch-kernel script can't patch a tree, say, from 2.6.25 to 2.6.26.1, because of a wrong comparison in context of patching 2.6.x base. Fix it. Acked-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Sam Ravnborg --- scripts/patch-kernel | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/patch-kernel b/scripts/patch-kernel index ece46ef0ba54..46a59cae3a0a 100755 --- a/scripts/patch-kernel +++ b/scripts/patch-kernel @@ -213,6 +213,7 @@ fi if [ $stopvers != "default" ]; then STOPSUBLEVEL=`echo $stopvers | cut -d. -f3` STOPEXTRA=`echo $stopvers | cut -d. -f4` + STOPFULLVERSION=${stopvers%%.$STOPEXTRA} #echo "#___STOPSUBLEVEL=/$STOPSUBLEVEL/, STOPEXTRA=/$STOPEXTRA/" else STOPSUBLEVEL=9999 @@ -249,7 +250,7 @@ while : # incrementing SUBLEVEL (s in v.p.s) do CURRENTFULLVERSION="$VERSION.$PATCHLEVEL.$SUBLEVEL" EXTRAVER= - if [ $stopvers = $CURRENTFULLVERSION ]; then + if [ $STOPFULLVERSION = $CURRENTFULLVERSION ]; then echo "Stopping at $CURRENTFULLVERSION base as requested." break fi From 0b0de144333fca335a0111a6f9c59176ad43ba0a Mon Sep 17 00:00:00 2001 From: "Robert P. J. Day" Date: Mon, 4 Aug 2008 13:31:32 -0400 Subject: [PATCH 3/4] Kconfig: Extend "menuconfig" for modules to simplify Kconfig file Given that the init/Kconfig file uses a "menuconfig" directive for modules already, might as well wrap all the submenu entries in an "if" to toss all those dependencies. Signed-off-by: Robert P. J. Day Acked-by: Randy Dunlap Signed-off-by: Sam Ravnborg --- init/Kconfig | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/init/Kconfig b/init/Kconfig index 7e6dae1ae727..b678803deccf 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -845,9 +845,10 @@ menuconfig MODULES If unsure, say Y. +if MODULES + config MODULE_FORCE_LOAD bool "Forced module loading" - depends on MODULES default n help Allow loading of modules without version information (ie. modprobe @@ -856,7 +857,6 @@ config MODULE_FORCE_LOAD config MODULE_UNLOAD bool "Module unloading" - depends on MODULES help Without this option you will not be able to unload any modules (note that some modules may not be unloadable @@ -875,7 +875,6 @@ config MODULE_FORCE_UNLOAD config MODVERSIONS bool "Module versioning support" - depends on MODULES help Usually, you have to use modules compiled with your kernel. Saying Y here makes it sometimes possible to use modules @@ -886,7 +885,6 @@ config MODVERSIONS config MODULE_SRCVERSION_ALL bool "Source checksum for all modules" - depends on MODULES help Modules which contain a MODULE_VERSION get an extra "srcversion" field inserted into their modinfo section, which contains a @@ -898,11 +896,12 @@ config MODULE_SRCVERSION_ALL config KMOD def_bool y - depends on MODULES help This is being removed soon. These days, CONFIG_MODULES implies CONFIG_KMOD, so use that instead. +endif # MODULES + config STOP_MACHINE bool default y From 64a99d2a8c3ed5c4e39f3ae1cc682aa8fd3977fc Mon Sep 17 00:00:00 2001 From: Denis ChengRq Date: Mon, 4 Aug 2008 09:51:40 +0800 Subject: [PATCH 4/4] kbuild: a better way to generate cscope database change It's a problem about cscope target of kernel Makefile, and the cscope plugin of emacs: 1. `make cscope` will generate cscope.files cscope.{in,po,}.out; 2. the cscope plugin expect a cscope.out.{in,po,}; 3. the default `cscope -b` would generate cscope.{in,po,}.out; There are three approach to solve it: 1. modify the cscope C code; 2. modify the cscope emacs plugin lisp code; 3. modify the Makefile; I have tried to communicate with the cscope upstream, but later I realize the third approach is most meaningful. Signed-off-by: Sam Ravnborg --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 343ec4774b55..f3e206509ee1 100644 --- a/Makefile +++ b/Makefile @@ -1492,7 +1492,7 @@ quiet_cmd_cscope-file = FILELST cscope.files cmd_cscope-file = (echo \-k; echo \-q; $(all-sources)) > cscope.files quiet_cmd_cscope = MAKE cscope.out - cmd_cscope = cscope -b + cmd_cscope = cscope -b -f cscope.out cscope: FORCE $(call cmd,cscope-file)