source: branches/8.09/package/broadcom-wl/Makefile @ 14312

Last change on this file since 14312 was 14312, checked in by agb, 8 years ago

merge r14306, r14307, r14309, and r14311 to 8.09:
[package] broadcom,madwifi,mac80211: move txpower from wifi-iface to wifi-device but retain backward compatiblity

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