Skip to contentSkip to conversation

2.6.20-rc2-mm1: Makefile drops local version when checking headers

DISCUSSION Lee Schermerhorn 2 participants 2 messages Jan 2, 2007

lore
Share & tools
lore
#0 lore raw

When building 2.6.20-rc2-mm1 with CHECK_HEADERS=y, the Makefile will build the target "include/config/kernel.release" twice. The first time, the CONFIG_LOCALVERSION [and any auto local version] will correctly be appended. Then, when it builds the "headers_check" target, the Makefile will build the "include/config/kernel.release" target again, dropping the local version information. If you then do a "make [modules_]install" in this tree, the install will use the second version string w/o the localversion, installing modules in the wrong place and kernel/initrd with wrong name, possibly overwriting desired copies of the "2.6.20-rc2-mm1" kernel/modules.

[Aside: it also appears that several items, including the kernel itself, get rebuilt during "make [modules_]install" after a successful "make [all]". I think this is new behavior.]

This behavior appears to have been introduced by the patch:

build-compileh-earlier.patch

Sorry, no patch to propose. Simple workaround is just to omit header checks.

Here's the results of some instrumentation that I added to the Makefile showing the sequence of targets built and which dependents cause the build:

-------------------
<first build of target OK>

generating include/config/kernel.release: 2.6.20-rc1-mm1+foo

	KERNELVERSION = 2.6.20-rc1-mm1
	localver-full = +foo
 		localver      = +foo
		localver-auto = 
Target:  include/linux/utsrelease.h
Target:  prepare3
Target:  prepare1

<but later, for headers check>

generating include/config/kernel.release: 2.6.20-rc1-mm1

	KERNELVERSION = 2.6.20-rc1-mm1
	localver-full = 
 		localver      = 
		localver-auto = 
Target:  include/linux/utsrelease.h
Target:  headers_install
Target:  headers_check

----------------------------

Regards,
Lee

#1 lore raw
Quoted 2 lines · Lee Schermerhorn

When building 2.6.20-rc2-mm1 with CHECK_HEADERS=y, the Makefile will build the target "include/config/kernel.release" twice.

I will try to take a look at this tomorrow.

Quoted 3 lines

This behavior appears to have been introduced by the patch:

build-compileh-earlier.patch

Andrew anyway claimed there was a 2% chance he got it right so we hit the 98% case.

PS. Not on top of things yet but trying to recover and get time for Linux again.

Sam