From: Mathias Kresin Date: Sun, 27 Dec 2020 20:59:28 +0000 (+0100) Subject: kernel: lantiq: fix Module.symvers handling X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d2d32dcd5f4bb2d028452419fb2e014b7b31a37a;p=openwrt%2Fstaging%2Fzorun.git kernel: lantiq: fix Module.symvers handling If an external module uses exported symbols from another external module, Kbuild needs to have full knowledge of all symbols to avoid spitting out warnings about undefined symbols. Use PKG_EXTMOD_SUBDIRS to point to the build directory which contains the Module.symvers. Pass KERNEL_MAKE_FLAGS to the external module build, to inject KBUILD_EXTRA_SYMBOLS. KBUILD_EXTRA_SYMBOLS holds a space separated list of Module.symvers, which list all exported symbols. Signed-off-by: Mathias Kresin --- diff --git a/package/kernel/lantiq/ltq-adsl/Makefile b/package/kernel/lantiq/ltq-adsl/Makefile index b2e1ccb640..31874acaca 100644 --- a/package/kernel/lantiq/ltq-adsl/Makefile +++ b/package/kernel/lantiq/ltq-adsl/Makefile @@ -46,6 +46,9 @@ IFX_DSL_MAX_DEVICE=1 IFX_DSL_LINES_PER_DEVICE=1 IFX_DSL_CHANNELS_PER_LINE=1 +MAKE_FLAGS += \ + $(KERNEL_MAKE_FLAGS) + CONFIGURE_ARGS += --enable-kernel-include="$(LINUX_DIR)/include" \ --with-max-device="$(IFX_DSL_MAX_DEVICE)" \ --with-lines-per-device="$(IFX_DSL_LINES_PER_DEVICE)" \ diff --git a/package/kernel/lantiq/ltq-atm/Makefile b/package/kernel/lantiq/ltq-atm/Makefile index 89a3328cf8..f675269ca3 100644 --- a/package/kernel/lantiq/ltq-atm/Makefile +++ b/package/kernel/lantiq/ltq-atm/Makefile @@ -36,7 +36,7 @@ endef define Build/Compile cd $(LINUX_DIR); \ ARCH=mips CROSS_COMPILE="$(KERNEL_CROSS)" \ - $(MAKE) BUILD_VARIANT=$(BUILD_VARIANT) M=$(PKG_BUILD_DIR) V=1 modules + $(MAKE) $(KERNEL_MAKE_FLAGS) BUILD_VARIANT=$(BUILD_VARIANT) M=$(PKG_BUILD_DIR) V=1 modules endef $(eval $(call KernelPackage,ltq-atm-danube)) diff --git a/package/kernel/lantiq/ltq-ifxos/Makefile b/package/kernel/lantiq/ltq-ifxos/Makefile index 4a368309d3..e98cb21eff 100644 --- a/package/kernel/lantiq/ltq-ifxos/Makefile +++ b/package/kernel/lantiq/ltq-ifxos/Makefile @@ -16,6 +16,7 @@ PKG_HASH:=ed7fe39311d7a4a13d23ed0ae2445c0d825b472b5a98da9b72bcaabcf5ed2d5f PKG_MAINTAINER:=John Crispin PKG_LICENSE:=GPL-2.0 BSD-2-Clause PKG_LICENSE_FILES:=LICENSE +PKG_EXTMOD_SUBDIRS:=src PKG_FIXUP:=autoreconf diff --git a/package/kernel/lantiq/ltq-ptm/Makefile b/package/kernel/lantiq/ltq-ptm/Makefile index d7c2a7aa61..33a23d6853 100644 --- a/package/kernel/lantiq/ltq-ptm/Makefile +++ b/package/kernel/lantiq/ltq-ptm/Makefile @@ -45,7 +45,7 @@ endef define Build/Compile cd $(LINUX_DIR); \ ARCH=mips CROSS_COMPILE="$(KERNEL_CROSS)" \ - $(MAKE) BUILD_VARIANT=$(BUILD_VARIANT) M=$(PKG_BUILD_DIR) V=1 modules + $(MAKE) $(KERNEL_MAKE_FLAGS) BUILD_VARIANT=$(BUILD_VARIANT) M=$(PKG_BUILD_DIR) V=1 modules endef $(eval $(call KernelPackage,ltq-ptm-danube)) diff --git a/package/kernel/lantiq/ltq-tapi/Makefile b/package/kernel/lantiq/ltq-tapi/Makefile index a04f7d38e5..77728644f6 100644 --- a/package/kernel/lantiq/ltq-tapi/Makefile +++ b/package/kernel/lantiq/ltq-tapi/Makefile @@ -19,6 +19,7 @@ PKG_MAINTAINER:=John Crispin PKG_CHECK_FORMAT_SECURITY:=0 PKG_FIXUP:=autoreconf +PKG_EXTMOD_SUBDIRS:=src include $(INCLUDE_DIR)/package.mk @@ -39,6 +40,9 @@ define KernelPackage/ltq-tapi/config source "$(SOURCE)/Config.in" endef +MAKE_FLAGS += \ + $(KERNEL_MAKE_FLAGS) + CONFIGURE_ARGS += \ ARCH=$(LINUX_KARCH) \ --enable-linux-26 \ diff --git a/package/kernel/lantiq/ltq-vdsl-mei/Makefile b/package/kernel/lantiq/ltq-vdsl-mei/Makefile index 4a305d9c27..8e52d20a72 100644 --- a/package/kernel/lantiq/ltq-vdsl-mei/Makefile +++ b/package/kernel/lantiq/ltq-vdsl-mei/Makefile @@ -21,6 +21,7 @@ PKG_FLAGS:=nonshared PKG_MAINTAINER:=John Crispin PKG_LICENSE:=GPL-2.0 BSD-2-Clause PKG_LICENSE_FILES:=LICENSE +PKG_EXTMOD_SUBDIRS:=src include $(INCLUDE_DIR)/package.mk @@ -52,6 +53,7 @@ define Package/ltq-vdsl-mei-test/description endef MAKE_FLAGS += \ + $(KERNEL_MAKE_FLAGS) \ SHELL="$(BASH)" CONFIGURE_ARGS += \ diff --git a/package/kernel/lantiq/ltq-vdsl/Makefile b/package/kernel/lantiq/ltq-vdsl/Makefile index c09c88057f..047543496e 100644 --- a/package/kernel/lantiq/ltq-vdsl/Makefile +++ b/package/kernel/lantiq/ltq-vdsl/Makefile @@ -42,6 +42,7 @@ define Package/ltq-vdsl-vr9/description endef MAKE_FLAGS += \ + $(KERNEL_MAKE_FLAGS) \ SHELL="$(BASH)" CONFIGURE_ARGS += --enable-kernel-include="$(LINUX_DIR)/include" \ diff --git a/package/kernel/lantiq/ltq-vmmc/Makefile b/package/kernel/lantiq/ltq-vmmc/Makefile index c733345cfa..c96cee819b 100644 --- a/package/kernel/lantiq/ltq-vmmc/Makefile +++ b/package/kernel/lantiq/ltq-vmmc/Makefile @@ -39,6 +39,9 @@ define KernelPackage/ltq-vmmc/config source "$(SOURCE)/Config.in" endef +MAKE_FLAGS += \ + $(KERNEL_MAKE_FLAGS) + CONFIGURE_ARGS += \ ARCH=$(LINUX_KARCH) \ --enable-linux-26 \