2 # Copyright (C) 2006-2014 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
9 include $(INCLUDE_DIR
)/kernel.mk
12 PKG_VERSION
:=5.10.56.27.3
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
)_
$(ARCH
).
tar.bz2
16 PKG_SOURCE_URL
:=http
://downloads.openwrt.org
/sources
19 PKG_HASH
:=26a8c370f48fc129d0731cfd751c36cae1419b0bc8ca35781126744e60eae009
22 PKG_HASH
:=ca6a86ca3e3e9c85b6dbb665b35bcbf338c37829c1b2f1994487d55664886045
28 include $(INCLUDE_DIR
)/package.mk
30 define Package
/broadcom-wl
/Default
32 CATEGORY
:=Kernel modules
33 DEPENDS
:=@PACKAGE_kmod-brcm-wl||PACKAGE_kmod-brcm-wl-mini
34 SUBMENU
:=Proprietary BCM43xx WiFi driver
35 SUBMENUDEP
:=@TARGET_brcm47xx||TARGET_brcm63xx
38 define KernelPackage
/brcm-wl
/Default
39 $(call Package
/broadcom-wl
/Default
)
41 DEPENDS
:=@TARGET_brcm47xx||TARGET_brcm63xx
+wireless-tools
42 TITLE
:=Kernel driver for BCM43xx chipsets
43 FILES
:=$(PKG_BUILD_DIR
)/driver
$(1)/wl.ko
$(PKG_BUILD_DIR
)/glue
/wl_glue.ko
44 AUTOLOAD
:=$(call AutoLoad
,30,wl_glue wl
)
47 define KernelPackage
/brcm-wl
/Default
/description
48 This package contains the proprietary wireless driver for the Broadcom
52 define KernelPackage
/brcm-wl
53 $(call KernelPackage
/brcm-wl
/Default
,)
54 TITLE
+= (normal version
)
57 define KernelPackage
/brcm-wl
/description
58 $(call KernelPackage
/brcm-wl
/Default
/description
)
61 define KernelPackage
/brcm-wl-mini
62 $(call KernelPackage
/brcm-wl
/Default
,-mini
)
63 TITLE
+= (Legacy version
)
66 define KernelPackage
/brcm-wl-mini
/description
67 $(call KernelPackage
/brcm-wl
/Default
/description
)
71 $(call Package
/broadcom-wl
/Default
)
72 TITLE
:=wl driver setup utility
75 define Package
/wlc
/description
76 This package contains an utility for initializing the proprietary Broadcom
81 $(call Package
/broadcom-wl
/Default
)
82 TITLE
:=Proprietary Broadcom wl driver config utility
85 define Package
/wl
/description
86 This package contains the proprietary utility
(wl
) for configuring the
87 proprietary Broadcom wl driver.
91 $(call Package
/broadcom-wl
/Default
)
92 TITLE
:=Proprietary Broadcom WPA
/WPA2 authenticator
95 define Package
/nas
/description
96 This package contains the proprietary WPA
/WPA2 authenticator
(nas
) for the
97 proprietary Broadcom wl driver.
100 MAKE_KMOD
:= $(MAKE
) -C
"$(LINUX_DIR)" \
101 CROSS_COMPILE
="$(TARGET_CROSS)" \
102 ARCH
="$(LINUX_KARCH)" \
103 PATH
="$(TARGET_PATH)" \
104 SUBDIRS
="$(PKG_BUILD_DIR)/kmod" \
107 $(call Build
/Prepare
/Default
)
108 $(CP
) $(PKG_BUILD_DIR
)/driver
$(PKG_BUILD_DIR
)/driver-mini
109 $(CP
) .
/src
/glue
$(PKG_BUILD_DIR
)/glue
113 # Compile the kernel part
115 SUBDIRS
="$(PKG_BUILD_DIR)/driver" \
116 MODFLAGS
="-DMODULE -mlong-calls" \
120 SUBDIRS
="$(PKG_BUILD_DIR)/driver-mini" \
121 MODFLAGS
="-DMODULE -mlong-calls" \
122 BUILD_TYPE
="wl_apsta_mini" \
125 # Compile glue driver
126 $(MAKE_KMOD
) -C
"$(LINUX_DIR)" \
127 SUBDIRS
="$(PKG_BUILD_DIR)/glue" \
131 $(MAKE
) -C
$(PKG_BUILD_DIR
)/shared \
132 $(TARGET_CONFIGURE_OPTS
) \
133 CFLAGS
="$(TARGET_CFLAGS) -I. -I$(PKG_BUILD_DIR)/driver/include" \
136 $(TARGET_CC
) -o
$(PKG_BUILD_DIR
)/wlc \
137 -I
$(PKG_BUILD_DIR
)/shared
-I
$(PKG_BUILD_DIR
)/driver
/include \
138 .
/src
/wlc.c
$(PKG_BUILD_DIR
)/shared
/libshared.a
140 $(TARGET_CC
) -o
$(PKG_BUILD_DIR
)/nas \
141 $(PKG_BUILD_DIR
)/nas_exe.o \
142 $(PKG_BUILD_DIR
)/shared
/libshared.a
144 $(TARGET_CC
) -o
$(PKG_BUILD_DIR
)/wl \
145 $(PKG_BUILD_DIR
)/wl_exe.o \
146 $(PKG_BUILD_DIR
)/shared
/libshared.a
149 define Build
/InstallDev
150 $(INSTALL_DIR
) $(1)/usr
/lib
151 $(CP
) $(PKG_BUILD_DIR
)/shared
/libshared.a
$(1)/usr
/lib
/
154 define Package
/wlc
/install
155 $(CP
) .
/files
/* $(1)/
156 $(INSTALL_DIR
) $(1)/sbin
157 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/wlc
$(1)/sbin
/
160 define Package
/wlc
/postinst
162 [ -n
"$${IPKG_INSTROOT}" ] ||
/etc
/init.d
/wlunbind enable || true
165 define Package
/wl
/install
166 $(INSTALL_DIR
) $(1)/usr
/sbin
167 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/wl
$(1)/usr
/sbin
/
170 define Package
/nas
/install
171 $(INSTALL_DIR
) $(1)/usr
/sbin
172 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/nas
$(1)/usr
/sbin
/
173 $(LN
) nas
$(1)/usr
/sbin
/nas4not
174 $(LN
) nas
$(1)/usr
/sbin
/nas4wds
177 $(eval
$(call KernelPackage
,brcm-wl
))
178 $(eval
$(call KernelPackage
,brcm-wl-mini
))
179 $(eval
$(call BuildPackage
,wlc
))
180 $(eval
$(call BuildPackage
,wl
))
181 $(eval
$(call BuildPackage
,nas
))