Thank you for the great work on updating this for newer kernels
For the rev21 code, building the module the old way (make, make install) is working as intended on Fedora 23.
However, using the dkms build options (dkms_install, or dkms_mkrpm) is resulting in the errors below:
Code: Select all
DKMS make.log for phc-intel-0.3.2 for kernel 4.5.7-200.fc23.x86_64 (x86_64)
Mon Jun 20 10:01:23 BRT 2016
make: Entering directory '/var/lib/dkms/phc-intel/0.3.2/build'
make: *** No rule to make target 'phc-intel.c', needed by 'phc-intel.ko'. Stop.
make: *** Waiting for unfinished jobs....
Preparing build area for phc-intel-0.3.2:
searching for patch directory... using ./inc/
cp: cannot stat ‘./inc//acpi-cpufreq.c’: No such file or directory
Makefile:152: recipe for target '.prepare' failed
make: *** [.prepare] Error 1
make: Leaving directory '/var/lib/dkms/phc-intel/0.3.2/build'
In summary, the first error is related to the phc-intel.c dependency, which make doesn't know how to build. A workaround is replacing the dependency with .prepare which seems to provide the phc-intel.c file (as far as I could understand).
The second error is related to the variable KERNELVERSION being empty. A workaround was commenting the line which sets the SKIPKERNEL flag, so that the code that sets KERNELVERSION is ensured to run on every call to make.
This is the diff showing the changes I made to the Makefile:
Code: Select all
< # No need to run this multiple times on recursive make
< export SKIPKERNEL := true
> # No need to run this multiple times on recursive make (Actually needed for using dkms in Fedora 23).
> # export SKIPKERNEL := true
< $(TARGET): $(SOURCE)
> $(TARGET): .prepare
In Fedora 23, the make version is GNU Make 4.0 and the dkms version is 126.96.36.199. I hope this helps anyone on a similar configuration and future versions of the patch.