exec debian/rules DEBIAN_REVISION=2.6.33-rc3-test-10.00.Custom APPEND_TO_VERSION=-test kernel_image
/usr/bin/make -f ./debian/rules debian/stamp/binary/pre-linux-image-2.6.33-rc3-test
make: Entering directory `/home/vincent/linux-2.6.git'
====== making target debian/stamp/install/linux-image-2.6.33-rc3-test [new prereqs: ]======
This is kernel package version 11.015.
echo "The UTS Release version in include/linux/version.h"; echo " \"\" "; echo "does not match current version:"; echo " \"2.6.33-rc3-test\" "; echo "Please correct this."; exit 2
The UTS Release version in include/linux/version.h
does not match current version:
Please correct this.
make: *** [debian/stamp/install/linux-image-2.6.33-rc3-test] Error 2
make: Leaving directory `/home/vincent/linux-2.6.git'
make: *** [kernel_image] Error 2
I asked this packaging error on ubuntu-kernel irc channel, someone pointed out that it is a bug of kernel-package and paste a sample working versions_var.mk file which should be located in /usr/share/kernel-package/ruleset/misc/, I tried that modified versions_var.mk file, it worked, so what is the problem, let's what is patched with versions_var.mk:
root@kernalhack:/home/vincent# diff -u version_vars.mk /usr/share/kernel-package/ruleset/misc/version_vars.mk
--- version_vars.mk 2010-01-12 11:08:24.000000000 -0800
+++ /usr/share/kernel-package/ruleset/misc/version_vars.mk 2010-01-15 21:37:44.000000000 -0800
@@ -138,11 +138,13 @@
-UTS_RELEASE_HEADER=$(call doit,if [ -f include/linux/utsrelease.h ]; then \
- echo include/linux/utsrelease.h; \
- else \
- echo include/linux/version.h ; \
+UTS_RELEASE_HEADER=$(call doit, if [ -f include/generated/utsrelease.h ]; then \
+ echo include/generate/utsrelease.h; \
+ elif [ -f include/linux/utsrelease.h ]; then \
+ echo include/linux/utsrelease.h; \
+ else \
+ echo include/linux/version.h ; \
UTS_RELEASE_VERSION=$(call doit,if [ -f $(UTS_RELEASE_HEADER) ]; then \
grep 'define UTS_RELEASE' $(UTS_RELEASE_HEADER) | \
perl -nle 'm/^\s*\#define\s+UTS_RELEASE\s+("?)(\S+)\1/g && print $$2;';\
Simply adding the include/generated/utsrelease.h file test solved the problem, where this include/generated directory come from then? here I found the kernel Kbuild patch series which added include/generated:
I am still not sure how kernel kbuild works, need to dig more.