From 02e85ea6468d7adb80ea64d8865d71e4e90b1bc3 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Fri, 25 Sep 2026 09:29:47 +0200 Subject: [PATCH] dmx_usb_module: build through KERNEL_MAKE kmod-usb-serial-dmx_usb_module differs between builds, e.g. on apm821xx/nand, as dmx_usb.ko carries the absolute path of the kernel tree: /builder/shared-workdir/build/build_dir/.../linux-6.18.52/include/linux/ucopysize.h The module is built through its own Makefile, which runs make -C $(KERNELPATH) M=... without any of the OpenWrt prefix maps, and since Linux 6.13 kbuild includes the kernel headers of external modules by their absolute path. That Makefile only wraps kbuild, so call kbuild through $(KERNEL_MAKE) directly, like the kernel packages of the main repository do. This passes KERNEL_MAKE_FLAGS and with them ARCH, CROSS_COMPILE and the prefix maps of the build and staging directories. The options only used by the wrapper (TARGET, TOOLPREFIX, TOOLPATH, LDOPTS) are dropped. Signed-off-by: Paul Spooren --- libs/dmx_usb_module/Makefile | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/libs/dmx_usb_module/Makefile b/libs/dmx_usb_module/Makefile index e85505e006..6716f96663 100644 --- a/libs/dmx_usb_module/Makefile +++ b/libs/dmx_usb_module/Makefile @@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=dmx_usb_module PKG_VERSION:=19.12.1 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/lowlander/dmx_usb_module/tar.gz/V$(PKG_VERSION)? @@ -38,18 +38,8 @@ define KernelPackage/usb-serial-dmx_usb_module/description design and produce its own USB DMX Dongle without paying any licenses. endef -DMX_MAKE_OPTS:= -C $(PKG_BUILD_DIR) \ - PATH="$(TARGET_PATH)" \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - TARGET="$(HAL_TARGET)" \ - TOOLPREFIX="$(KERNEL_CROSS)" \ - TOOLPATH="$(KERNEL_CROSS)" \ - KERNELPATH="$(LINUX_DIR)" \ - LDOPTS=" " - define Build/Compile - $(MAKE) $(DMX_MAKE_OPTS) M=$(PKG_BUILD_DIR) + $(KERNEL_MAKE) M="$(PKG_BUILD_DIR)" modules endef $(eval $(call KernelPackage,usb-serial-dmx_usb_module))