2 # Copyright (C) 2006-2010 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.0
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
16 PKG_SOURCE_URL
:=http
://downloads.openwrt.org
/sources
17 PKG_MD5SUM
:=dfaee8bdafaa4bb5ccbcdfe541c29e7d
19 include $(INCLUDE_DIR
)/package.mk
21 define Package
/broadcom-wl
/Default
23 CATEGORY
:=Kernel modules
24 DEPENDS
:=@PACKAGE_kmod-brcm-wl||PACKAGE_kmod-brcm-wl-mini
25 SUBMENU
:=Proprietary BCM43xx WiFi driver
26 SUBMENUDEP
:=@TARGET_brcm47xx
29 define KernelPackage
/brcm-wl
/Default
30 $(call Package
/broadcom-wl
/Default
)
32 DEPENDS
:=@TARGET_brcm47xx
+wireless-tools
33 TITLE
:=Kernel driver for BCM43xx chipsets
34 FILES
:=$(PKG_BUILD_DIR
)/driver
$(1)/wl.
$(LINUX_KMOD_SUFFIX
)
35 AUTOLOAD
:=$(call AutoLoad
,30,wl
)
38 define KernelPackage
/brcm-wl
/Default
/description
39 This package contains the proprietary wireless driver for the Broadcom
43 define KernelPackage
/brcm-wl
44 $(call KernelPackage
/brcm-wl
/Default
,)
45 TITLE
+= (normal version
)
48 define KernelPackage
/brcm-wl
/description
49 $(call KernelPackage
/brcm-wl
/Default
/description
)
52 define KernelPackage
/brcm-wl-mini
53 $(call KernelPackage
/brcm-wl
/Default
,-mini
)
54 TITLE
+= (Legacy version
)
57 define KernelPackage
/brcm-wl-mini
/description
58 $(call KernelPackage
/brcm-wl
/Default
/description
)
62 $(call Package
/broadcom-wl
/Default
)
63 TITLE
:=wl driver setup utility
66 define Package
/wlc
/description
67 This package contains an utility for initializing the proprietary Broadcom
72 $(call Package
/broadcom-wl
/Default
)
73 TITLE
:=Proprietary Broadcom wl driver config utility
76 define Package
/wl
/description
77 This package contains the proprietary utility
(wl
) for configuring the
78 proprietary Broadcom wl driver.
82 $(call Package
/broadcom-wl
/Default
)
83 TITLE
:=Proprietary Broadcom WPA
/WPA2 authenticator
86 define Package
/nas
/description
87 This package contains the proprietary WPA
/WPA2 authenticator
(nas
) for the
88 proprietary Broadcom wl driver.
91 MAKE_KMOD
:= $(MAKE
) -C
"$(LINUX_DIR)" \
92 CROSS_COMPILE
="$(TARGET_CROSS)" \
93 ARCH
="$(LINUX_KARCH)" \
94 PATH
="$(TARGET_PATH)" \
95 SUBDIRS
="$(PKG_BUILD_DIR)/kmod" \
98 $(call Build
/Prepare
/Default
)
99 $(CP
) $(PKG_BUILD_DIR
)/driver
$(PKG_BUILD_DIR
)/driver-mini
103 # Compile the kernel part
105 SUBDIRS
="$(PKG_BUILD_DIR)/driver" \
106 MODFLAGS
="-DMODULE -mlong-calls" \
110 SUBDIRS
="$(PKG_BUILD_DIR)/driver-mini" \
111 MODFLAGS
="-DMODULE -mlong-calls" \
112 BUILD_TYPE
="wl_apsta_mini" \
116 $(MAKE
) -C
$(PKG_BUILD_DIR
)/shared \
117 $(TARGET_CONFIGURE_OPTS
) \
118 CFLAGS
="$(TARGET_CFLAGS) -I. -I$(PKG_BUILD_DIR)/driver/include" \
121 $(TARGET_CC
) -o
$(PKG_BUILD_DIR
)/wlc \
122 -I
$(PKG_BUILD_DIR
)/shared
-I
$(PKG_BUILD_DIR
)/driver
/include \
123 .
/src
/wlc.c
$(PKG_BUILD_DIR
)/shared
/libshared.a
125 $(TARGET_CC
) -o
$(PKG_BUILD_DIR
)/nas \
126 $(PKG_BUILD_DIR
)/nas_exe.o \
127 $(PKG_BUILD_DIR
)/shared
/libshared.a
129 $(TARGET_CC
) -o
$(PKG_BUILD_DIR
)/wl \
130 $(PKG_BUILD_DIR
)/wl_exe.o \
131 $(PKG_BUILD_DIR
)/shared
/libshared.a
134 define Build
/InstallDev
135 $(INSTALL_DIR
) $(1)/usr
/lib
136 $(CP
) $(PKG_BUILD_DIR
)/shared
/libshared.a
$(1)/usr
/lib
/
139 define Package
/wlc
/install
140 $(CP
) .
/files
/* $(1)/
141 $(INSTALL_DIR
) $(1)/sbin
142 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/wlc
$(1)/sbin
/
145 define Package
/wlc
/postinst
147 [ -n
"$${IPKG_INSTROOT}" ] ||
/etc
/init.d
/wlunbind enable || true
150 define Package
/wl
/install
151 $(INSTALL_DIR
) $(1)/usr
/sbin
152 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/wl
$(1)/usr
/sbin
/
155 define Package
/nas
/install
156 $(INSTALL_DIR
) $(1)/usr
/sbin
157 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/nas
$(1)/usr
/sbin
/
158 ln
-sf nas
$(1)/usr
/sbin
/nas4not
159 ln
-sf nas
$(1)/usr
/sbin
/nas4wds
162 $(eval
$(call KernelPackage
,brcm-wl
))
163 $(eval
$(call KernelPackage
,brcm-wl-mini
))
164 $(eval
$(call BuildPackage
,wlc
))
165 $(eval
$(call BuildPackage
,wl
))
166 $(eval
$(call BuildPackage
,nas
))