fix failsafe on broadcom, send netlink events in diag when running linux 2.6
[openwrt.git] / package / broadcom-wl / Makefile
1 #
2 # Copyright (C) 2006 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
9 include $(TOPDIR)/rules.mk
10 include $(INCLUDE_DIR)/kernel.mk
11
12 PKG_NAME:=broadcom-wl
13 PKG_VERSION:=4.80.53.0
14 PKG_RELEASE:=1
15 WLC_VERSION:=0.1
16
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
18 PKG_SOURCE_URL:=http://downloads.openwrt.org/sources
19 PKG_MD5SUM:=a7d8dde3ce474c361143b83e1d9890b1
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/broadcom-wl/Default
24 SECTION:=kernel
25 CATEGORY:=Kernel modules
26 DEPENDS:=@PACKAGE_kmod-brcm-wl||PACKAGE_kmod-brcm-wl-mimo
27 SUBMENU:=Proprietary BCM43xx WiFi driver
28 SUBMENUDEP:=@LINUX_2_4_BRCM
29 endef
30
31 define KernelPackage/brcm-wl/Default
32 $(call Package/broadcom-wl/Default)
33 SECTION:=kernel
34 DEPENDS:=@LINUX_2_4_BRCM
35 TITLE:=Kernel driver for BCM43xx chipsets
36 DESCRIPTION:=\
37 This package contains the proprietary wireless driver for the Broadcom \\\
38 BCM43xx chipset
39 VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(PKG_RELEASE)
40 FILES:=$(PKG_BUILD_DIR)/kmod/wl$(1).o
41 AUTOLOAD:=$(call AutoLoad,30,wl$(1))
42 endef
43
44 define KernelPackage/brcm-wl
45 $(call KernelPackage/brcm-wl/Default,)
46 TITLE+= (normal version)
47 DESCRIPTION+= (normal version).
48 endef
49
50 define KernelPackage/brcm-wl-mimo
51 $(call KernelPackage/brcm-wl/Default,_mimo)
52 TITLE+= (MIMO version)
53 DESCRIPTION+= (MIMO version).
54 endef
55
56 define Package/wlc
57 $(call Package/broadcom-wl/Default)
58 TITLE:=wl driver setup utility
59 DESCRIPTION:=\
60 This package contains an utility for initializing the proprietary Broadcom \\\
61 wl driver.
62 endef
63
64 define Package/wl
65 $(call Package/broadcom-wl/Default)
66 TITLE:=Proprietary Broadcom wl driver config utility
67 DESCRIPTION:=\
68 This package contains the proprietary utility (wl) for configuring the \\\
69 proprietary Broadcom wl driver.
70 endef
71
72 define Package/nas
73 $(call Package/broadcom-wl/Default)
74 DEPENDS+=+nvram
75 TITLE:=Proprietary Broadcom WPA/WPA2 authenticator
76 DESCRIPTION:=\
77 This package contains the proprietary WPA/WPA2 authenticator (nas) for the \\\
78 proprietary Broadcom wl driver.
79 endef
80
81
82 define install_template
83 $(INSTALL_DIR) $(1)/lib/modules/$(LINUX_VERSION)
84 $(INSTALL_DATA) $(PKG_BUILD_DIR)/kmod/wl$(2).o.patch $(1)/lib/modules/$(LINUX_VERSION)/
85 endef
86
87 define KernelPackage/brcm-wl/install
88 $(call install_template,$(1),)
89 endef
90
91 define KernelPackage/brcm-wl_mimo/install
92 $(call install_template,$(1),_mimo)
93 endef
94
95 MAKEFLAGS_KMOD:= -C "$(LINUX_DIR)" \
96 CROSS_COMPILE="$(TARGET_CROSS)" \
97 ARCH="$(LINUX_KARCH)" \
98 PATH="$(TARGET_PATH)" \
99 SUBDIRS="$(PKG_BUILD_DIR)/kmod"
100
101 define Build/Prepare
102 $(call Build/Prepare/Default)
103 $(CP) src/* $(PKG_BUILD_DIR)/
104 endef
105
106 define Build/Compile
107 # Compile the kernel part
108 $(MAKE) $(MAKEFLAGS_KMOD) \
109 modules
110 $(MAKE) $(MAKEFLAGS_KMOD) MOD_NAME="_mimo" \
111 modules
112
113 # Compile wlc
114 $(MAKE) -C $(PKG_BUILD_DIR)/wlc \
115 $(TARGET_CONFIGURE_OPTS) \
116 CFLAGS="-I$(PKG_BUILD_DIR)/wlc/include $(TARGET_CFLAGS)" \
117 all
118 endef
119
120 define Package/wlc/install
121 $(CP) ./files/* $(1)/
122 $(INSTALL_DIR) $(1)/sbin
123 $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlc/wlc $(1)/sbin/
124 endef
125
126 define Package/wl/install
127 $(INSTALL_DIR) $(1)/usr/sbin
128 $(INSTALL_BIN) $(PKG_BUILD_DIR)/wl $(1)/usr/sbin/
129 endef
130
131 define Package/nas/install
132 $(INSTALL_DIR) $(1)/usr/lib
133 $(INSTALL_BIN) $(PKG_BUILD_DIR)/libbcmcrypto.so $(1)/usr/lib/
134 $(INSTALL_DIR) $(1)/usr/sbin
135 $(INSTALL_BIN) $(PKG_BUILD_DIR)/nas $(1)/usr/sbin/
136 ln -sf nas $(1)/usr/sbin/nas4not
137 ln -sf nas $(1)/usr/sbin/nas4wds
138 endef
139
140 $(eval $(call KernelPackage,brcm-wl))
141 $(eval $(call KernelPackage,brcm-wl-mimo))
142 $(eval $(call BuildPackage,wlc))
143 $(eval $(call BuildPackage,wl))
144 $(eval $(call BuildPackage,nas))
This page took 0.049099 seconds and 5 git commands to generate.