Skip to content

Fix DKMS version mismatch and Makefile KERNELDIR handling#43

Open
achrafsoltani wants to merge 2 commits intointel:usbio-mainfrom
achrafsoltani:fix-dkms-version-and-makefile
Open

Fix DKMS version mismatch and Makefile KERNELDIR handling#43
achrafsoltani wants to merge 2 commits intointel:usbio-mainfrom
achrafsoltani:fix-dkms-version-and-makefile

Conversation

@achrafsoltani
Copy link

Summary

  • dkms.conf: Fix PACKAGE_VERSION from "0.2" to "0.3" to match the actual release version referenced in the README
  • Makefile: Change := to ?= for KERNELRELEASE and KDIR, and add an ifdef KERNELDIR block so the KERNELDIR variable passed by dkms.conf is properly honoured

Problem

  1. The dkms.conf registers version 0.2 but the README instructs users to use version 0.3, causing confusion and DKMS registration mismatches.

  2. The Makefile uses unconditional assignment (:=) for KERNELRELEASE and KDIR, which means the KERNELDIR variable passed via the DKMS MAKE command 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):

  • Direct build (make): 3 modules built successfully
  • DKMS-style build (make KERNELDIR=/lib/modules/6.17.0-14-generic/build): 3 modules built successfully
  • Exact DKMS command (make -C . KERNELDIR=/lib/modules/6.17.0-14-generic/build): 3 modules built successfully
  • All three modules (usbio, gpio-usbio, i2c-usbio) load correctly and the camera stack functions as expected

Signed-off-by: Achraf Soltani achraf@achrafsoltani.com

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant