building kernel modules
Jan Palus
atler at pld-linux.org
Thu Apr 21 22:55:07 CEST 2016
In latest VirtualBox release there was an issue with building kernel
modules for LTS kernel 3.10 which was basically caused by missing
KERNELRELEASE definition. Since for one module build depends on
target kernel version, the decision was made incorrectly in the absence
of above var. Now from top level Makefile in kernel-headers:
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
kernel.release file is fine and contains correct value, however the
implicit requirement is to have $PWD pointing to kernel headers top dir.
That's not the case for our %build_kernel_modules macro which uses
O=$PWD/o in turn causing `cd $O` before evaluating KERNELRELEASE. As a
result KERNELRELEASE ends up empty.
As I'm not really proficient with build process of kernel modules, can
someone advise if O= is really necessary or is there some other way to
fix the issue?
More information about the pld-devel-en
mailing list