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.80.53.0
17 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
18 PKG_SOURCE_URL
:=http
://downloads.openwrt.org
/sources
19 PKG_MD5SUM
:=a7d8dde3ce474c361143b83e1d9890b1
21 include $(INCLUDE_DIR
)/package.mk
23 define Package
/broadcom-wl
/Default
25 CATEGORY
:=Kernel modules
26 DEPENDS
:=@PACKAGE_kmod-brcm-wl||PACKAGE_kmod-brcm-wl-mimo
27 SUBMENU
:=Proprietary BCM43xx WiFi driver
28 SUBMENUDEP
:=@TARGET_BRCM_2_4
31 define KernelPackage
/brcm-wl
/Default
32 $(call Package
/broadcom-wl
/Default
)
34 DEPENDS
:=@TARGET_BRCM_2_4
35 TITLE
:=Kernel driver for BCM43xx chipsets
36 FILES
:=$(PKG_BUILD_DIR
)/kmod
/wl
$(1).o
37 AUTOLOAD
:=$(call AutoLoad
,30,wl
$(1))
40 define KernelPackage
/brcm-wl
/Default
/description
41 This package contains the proprietary wireless driver for the Broadcom
45 define KernelPackage
/brcm-wl
46 $(call KernelPackage
/brcm-wl
/Default
,)
47 TITLE
+= (normal version
)
50 define KernelPackage
/brcm-wl
/description
51 $(call KernelPackage
/brcm-wl
/Default
/description
)
54 define KernelPackage
/brcm-wl-mimo
55 $(call KernelPackage
/brcm-wl
/Default
,_mimo
)
56 TITLE
+= (MIMO version
)
59 define KernelPackage
/brcm-wl-mimo
/description
60 $(call KernelPackage
/brcm-wl
/Default
/description
)
64 $(call Package
/broadcom-wl
/Default
)
65 TITLE
:=wl driver setup utility
68 define Package
/wlc
/description
69 This package contains an utility for initializing the proprietary Broadcom
74 $(call Package
/broadcom-wl
/Default
)
75 TITLE
:=Proprietary Broadcom wl driver config utility
78 define Package
/wl
/description
79 This package contains the proprietary utility
(wl
) for configuring the
80 proprietary Broadcom wl driver.
84 $(call Package
/broadcom-wl
/Default
)
86 TITLE
:=Proprietary Broadcom WPA
/WPA2 authenticator
89 define Package
/nas
/description
90 This package contains the proprietary WPA
/WPA2 authenticator
(nas
) for the
91 proprietary Broadcom wl driver.
95 define install_template
96 $(INSTALL_DIR
) $(1)/lib
/modules
/$(LINUX_VERSION
)
97 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/kmod
/wl
$(2).o.patch
$(1)/lib
/modules
/$(LINUX_VERSION
)/
100 define KernelPackage
/brcm-wl
/install
101 $(call install_template
,$(1),)
104 define KernelPackage
/brcm-wl_mimo
/install
105 $(call install_template
,$(1),_mimo
)
108 MAKEFLAGS_KMOD
:= -C
"$(LINUX_DIR)" \
109 CROSS_COMPILE
="$(TARGET_CROSS)" \
110 ARCH
="$(LINUX_KARCH)" \
111 PATH
="$(TARGET_PATH)" \
112 SUBDIRS
="$(PKG_BUILD_DIR)/kmod"
115 $(call Build
/Prepare
/Default
)
116 $(CP
) src
/* $(PKG_BUILD_DIR
)/
120 # Compile the kernel part
121 $(MAKE
) $(MAKEFLAGS_KMOD
) \
123 $(MAKE
) $(MAKEFLAGS_KMOD
) MOD_NAME
="_mimo" \
127 $(MAKE
) -C
$(PKG_BUILD_DIR
)/wlc \
128 $(TARGET_CONFIGURE_OPTS
) \
129 CFLAGS
="-I$(PKG_BUILD_DIR)/wlc/include $(TARGET_CFLAGS)" \
133 define Package
/wlc
/install
134 $(CP
) .
/files
/* $(1)/
135 $(INSTALL_DIR
) $(1)/sbin
136 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/wlc
/wlc
$(1)/sbin
/
139 define Package
/wl
/install
140 $(INSTALL_DIR
) $(1)/usr
/sbin
141 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/wl
$(1)/usr
/sbin
/
144 define Package
/nas
/install
145 $(INSTALL_DIR
) $(1)/usr
/lib
146 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/libbcmcrypto.so
$(1)/usr
/lib
/
147 $(INSTALL_DIR
) $(1)/usr
/sbin
148 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/nas
$(1)/usr
/sbin
/
149 ln
-sf nas
$(1)/usr
/sbin
/nas4not
150 ln
-sf nas
$(1)/usr
/sbin
/nas4wds
153 $(eval
$(call KernelPackage
,brcm-wl
))
154 $(eval
$(call KernelPackage
,brcm-wl-mimo
))
155 $(eval
$(call BuildPackage
,wlc
))
156 $(eval
$(call BuildPackage
,wl
))
157 $(eval
$(call BuildPackage
,nas
))