SOLVED (use make modules_prepare) Re: make-kpkg UTS version problem
Arthur Marsh wrote:
Hi, when doing a fresh unpack of linux-source-2.6.17 then attempting to
build realtime-lsm, I get the following error:
/usr/src/linux# make-kpkg modules-image
exec debian/rules DEBIAN_REVISION=2.6.17-10.00.Custom modules-image
echo "The UTS Release version in include/linux/version.h"; echo " \"\"
"; echo "does not match current version:"; echo " \"2.6.17\" "; echo
"Please correct this."; exit 2
The UTS Release version in include/linux/version.h
""
does not match current version:
"2.6.17"
Please correct this.
make: *** [modules-image] Error 2
I tried creating /usr/src/linux/version.h with simply the line:
2.6.17
but that didn't work.
I had this working before but removed my kernel source tree and can't
get it working again )-:.
I had the situation where I had removed my kernel source tree, and there
was a realtime-lsm-source update, which I wanted to build and install.
Since realtime-lsm requires a kernel rebuilt with
CONFIG_SECURITY_CAPABILITIES=m
It is reasonable to assume that the person building realtime-lsm will
have the linux-source-* package installed if not unpacked.
Also, since make-kpkg package can be used to build both the realtime-lsm
module and the custom kernel required by realtime-lsm, make-kpkg is a
more logical choice for building the realtime-lsm module than
module-assistant. I found myself frustrated trying to use
module-assistant to build the realtime-lsm module. The directions for
using make-kpkg in /usr/share/doc/alsa-source also helped me build the
realtime-lsm module, but the directions in /usr/src/realtime-lsm-source
simply state:
[quote]
In order to build the realtime kernel module from source use
module-assistant.
e.g.
module-assistant update
modula-assistant build realtime-lsm
You need to have the kernel header files installed for this to work.
[end quote]
Why have kernel-headers-[insert-version-number] installed if one needs
the full kernel source to build a kernel with
Since realtime-lsm requires a kernel rebuilt with
CONFIG_SECURITY_CAPABILITIES=m anyway?
Unpacking the kernel source and realtime-lsm source, creating a symbolic
link /usr/src/linux pointing to /usr/src/linux-source-2.6.17 then
copying the current kernel configuration from /boot to
/usr/src/linux/.config didn't allow:
make-kpkg modules-image
to succeed (as shown in the quoted errors above).
What was needed after:
cp /boot/config-2.6.17 /usr/src/linux/.config
was:
cd /usr/src/linux
make modules_prepare
before:
make-kpkg modules-image
After that I could do:
cd /usr/src
dpkg -i realtime-lsm-module*.deb
Problem solved!
Arthur.
Reply to: