source: branches/backfire/package/broadcom-wl/Makefile @ 29138

Last change on this file since 29138 was 29138, checked in by jow, 5 years ago

[backfire] broadcom-wl: backport r29136

  • Property svn:copyright set to Copyright (C) 2006 OpenWrt.org
  • Property svn:eol-style set to native
File size: 5.0 KB
Line 
1#
2# Copyright (C) 2006-2011 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9include $(INCLUDE_DIR)/kernel.mk
10
11PKG_NAME:=broadcom-wl
12PKG_VERSION:=4.150.10.5.3
13PKG_RELEASE:=9
14WLC_VERSION:=0.2
15
16PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17PKG_SOURCE_URL:=http://downloads.openwrt.org/sources
18PKG_MD5SUM:=cc615fd49719eea8bce5b2a8813783f3
19
20WL_WEXT=1
21
22include $(INCLUDE_DIR)/package.mk
23
24define Package/broadcom-wl/Default
25  SECTION:=kernel
26  CATEGORY:=Kernel modules
27  DEPENDS:=@PACKAGE_kmod-brcm-wl||PACKAGE_kmod-brcm-wl-mimo
28  SUBMENU:=Proprietary BCM43xx WiFi driver
29  SUBMENUDEP:=@TARGET_brcm_2_4
30endef
31
32define KernelPackage/brcm-wl/Default
33  $(call Package/broadcom-wl/Default)
34  SECTION:=kernel
35  DEPENDS:=@TARGET_brcm_2_4 +wireless-tools
36  TITLE:=Kernel driver for BCM43xx chipsets
37  FILES:=$(PKG_BUILD_DIR)/driver/wl$(1).o
38  AUTOLOAD:=$(call AutoLoad,30,wl$(1))
39endef
40
41define KernelPackage/brcm-wl/Default/description
42 This package contains the proprietary wireless driver for the Broadcom
43 BCM43xx chipset.
44endef
45
46define KernelPackage/brcm-wl
47$(call KernelPackage/brcm-wl/Default,)
48  TITLE+= (normal version)
49endef
50
51define KernelPackage/brcm-wl/description
52$(call KernelPackage/brcm-wl/Default/description)
53endef
54
55define KernelPackage/brcm-wl-mimo
56$(call KernelPackage/brcm-wl/Default,_mimo)
57  TITLE+= (MIMO version)
58endef
59
60define KernelPackage/brcm-wl-mimo/description
61$(call KernelPackage/brcm-wl/Default/description)
62endef
63
64define KernelPackage/wlcompat/Default
65  $(call KernelPackage/brcm-wl/Default,)
66  TITLE:=Kernel driver for BCM43xx chipsets
67  FILES:=$(PKG_BUILD_DIR)/wlcompat/wlcompat$(1).o
68endef
69
70define KernelPackage/wlcompat
71$(call KernelPackage/wlcompat/Default,)
72  AUTOLOAD:=$(call AutoLoad,50,wlcompat)
73endef
74
75define KernelPackage/wlcompat/description
76 This package contains a wrapper module, that provides Wireless Extension
77 support for the proprietary Broadcom wl module.
78endef
79
80define KernelPackage/wlcompat-debug
81$(call KernelPackage/wlcompat/Default,-debug)
82  TITLE+= (debug)
83  AUTOLOAD:=
84endef
85
86define KernelPackage/wlcompat-debug/description
87$(call KernelPackage/wlcompat/description)
88 This is the debugging version.
89endef
90
91define Package/wlc
92$(call Package/broadcom-wl/Default)
93  TITLE:=wl driver setup utility
94endef
95
96define Package/wlc/description
97 This package contains an utility for initializing the proprietary Broadcom
98 wl driver.
99endef
100
101define Package/wl
102$(call Package/broadcom-wl/Default)
103  TITLE:=Proprietary Broadcom wl driver config utility
104endef
105
106define Package/wl/description
107 This package contains the proprietary utility (wl) for configuring the
108 proprietary Broadcom wl driver.
109endef
110
111define Package/nas
112$(call Package/broadcom-wl/Default)
113  TITLE:=Proprietary Broadcom WPA/WPA2 authenticator
114endef
115
116define Package/nas/description
117 This package contains the proprietary WPA/WPA2 authenticator (nas) for the
118 proprietary Broadcom wl driver.
119endef
120
121MAKE_KMOD := $(MAKE) -C "$(LINUX_DIR)" \
122                CROSS_COMPILE="$(TARGET_CROSS)" \
123                ARCH="$(LINUX_KARCH)" \
124                PATH="$(TARGET_PATH)" \
125                SUBDIRS="$(PKG_BUILD_DIR)/kmod"
126
127define Build/Prepare
128        $(call Build/Prepare/Default)
129        $(CP) src/* $(PKG_BUILD_DIR)/
130endef
131
132define Build/Compile
133        # Compile the kernel part
134        $(MAKE_KMOD) \
135                SUBDIRS="$(PKG_BUILD_DIR)/driver" \
136                modules
137        $(MAKE_KMOD) \
138                SUBDIRS="$(PKG_BUILD_DIR)/driver" \
139                MOD_NAME="_mimo" \
140                modules
141        $(MAKE_KMOD) \
142                SUBDIRS="$(PKG_BUILD_DIR)/wlcompat" \
143                $(if $(WL_WEXT),WL_WEXT=1) \
144                modules
145        $(MAKE_KMOD) \
146                SUBDIRS="$(PKG_BUILD_DIR)/wlcompat" \
147                DEBUG=1 \
148                $(if $(WL_WEXT),WL_WEXT=1) \
149                modules
150
151        # NVRAM stub
152        $(TARGET_CC) $(TARGET_CFLAGS) -c -o $(PKG_BUILD_DIR)/nvram/nvram_stub.o $(PKG_BUILD_DIR)/nvram/nvram_stub.c
153
154        # Compile wlc
155        $(MAKE) -C $(PKG_BUILD_DIR)/wlc \
156                $(TARGET_CONFIGURE_OPTS) \
157                CFLAGS="$(TARGET_CFLAGS)" \
158                all
159
160        # Compile libshared
161        $(MAKE) -C $(PKG_BUILD_DIR)/router/shared \
162                $(TARGET_CONFIGURE_OPTS) \
163                CFLAGS="$(TARGET_CFLAGS) -I. -I$(PKG_BUILD_DIR)/include -Dlinux=1" \
164                all
165        $(TARGET_CC) -o $(PKG_BUILD_DIR)/nas \
166                $(PKG_BUILD_DIR)/nas_exe.o \
167                $(PKG_BUILD_DIR)/nvram/nvram_stub.o \
168                $(TARGET_LDFLAGS) \
169                $(PKG_BUILD_DIR)/router/shared/libshared.a
170        $(TARGET_CC) -o $(PKG_BUILD_DIR)/wl $(PKG_BUILD_DIR)/wl_exe.o
171endef
172
173define Build/InstallDev
174        $(INSTALL_DIR) $(1)/usr/lib
175        $(CP) $(PKG_BUILD_DIR)/router/shared/libshared.a $(1)/usr/lib/
176endef
177
178define Package/wlc/install
179        $(CP) ./files/* $(1)/
180        $(INSTALL_DIR) $(1)/sbin
181        $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlc/wlc $(1)/sbin/
182endef
183
184define Package/wl/install
185        $(INSTALL_DIR) $(1)/usr/sbin
186        $(INSTALL_BIN) $(PKG_BUILD_DIR)/wl $(1)/usr/sbin/
187endef
188
189define Package/nas/install
190        $(INSTALL_DIR) $(1)/usr/sbin
191        $(INSTALL_BIN) $(PKG_BUILD_DIR)/nas $(1)/usr/sbin/
192        ln -sf nas $(1)/usr/sbin/nas4not
193        ln -sf nas $(1)/usr/sbin/nas4wds
194endef
195
196$(eval $(call KernelPackage,brcm-wl))
197$(eval $(call KernelPackage,brcm-wl-mimo))
198$(eval $(call KernelPackage,wlcompat))
199$(eval $(call KernelPackage,wlcompat-debug))
200$(eval $(call BuildPackage,wlc))
201$(eval $(call BuildPackage,wl))
202$(eval $(call BuildPackage,nas))
Note: See TracBrowser for help on using the repository browser.