linux-yocto: Rework virtio-aarch64 kernel configuration 91/28191/2
authorScott Murray <scott.murray@konsulko.com>
Wed, 23 Nov 2022 18:39:08 +0000 (13:39 -0500)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Thu, 8 Dec 2022 05:59:05 +0000 (05:59 +0000)
Changes:
- Appending the virtio kernel metadata to SRC_URI in the linux-yocto
  bbappend was having the side-effect of overriding a lot of the
  changes from the other AGL configuration fragments.  To avoid this,
  prepend the addition to AGL_KCONFIG_FRAGMENTS instead.
- Add the HDA sound driver config fragment for virtio machines to
  allow using the QEMU emulation.
- Add config fragment for the virtio kernel to ensure that
  CONFIG_DRM and the fbdev emulation are on.
- Add config fragment for the virtio kernel to turn on CONFIG_PCI,
  as there are some peripherals that we may need to expose to guests
  with it.  This and the DRM changes will be rationalized in the
  metadata repo once it's clear we do need them.

Bug-AGL: SPEC-4618

Change-Id: I453b84d9840498772afd01404dd374f5c1d245da
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/28191
ci-image-build: Jenkins Job builder account
Tested-by: Jenkins Job builder account
ci-image-boot-test: Jenkins Job builder account
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
meta-agl-bsp/virtualization-layer/recipes-kernel/linux/linux-yocto/virtio-drm.cfg [new file with mode: 0644]
meta-agl-bsp/virtualization-layer/recipes-kernel/linux/linux-yocto/virtio-pci.cfg [new file with mode: 0644]
meta-agl-bsp/virtualization-layer/recipes-kernel/linux/linux-yocto_5.15.bbappend
meta-agl-core/recipes-kernel/linux/linux-agl-config.inc

diff --git a/meta-agl-bsp/virtualization-layer/recipes-kernel/linux/linux-yocto/virtio-drm.cfg b/meta-agl-bsp/virtualization-layer/recipes-kernel/linux/linux-yocto/virtio-drm.cfg
new file mode 100644 (file)
index 0000000..2facc34
--- /dev/null
@@ -0,0 +1,3 @@
+CONFIG_DRM=y
+CONFIG_FB=y
+CONFIG_DRM_FBDEV_EMULATION=y
diff --git a/meta-agl-bsp/virtualization-layer/recipes-kernel/linux/linux-yocto/virtio-pci.cfg b/meta-agl-bsp/virtualization-layer/recipes-kernel/linux/linux-yocto/virtio-pci.cfg
new file mode 100644 (file)
index 0000000..bbcaca3
--- /dev/null
@@ -0,0 +1,3 @@
+CONFIG_PCI=y
+CONFIG_VIRTIO_PCI=y
+CONFIG_PCI_HOST_GENERIC=y
index 3a278fa..6952436 100644 (file)
@@ -1,10 +1,17 @@
 FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
 
-SRC_URI:append:virtio-all = " \
+# Cannot just append to SRC_URI, as the metadata interferes with the
+# AGL config fragment scheme
+AGL_KERNEL_SRC:prepend:virtio-all = " \
     git://gerrit.automotivelinux.org/gerrit/src/agl-yocto-kernel-meta.git;protocol=https;type=kmeta;name=agl-meta;destsuffix=agl-kernel-meta;branch=kernel-5.15 \
     file://virtio-aarch64-${LINUX_KERNEL_TYPE}.scc \
 "
 
 SRCREV_agl-meta = "4deb7357eab5962b0553a5ad1f11be5ac35f9da9"
 
+AGL_KCONFIG_FRAGMENTS:append:virtio-all = " \
+    virtio-drm.cfg \
+    virtio-pci.cfg \
+"
+
 COMPATIBLE_MACHINE:virtio-aarch64 = "virtio-aarch64"
index bdca5d4..80f7129 100644 (file)
@@ -67,6 +67,10 @@ AGL_KCONFIG_FRAGMENTS:append:qemuall = " \
     qemu-drm.cfg \
 "
 
+AGL_KCONFIG_FRAGMENTS:append:virtio-all = " \
+    sound-hda.cfg \
+"
+
 # Configuration for using the ARM virt machine (and not versatilepb)
 AGL_KCONFIG_FRAGMENTS:append:qemuarm = " qemuarm.cfg"