Fix DKMS version mismatch and Makefile KERNELDIR handling#43
Open
achrafsoltani wants to merge 2 commits intointel:usbio-mainfrom
Open
Fix DKMS version mismatch and Makefile KERNELDIR handling#43achrafsoltani wants to merge 2 commits intointel:usbio-mainfrom
achrafsoltani wants to merge 2 commits intointel:usbio-mainfrom
Conversation
The dkms.conf had PACKAGE_VERSION="0.2" while the README and actual release version is 0.3, causing DKMS to register the wrong version. Signed-off-by: Achraf SOLTANI <achraf.soltani@gmail.com>
The Makefile used unconditional assignment (:=) for KERNELRELEASE and KDIR, which meant the KERNELDIR variable passed by dkms.conf was silently ignored. This caused DKMS builds to compile against the running kernel rather than the target kernel during kernel upgrades. Change to conditional assignment (?=) and add an ifdef KERNELDIR block so the DKMS MAKE command works correctly. Signed-off-by: Achraf SOLTANI <achraf.soltani@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PACKAGE_VERSIONfrom"0.2"to"0.3"to match the actual release version referenced in the README:=to?=forKERNELRELEASEandKDIR, and add anifdef KERNELDIRblock so theKERNELDIRvariable passed bydkms.confis properly honouredProblem
The
dkms.confregisters version0.2but the README instructs users to use version0.3, causing confusion and DKMS registration mismatches.The Makefile uses unconditional assignment (
:=) forKERNELRELEASEandKDIR, which means theKERNELDIRvariable passed via the DKMSMAKEcommand is silently ignored. This causes DKMS builds to compile against the running kernel rather than the target kernel during kernel upgrades.Testing
Tested on Ubuntu 24.04 LTS, kernel 6.17.0-14-generic (HWE):
make): 3 modules built successfullymake KERNELDIR=/lib/modules/6.17.0-14-generic/build): 3 modules built successfullymake -C . KERNELDIR=/lib/modules/6.17.0-14-generic/build): 3 modules built successfullySigned-off-by: Achraf Soltani achraf@achrafsoltani.com