Enable kexec for x86 as well (#2141)
[openwrt.git] / package / rt2x00 / Makefile
1 #
2 # Copyright (C) 2007 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:=rt2x00
13 #PKG_VERSION:=cvs-20070725
14 PKG_VERSION:=git-200706018
15
16 include $(INCLUDE_DIR)/package.mk
17
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)
23 endef
24
25 define KernelPackage/rt2x00-lib
26 $(call Package/rt2x00/Default)
27 DEPENDS:=+kmod-mac80211
28 TITLE+= (LIB)
29 DESCRIPTION+= (LIB)
30 FILES:=$(PKG_BUILD_DIR)/rt2x00lib.$(LINUX_KMOD_SUFFIX)
31 AUTOLOAD:=$(call AutoLoad,25,rt2x00lib)
32 endef
33
34 define KernelPackage/rt2x00-pci
35 $(call Package/rt2x00/Default)
36 DEPENDS:=@PCI_SUPPORT +kmod-rt2x00-lib
37 TITLE+= (PCI)
38 DESCRIPTION+= (PCI)
39 FILES:=$(PKG_BUILD_DIR)/rt2x00pci.$(LINUX_KMOD_SUFFIX)
40 AUTOLOAD:=$(call AutoLoad,26,rt2x00pci)
41 endef
42
43 define KernelPackage/rt2x00-usb
44 $(call Package/rt2x00/Default)
45 DEPENDS:=@USB_SUPPORT +kmod-rt2x00-lib
46 TITLE+= (USB)
47 DESCRIPTION+= (USB)
48 FILES:=$(PKG_BUILD_DIR)/rt2x00usb.$(LINUX_KMOD_SUFFIX)
49 AUTOLOAD:=$(call AutoLoad,26,rt2x00usb)
50 endef
51
52 define KernelPackage/rt2400-pci
53 $(call Package/rt2x00/Default)
54 DEPENDS:=+kmod-rt2x00-pci
55 TITLE+= (RT2400 PCI)
56 DESCRIPTION+= (RT2400 PCI)
57 FILES:=$(PKG_BUILD_DIR)/rt2400pci.$(LINUX_KMOD_SUFFIX)
58 AUTOLOAD:=$(call AutoLoad,27,rt2400pci)
59 endef
60
61 define KernelPackage/rt2500-pci
62 $(call Package/rt2x00/Default)
63 DEPENDS:=+kmod-rt2x00-pci
64 TITLE+= (RT2500 PCI)
65 DESCRIPTION+= (RT2500 PCI)
66 FILES:=$(PKG_BUILD_DIR)/rt2500pci.$(LINUX_KMOD_SUFFIX)
67 AUTOLOAD:=$(call AutoLoad,27,rt2500pci)
68 endef
69
70 define KernelPackage/rt2500-usb
71 $(call Package/rt2x00/Default)
72 DEPENDS:=+kmod-rt2x00-usb
73 TITLE+= (RT2500 USB)
74 DESCRIPTION+= (RT2500 USB)
75 FILES:=$(PKG_BUILD_DIR)/rt2500usb.$(LINUX_KMOD_SUFFIX)
76 AUTOLOAD:=$(call AutoLoad,27,rt2500usb)
77 endef
78
79 define KernelPackage/rt61-pci
80 $(call Package/rt2x00/Default)
81 DEPENDS:=+kmod-rt2x00-pci
82 TITLE+= (RT2x61 PCI)
83 DESCRIPTION+= (RT2x61 PCI)
84 FILES:=$(PKG_BUILD_DIR)/rt61pci.$(LINUX_KMOD_SUFFIX)
85 AUTOLOAD:=$(call AutoLoad,27,rt61pci)
86 endef
87
88 define KernelPackage/rt61-pci/install
89 mkdir -p $(1)/lib/firmware
90 $(CP) -L $(PKG_BUILD_DIR)/rt2?61*.bin $(1)/lib/firmware
91 endef
92
93 define KernelPackage/rt73-usb
94 $(call Package/rt2x00/Default)
95 DEPENDS:=+kmod-rt2x00-usb
96 TITLE+= (RT73 USB)
97 DESCRIPTION+= (RT73 USB)
98 FILES:=$(PKG_BUILD_DIR)/rt73usb.$(LINUX_KMOD_SUFFIX)
99 AUTOLOAD:=$(call AutoLoad,27,rt73usb)
100 endef
101
102 define KernelPackage/rt73-usb/install
103 mkdir -p $(1)/lib/firmware
104 $(CP) -L $(PKG_BUILD_DIR)/rt73.bin $(1)/lib/firmware
105 endef
106
107 define Build/Prepare
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
111 endef
112
113 define Build/Compile
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" \
122 KDIR="$(LINUX_DIR)"
123 endef
124
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))
This page took 0.044415 seconds and 5 git commands to generate.