2 # Copyright (C) 2007 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
:=cvs-20070712
15 include $(INCLUDE_DIR
)/package.mk
17 define Package
/rt2x00
/Default
18 SUBMENU
:=Wireless Drivers
19 TITLE
:=Ralink GPL Drivers
21 KCONFIG
:=CONFIG_MAC80211
22 DESCRIPTION
:=Ralink GPL Drivers for rt2x00 cards
23 VERSION
:=$(LINUX_VERSION
)+$(PKG_VERSION
)-$(BOARD
)-$(LINUX_RELEASE
)
26 define KernelPackage
/rt2x00-lib
27 $(call Package
/rt2x00
/Default
)
28 DEPENDS
+= +kmod-mac80211
+kmod-crypto
31 FILES
:=$(PKG_BUILD_DIR
)/rt2x00lib.
$(LINUX_KMOD_SUFFIX
)
32 AUTOLOAD
:=$(call AutoLoad
,25,ecb arc4 rt2x00lib
)
35 define KernelPackage
/rt2x00-pci
36 $(call Package
/rt2x00
/Default
)
37 DEPENDS
+= @PCI_SUPPORT
+kmod-rt2x00-lib
40 FILES
:=$(PKG_BUILD_DIR
)/rt2x00pci.
$(LINUX_KMOD_SUFFIX
)
41 AUTOLOAD
:=$(call AutoLoad
,26,rt2x00pci
)
44 define KernelPackage
/rt2x00-usb
45 $(call Package
/rt2x00
/Default
)
46 DEPENDS
+= @USB_SUPPORT
+kmod-rt2x00-lib
+kmod-usb-core
49 FILES
:=$(PKG_BUILD_DIR
)/rt2x00usb.
$(LINUX_KMOD_SUFFIX
)
50 AUTOLOAD
:=$(call AutoLoad
,26,rt2x00usb
)
53 define KernelPackage
/rt2400-pci
54 $(call Package
/rt2x00
/Default
)
55 DEPENDS
+= +kmod-rt2x00-pci
57 DESCRIPTION
+= (RT2400 PCI
)
58 FILES
:=$(PKG_BUILD_DIR
)/rt2400pci.
$(LINUX_KMOD_SUFFIX
)
59 AUTOLOAD
:=$(call AutoLoad
,27,rt2400pci
)
62 define KernelPackage
/rt2500-pci
63 $(call Package
/rt2x00
/Default
)
64 DEPENDS
+= +kmod-rt2x00-pci
66 DESCRIPTION
+= (RT2500 PCI
)
67 FILES
:=$(PKG_BUILD_DIR
)/rt2500pci.
$(LINUX_KMOD_SUFFIX
)
68 AUTOLOAD
:=$(call AutoLoad
,27,rt2500pci
)
71 define KernelPackage
/rt2500-usb
72 $(call Package
/rt2x00
/Default
)
73 DEPENDS
+= +kmod-rt2x00-usb
75 DESCRIPTION
+= (RT2500 USB
)
76 FILES
:=$(PKG_BUILD_DIR
)/rt2500usb.
$(LINUX_KMOD_SUFFIX
)
77 AUTOLOAD
:=$(call AutoLoad
,27,rt2500usb
)
80 define KernelPackage
/rt61-pci
81 $(call Package
/rt2x00
/Default
)
82 DEPENDS
+= +kmod-rt2x00-pci
84 DESCRIPTION
+= (RT2x61 PCI
)
85 FILES
:=$(PKG_BUILD_DIR
)/rt61pci.
$(LINUX_KMOD_SUFFIX
)
86 AUTOLOAD
:=$(call AutoLoad
,27,rt61pci
)
89 define KernelPackage
/rt61-pci
/install
90 mkdir
-p
$(1)/lib
/firmware
91 $(CP
) -L
$(PKG_BUILD_DIR
)/rt2?
61*.bin
$(1)/lib
/firmware
94 define KernelPackage
/rt73-usb
95 $(call Package
/rt2x00
/Default
)
96 DEPENDS
+= +kmod-rt2x00-usb
98 DESCRIPTION
+= (RT73 USB
)
99 FILES
:=$(PKG_BUILD_DIR
)/rt73usb.
$(LINUX_KMOD_SUFFIX
)
100 AUTOLOAD
:=$(call AutoLoad
,27,rt73usb
)
103 define KernelPackage
/rt73-usb
/install
104 mkdir
-p
$(1)/lib
/firmware
105 $(CP
) -L
$(PKG_BUILD_DIR
)/rt73.bin
$(1)/lib
/firmware
109 $(call Build
/Prepare
/Default
)
110 $(CP
) -r src
/* $(PKG_BUILD_DIR
)/
111 wget
-N
-P
$(DL_DIR
) http
://www.ralinktech.com.tw
/data
/RT61_Firmware_V1.2.zip
112 wget
-N
-P
$(DL_DIR
) http
://www.ralinktech.com.tw
/data
/RT71W_Firmware_V1.8.zip
113 unzip
-jod
$(PKG_BUILD_DIR
) $(DL_DIR
)/RT61_Firmware_V1.2.zip
114 unzip
-jod
$(PKG_BUILD_DIR
) $(DL_DIR
)/RT71W_Firmware_V1.8.zip
118 $(MAKE
) -C
"$(PKG_BUILD_DIR)" \
119 KERNDIR
="$(LINUX_DIR)" \
122 $(MAKE
) -C
"$(LINUX_DIR)" \
123 CROSS_COMPILE
="$(TARGET_CROSS)" \
124 ARCH
="$(LINUX_KARCH)" V
="$(V)" \
125 SUBDIRS
="$(PKG_BUILD_DIR)" \
126 KERNELVERSION
="$(KERNEL)" \
127 KERNEL_SOURCES
="$(LINUX_DIR)" \
131 $(eval
$(call KernelPackage
,rt2x00-lib
))
132 $(eval
$(call KernelPackage
,rt2x00-pci
))
133 $(eval
$(call KernelPackage
,rt2x00-usb
))
134 $(eval
$(call KernelPackage
,rt2400-pci
))
135 $(eval
$(call KernelPackage
,rt2500-pci
))
136 $(eval
$(call KernelPackage
,rt2500-usb
))
137 $(eval
$(call KernelPackage
,rt61-pci
))
138 $(eval
$(call KernelPackage
,rt73-usb
))