2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
10 include $(INCLUDE_DIR
)/kernel.mk
13 PKG_VERSION
:=4.150.10.5.1
17 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
18 PKG_SOURCE_URL
:=http
://downloads.openwrt.org
/sources
19 PKG_MD5SUM
:=13cffebdcc08ef87673fbc02b2d56d52
23 include $(INCLUDE_DIR
)/package.mk
25 define Package
/broadcom-wl
/Default
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
33 define KernelPackage
/brcm-wl
/Default
34 $(call Package
/broadcom-wl
/Default
)
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))
42 define KernelPackage
/brcm-wl
/Default
/description
43 This package contains the proprietary wireless driver for the Broadcom
47 define KernelPackage
/brcm-wl
48 $(call KernelPackage
/brcm-wl
/Default
,)
49 TITLE
+= (normal version
)
52 define KernelPackage
/brcm-wl
/description
53 $(call KernelPackage
/brcm-wl
/Default
/description
)
56 define KernelPackage
/brcm-wl-mimo
57 $(call KernelPackage
/brcm-wl
/Default
,_mimo
)
58 TITLE
+= (MIMO version
)
61 define KernelPackage
/brcm-wl-mimo
/description
62 $(call KernelPackage
/brcm-wl
/Default
/description
)
65 define 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
71 define KernelPackage
/wlcompat
72 $(call KernelPackage
/wlcompat
/Default
,)
73 AUTOLOAD
:=$(call AutoLoad
,50,wlcompat
)
76 define KernelPackage
/wlcompat
/description
77 This package contains a wrapper module
, that provides Wireless Extension
78 support for the proprietary Broadcom wl module.
81 define KernelPackage
/wlcompat-debug
82 $(call KernelPackage
/wlcompat
/Default
,-debug
)
87 define KernelPackage
/wlcompat-debug
/description
88 $(call KernelPackage
/wlcompat
/description
)
89 This is the debugging version.
93 $(call Package
/broadcom-wl
/Default
)
94 TITLE
:=wl driver setup utility
97 define Package
/wlc
/description
98 This package contains an utility for initializing the proprietary Broadcom
103 $(call Package
/broadcom-wl
/Default
)
104 TITLE
:=Proprietary Broadcom wl driver config utility
107 define Package
/wl
/description
108 This package contains the proprietary utility
(wl
) for configuring the
109 proprietary Broadcom wl driver.
113 $(call Package
/broadcom-wl
/Default
)
115 TITLE
:=Proprietary Broadcom WPA
/WPA2 authenticator
118 define Package
/nas
/description
119 This package contains the proprietary WPA
/WPA2 authenticator
(nas
) for the
120 proprietary Broadcom wl driver.
123 MAKE_KMOD
:= $(MAKE
) -C
"$(LINUX_DIR)" \
124 CROSS_COMPILE
="$(TARGET_CROSS)" \
125 ARCH
="$(LINUX_KARCH)" \
126 PATH
="$(TARGET_PATH)" \
127 SUBDIRS
="$(PKG_BUILD_DIR)/kmod"
130 $(call Build
/Prepare
/Default
)
131 $(CP
) src
/* $(PKG_BUILD_DIR
)/
135 # Compile the kernel part
137 SUBDIRS
="$(PKG_BUILD_DIR)/driver" \
140 SUBDIRS
="$(PKG_BUILD_DIR)/driver" \
144 SUBDIRS
="$(PKG_BUILD_DIR)/wlcompat" \
145 $(if
$(WL_WEXT
),WL_WEXT
=1) \
148 SUBDIRS
="$(PKG_BUILD_DIR)/wlcompat" \
150 $(if
$(WL_WEXT
),WL_WEXT
=1) \
154 $(MAKE
) -C
$(PKG_BUILD_DIR
)/wlc \
155 $(TARGET_CONFIGURE_OPTS
) \
156 CFLAGS
="$(TARGET_CFLAGS)" \
158 $(TARGET_CC
) -o
$(PKG_BUILD_DIR
)/nas
$(PKG_BUILD_DIR
)/nas_exe.o
-L
$(STAGING_DIR
)/usr
/lib
-lnvram
159 $(TARGET_CC
) -o
$(PKG_BUILD_DIR
)/wl
$(PKG_BUILD_DIR
)/wl_exe.o
162 define Package
/wlc
/install
163 $(CP
) .
/files
/* $(1)/
164 $(INSTALL_DIR
) $(1)/sbin
165 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/wlc
/wlc
$(1)/sbin
/
168 define Package
/wl
/install
169 $(INSTALL_DIR
) $(1)/usr
/sbin
170 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/wl
$(1)/usr
/sbin
/
173 define Package
/nas
/install
174 $(INSTALL_DIR
) $(1)/usr
/sbin
175 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/nas
$(1)/usr
/sbin
/
176 ln
-sf nas
$(1)/usr
/sbin
/nas4not
177 ln
-sf nas
$(1)/usr
/sbin
/nas4wds
180 $(eval
$(call KernelPackage
,brcm-wl
))
181 $(eval
$(call KernelPackage
,brcm-wl-mimo
))
182 $(eval
$(call KernelPackage
,wlcompat
))
183 $(eval
$(call KernelPackage
,wlcompat-debug
))
184 $(eval
$(call BuildPackage
,wlc
))
185 $(eval
$(call BuildPackage
,wl
))
186 $(eval
$(call BuildPackage
,nas
))