* [PATCH 11/19] kconfig: move .kernelrelease
@ 2006-04-09 15:29 Roman Zippel
2006-04-10 8:57 ` Andrew Morton
0 siblings, 1 reply; 8+ messages in thread
From: Roman Zippel @ 2006-04-09 15:29 UTC (permalink / raw)
To: linux-kernel, Andrew Morton, Sam Ravnborg
This moves the .kernelrelease file into include/config directory.
Remove its generation from the config step, if the config step doesn't
leave a proper .config behind, it triggers a call to silentoldconfig.
Instead its generation can be done via proper dependencies.
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
---
Makefile | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
Index: linux-2.6-git/Makefile
===================================================================
--- linux-2.6-git.orig/Makefile
+++ linux-2.6-git/Makefile
@@ -309,8 +309,8 @@ CFLAGS := -Wall -Wundef -Wstrict-proto
-fno-strict-aliasing -fno-common
AFLAGS := -D__ASSEMBLY__
-# Read KERNELRELEASE from .kernelrelease (if it exists)
-KERNELRELEASE = $(shell cat .kernelrelease 2> /dev/null)
+# Read KERNELRELEASE from include/config/kernel.release (if it exists)
+KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION \
@@ -408,7 +408,6 @@ export KBUILD_DEFCONFIG
config %config: scripts_basic outputmakefile FORCE
$(Q)mkdir -p include/linux include/config
$(Q)$(MAKE) $(build)=scripts/kconfig $@
- $(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease
else
# ===========================================================================
@@ -716,7 +715,7 @@ $(vmlinux-dirs): prepare scripts
$(Q)$(MAKE) $(build)=$@
# Build the kernel release string
-# The KERNELRELEASE is stored in a file named .kernelrelease
+# The KERNELRELEASE is stored in a file named include/config/kernel.release
# to be used when executing for example make install or make modules_install
#
# Take the contents of any files called localversion* and the config
@@ -750,9 +749,9 @@ endif
localver-full = $(localver)$(localver-auto)
-# Store (new) KERNELRELASE string in .kernelrelease
+# Store (new) KERNELRELASE string in include/config/kernel.release
kernelrelease = $(KERNELVERSION)$(localver-full)
-.kernelrelease: FORCE
+include/config/kernel.release: include/config/auto.conf FORCE
$(Q)rm -f $@
$(Q)echo $(kernelrelease) > $@
@@ -773,7 +772,7 @@ PHONY += prepare-all
# and if so do:
# 1) Check that make has not been executed in the kernel src $(srctree)
# 2) Create the include2 directory, used for the second asm symlink
-prepare3: .kernelrelease
+prepare3: include/config/kernel.release
ifneq ($(KBUILD_SRC),)
@echo ' Using $(srctree) as source for kernel'
$(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \
@@ -836,7 +835,7 @@ define filechk_version.h
)
endef
-include/linux/version.h: $(srctree)/Makefile .config .kernelrelease FORCE
+include/linux/version.h: $(srctree)/Makefile include/config/kernel.release FORCE
$(call filechk,version.h)
# ---------------------------------------------------------------------------
@@ -932,7 +931,7 @@ CLEAN_FILES += vmlinux System.map \
MRPROPER_DIRS += include/config include2
MRPROPER_FILES += .config .config.old include/asm .version .old_version \
include/linux/autoconf.h include/linux/version.h \
- .kernelrelease Module.symvers tags TAGS cscope*
+ Module.symvers tags TAGS cscope*
# clean - Delete most, but leave enough to build external modules
#
@@ -1256,8 +1255,8 @@ checkstack:
$(PERL) $(src)/scripts/checkstack.pl $(ARCH)
kernelrelease:
- $(if $(wildcard .kernelrelease), $(Q)echo $(KERNELRELEASE), \
- $(error kernelrelease not valid - run 'make *config' to update it))
+ $(if $(wildcard include/config/kernel.release), $(Q)echo $(KERNELRELEASE), \
+ $(error kernelrelease not valid - run 'make prepare' to update it))
kernelversion:
@echo $(KERNELVERSION)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 11/19] kconfig: move .kernelrelease
2006-04-09 15:29 [PATCH 11/19] kconfig: move .kernelrelease Roman Zippel
@ 2006-04-10 8:57 ` Andrew Morton
2006-04-10 10:42 ` Sam Ravnborg
0 siblings, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2006-04-10 8:57 UTC (permalink / raw)
To: Roman Zippel; +Cc: linux-kernel, sam
Roman Zippel <zippel@linux-m68k.org> wrote:
>
> This moves the .kernelrelease file into include/config directory.
> Remove its generation from the config step, if the config step doesn't
> leave a proper .config behind, it triggers a call to silentoldconfig.
> Instead its generation can be done via proper dependencies.
Well that was a pita. I was using that file in my kernel installation
script.
Your changelog says what the patch does, but gives no indication of why it
did it.
What do we get back for the breakage which this will cause?
Now I'm going to have to look for both .kernelrelease and
include/config/kernel.release and work out which one has the more recent
mtime. grr.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 11/19] kconfig: move .kernelrelease
2006-04-10 10:42 ` Sam Ravnborg
@ 2006-04-10 9:58 ` Andrew Morton
2006-04-10 10:10 ` Andrew Morton
2006-04-10 13:29 ` Roman Zippel
0 siblings, 2 replies; 8+ messages in thread
From: Andrew Morton @ 2006-04-10 9:58 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: zippel, linux-kernel
Sam Ravnborg <sam@ravnborg.org> wrote:
>
> On Mon, Apr 10, 2006 at 01:57:27AM -0700, Andrew Morton wrote:
> > Roman Zippel <zippel@linux-m68k.org> wrote:
> > >
> > > This moves the .kernelrelease file into include/config directory.
> > > Remove its generation from the config step, if the config step doesn't
> > > leave a proper .config behind, it triggers a call to silentoldconfig.
> > > Instead its generation can be done via proper dependencies.
> >
> > Well that was a pita. I was using that file in my kernel installation
> > script.
> >
> > Your changelog says what the patch does, but gives no indication of why it
> > did it.
> >
> > What do we get back for the breakage which this will cause?
> >
> > Now I'm going to have to look for both .kernelrelease and
> > include/config/kernel.release and work out which one has the more recent
> > mtime. grr.
> That you have for not using 'make kernelrelease' - he ;-)
> Did you not know, or did make kernelrelease not do what you expected?
>
I stopped using `make kernelrelease' when it did something bad when used
from another machine across NFS.
<tries it>
hm, it takes nearly five seconds, but it wasn't that - something actually
broke. But I forget what it was. I'll put it back and will wait for it
to reoccur.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 11/19] kconfig: move .kernelrelease
2006-04-10 9:58 ` Andrew Morton
@ 2006-04-10 10:10 ` Andrew Morton
2006-04-10 13:29 ` Roman Zippel
1 sibling, 0 replies; 8+ messages in thread
From: Andrew Morton @ 2006-04-10 10:10 UTC (permalink / raw)
To: sam, zippel, linux-kernel
Andrew Morton <akpm@osdl.org> wrote:
>
> I stopped using `make kernelrelease' when it did something bad when used
> from another machine across NFS.
>
> <tries it>
>
> hm, it takes nearly five seconds, but it wasn't that - something actually
> broke. But I forget what it was. I'll put it back and will wait for it
> to reoccur.
>
Actually, I think it was a problem interacting with the weird things which
`git bisect' does with .kernelrelease.
bix:/usr/src/git26> git bisect start
bix:/usr/src/git26> git bisect bad v2.6.15
bix:/usr/src/git26> git bisect good v2.6.14
Bisecting: 2705 revisions left to test after this
bix:/usr/src/git26> cat .kernelrelease
2.6.16-rc2-g6bd0e10e
bix:/usr/src/git26> make kernelrelease
2.6.14-gref: ref
That's cute, but it wasn't that..
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 11/19] kconfig: move .kernelrelease
2006-04-10 8:57 ` Andrew Morton
@ 2006-04-10 10:42 ` Sam Ravnborg
2006-04-10 9:58 ` Andrew Morton
0 siblings, 1 reply; 8+ messages in thread
From: Sam Ravnborg @ 2006-04-10 10:42 UTC (permalink / raw)
To: Andrew Morton; +Cc: Roman Zippel, linux-kernel
On Mon, Apr 10, 2006 at 01:57:27AM -0700, Andrew Morton wrote:
> Roman Zippel <zippel@linux-m68k.org> wrote:
> >
> > This moves the .kernelrelease file into include/config directory.
> > Remove its generation from the config step, if the config step doesn't
> > leave a proper .config behind, it triggers a call to silentoldconfig.
> > Instead its generation can be done via proper dependencies.
>
> Well that was a pita. I was using that file in my kernel installation
> script.
>
> Your changelog says what the patch does, but gives no indication of why it
> did it.
>
> What do we get back for the breakage which this will cause?
>
> Now I'm going to have to look for both .kernelrelease and
> include/config/kernel.release and work out which one has the more recent
> mtime. grr.
That you have for not using 'make kernelrelease' - he ;-)
Did you not know, or did make kernelrelease not do what you expected?
Sam
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 11/19] kconfig: move .kernelrelease
2006-04-10 9:58 ` Andrew Morton
2006-04-10 10:10 ` Andrew Morton
@ 2006-04-10 13:29 ` Roman Zippel
2006-04-10 20:02 ` Andrew Morton
1 sibling, 1 reply; 8+ messages in thread
From: Roman Zippel @ 2006-04-10 13:29 UTC (permalink / raw)
To: Andrew Morton; +Cc: Sam Ravnborg, linux-kernel
Hi,
On Mon, 10 Apr 2006, Andrew Morton wrote:
> hm, it takes nearly five seconds, but it wasn't that - something actually
> broke. But I forget what it was. I'll put it back and will wait for it
> to reoccur.
The patch below should speed this up. You know that you have to update
this file explicitly?
bye, Roman
---
Makefile | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Index: linux-2.6-git/Makefile
===================================================================
--- linux-2.6-git.orig/Makefile
+++ linux-2.6-git/Makefile
@@ -366,7 +366,8 @@ outputmakefile:
# of make so .config is not included in this case either (for *config).
no-dot-config-targets := clean mrproper distclean \
- cscope TAGS tags help %docs check%
+ cscope TAGS tags help %docs check% \
+ kernelrelease kernelversion
config-targets := 0
mixed-targets := 0
@@ -1251,7 +1252,7 @@ namespacecheck:
endif #ifeq ($(config-targets),1)
endif #ifeq ($(mixed-targets),1)
-PHONY += checkstack
+PHONY += checkstack kernelrelease kernelversion
checkstack:
$(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \
$(PERL) $(src)/scripts/checkstack.pl $(ARCH)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 11/19] kconfig: move .kernelrelease
2006-04-10 13:29 ` Roman Zippel
@ 2006-04-10 20:02 ` Andrew Morton
2006-04-12 13:23 ` Roman Zippel
0 siblings, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2006-04-10 20:02 UTC (permalink / raw)
To: Roman Zippel; +Cc: sam, linux-kernel
Roman Zippel <zippel@linux-m68k.org> wrote:
>
> On Mon, 10 Apr 2006, Andrew Morton wrote:
>
> > hm, it takes nearly five seconds, but it wasn't that - something actually
> > broke. But I forget what it was. I'll put it back and will wait for it
> > to reoccur.
>
> The patch below should speed this up.
It went from 5 seconds down to 4 seconds.
> You know that you have to update
> this file explicitly?
That depends on what "explicitly" means. `make oldconfig' updates it.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 11/19] kconfig: move .kernelrelease
2006-04-10 20:02 ` Andrew Morton
@ 2006-04-12 13:23 ` Roman Zippel
0 siblings, 0 replies; 8+ messages in thread
From: Roman Zippel @ 2006-04-12 13:23 UTC (permalink / raw)
To: Andrew Morton; +Cc: sam, linux-kernel
Hi,
On Mon, 10 Apr 2006, Andrew Morton wrote:
> > The patch below should speed this up.
>
> It went from 5 seconds down to 4 seconds.
It shouldn't do much besides printing the file content.
An strace -ftt might help to find what it's wasting it time with.
> > You know that you have to update
> > this file explicitly?
>
> That depends on what "explicitly" means. `make oldconfig' updates it.
I had to change this, it's now "make prepare".
Putting it at the end of *config was an unfortunate choice, as it was
updated independent of whether the config step left a valid config or not
and with the fixed dependencies it even may have triggered a unexpected
call to silentoldconfig (e.g. just by quitting xconfig/menuconfig).
bye, Roman
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-04-12 13:23 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-09 15:29 [PATCH 11/19] kconfig: move .kernelrelease Roman Zippel
2006-04-10 8:57 ` Andrew Morton
2006-04-10 10:42 ` Sam Ravnborg
2006-04-10 9:58 ` Andrew Morton
2006-04-10 10:10 ` Andrew Morton
2006-04-10 13:29 ` Roman Zippel
2006-04-10 20:02 ` Andrew Morton
2006-04-12 13:23 ` Roman Zippel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®