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
20 DESCRIPTION
:=Ralink GPL Drivers for rt2x00 cards
21 VERSION
:=$(LINUX_VERSION
)+$(PKG_VERSION
)-$(BOARD
)-$(LINUX_RELEASE
)
24 define KernelPackage
/rt2x00-lib
25 $(call Package
/rt2x00
/Default
)
26 DEPENDS
:=+kmod-mac80211
29 FILES
:=$(PKG_BUILD_DIR
)/rt2x00lib.
$(LINUX_KMOD_SUFFIX
)
30 AUTOLOAD
:=$(call AutoLoad
,25,rt2x00lib
)
33 define KernelPackage
/rt2x00-pci
34 $(call Package
/rt2x00
/Default
)
35 DEPENDS
:=@PCI_SUPPORT
+kmod-rt2x00-lib
38 FILES
:=$(PKG_BUILD_DIR
)/rt2x00pci.
$(LINUX_KMOD_SUFFIX
)
39 AUTOLOAD
:=$(call AutoLoad
,26,rt2x00pci
)
42 define KernelPackage
/rt2x00-usb
43 $(call Package
/rt2x00
/Default
)
44 DEPENDS
:=@USB_SUPPORT
+kmod-rt2x00-lib
47 FILES
:=$(PKG_BUILD_DIR
)/rt2x00usb.
$(LINUX_KMOD_SUFFIX
)
48 AUTOLOAD
:=$(call AutoLoad
,26,rt2x00usb
)
51 define KernelPackage
/rt2400-pci
52 $(call Package
/rt2x00
/Default
)
53 DEPENDS
:=+kmod-rt2x00-pci
55 DESCRIPTION
+= (RT2400 PCI
)
56 FILES
:=$(PKG_BUILD_DIR
)/rt2400pci.
$(LINUX_KMOD_SUFFIX
)
57 AUTOLOAD
:=$(call AutoLoad
,27,rt2400pci
)
60 define KernelPackage
/rt2500-pci
61 $(call Package
/rt2x00
/Default
)
62 DEPENDS
:=+kmod-rt2x00-pci
64 DESCRIPTION
+= (RT2500 PCI
)
65 FILES
:=$(PKG_BUILD_DIR
)/rt2500pci.
$(LINUX_KMOD_SUFFIX
)
66 AUTOLOAD
:=$(call AutoLoad
,27,rt2500pci
)
69 define KernelPackage
/rt2500-usb
70 $(call Package
/rt2x00
/Default
)
71 DEPENDS
:=+kmod-rt2x00-usb
73 DESCRIPTION
+= (RT2500 USB
)
74 FILES
:=$(PKG_BUILD_DIR
)/rt2500usb.
$(LINUX_KMOD_SUFFIX
)
75 AUTOLOAD
:=$(call AutoLoad
,27,rt2500usb
)
78 define KernelPackage
/rt61-pci
79 $(call Package
/rt2x00
/Default
)
80 DEPENDS
:=+kmod-rt2x00-pci
82 DESCRIPTION
+= (RT2x61 PCI
)
83 FILES
:=$(PKG_BUILD_DIR
)/rt61pci.
$(LINUX_KMOD_SUFFIX
)
84 AUTOLOAD
:=$(call AutoLoad
,27,rt61pci
)
87 define KernelPackage
/rt61-pci
/install
88 mkdir
-p
$(1)/lib
/firmware
89 $(CP
) -L
$(PKG_BUILD_DIR
)/rt2?
61*.bin
$(1)/lib
/firmware
92 define KernelPackage
/rt73-usb
93 $(call Package
/rt2x00
/Default
)
94 DEPENDS
:=+kmod-rt2x00-usb
96 DESCRIPTION
+= (RT73 USB
)
97 FILES
:=$(PKG_BUILD_DIR
)/rt73usb.
$(LINUX_KMOD_SUFFIX
)
98 AUTOLOAD
:=$(call AutoLoad
,27,rt73usb
)
101 define KernelPackage
/rt73-usb
/install
102 mkdir
-p
$(1)/lib
/firmware
103 $(CP
) -L
$(PKG_BUILD_DIR
)/rt73.bin
$(1)/lib
/firmware
107 $(call Build
/Prepare
/Default
)
108 $(CP
) -r src
/* $(PKG_BUILD_DIR
)/
109 wget
-N
-P
$(DL_DIR
) http
://www.ralinktech.com.tw
/data
/RT61_Firmware_V1.2.zip
110 wget
-N
-P
$(DL_DIR
) http
://www.ralinktech.com.tw
/data
/RT71W_Firmware_V1.8.zip
111 unzip
-jod
$(PKG_BUILD_DIR
) $(DL_DIR
)/RT61_Firmware_V1.2.zip
112 unzip
-jod
$(PKG_BUILD_DIR
) $(DL_DIR
)/RT71W_Firmware_V1.8.zip
116 $(MAKE
) -C
"$(PKG_BUILD_DIR)" config_header
117 $(MAKE
) -C
"$(LINUX_DIR)" \
118 CROSS_COMPILE
="$(TARGET_CROSS)" \
119 ARCH
="$(LINUX_KARCH)" V
="$(V)" \
120 SUBDIRS
="$(PKG_BUILD_DIR)" \
121 KERNELVERSION
="$(KERNEL)" \
122 KERNEL_SOURCE
="$(LINUX_DIR)" \
126 $(eval
$(call KernelPackage
,rt2x00-lib
))
127 $(eval
$(call KernelPackage
,rt2x00-pci
))
128 $(eval
$(call KernelPackage
,rt2x00-usb
))
129 $(eval
$(call KernelPackage
,rt2400-pci
))
130 $(eval
$(call KernelPackage
,rt2500-pci
))
131 $(eval
$(call KernelPackage
,rt2500-usb
))
132 $(eval
$(call KernelPackage
,rt61-pci
))
133 $(eval
$(call KernelPackage
,rt73-usb
))