kernel: lantiq: fix Module.symvers handling
authorMathias Kresin <dev@kresin.me>
Sun, 27 Dec 2020 20:59:28 +0000 (21:59 +0100)
committerMathias Kresin <dev@kresin.me>
Thu, 18 Feb 2021 07:43:08 +0000 (08:43 +0100)
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 <dev@kresin.me>
package/kernel/lantiq/ltq-adsl/Makefile
package/kernel/lantiq/ltq-atm/Makefile
package/kernel/lantiq/ltq-ifxos/Makefile
package/kernel/lantiq/ltq-ptm/Makefile
package/kernel/lantiq/ltq-tapi/Makefile
package/kernel/lantiq/ltq-vdsl-mei/Makefile
package/kernel/lantiq/ltq-vdsl/Makefile
package/kernel/lantiq/ltq-vmmc/Makefile

index b2e1ccb6405e515894847e4c02be6ff4f5dd9c85..31874acaca4e778f9bc896bbeeefeb766f26efb6 100644 (file)
@@ -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)" \
index 89a3328cf8c8c2d7dd7196c52ac68593666782a3..f675269ca33521ffbcb9735b3f9ae03d2475f397 100644 (file)
@@ -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))
index 4a368309d3f448ba3af26a8707890eaebe3d44e2..e98cb21eff57c5ed5d1307246997f1292c6e03c1 100644 (file)
@@ -16,6 +16,7 @@ PKG_HASH:=ed7fe39311d7a4a13d23ed0ae2445c0d825b472b5a98da9b72bcaabcf5ed2d5f
 PKG_MAINTAINER:=John Crispin <john@phrozen.org>
 PKG_LICENSE:=GPL-2.0 BSD-2-Clause
 PKG_LICENSE_FILES:=LICENSE
+PKG_EXTMOD_SUBDIRS:=src
 
 PKG_FIXUP:=autoreconf
 
index d7c2a7aa6166a7203a172843027ce356430fb4dc..33a23d6853fcc9d0c023aba9e98d492764e952d3 100644 (file)
@@ -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))
index a04f7d38e557993b4eeab4323936f0610fb28b18..77728644f6024998ed702186a5ad56bef633262f 100644 (file)
@@ -19,6 +19,7 @@ PKG_MAINTAINER:=John Crispin <john@phrozen.org>
 
 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 \
index 4a305d9c2779c43674a96db590365454c4e94526..8e52d20a722395f96097ec2196af36fafe5e158a 100644 (file)
@@ -21,6 +21,7 @@ PKG_FLAGS:=nonshared
 PKG_MAINTAINER:=John Crispin <john@phrozen.org>
 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 += \
index c09c88057f8442c4d897982b066bace6ee36b534..047543496e4ed6f78e05cd57d5f447eca6155634 100644 (file)
@@ -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" \
index c733345cfa8e0214d9d70774c2f218d1010188fb..c96cee819b60309ebd3ff07cd1f363a2bc33c300 100644 (file)
@@ -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 \