fix kmod packaging for packages where some KCONFIG symbols are set to y
[openwrt/svn-archive/archive.git] / package / kernel / modules / usb.mk
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$
8
9 USBMENU:=USB Support
10
11 ifeq ($(KERNEL),2.4)
12 USBNET_DIR:=usb/net
13 endif
14
15 ifeq ($(KERNEL_PATCHVER),2.6.21)
16 USBNET_DIR:=usb/net
17 USBHID_DIR:=usb/input
18 USBINPUT_DIR:=usb/input
19 endif
20
21 USBNET_DIR?=net/usb
22 USBHID_DIR?=hid/usbhid
23 USBINPUT_DIR?=input/misc
24
25 define usbdep
26 SUBMENU:=$(USBMENU)
27 DEPENDS:=kmod-usb-core $(1)
28 endef
29
30 define KernelPackage/usb-core
31 TITLE:=Support for USB
32 DESCRIPTION:=Kernel support for USB
33 DEPENDS:=@USB_SUPPORT
34 KCONFIG:=CONFIG_USB
35 SUBMENU:=$(USBMENU)
36 AUTOLOAD:=$(call AutoLoad,20,usbcore)
37 endef
38
39 define KernelPackage/usb-core/2.4
40 FILES:=$(LINUX_DIR)/drivers/usb/usbcore.$(LINUX_KMOD_SUFFIX)
41 endef
42
43 define KernelPackage/usb-core/2.6
44 FILES:=$(LINUX_DIR)/drivers/usb/core/usbcore.$(LINUX_KMOD_SUFFIX)
45 endef
46 $(eval $(call KernelPackage,usb-core))
47
48
49 define KernelPackage/usb-uhci
50 $(call usbdep,)
51 TITLE:=Support for UHCI controllers
52 DESCRIPTION:=Kernel support for USB UHCI controllers
53 KCONFIG:=CONFIG_USB_UHCI_ALT CONFIG_USB_UHCI_HCD
54 endef
55 define KernelPackage/usb-uhci/2.4
56 FILES:=$(LINUX_DIR)/drivers/usb/host/uhci.o
57 AUTOLOAD:=$(call AutoLoad,50,uhci)
58 endef
59 define KernelPackage/usb-uhci/2.6
60 FILES:=$(LINUX_DIR)/drivers/usb/host/uhci-hcd.ko
61 AUTOLOAD:=$(call AutoLoad,50,uhci-hcd)
62 endef
63 $(eval $(call KernelPackage,usb-uhci))
64
65 define KernelPackage/usb-uhci-iv
66 $(call usbdep,@LINUX_2_4)
67 TITLE:=Support for Intel/VIA UHCI controllers
68 DESCRIPTION:=Kernel support for Intel/VIA USB UHCI controllers
69 FILES:=$(LINUX_DIR)/drivers/usb/host/usb-uhci.$(LINUX_KMOD_SUFFIX)
70 KCONFIG:=CONFIG_USB_UHCI
71 AUTOLOAD:=$(call AutoLoad,50,usb-uhci)
72 endef
73 $(eval $(call KernelPackage,usb-uhci-iv))
74
75 define KernelPackage/usb-ohci
76 $(call usbdep,)
77 TITLE:=Support for OHCI controllers
78 DESCRIPTION:=Kernel support for USB OHCI controllers
79 KCONFIG:=CONFIG_USB_OHCI CONFIG_USB_OHCI_HCD
80 endef
81
82 define KernelPackage/usb-ohci/2.4
83 FILES:=$(LINUX_DIR)/drivers/usb/host/usb-ohci.o
84 AUTOLOAD:=$(call AutoLoad,50,usb-ohci)
85 endef
86
87 define KernelPackage/usb-ohci/2.6
88 FILES:=$(LINUX_DIR)/drivers/usb/host/ohci-hcd.ko
89 AUTOLOAD:=$(call AutoLoad,50,ohci-hcd)
90 endef
91 $(eval $(call KernelPackage,usb-ohci))
92
93 define KernelPackage/usb2
94 $(call usbdep,)
95 TITLE:=Support for USB2 controllers
96 DESCRIPTION:=Kernel support for USB2 (EHCI) controllers
97 FILES:=$(LINUX_DIR)/drivers/usb/host/ehci-hcd.$(LINUX_KMOD_SUFFIX)
98 KCONFIG:=CONFIG_USB_EHCI_HCD
99 AUTOLOAD:=$(call AutoLoad,50,ehci-hcd)
100 endef
101 $(eval $(call KernelPackage,usb2))
102
103
104 define KernelPackage/usb-acm
105 $(call usbdep,)
106 TITLE:=Support for modems/isdn controllers
107 DESCRIPTION:=Kernel support for USB ACM devices (modems/isdn controllers)
108 KCONFIG:=CONFIG_USB_ACM
109 endef
110
111 define KernelPackage/usb-acm/2.4
112 FILES:=$(LINUX_DIR)/drivers/usb/acm.o
113 AUTOLOAD:=$(call AutoLoad,60,acm)
114 endef
115
116 define KernelPackage/usb-acm/2.6
117 FILES:=$(LINUX_DIR)/drivers/usb/class/cdc-acm.ko
118 AUTOLOAD:=$(call AutoLoad,60,cdc-acm)
119 endef
120 $(eval $(call KernelPackage,usb-acm))
121
122
123 define KernelPackage/usb-audio
124 $(call usbdep,+kmod-soundcore)
125 TITLE:=Support for audio devices
126 DESCRIPTION:=Kernel support for USB audio devices
127 KCONFIG:=CONFIG_USB_AUDIO CONFIG_SND_USB_AUDIO
128 endef
129
130 define KernelPackage/usb-audio/2.4
131 FILES:=$(LINUX_DIR)/drivers/usb/audio.o
132 AUTOLOAD:=$(call AutoLoad,60,audio)
133 endef
134
135 define KernelPackage/usb-audio/2.6
136 FILES:= \
137 $(LINUX_DIR)/sound/usb/snd-usb-lib.ko \
138 $(LINUX_DIR)/sound/usb/snd-usb-audio.ko
139 AUTOLOAD:=$(call AutoLoad,60,snd-usb-lib snd-usb-audio)
140 endef
141 $(eval $(call KernelPackage,usb-audio))
142
143
144 define KernelPackage/usb-printer
145 $(call usbdep,)
146 TITLE:=Support for printers
147 DESCRIPTION:=Kernel support for USB printers
148 KCONFIG:=CONFIG_USB_PRINTER
149 endef
150
151 define KernelPackage/usb-printer/2.4
152 FILES:=$(LINUX_DIR)/drivers/usb/printer.o
153 AUTOLOAD:=$(call AutoLoad,60,printer)
154 endef
155
156 define KernelPackage/usb-printer/2.6
157 FILES:=$(LINUX_DIR)/drivers/usb/class/usblp.ko
158 AUTOLOAD:=$(call AutoLoad,60,usblp)
159 endef
160 $(eval $(call KernelPackage,usb-printer))
161
162
163 define KernelPackage/usb-serial
164 $(call usbdep,)
165 TITLE:=Support for USB-to-Serial converters
166 DESCRIPTION:=Kernel support for USB-to-Serial converters
167 KCONFIG:=CONFIG_USB_SERIAL
168 FILES:=$(LINUX_DIR)/drivers/usb/serial/usbserial.$(LINUX_KMOD_SUFFIX)
169 AUTOLOAD:=$(call AutoLoad,60,usbserial)
170 endef
171 $(eval $(call KernelPackage,usb-serial))
172
173 define KernelPackage/usb-serial-airprime
174 $(call usbdep,kmod-usb-serial @LINUX_2_6)
175 TITLE:=Support for Airprime (EVDO)
176 DESCRIPTION:=Kernel support for Airprime (EVDO)
177 KCONFIG:=CONFIG_USB_SERIAL_AIRPRIME
178 FILES:=$(LINUX_DIR)/drivers/usb/serial/airprime.$(LINUX_KMOD_SUFFIX)
179 AUTOLOAD:=$(call AutoLoad,65,airprime)
180 endef
181 $(eval $(call KernelPackage,usb-serial-airprime))
182
183 define KernelPackage/usb-serial-belkin
184 $(call usbdep,kmod-usb-serial)
185 TITLE:=Support for Belkin devices
186 DESCRIPTION:=Kernel support for Belkin USB-to-Serial converters
187 KCONFIG:=CONFIG_USB_SERIAL_BELKIN
188 FILES:=$(LINUX_DIR)/drivers/usb/serial/belkin_sa.$(LINUX_KMOD_SUFFIX)
189 AUTOLOAD:=$(call AutoLoad,65,belkin_sa)
190 endef
191 $(eval $(call KernelPackage,usb-serial-belkin))
192
193
194 define KernelPackage/usb-serial-ftdi
195 $(call usbdep,kmod-usb-serial)
196 TITLE:=Support for FTDI devices
197 DESCRIPTION:=Kernel support for FTDI USB-to-Serial converters
198 KCONFIG:=CONFIG_USB_SERIAL_FTDI_SIO
199 FILES:=$(LINUX_DIR)/drivers/usb/serial/ftdi_sio.$(LINUX_KMOD_SUFFIX)
200 AUTOLOAD:=$(call AutoLoad,65,ftdi_sio)
201 endef
202 $(eval $(call KernelPackage,usb-serial-ftdi))
203
204
205 define KernelPackage/usb-serial-mct
206 $(call usbdep,kmod-usb-serial)
207 TITLE:=Support for Magic Control Tech. devices
208 DESCRIPTION:=Kernel support for Magic Control Technology USB-to-Serial converters
209 KCONFIG:=CONFIG_USB_SERIAL_MCT_U232
210 FILES:=$(LINUX_DIR)/drivers/usb/serial/mct_u232.$(LINUX_KMOD_SUFFIX)
211 AUTOLOAD:=$(call AutoLoad,65,mct_u232)
212 endef
213 $(eval $(call KernelPackage,usb-serial-mct))
214
215 define KernelPackage/usb-serial-pl2303
216 $(call usbdep,kmod-usb-serial)
217 TITLE:=Support for Prolific PL2303 devices
218 DESCRIPTION:=Kernel support for Prolific PL2303 USB-to-Serial converters
219 KCONFIG:=CONFIG_USB_SERIAL_PL2303
220 FILES:=$(LINUX_DIR)/drivers/usb/serial/pl2303.$(LINUX_KMOD_SUFFIX)
221 AUTOLOAD:=$(call AutoLoad,65,pl2303)
222 endef
223 $(eval $(call KernelPackage,usb-serial-pl2303))
224
225
226 define KernelPackage/usb-serial-sierrawireless
227 $(call usbdep,kmod-usb-serial @LINUX_2_6)
228 TITLE:=Support for Sierra Wireless devices
229 DESCRIPTION:=Kernel support for Sierra Wireless devices
230 KCONFIG:=CONFIG_USB_SERIAL_SIERRAWIRELESS
231 FILES:=$(LINUX_DIR)/drivers/usb/serial/sierra.$(LINUX_KMOD_SUFFIX)
232 AUTOLOAD:=$(call AutoLoad,65,sierra)
233 endef
234 $(eval $(call KernelPackage,usb-serial-sierrawireless))
235
236
237 define KernelPackage/usb-serial-visor
238 $(call usbdep,kmod-usb-serial)
239 TITLE:=Support for Handspring Visor devices
240 DESCRIPTION:=Kernel support for Handspring Visor PDAs
241 KCONFIG:=CONFIG_USB_SERIAL_VISOR
242 FILES:=$(LINUX_DIR)/drivers/usb/serial/visor.$(LINUX_KMOD_SUFFIX)
243 AUTOLOAD:=$(call AutoLoad,65,visor)
244 endef
245 $(eval $(call KernelPackage,usb-serial-visor))
246
247 define KernelPackage/usb-serial-option
248 $(call usbdep,kmod-usb-serial @LINUX_2_6)
249 TITLE:=Support for Option HSDPA modems
250 DESCRIPTION:=Kernel support for Option HSDPA modems
251 KCONFIG:=CONFIG_USB_SERIAL_OPTION
252 FILES:=$(LINUX_DIR)/drivers/usb/serial/option.$(LINUX_KMOD_SUFFIX)
253 AUTOLOAD:=$(call AutoLoad,65,option)
254 endef
255 $(eval $(call KernelPackage,usb-serial-option))
256
257
258 define KernelPackage/usb-storage
259 $(call usbdep,+kmod-scsi-core)
260 TITLE:=USB Storage support
261 DESCRIPTION:=Kernel support for USB Mass Storage devices
262 KCONFIG:=CONFIG_USB_STORAGE
263 FILES:= \
264 $(LINUX_DIR)/drivers/usb/storage/usb-storage.$(LINUX_KMOD_SUFFIX)
265 AUTOLOAD:=$(call AutoLoad,60,scsi_mod sd_mod usb-storage)
266 endef
267 $(eval $(call KernelPackage,usb-storage))
268
269 define KernelPackage/usb-atm
270 $(call usbdep,@LINUX_2_6 kmod-atm)
271 TITLE:=Support for ATM on USB bus
272 DESCRIPTION:=Kernel support for USB DSL modems
273 KCONFIG:=CONFIG_USB_ATM
274 FILES:=$(LINUX_DIR)/drivers/usb/atm/usbatm.$(LINUX_KMOD_SUFFIX)
275 AUTOLOAD:=$(call AutoLoad,60,usbatm)
276 endef
277 $(eval $(call KernelPackage,usb-atm))
278
279 define KernelPackage/usb-speedtouch
280 $(call usbdep,@LINUX_2_6 kmod-atm)
281 TITLE:=Support for SpeedTouch ADSL modems
282 DESCRIPTION:=Kernel support for SpeedTouch USB ADSL modems
283 KCONFIG:=CONFIG_USB_SPEEDTOUCH
284 FILES:=$(LINUX_DIR)/drivers/usb/atm/speedtch.$(LINUX_KMOD_SUFFIX)
285 AUTOLOAD:=$(call AutoLoad,70,speedtch)
286 endef
287 $(eval $(call KernelPackage,usb-speedtouch))
288
289 define KernelPackage/ueagle-atm
290 $(call usbdep,@LINUX_2_6 kmod-atm)
291 TITLE:=Driver for Eagle 8051 based USB ADSL modems
292 DESCRIPTION:=Kernel support for Eagle 8051 based USB ADSL modems
293 FILES:=$(LINUX_DIR)/drivers/usb/atm/ueagle-atm.$(LINUX_KMOD_SUFFIX)
294 KCONFIG:=CONFIG_USB_UEAGLEATM
295 AUTOLOAD:=$(call AutoLoad,70,ueagle-atm)
296 endef
297 $(eval $(call KernelPackage,ueagle-atm))
298
299 define KernelPackage/usb-pwc
300 $(call usbdep,+kmod-videodev @LINUX_2_6)
301 TITLE:=Philips WebCam driver
302 DESCRIPTION:=Kernel modules for supporting Philips WebCam USB devices
303 KCONFIG:=CONFIG_USB_PWC CONFIG_VIDEO_V4L1=y CONFIG_VIDEO_CAPTURE_DRIVERS=y CONFIG_V4L_USB_DRIVERS=y CONFIG_USB_PWC_DEBUG=n
304 AUTOLOAD:=$(call AutoLoad,70,pwc)
305 endef
306
307 define KernelPackage/usb-pwc/2.4
308 FILES:=$(LINUX_DIR)/drivers/usb/pwc.$(LINUX_KMOD_SUFFIX)
309 endef
310
311 define KernelPackage/usb-pwc/2.6
312 FILES:=$(LINUX_DIR)/drivers/media/video/pwc/pwc.$(LINUX_KMOD_SUFFIX)
313 endef
314 $(eval $(call KernelPackage,usb-pwc))
315
316 define KernelPackage/cpia2
317 $(call usbdep,+kmod-videodev @LINUX_2_6)
318 TITLE:=CPIA2 video driver
319 DESCRIPTION:=Kernel modules for CPIA2 WebCam devices
320 KCONFIG:=CONFIG_VIDEO_CPIA2
321 AUTOLOAD:=$(call AutoLoad,70,cpia2)
322 FILES:=$(LINUX_DIR)/drivers/media/video/cpia2/cpia2.$(LINUX_KMOD_SUFFIX)
323 endef
324 $(eval $(call KernelPackage,cpia2))
325
326 define KernelPackage/usb-net
327 $(call usbdep,)
328 TITLE:=Kernel modules for USB-to-Ethernet convertors
329 DESCRIPTION:=Kernel modules for USB-to-Ethernet convertors
330 KCONFIG:=CONFIG_USB_USBNET
331 AUTOLOAD:=$(call Autoload,60, usbnet)
332 endef
333
334 define KernelPackage/usb-net/2.4
335 FILES:=$(LINUX_DIR)/drivers/usb/usbnet.$(LINUX_KMOD_SUFFIX)
336 endef
337
338 define KernelPackage/usb-net/2.6
339 FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/usbnet.$(LINUX_KMOD_SUFFIX)
340 endef
341
342 $(eval $(call KernelPackage,usb-net))
343
344 define KernelPackage/usb-net-asix
345 $(call usbdep,kmod-usb-net @LINUX_2_6)
346 TITLE:=Kernel module for USB-to-Ethernet Asix convertors
347 DESCRIPTION:=Kernel module for USB-to-Ethernet Asix convertors
348 KCONFIG:=CONFIG_USB_NET_AX8817X
349 FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/asix.$(LINUX_KMOD_SUFFIX)
350 AUTOLOAD:=$(call Autoload,61,asix)
351 endef
352
353 $(eval $(call KernelPackage,usb-net-asix))
354
355 define KernelPackage/usb-net-kaweth
356 $(call usbdep,kmod-usb-net @LINUX_2_6)
357 TITLE:=Kernel module for USB-to-Ethernet Kaweth convertors
358 DESCRIPTION:=Kernel module for USB-to-Ethernet Kaweth convertors
359 KCONFIG:=CONFIG_USB_KAWETH
360 FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/kaweth.$(LINUX_KMOD_SUFFIX)
361 AUTOLOAD:=$(call Autoload,61,kaweth)
362 endef
363
364 $(eval $(call KernelPackage,usb-net-kaweth))
365
366 define KernelPackage/usb-net-pegasus
367 $(call usbdep,kmod-usb-net @LINUX_2_6)
368 TITLE:=Kernel module for USB-to-Ethernet Pegasus convertors
369 DESCRIPTION:=Kernel module for USB-to-Ethernet Pegasus convertors
370 KCONFIG:=CONFIG_USB_PEGASUS
371 FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/pegasus.$(LINUX_KMOD_SUFFIX)
372 AUTOLOAD:=$(call Autoload,61,pegasus)
373 endef
374
375 $(eval $(call KernelPackage,usb-net-pegasus))
376
377 define KernelPackage/usb-hid
378 $(call usbdep,@LINUX_2_6 +kmod-input-core +kmod-input-evdev)
379 TITLE:=Support for USB Human Input Devices
380 DESCRIPTION:=Kernel support for USB HID devices such as keyboards and mice
381 KCONFIG:=CONFIG_USB_HID
382 AUTOLOAD:=$(call AutoLoad,70,usbhid)
383 endef
384
385 define KernelPackage/usb-hid/2.6
386 FILES:=$(LINUX_DIR)/drivers/$(USBHID_DIR)/usbhid.ko
387 endef
388 $(eval $(call KernelPackage,usb-hid))
389
390 define KernelPackage/usb-yealink
391 $(call usbdep,@LINUX_2_6 +kmod-input-core +kmod-input-evdev)
392 TITLE:=USB Yealink VOIP phone
393 DESCRIPTION:=Kernel support for Yealink VOIP phone
394 KCONFIG:=CONFIG_USB_YEALINK CONFIG_INPUT_YEALINK CONFIG_INPUT=m CONFIG_INPUT_MISC=y
395 FILES:=$(LINUX_DIR)/drivers/$(USBINPUT_DIR)/yealink.ko
396 AUTOLOAD:=$(call AutoLoad,70,yealink)
397 endef
398 $(eval $(call KernelPackage,usb-yealink))
399
400