broadcom-wl: reorder kmod build and pass EXTRA_VERSIONS
authorJonas Gorski <jonas.gorski@gmail.com>
Fri, 21 Jul 2017 14:23:06 +0000 (16:23 +0200)
committerJonas Gorski <jonas.gorski@gmail.com>
Fri, 27 Oct 2017 11:06:15 +0000 (13:06 +0200)
Reoder the build to build the glue module first and pass the glue module's
Module.symvers to the wl driver builds.

This allows modpost to properly store a wl_glue dependency in the driver.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
package/kernel/broadcom-wl/Makefile

index c1741416f3d71bbc630461b506b392756d698256..cca002328212f5f51efbccd18e480f905afd316b 100644 (file)
@@ -112,23 +112,25 @@ define Build/Prepare
 endef
 
 define Build/Compile
+       # Compile glue driver
+       $(MAKE_KMOD) -C "$(LINUX_DIR)" \
+               SUBDIRS="$(PKG_BUILD_DIR)/glue" \
+               modules
+
        # Compile the kernel part
        $(MAKE_KMOD) \
                SUBDIRS="$(PKG_BUILD_DIR)/driver" \
                MODFLAGS="-DMODULE -mlong-calls" \
+               KBUILD_EXTRA_SYMBOLS="$(PKG_BUILD_DIR)/glue/Module.symvers" \
                modules
 
        $(MAKE_KMOD) \
                SUBDIRS="$(PKG_BUILD_DIR)/driver-mini" \
                MODFLAGS="-DMODULE -mlong-calls" \
                BUILD_TYPE="wl_apsta_mini" \
+               KBUILD_EXTRA_SYMBOLS="$(PKG_BUILD_DIR)/glue/Module.symvers" \
                modules
 
-       # Compile glue driver
-       $(MAKE_KMOD) -C "$(LINUX_DIR)" \
-               SUBDIRS="$(PKG_BUILD_DIR)/glue" \
-               modules                                        
-
        # Compile libshared
        $(MAKE) -C $(PKG_BUILD_DIR)/shared \
                $(TARGET_CONFIGURE_OPTS) \