The DKMS Makefile built against /lib/modules/$(uname -r), the *running*
kernel. When DKMS rebuilds the module for a newly installed kernel (the
common case after an apt upgrade, while the old kernel is still running),
it produced a .ko with the old kernel's vermagic and installed it into
the new kernel's tree. The module then failed to load with "disagrees
about version of symbol module_layout".
Make the Makefile honour a KVERSION variable (defaulting to the running
kernel for manual builds) and have dkms.conf pass DKMS's target kernel
via KVERSION=${kernelver}, so the module is always built for the kernel
it is being installed for.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
10 lines
321 B
Plaintext
10 lines
321 B
Plaintext
PACKAGE_NAME="oneUpPower"
|
|
PACKAGE_VERSION="1.0"
|
|
MAKE="make -f ./src/Makefile KVERSION=${kernelver}"
|
|
CLEAN="make -f ./src/Makefile clean KVERSION=${kernelver}"
|
|
BUILT_MODULE_NAME="oneUpPower"
|
|
BUILT_MODULE_LOCATION="./src/"
|
|
DEST_MODULE_LOCATION="/kernel/drivers/power/supply/"
|
|
AUTOINSTALL="yes"
|
|
POST_INSTALL="./postinstall"
|