Install module into the kernel module tree - #156
Conversation
Add install and uninstall targets so the built module can be placed under /lib/modules/<kernel>/extra and indexed with depmod. This lets modprobe, modinfo, and modules-load.d find the module after it is built, instead of requiring users to load the local .ko with insmod. Also wire the existing WMI device ID table into the wmi_driver definition so the driver's modalias metadata matches the GUID it supports. Signed-off-by: dharmik <dharmikparmar2004@yahoo.com>
Add a dkms.conf so the module can be rebuilt and installed automatically when new kernels are installed. This avoids requiring users to manually rerun the local install flow after each kernel update. Document the DKMS install and removal commands, and stop ignoring dkms.conf now that it is project configuration rather than a build artifact. Signed-off-by: dharmik <dharmikparmar2004@yahoo.com>
|
@shadowhexer I ran into a related install/reinstall problem and was working on it. Your comment made me realize that the same work can also cover the kernel-update behavior you mentioned. I have added a normal The install target fixes the normal |
Thanks for noticing the issue and delivering a fix. I hope the module author merge this. |
Add install and uninstall targets for the module.
The install target copies the built
.kointo/lib/modules/<kernel>/extraand runs
depmod, so the module can be found normally by tools likemodprobe,modinfo, andmodules-load.d. Without this, users have to loadthe local build artifact directly with
insmod.I ran into this while testing on an Acer Aspire A315-58. I had a
modules-load.dentry foracer-wmi-battery, but each boot still logged amodule load failure because the module had only been built locally and was not
installed into the kernel module tree. After installing it under
/lib/modules/<kernel>/extraand runningdepmod, bothmodinfo acer-wmi-batteryandmodprobe acer-wmi-batteryresolve it correctly.This also attaches the existing WMI device ID table to the
wmi_driverdefinition so the generated modalias metadata matches the GUID supported by the
driver.
I tested this with
make,sudo make install,modinfo acer-wmi-battery,and
modprobe --show-depends acer-wmi-battery.