Open HaleTom opened 2 years ago
The only make.log
left on my system is for kernel 5.15 which shows everything worked just fine.
I think the problem is that the module is built only for one kernel, so trying to install it on other kernels won't work:
Here, 5.15 works, 5.10 fails:
% sudo dkms -k 5.15.12-1-MANJARO --kernelsourcedir /usr/lib/modules/5.15.12-1-MANJARO/build install asus-wmi/1.0
Module asus-wmi/1.0 already installed on kernel 5.15.12-1-MANJARO (x86_64).
% sudo dkms -k 5.10.89-1-MANJARO --kernelsourcedir /usr/lib/modules/5.10.89-1-MANJARO/build install asus-wmi/1.0
Building module:
cleaning build area...
make -j8 KERNELRELEASE=5.10.89-1-MANJARO -C /usr/lib/modules/5.10.89-1-MANJARO/build M=/var/lib/dkms/asus-wmi/1.0/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.10.89-1-MANJARO (x86_64)
Consult /var/lib/dkms/asus-wmi/1.0/build/make.log for more information.
% cat /var/lib/dkms/asus-wmi/1.0/build/make.log
DKMS make.log for asus-wmi-1.0 for kernel 5.10.89-1-MANJARO (x86_64)
Tue 18 Jan 2022 17:21:02 +07
make: Entering directory '/usr/lib/modules/5.10.89-1-MANJARO/build'
CC [M] /var/lib/dkms/asus-wmi/1.0/build/asus-wmi.o
CC [M] /var/lib/dkms/asus-wmi/1.0/build/asus-nb-wmi.o
/var/lib/dkms/asus-wmi/1.0/build/asus-wmi.c:29:10: fatal error: linux/platform_profile.h: No such file or directory
29 | #include <linux/platform_profile.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:280: /var/lib/dkms/asus-wmi/1.0/build/asus-wmi.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1822: /var/lib/dkms/asus-wmi/1.0/build] Error 2
make: Leaving directory '/usr/lib/modules/5.10.89-1-MANJARO/build'
%
platform_profile.h
only exists in 5.15:
% curl -s https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/plain/drivers/platform/x86/asus-wmi.c\?h\=linux-5.15.y | grep -F 'platform_profile.h'
#include <linux/platform_profile.h>
% fd platform_profile.h /usr/lib/modules/
/usr/lib/modules/5.15.12-1-MANJARO/build/include/linux/platform_profile.h
It doesn't exist in 5.10:
% fd platform_profile.h /usr/lib/modules/5.10.89-1-MANJARO
%
Could you build for all installed kernels, or allow passing a kernel name to build for?
You could try to temporarily hard-code the specific Kernel version you'd like to build and install this for in line two of prepare-for-current-kernel.sh
: https://github.com/Plippo/asus-wmi-screenpad/blob/47fce74f278e3896d2ca5bdcfc8f5592d3ca028a/prepare-for-current-kernel.sh#L2
Something like replacing it with VERSION="5.10"
with that specific Kernel version actually already installed on your system might do the trick.
Note that I haven't tried this myself, but if you do end up trying it, I'd love to hear if it worked. If it does work, it should be a relatively simple change to have the VERSION
value either be provided (as an environment variable or command argument), or alternatively fall back to the currently running version (ie. the current behavior).
I just wanted to follow up my previous post and to let you know that it indeed works as you want. The Linux flavor I'm running (Fedora 35) just updated to kernel 5.16.5 from 5.15.7 (I believe), and I was able to install the new kernel and immediately update and install the screenpad module, before rebooting. The steps I took:
prepare-for-current-kernel.sh
so that it had VERSION="5.16"
at the very top of the filesudo sh prepare-for-current-kernel.sh
sudo dkms build -m asus-wmi -v 1.0 -k 5.16.5-200.fc35.x86_64
sudo dkms install -m asus-wmi -v 1.0 -k 5.16.5-200.fc35.x86_64
It should be possibly to modify the prepare shell script to optionally take a version number from the command line so that it doesn't have to be hard-coded, but as I'm a little pressed foro time right now, simply temporarily setting it like this does the trick.
I hope this helps!
Note It works on my current kernel (5.15) but fails on 5.4 and 5.10:
I see the file
prepare-for-current-kernel.sh
. How can I have this work properly for non-current kernels, too?