summaryrefslogtreecommitdiffstats
path: root/meta-agl-core/recipes-kernel/linux
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2024-07-08 12:51:15 -0400
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2024-07-09 09:32:15 +0000
commit6e274689443736549241f128992b5eedbafe5e91 (patch)
tree8f511686c326bc88164102dd3bb390970bbc124e /meta-agl-core/recipes-kernel/linux
parent5606c3cbca6e23af22dbd54e0ea9f3dfdc4ad1d5 (diff)
Rework virtio-aarch64 machine definition
Start on potentially removing separate virtio-arch64 machine by simplifying it and moving as much of its virtio kernel configuration over to our generic kernel configuration scheme. From some experimentation, it is not obvious that genericarm64 or qemuarm64 are directly reusable as guest MACHINEs as is, so further investigation is required on whether maintaining our own machine and potentially custom kernel metadata cache is perhaps worthwhile. Changes: - Update virtio-aarch64 linux-yocto bbappend for new version in scarthgap, and drop its use of a custom kernel metadata cache for reusing qemuarm64's BSP as a starting point for now. - Move the various virtio-*.cfg kernel configuration fragments over to meta-agl-core, using a new "agl-virtio-guest" AGL_FEATURES flag to control whether they are used. The aim is to make it more obvious where any virtio kernel configuration comes from and hopefully make it more easily reusable. Bug-AGL: SPEC-5137, SPEC-5201 Change-Id: I861cd1f80643aca632a5ab103eae2cc46de3922e Signed-off-by: Scott Murray <scott.murray@konsulko.com> Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/30119 ci-image-build: Jenkins Job builder account Tested-by: Jenkins Job builder account Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org> ci-image-boot-test: Jenkins Job builder account
Diffstat (limited to 'meta-agl-core/recipes-kernel/linux')
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux-agl-config-virtio.inc8
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux-agl-config.inc4
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux-agl.inc3
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/virtio-aarch64.cfg29
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/virtio-drm.cfg3
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/virtio-pci.cfg3
-rw-r--r--meta-agl-core/recipes-kernel/linux/linux/virtio-scmi.cfg25
7 files changed, 70 insertions, 5 deletions
diff --git a/meta-agl-core/recipes-kernel/linux/linux-agl-config-virtio.inc b/meta-agl-core/recipes-kernel/linux/linux-agl-config-virtio.inc
new file mode 100644
index 000000000..e0d30b1f6
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux-agl-config-virtio.inc
@@ -0,0 +1,8 @@
+AGL_KCONFIG_FRAGMENTS += " \
+ virtio-${TUNE_ARCH} \
+ virtio-drm.cfg \
+ virtio-pci.cfg \
+ virtio-scmi.cfg \
+ sound-hda.cfg \
+ virtio-snd.cfg \
+"
diff --git a/meta-agl-core/recipes-kernel/linux/linux-agl-config.inc b/meta-agl-core/recipes-kernel/linux/linux-agl-config.inc
index 4799a6180..5cf008a77 100644
--- a/meta-agl-core/recipes-kernel/linux/linux-agl-config.inc
+++ b/meta-agl-core/recipes-kernel/linux/linux-agl-config.inc
@@ -71,10 +71,6 @@ 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"
diff --git a/meta-agl-core/recipes-kernel/linux/linux-agl.inc b/meta-agl-core/recipes-kernel/linux/linux-agl.inc
index c318716fe..f41e35bc2 100644
--- a/meta-agl-core/recipes-kernel/linux/linux-agl.inc
+++ b/meta-agl-core/recipes-kernel/linux/linux-agl.inc
@@ -3,7 +3,8 @@
DEPENDS += "kern-tools-native"
-include linux-agl-config.inc
+require linux-agl-config.inc
+include ${@bb.utils.contains('AGL_FEATURES', 'agl-virtio-guest', 'linux-agl-config-virtio.inc', '', d)}
# returns all the elements from the src uri that are .cfg files
def find_cfgs(d):
diff --git a/meta-agl-core/recipes-kernel/linux/linux/virtio-aarch64.cfg b/meta-agl-core/recipes-kernel/linux/linux/virtio-aarch64.cfg
new file mode 100644
index 000000000..25381e133
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/virtio-aarch64.cfg
@@ -0,0 +1,29 @@
+# SPDX-License-Identifier: MIT
+#
+# ARM64
+#
+CONFIG_ARM64=y
+CONFIG_64BIT=y
+
+#
+# Bus support
+#
+CONFIG_ARM_AMBA=y
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_AMBA_PL011=y
+CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
+
+#
+# RTC
+#
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_DRV_PL031=y
diff --git a/meta-agl-core/recipes-kernel/linux/linux/virtio-drm.cfg b/meta-agl-core/recipes-kernel/linux/linux/virtio-drm.cfg
new file mode 100644
index 000000000..2facc345e
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/virtio-drm.cfg
@@ -0,0 +1,3 @@
+CONFIG_DRM=y
+CONFIG_FB=y
+CONFIG_DRM_FBDEV_EMULATION=y
diff --git a/meta-agl-core/recipes-kernel/linux/linux/virtio-pci.cfg b/meta-agl-core/recipes-kernel/linux/linux/virtio-pci.cfg
new file mode 100644
index 000000000..bbcaca312
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/virtio-pci.cfg
@@ -0,0 +1,3 @@
+CONFIG_PCI=y
+CONFIG_VIRTIO_PCI=y
+CONFIG_PCI_HOST_GENERIC=y
diff --git a/meta-agl-core/recipes-kernel/linux/linux/virtio-scmi.cfg b/meta-agl-core/recipes-kernel/linux/linux/virtio-scmi.cfg
new file mode 100644
index 000000000..5ae01938e
--- /dev/null
+++ b/meta-agl-core/recipes-kernel/linux/linux/virtio-scmi.cfg
@@ -0,0 +1,25 @@
+# Enable ARM_SCMI_PROTOCOL ("ARM System Control and Management Interface (SCMI)
+# Message Protocol") config located in menu
+#
+# -> Device Drivers
+# -> Firmware Drivers
+# -> ARM System Control and Management Interface Protocol
+#
+# After that, in the same menu enabled:
+#
+# * ARM_SCMI_TRANSPORT_VIRTIO ("SCMI transport based on VirtIO")
+#
+# and disabled not used features:
+#
+# * ARM_SCMI_TRANSPORT_SMC ("SCMI transport based on SMC")
+# * ARM_SCMI_POWER_DOMAIN ("SCMI power domain driver")
+
+CONFIG_ARM_SCMI_PROTOCOL=y
+CONFIG_ARM_SCMI_HAVE_TRANSPORT=y
+CONFIG_ARM_SCMI_HAVE_MSG=y
+# CONFIG_ARM_SCMI_TRANSPORT_SMC is not set
+CONFIG_ARM_SCMI_TRANSPORT_VIRTIO=y
+# CONFIG_ARM_SCMI_POWER_DOMAIN is not set
+# CONFIG_SENSORS_ARM_SCMI is not set
+# CONFIG_COMMON_CLK_SCMI is not set
+CONFIG_IIO_SCMI=y