Convert to new override syntax
[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 "
43
44 AGL_KCONFIG_FRAGMENTS += " ${@bb.utils.contains('AGL_XEN_GUEST_WANTED','1','xen_domu.cfg','',d)}"
45
46 # Base ALSA support and other sound related configuration
47 AGL_KCONFIG_FRAGMENTS += "sound.cfg"
48
49 # Enable support for SystemTap
50 AGL_KCONFIG_FRAGMENTS += "${@bb.utils.contains('DISTRO_FEATURES', 'agl-devel', 'systemtap.cfg', '', d)}"
51
52 #
53 # Feature override and qemu specific appends:
54 #
55
56 # Enable required features for the agl-netboot feature
57 AGL_KCONFIG_FRAGMENTS:append:netboot = " \
58     nbd.cfg \
59     ramdisk.cfg \
60 "
61
62 # Add hda audio and required virtio device support for qemu
63 AGL_KCONFIG_FRAGMENTS:append:qemuall = " \
64     sound-hda.cfg \
65     qemu-virtio.cfg \
66     qemu-drm.cfg \
67 "
68
69 # Configuration for using the ARM virt machine (and not versatilepb)
70 AGL_KCONFIG_FRAGMENTS:append:qemuarm = " qemuarm.cfg"
71
72 # Additional drivers for virtual machines
73 # OVERRIDES save us some c'n'p below ...
74 OVERRIDES:prepend:qemux86 = "virtualmachine:"
75 OVERRIDES:prepend:qemux86-64 = "virtualmachine:"
76 AGL_KCONFIG_FRAGMENTS:append_virtualmachine = " vbox-vmware-sata.cfg"
77
78 # Extra configuration for using qemux86-64 image on physical hardware
79 AGL_KCONFIG_FRAGMENTS:append:qemux86-64 = " \
80     x86-extra-graphic-devices.cfg \
81     x86-net-devices.cfg \
82     x86-security-tpm.cfg \
83     x86-usb-devices.cfg \
84     x86-upsquare.cfg \
85 "