task-marmita-base: remove conflicting subtasks
[vjaquez-beagleboard:marmita.git] / meta-marmita / tasks / task-marmita-base.bb
1 DESCRIPTION = "Merge machine and distro options to create a basic machine task/package"
2 PR = "r8"
3
4 inherit task
5
6 DEPENDS = "task-boot"
7 PROVIDES = "${PACKAGES}"
8 PACKAGES = ' \
9             task-marmita-base \
10             task-marmita-base-extended \
11             \
12             ${@base_contains("MACHINE_FEATURES", "acpi", "task-marmita-base-acpi", "",d)} \
13             ${@base_contains("MACHINE_FEATURES", "alsa", "task-marmita-base-alsa", "", d)} \
14             ${@base_contains("MACHINE_FEATURES", "apm", "task-marmita-base-apm", "", d)} \
15             ${@base_contains("MACHINE_FEATURES", "ext2", "task-marmita-base-ext2", "", d)} \
16             ${@base_contains("MACHINE_FEATURES", "vfat", "task-marmita-base-vfat", "", d)} \
17             ${@base_contains("MACHINE_FEATURES", "irda", "task-marmita-base-irda", "",d)} \
18             ${@base_contains("MACHINE_FEATURES", "keyboard", "task-marmita-base-keyboard", "", d)} \
19             ${@base_contains("MACHINE_FEATURES", "pci", "task-marmita-base-pci", "",d)} \
20             ${@base_contains("MACHINE_FEATURES", "pcmcia", "task-marmita-base-pcmcia", "", d)} \
21             ${@base_contains("MACHINE_FEATURES", "phone", "task-marmita-base-phone", "", d)} \
22             ${@base_contains("MACHINE_FEATURES", "screen", "task-marmita-base-screen", "", d)} \
23             ${@base_contains("MACHINE_FEATURES", "serial", "task-marmita-base-serial", "", d)} \
24             ${@base_contains("MACHINE_FEATURES", "touchscreen", "task-marmita-base-touchscreen", "", d)} \
25             ${@base_contains("MACHINE_FEATURES", "usbgadget", "task-marmita-base-usbgadget", "", d)} \
26             ${@base_contains("MACHINE_FEATURES", "usbhost", "task-marmita-base-usbhost", "", d)} \
27             \
28             ${@base_contains("MACHINE_FEATURES", "uboot", "task-marmita-base-uboot", "",d)} \
29             ${@base_contains("MACHINE_FEATURES", "redboot", "task-marmita-base-redboot", "",d)} \
30             ${@base_contains("MACHINE_FEATURES", "apex", "task-marmita-base-apex", "",d)} \
31             \
32 #            task-marmita-base-bluetooth \
33 #            task-marmita-base-wifi \
34             \
35             ${@base_contains("DISTRO_FEATURES", "cramfs", "task-marmita-base-cramfs", "", d)} \
36             ${@base_contains("DISTRO_FEATURES", "ipsec", "task-marmita-base-ipsec", "", d)} \
37             ${@base_contains("DISTRO_FEATURES", "ipv6", "task-marmita-base-ipv6", "", d)} \
38             ${@base_contains("DISTRO_FEATURES", "nfs", "task-marmita-base-nfs", "", d)} \
39 #            ${@base_contains("DISTRO_FEATURES", "ppp", "task-marmita-base-ppp", "", d)} \
40             ${@base_contains("DISTRO_FEATURES", "smbfs", "task-marmita-base-smbfs", "", d)} \
41             ${@base_contains("DISTRO_FEATURES", "raid", "task-marmita-base-raid", "",d)} \
42             \
43             ${@base_contains("MACHINE_FEATURES","kernel26","task-marmita-base-kernel26","task-marmita-base-kernel24",d)} \
44             '
45
46 #
47 # packages which content depend on MACHINE_FEATURES need to be MACHINE_ARCH
48 #
49 PACKAGE_ARCH = "${MACHINE_ARCH}"
50
51 #
52 # linux-hotplug or none
53 #
54 HOTPLUG ?= "${@base_contains("MACHINE_FEATURES", "kernel24",  "linux-hotplug","",d)} "
55
56 #
57 # dropbear, openssh or none
58 #
59 DISTRO_SSH_DAEMON ?= "dropbear"
60
61 # Distro can override apm provider
62 DISTRO_APM ?= "apm"
63
64 # Override the distro set
65 DISTRO_EXTRA_RRECOMMENDS := ""
66
67 #
68 # bluetooth manager
69 #
70 DISTRO_BLUETOOTH_MANAGER ?= "\
71         blueprobe \
72         bluez-utils \
73         bluez-utils-compat \
74         "
75
76 #
77 # pcmciautils for >= 2.6.13-rc1, pcmcia-cs for others
78 #
79 PCMCIA_MANAGER ?= "${@base_contains('MACHINE_FEATURES', 'kernel26','pcmciautils','pcmcia-cs',d)} "
80
81 #
82 # those ones can be set in machine config to supply packages needed to get machine booting
83 #
84 MACHINE_ESSENTIAL_EXTRA_RDEPENDS ?= ""
85 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= ""
86
87 #
88 # task-marmita-base contain stuff needed for base system (machine related)
89 #
90 RDEPENDS_task-marmita-base = "\
91     task-boot \
92     ${DISTRO_SSH_DAEMON} \
93     ${HOTPLUG} \
94     \
95     ${@base_contains('MACHINE_FEATURES', 'kernel26','task-marmita-base-kernel26','task-marmita-base-kernel24',d)} \
96     ${@base_contains('MACHINE_FEATURES', 'apm', 'task-marmita-base-apm', '',d)} \
97     ${@base_contains('MACHINE_FEATURES', 'acpi', 'task-marmita-base-acpi', '',d)} \
98     ${@base_contains('MACHINE_FEATURES', 'keyboard', 'task-marmita-base-keyboard', '',d)} \
99     \
100     ${@base_contains('COMBINED_FEATURES', 'alsa', 'task-marmita-base-alsa', '',d)} \
101     ${@base_contains('COMBINED_FEATURES', 'ext2', 'task-marmita-base-ext2', '',d)} \
102     ${@base_contains('COMBINED_FEATURES', 'vfat', 'task-marmita-base-vfat', '',d)} \
103     ${@base_contains('COMBINED_FEATURES', 'irda', 'task-marmita-base-irda', '',d)} \
104     ${@base_contains('COMBINED_FEATURES', 'pci', 'task-marmita-base-pci', '',d)} \
105     ${@base_contains('COMBINED_FEATURES', 'pcmcia', 'task-marmita-base-pcmcia', '',d)} \
106     ${@base_contains('COMBINED_FEATURES', 'usbgadget', 'task-marmita-base-usbgadget', '',d)} \
107     ${@base_contains('COMBINED_FEATURES', 'usbhost', 'task-marmita-base-usbhost', '',d)} \
108 #    ${@base_contains('COMBINED_FEATURES', 'bluetooth', 'task-marmita-base-bluetooth', '',d)} \
109 #    ${@base_contains('COMBINED_FEATURES', 'wifi', 'task-marmita-base-wifi', '',d)} \
110     ${@base_contains('COMBINED_FEATURES', 'uboot', 'task-marmita-base-uboot', '',d)} \
111     ${@base_contains('COMBINED_FEATURES', 'redboot', 'task-marmita-base-redboot', '',d)} \
112     ${@base_contains('COMBINED_FEATURES', 'apex', 'task-marmita-base-apex', '',d)} \
113     \
114     ${@base_contains('DISTRO_FEATURES', 'nfs', 'task-marmita-base-nfs', '',d)} \
115     ${@base_contains('DISTRO_FEATURES', 'cramfs', 'task-marmita-base-cramfs', '',d)} \
116     ${@base_contains('DISTRO_FEATURES', 'smbfs', 'task-marmita-base-smbfs', '',d)} \
117     ${@base_contains('DISTRO_FEATURES', 'ipv6', 'task-marmita-base-ipv6', '',d)} \
118     ${@base_contains('DISTRO_FEATURES', 'ipsec', 'task-marmita-base-ipsec', '',d)} \
119 #    ${@base_contains('DISTRO_FEATURES', 'ppp', 'task-marmita-base-ppp', '',d)} \
120     ${@base_contains('DISTRO_FEATURES', 'raid', 'task-marmita-base-raid', '',d)} \
121     "
122
123 RDEPENDS_task-marmita-base-extended = "\
124     task-marmita-base \
125     ${ADD_WIFI} \
126     ${ADD_BT} \
127     "
128
129 ADD_WIFI = ""
130 ADD_BT = ""
131
132 python __anonymous () {
133     # If Distro want wifi and machine feature wifi/pci/pcmcia/usbhost (one of them)
134     # then include task-marmita-base-wifi in task-marmita-base
135
136     import bb
137
138     try:
139         set = __builtins__["set"]
140     except KeyError:
141         from sets import Set as set
142
143     distro_features = set(bb.data.getVar("DISTRO_FEATURES", d, 1).split())
144     machine_features= set(bb.data.getVar("MACHINE_FEATURES", d, 1).split())
145
146 #    if "bluetooth" in distro_features and not "bluetooth" in machine_features and ("pcmcia" in machine_features or "pci" in machine_features or "usbhost" in machine_features):
147 #       bb.data.setVar("ADD_BT", "task-marmita-base-bluetooth", d)
148
149 #    if "wifi" in distro_features and not "wifi" in machine_features and ("pcmcia" in machine_features or "pci" in machine_features or "usbhost" in machine_features):
150 #       bb.data.setVar("ADD_WIFI", "task-marmita-base-wifi", d)
151 }
152
153 RDEPENDS_task-marmita-base-kernel24 = "\
154     modutils-depmod"
155
156 RDEPENDS_task-marmita-base-kernel26 = "\
157     sysfsutils \
158     module-init-tools"
159
160 RRECOMMENDS_task-marmita-base-kernel24 = "\
161     kernel-module-input \
162     kernel-module-uinput"
163
164 RRECOMMENDS_task-marmita-base-kernel26 = "\
165     kernel-module-nls-utf8 \
166     kernel-module-input \
167     kernel-module-uinput \
168     kernel-module-rtc-dev \
169     kernel-module-rtc-proc \
170     kernel-module-rtc-sysfs \
171     kernel-module-rtc-core \
172     kernel-module-rtc-twl \
173     kernel-module-unix"
174
175 RDEPENDS_task-marmita-base-keyboard = "\
176     keymaps"
177
178 RDEPENDS_task-marmita-base-pci = "\
179     pciutils"
180
181 RDEPENDS_task-marmita-base-acpi = "\
182     acpid"
183
184 RDEPENDS_task-marmita-base-apm = "\
185     ${DISTRO_APM} \
186     apmd \
187     ${@base_contains('MACHINE_FEATURES', 'kernel24', 'network-suspend-scripts', '',d)}"
188
189 RDEPENDS_task-marmita-base-ext2 = "\
190     hdparm \
191     e2fsprogs \
192     e2fsprogs-e2fsck \
193     e2fsprogs-mke2fs"
194
195 RRECOMMENDS_task-marmita-base-vfat = "\
196     kernel-module-msdos \
197     kernel-module-vfat \
198     kernel-module-nls-iso8859-1 \
199     kernel-module-nls-cp437"
200
201 RDEPENDS_task-marmita-base-alsa = "\
202     alsa-utils-alsactl \
203     alsa-utils-alsamixer"
204
205 #
206 # alsa-states are machine related so can be missing in feed, OSS support is optional
207 #
208 RRECOMMENDS_task-marmita-base-alsa = "\
209     alsa-state \
210     kernel-module-snd-mixer-oss \
211     kernel-module-snd-pcm-oss"
212
213 RDEPENDS_task-marmita-base-pcmcia = "\
214     ${PCMCIA_MANAGER} \
215     ${@base_contains('DISTRO_FEATURES', 'wifi', 'prism-firmware', '',d)} \
216     ${@base_contains('DISTRO_FEATURES', 'wifi', 'spectrum-fw', '',d)} \
217     "
218
219 RRECOMMENDS_task-marmita-base-pcmcia = "\
220     ${@base_contains('MACHINE_FEATURES', 'kernel26', '${task-marmita-base-pcmcia26}', '${task-marmita-base-pcmcia24}',d)} \
221     kernel-module-pcmcia \
222     kernel-module-airo-cs \
223     kernel-module-pcnet-cs \
224     kernel-module-serial-cs \
225     kernel-module-ide-cs \
226     kernel-module-ide-disk \
227     "
228
229 task-marmita-base-pcmcia24 = "\
230     "
231
232 task-marmita-base-pcmcia26 = "\
233     ${@base_contains('DISTRO_FEATURES', 'wifi', 'kernel-module-hostap-cs', '',d)} \
234     ${@base_contains('DISTRO_FEATURES', 'wifi', 'kernel-module-spectrum-cs', '',d)}"
235
236 # Provide bluez-utils-compat utils for the time being, the binaries in that package will vanish soon from upstream releases, so beware! 
237
238 RDEPENDS_task-marmita-base-bluetooth = "\
239     ${DISTRO_BLUETOOTH_MANAGER} \
240     "
241
242 RRECOMMENDS_task-marmita-base-bluetooth = "\
243     kernel-module-bluetooth \
244     kernel-module-l2cap \
245     kernel-module-rfcomm \
246     kernel-module-hci-vhci \
247     kernel-module-bnep \
248     kernel-module-hidp \
249     kernel-module-hci-uart \
250     kernel-module-sco \
251     ${@base_contains('COMBINED_FEATURES', 'usbhost', 'kernel-module-btusb kernel-module-hci-usb', '',d)} \
252     ${@base_contains('COMBINED_FEATURES', 'pcmcia', 'kernel-module-bluetooth3c-cs', '',d)} \
253     ${@base_contains('COMBINED_FEATURES', 'pcmcia', 'kernel-module-bluecard-cs', '',d)} \
254     ${@base_contains('COMBINED_FEATURES', 'pcmcia', 'kernel-module-bluetoothuart-cs', '',d)} \
255     ${@base_contains('COMBINED_FEATURES', 'pcmcia', 'kernel-module-dtl1-cs', '',d)} \
256     ${@base_contains('COMBINED_FEATURES', 'pcmcia', 'bluez-dtl1-workaround', '',d)} \
257     "
258 # bluez-dtl1-workaround above is workaround for bitbake not handling DEPENDS on it in
259 # kernel.bbclass. It should be there as long as kernel-module-dtl1-cs is, but not longer.
260
261 RDEPENDS_task-marmita-base-irda = "\
262     irda-utils"
263
264 RRECOMMENDS_task-marmita-base-irda = "\
265     kernel-module-pxaficp-ir \
266     kernel-module-irda \
267     kernel-module-ircomm \
268     kernel-module-ircomm-tty \
269     kernel-module-irlan \
270     ${@base_contains('DISTRO_FEATURES', 'ppp', 'kernel-module-irnet', '',d)} \
271     kernel-module-irport \
272     kernel-module-irtty \
273     kernel-module-irtty-sir \
274     kernel-module-sir-dev \
275     ${@base_contains('COMBINED_FEATURES', 'usbhost', 'kernel-module-ir-usb', '',d)} "
276
277 RRECOMMENDS_task-marmita-base-usbgadget = "\
278     kernel-module-pxa27x_udc \
279     kernel-module-gadgetfs \
280     kernel-module-g-file-storage \
281     kernel-module-g-serial \
282     kernel-module-g-ether \
283     usb-gadget-mode"
284
285 RDEPENDS_task-marmita-base-usbhost = "\
286     usbutils "
287
288 RRECOMMENDS_task-marmita-base-usbhost = "\
289     kernel-module-uhci-hcd \
290     kernel-module-ohci-hcd \
291     kernel-module-ehci-hcd \
292     kernel-module-usbcore \
293     kernel-module-usbhid \
294     kernel-module-usbnet \
295     kernel-module-sd-mod \
296     kernel-module-scsi-mod \
297     kernel-module-usbmouse \
298     kernel-module-mousedev \
299     kernel-module-usbserial \
300     kernel-module-usb-storage \
301     kernel-module-asix \
302     kernel-module-pegasus \
303 "
304
305 RDEPENDS_task-marmita-base-uboot = "\
306     u-boot"
307
308 RDEPENDS_task-marmita-base-redboot = "\
309     fis"
310
311 RDEPENDS_task-marmita-base-apex = "\
312     apex-env"
313
314 RDEPENDS_task-marmita-base-ppp = "\
315     ppp \
316     ppp-dialin"
317
318 RRECOMMENDS_task-marmita-base-ppp = "\
319     kernel-module-ppp-async \
320     kernel-module-ppp-deflate \
321     kernel-module-ppp-mppe"
322
323 RDEPENDS_task-marmita-base-ipsec = "\
324     openswan"
325
326 RRECOMMENDS_task-marmita-base-ipsec = "\
327     kernel-module-ipsec"
328
329 #
330 # task-marmita-base-wifi contain everything needed to get WiFi working
331 # WEP/WPA connection needs to be supported out-of-box
332 #
333 RDEPENDS_task-marmita-base-wifi = "\
334     wireless-tools \
335     ${@base_contains('COMBINED_FEATURES', 'hostap', 'hostap-utils', '',d)} \
336     ${@base_contains('COMBINED_FEATURES', 'madwifi', 'madwifi-ng-tools', '',d)} \
337     wpa-supplicant"
338
339 RRECOMMENDS_task-marmita-base-wifi = "\
340     ${@base_contains('COMBINED_FEATURES', 'madwifi', 'madwifi-ng-modules', '',d)} \
341     ${@base_contains('COMBINED_FEATURES', 'usbhost', 'kernel-module-zd1211rw', '',d)} \
342     kernel-module-ieee80211-crypt \
343     kernel-module-ieee80211-crypt-ccmp \
344     kernel-module-ieee80211-crypt-tkip \
345     kernel-module-ieee80211-crypt-wep \
346     kernel-module-ecb \
347     kernel-module-arc4 \
348     kernel-module-crypto_algapi \
349     kernel-module-cryptomgr \
350     kernel-module-michael-mic \
351     kernel-module-aes"
352
353 RRECOMMENDS_task-marmita-base-smbfs = "\
354     kernel-module-cifs \
355     kernel-module-smbfs"
356
357 RRECOMMENDS_task-marmita-base-cramfs = "\
358     kernel-module-cramfs"
359
360 #
361 # task-marmita-base-nfs provides ONLY client support - server is in nfs-utils package
362 #
363 RDEPENDS_task-marmita-base-nfs = "\
364     portmap"
365
366 RRECOMMENDS_task-marmita-base-nfs = "\
367     kernel-module-nfs "
368
369 RDEPENDS_task-marmita-base-raid = "\
370         "
371
372 RDEPENDS_task-marmita-base-screen = "\
373         "
374
375 #
376 # GPE/OPIE/Openmoko provide own touchscreen calibration utils
377 #
378 RDEPENDS_task-marmita-base-touchscreen = "\
379     tslib-tests \
380     tslib-calibrate "
381
382 RDEPENDS_task-marmita-base-ipv6 = "\
383     "
384
385 RRECOMMENDS_task-marmita-base-ipv6 = "\
386     kernel-module-ipv6 "
387
388 RDEPENDS_task-marmita-base-serial = "\
389     setserial \
390     lrzsz "
391
392 # Tosort
393 # kernel-module-nvrd
394 # kernel-module-mip6-mn
395 # kernel-module-tun
396 # kernel-module-ide-probe-mo
397 # kernel-module-loop
398 # kernel-module-vfat
399 # kernel-module-ext2
400 # kernel-module-sco
401 # kernel-module-af_packet
402 # kernel-module-ip-gre
403 # kernel-module-ip-tables
404 # kernel-module-ipip
405 # kernel-module-des
406 # kernel-module-md5
407 # kernel-module-8250
408 # Should be DISTRO_EXTRA_RRECOMMENDS: lrzsz