mirror of
https://github.com/openwrt/packages.git
synced 2026-10-12 08:07:24 +04:00
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 <mail@aparcar.org>
This commit is contained in:
1 parent
6e7270bc8e
commit
02e85ea646
1 file changed
+2
-12
@@ -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))
|
||||
Reference in new issue
Block a user