1 # Common include file that defines AGL's variables for kernel
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).
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.
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.
25 FILESEXTRAPATHS:prepend := "${THISDIR}/linux:"
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()])}"
32 SRC_URI:append = " ${AGL_KERNEL_SRC}"
34 # For meta-ti and meta-qcom
35 KERNEL_CONFIG_FRAGMENTS ?= "${@' '.join(['${WORKDIR}/' + x for x in d.getVar('AGL_KCONFIG_FRAGMENTS').split()])}"
37 # Extra configuration options for the AGL kernel
38 AGL_KCONFIG_FRAGMENTS += " \
43 ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux.cfg', '', d)} \
44 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-required.cfg', '', d)} \
47 AGL_KCONFIG_FRAGMENTS += " ${@bb.utils.contains('AGL_XEN_GUEST_WANTED','1','xen_domu.cfg','',d)}"
49 # Base ALSA support and other sound related configuration
50 AGL_KCONFIG_FRAGMENTS += "sound.cfg"
52 # Enable support for SystemTap
53 AGL_KCONFIG_FRAGMENTS += "${@bb.utils.contains('DISTRO_FEATURES', 'agl-devel', 'systemtap.cfg', '', d)}"
56 # Feature override and qemu specific appends:
59 # Enable required features for the agl-netboot feature
60 AGL_KCONFIG_FRAGMENTS:append:netboot = " \
65 # Add hda audio and required virtio device support for qemu
66 AGL_KCONFIG_FRAGMENTS:append:qemuall = " \
72 AGL_KCONFIG_FRAGMENTS:append:virtio-all = " \
76 # Configuration for using the ARM virt machine (and not versatilepb)
77 AGL_KCONFIG_FRAGMENTS:append:qemuarm = " qemuarm.cfg"
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"
85 # Extra configuration for using qemux86-64 image on physical hardware
86 AGL_KCONFIG_FRAGMENTS:append:qemux86-64 = " \
87 x86-extra-graphic-devices.cfg \
89 x86-security-tpm.cfg \