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