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-20070725
14 PKG_VERSION
:=git-200706018
16 include $(INCLUDE_DIR
)/package.mk
18 define Package
/rt2x00
/Default
19 SUBMENU
:=Wireless Drivers
20 TITLE
:=Ralink GPL Drivers
21 DESCRIPTION
:=Ralink GPL Drivers for rt2x00 cards
22 VERSION
:=$(LINUX_VERSION
)+$(PKG_VERSION
)-$(BOARD
)-$(LINUX_RELEASE
)
25 define KernelPackage
/rt2x00-lib
26 $(call Package
/rt2x00
/Default
)
27 DEPENDS
:=+kmod-mac80211
30 FILES
:=$(PKG_BUILD_DIR
)/rt2x00lib.
$(LINUX_KMOD_SUFFIX
)
31 AUTOLOAD
:=$(call AutoLoad
,25,rt2x00lib
)
34 define KernelPackage
/rt2x00-pci
35 $(call Package
/rt2x00
/Default
)
36 DEPENDS
:=@PCI_SUPPORT
+kmod-rt2x00-lib
39 FILES
:=$(PKG_BUILD_DIR
)/rt2x00pci.
$(LINUX_KMOD_SUFFIX
)
40 AUTOLOAD
:=$(call AutoLoad
,26,rt2x00pci
)
43 define KernelPackage
/rt2x00-usb
44 $(call Package
/rt2x00
/Default
)
45 DEPENDS
:=@USB_SUPPORT
+kmod-rt2x00-lib
48 FILES
:=$(PKG_BUILD_DIR
)/rt2x00usb.
$(LINUX_KMOD_SUFFIX
)
49 AUTOLOAD
:=$(call AutoLoad
,26,rt2x00usb
)
52 define KernelPackage
/rt2400-pci
53 $(call Package
/rt2x00
/Default
)
54 DEPENDS
:=+kmod-rt2x00-pci
56 DESCRIPTION
+= (RT2400 PCI
)
57 FILES
:=$(PKG_BUILD_DIR
)/rt2400pci.
$(LINUX_KMOD_SUFFIX
)
58 AUTOLOAD
:=$(call AutoLoad
,27,rt2400pci
)
61 define KernelPackage
/rt2500-pci
62 $(call Package
/rt2x00
/Default
)
63 DEPENDS
:=+kmod-rt2x00-pci
65 DESCRIPTION
+= (RT2500 PCI
)
66 FILES
:=$(PKG_BUILD_DIR
)/rt2500pci.
$(LINUX_KMOD_SUFFIX
)
67 AUTOLOAD
:=$(call AutoLoad
,27,rt2500pci
)
70 define KernelPackage
/rt2500-usb
71 $(call Package
/rt2x00
/Default
)
72 DEPENDS
:=+kmod-rt2x00-usb
74 DESCRIPTION
+= (RT2500 USB
)
75 FILES
:=$(PKG_BUILD_DIR
)/rt2500usb.
$(LINUX_KMOD_SUFFIX
)
76 AUTOLOAD
:=$(call AutoLoad
,27,rt2500usb
)
79 define KernelPackage
/rt61-pci
80 $(call Package
/rt2x00
/Default
)
81 DEPENDS
:=+kmod-rt2x00-pci
83 DESCRIPTION
+= (RT2x61 PCI
)
84 FILES
:=$(PKG_BUILD_DIR
)/rt61pci.
$(LINUX_KMOD_SUFFIX
)
85 AUTOLOAD
:=$(call AutoLoad
,27,rt61pci
)
88 define KernelPackage
/rt61-pci
/install
89 mkdir
-p
$(1)/lib
/firmware
90 $(CP
) -L
$(PKG_BUILD_DIR
)/rt2?
61*.bin
$(1)/lib
/firmware
93 define KernelPackage
/rt73-usb
94 $(call Package
/rt2x00
/Default
)
95 DEPENDS
:=+kmod-rt2x00-usb
97 DESCRIPTION
+= (RT73 USB
)
98 FILES
:=$(PKG_BUILD_DIR
)/rt73usb.
$(LINUX_KMOD_SUFFIX
)
99 AUTOLOAD
:=$(call AutoLoad
,27,rt73usb
)
102 define KernelPackage
/rt73-usb
/install
103 mkdir
-p
$(1)/lib
/firmware
104 $(CP
) -L
$(PKG_BUILD_DIR
)/rt73.bin
$(1)/lib
/firmware
108 $(call Build
/Prepare
/Default
)
109 $(CP
) -r src
/* $(PKG_BUILD_DIR
)/
110 sed
's/\$$$$(CONFIG_RT.*)/m\t\t/g' src
/Makefile
> $(PKG_BUILD_DIR
)/Makefile
114 # $(MAKE) -C "$(PKG_BUILD_DIR)" config_header
115 $(MAKE
) -C
"$(LINUX_DIR)" \
116 CROSS_COMPILE
="$(TARGET_CROSS)" \
117 ARCH
="$(LINUX_KARCH)" V
="$(V)" \
118 SUBDIRS
="$(PKG_BUILD_DIR)" \
119 KERNELVERSION
="$(KERNEL)" \
120 KERNEL_SOURCE
="$(LINUX_DIR)" \
121 CFLAGS_MODULE
="-DMODULE -include $(PKG_BUILD_DIR)/rt2x00_compat.h" \
125 $(eval
$(call KernelPackage
,rt2x00-lib
))
126 $(eval
$(call KernelPackage
,rt2x00-pci
))
127 $(eval
$(call KernelPackage
,rt2x00-usb
))
128 $(eval
$(call KernelPackage
,rt2400-pci
))
129 $(eval
$(call KernelPackage
,rt2500-pci
))
130 $(eval
$(call KernelPackage
,rt2500-usb
))
131 $(eval
$(call KernelPackage
,rt61-pci
))
132 $(eval
$(call KernelPackage
,rt73-usb
))