linux-agl-config: correct override syntax for virtualmachine
[AGL/meta-agl.git] / meta-agl-core / recipes-kernel / linux / linux-agl-config.inc
1 # Common include file that defines AGL's variables for kernel
2 # configuration.
3 #
4 # Can be included directly for kernel.bbclass based recipes that
5 # use their own config fragment merging scheme, or use the
6 # KERNEL_CONFIG_FRAGMENTS variable (e.g. meta-ti, meta-qcom).
7 #
8 # Fragments should be added to AGL_KCONFIG_FRAGMENTS as just the
9 # .cfg filename with +=.  Appending to AGL_KCONFIG_FRAGMENTS (i.e.
10 # using _append) should only be done for:
11 # - Specific AGL features that set an override in their feature
12 #   template, e.g. agl-netboot.
13 # - To add essential configuration for core target machines like
14 #   qemu.  Note that appending fragments directly to SRC_URI
15 #   would work for qemu targets since they use linux-yocto, but
16 #   the AGL_KCONFIG_FRAGMENTS mechanism is recommended for
17 #   consistency and to preserve the option of disabling all AGL
18 #   additions by overriding AGL_KERNEL_SRC.
19 #
20 # In general, care shoud be taken to preserve the ability to set
21 # AGL_KCONFIG_FRAGMENTS to "" to disable non-essential (from a build
22 # perspective) AGL additions.
23 #
24
25 FILESEXTRAPATHS:prepend := "${THISDIR}/linux:"
26
27 # NOTE: AGL_KERNEL_SRC is explicitly intended as an intermediate variable
28 #       that can be used as a last resort to completely disable all AGL
29 #       additions, modifying or appending it is not recommended.
30 AGL_KERNEL_SRC ?= "${@' '.join(['file://' + x for x in d.getVar('AGL_KCONFIG_FRAGMENTS').split()])}"
31
32 SRC_URI:append = " ${AGL_KERNEL_SRC}"
33
34 # For meta-ti and meta-qcom
35 KERNEL_CONFIG_FRAGMENTS ?= "${@' '.join(['${WORKDIR}/' + x for x in d.getVar('AGL_KCONFIG_FRAGMENTS').split()])}"
36
37 # Extra configuration options for the AGL kernel
38 AGL_KCONFIG_FRAGMENTS += " \
39     can-bus.cfg \
40     fanotify.cfg \
41     overlayfs.cfg \
42     ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux.cfg', '', d)} \
43 "
44
45 AGL_KCONFIG_FRAGMENTS += " ${@bb.utils.contains('AGL_XEN_GUEST_WANTED','1','xen_domu.cfg','',d)}"
46
47 # Base ALSA support and other sound related configuration
48 AGL_KCONFIG_FRAGMENTS += "sound.cfg"
49
50 # Enable support for SystemTap
51 AGL_KCONFIG_FRAGMENTS += "${@bb.utils.contains('DISTRO_FEATURES', 'agl-devel', 'systemtap.cfg', '', d)}"
52 AGL_KCONFIG_FRAGMENTS:bbe += "disable-relay.cfg"
53
54 #
55 # Feature override and qemu specific appends:
56 #
57
58 # Enable required features for the agl-netboot feature
59 AGL_KCONFIG_FRAGMENTS:append:netboot = " \
60     nbd.cfg \
61     ramdisk.cfg \
62 "
63
64 # Add hda audio and required virtio device support for qemu
65 AGL_KCONFIG_FRAGMENTS:append:qemuall = " \
66     sound-hda.cfg \
67     qemu-virtio.cfg \
68     qemu-drm.cfg \
69 "
70
71 # Configuration for using the ARM virt machine (and not versatilepb)
72 AGL_KCONFIG_FRAGMENTS:append:qemuarm = " qemuarm.cfg"
73
74 # Additional drivers for virtual machines
75 # OVERRIDES save us some c'n'p below ...
76 OVERRIDES:prepend:qemux86 = "virtualmachine:"
77 OVERRIDES:prepend:qemux86-64 = "virtualmachine:"
78 AGL_KCONFIG_FRAGMENTS:append:virtualmachine = " vbox-vmware-sata.cfg"
79
80 # Extra configuration for using qemux86-64 image on physical hardware
81 AGL_KCONFIG_FRAGMENTS:append:qemux86-64 = " \
82     x86-extra-graphic-devices.cfg \
83     x86-net-devices.cfg \
84     x86-security-tpm.cfg \
85     x86-usb-devices.cfg \
86     x86-upsquare.cfg \
87 "