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