From c4a5e6388b683941b01b3db3c3920c5836b0892e Mon Sep 17 00:00:00 2001 From: Achraf SOLTANI Date: Mon, 16 Feb 2026 12:22:52 +0000 Subject: [PATCH 1/2] dkms: fix PACKAGE_VERSION to match v0.3 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 --- dkms.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dkms.conf b/dkms.conf index 8c38f21..7e4a910 100644 --- a/dkms.conf +++ b/dkms.conf @@ -1,5 +1,5 @@ PACKAGE_NAME="usbio" -PACKAGE_VERSION="0.2" +PACKAGE_VERSION="0.3" MAKE="make -C . KERNELDIR=/lib/modules/${kernelver}/build" CLEAN="make -C . clean" From 46e8c4bf6716cab2210fd6aee182d37700f41749 Mon Sep 17 00:00:00 2001 From: Achraf SOLTANI Date: Mon, 16 Feb 2026 12:22:58 +0000 Subject: [PATCH 2/2] Makefile: use conditional assignment and honour KERNELDIR from DKMS 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 --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d1207e1..bed2485 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,11 @@ gpio-usbio-y := drivers/gpio/gpio-usbio.o obj-m += i2c-usbio.o i2c-usbio-y := drivers/i2c/busses/i2c-usbio.o -KERNELRELEASE := $(shell uname -r) -KDIR := /lib/modules/$(KERNELRELEASE)/build +KERNELRELEASE ?= $(shell uname -r) +KDIR ?= /lib/modules/$(KERNELRELEASE)/build +ifdef KERNELDIR +KDIR := $(KERNELDIR) +endif PWD := $(shell pwd) ccflags-y += -I$(src)/include/