Package: broadcom-sta / 6.30.223.248-3

01-shipped-module.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Index: broadcom-sta-6.30.223.248/amd64/Makefile
===================================================================
--- broadcom-sta-6.30.223.248.orig/amd64/Makefile	2014-08-11 08:22:15.575131107 +0400
+++ broadcom-sta-6.30.223.248/amd64/Makefile	2014-08-11 08:32:17.555129627 +0400
@@ -126,9 +126,27 @@
 EXTRA_CFLAGS       += -I$(src)/src/shared/bcmwifi/include
 #EXTRA_CFLAGS       += -DBCMDBG_ASSERT -DBCMDBG_ERR
 
-EXTRA_LDFLAGS      := $(src)/lib/wlc_hybrid.o_shipped
+# Look for kernel architecture.
+# Check for a config symbol that should always be defined, so we don't
+# fail on 'make clean' which doesn't include .config
+ifeq ($(CONFIG_NET),y)
+    ifeq ($(CONFIG_X86_32),y)
+        SHIPPED=wlc_hybrid.o_i386
+        $(info Kernel architecture is X86_32)
+    else
+        ifeq ($(CONFIG_X86_64),y)
+            SHIPPED=wlc_hybrid.o_amd64
+            $(info Kernel architecture is X86_64)
+        else # Error!
+            $(error Unsupported kernel architecture)
+        endif
+    endif
+endif
 
-KBASE              ?= /lib/modules/`uname -r`
+EXTRA_LDFLAGS      := $(src)/lib/$(SHIPPED)
+
+KVER               ?= $(shell uname -r)
+KBASE              ?= /lib/modules/$(KVER)
 KBUILD_DIR         ?= $(KBASE)/build
 MDEST_DIR          ?= $(KBASE)/kernel/drivers/net/wireless