meta-agl-kvm-demo: Add initial Raspberry Pi support 20/30720/2
authorScott Murray <scott.murray@konsulko.com>
Wed, 8 Jan 2025 23:42:36 +0000 (18:42 -0500)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Fri, 10 Jan 2025 13:36:53 +0000 (13:36 +0000)
Changes:
- Add Rasperry Pi specific agl-qemu-runner configuration files for
  the KVM demo guests.  These have only been tested on a 8 GB RPi 5;
  it is possible that the USB port configuration for passing through
  the touchscreen may need tweaking for RPi 4, this will be addressed
  in follow up changes if required.  There is some potential for
  tweaking the guest memory configurations to try to run on 4 GB
  hardware, but that will likely take some more rework of the
  configuration system.
- Replace the duplicated agl-qemu-runner configuration files for the
  reference hardware with symlinks to clean things up a bit.
- To work around what seems like a detection problem in libepoxy
  that leads to a crash, tweak agl-qemu-runner to explicitly pass
  "gl=es" for the QEMU SDL display option by default (instead of the
  previous "gl=on").  A hook variable has been left to allow
  overriding this in a guest configuration.

Bug-AGL: SPEC-5305

Change-Id: I6270b7d96164a7f8e756660e733d1285d22b621e
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl-demo/+/30720
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
ci-image-boot-test: Jenkins Job builder account
ci-image-build: Jenkins Job builder account
Tested-by: Jenkins Job builder account
meta-agl-kvm-demo/recipes-config/qemu-config/files/agl-cluster-demo-flutter-guest-preconfigured-gateway.conf [changed from file to symlink]
meta-agl-kvm-demo/recipes-config/qemu-config/files/agl-cluster-demo-flutter-guest-preconfigured.conf [changed from file to symlink]
meta-agl-kvm-demo/recipes-config/qemu-config/files/agl-ivi-demo-flutter-guest-preconfigured-gateway.conf [changed from file to symlink]
meta-agl-kvm-demo/recipes-config/qemu-config/files/agl-ivi-demo-flutter-guest-preconfigured.conf [changed from file to symlink]
meta-agl-kvm-demo/recipes-config/qemu-config/files/rpi/agl-cluster-demo-flutter-guest-preconfigured-gateway.conf [new symlink]
meta-agl-kvm-demo/recipes-config/qemu-config/files/rpi/agl-cluster-demo-flutter-guest-preconfigured.conf [new symlink]
meta-agl-kvm-demo/recipes-config/qemu-config/files/rpi/agl-cluster-demo-flutter-guest.conf [new file with mode: 0644]
meta-agl-kvm-demo/recipes-config/qemu-config/files/rpi/agl-ivi-demo-flutter-guest-preconfigured-gateway.conf [new symlink]
meta-agl-kvm-demo/recipes-config/qemu-config/files/rpi/agl-ivi-demo-flutter-guest-preconfigured.conf [new symlink]
meta-agl-kvm-demo/recipes-config/qemu-config/files/rpi/agl-ivi-demo-flutter-guest.conf [new file with mode: 0644]
meta-agl-kvm-demo/recipes-extended/agl-qemu-runner/files/agl-qemu-runner.sh

deleted file mode 100644 (file)
index 37003abdef6801218706410edd5445ac20b69c50..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1,6 +0,0 @@
-QEMU_TASKSET_CPUS="4-7"
-QEMU_SMP_OPT="-smp 2"
-QEMU_MEM_OPT="-m 1G"
-QEMU_NET_OPT="-netdev bridge,br=vmnet0,id=net0 -device virtio-net-device,mac=52:54:00:12:00:03,netdev=net0"
-QEMU_KERNEL_CMDLINE_APPEND="root=/dev/vda rw mem=2048M video=Virtual-1:1920x1080"
-QEMU_XDG_APP_ID="agl-cluster-demo"
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..fb7fe7b78b93337e2a6e3093a174049a754216b6
--- /dev/null
@@ -0,0 +1 @@
+agl-cluster-demo-flutter-guest.conf
\ No newline at end of file
deleted file mode 100644 (file)
index 37003abdef6801218706410edd5445ac20b69c50..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1,6 +0,0 @@
-QEMU_TASKSET_CPUS="4-7"
-QEMU_SMP_OPT="-smp 2"
-QEMU_MEM_OPT="-m 1G"
-QEMU_NET_OPT="-netdev bridge,br=vmnet0,id=net0 -device virtio-net-device,mac=52:54:00:12:00:03,netdev=net0"
-QEMU_KERNEL_CMDLINE_APPEND="root=/dev/vda rw mem=2048M video=Virtual-1:1920x1080"
-QEMU_XDG_APP_ID="agl-cluster-demo"
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..fb7fe7b78b93337e2a6e3093a174049a754216b6
--- /dev/null
@@ -0,0 +1 @@
+agl-cluster-demo-flutter-guest.conf
\ No newline at end of file
deleted file mode 100644 (file)
index c2d420eb6f267742e688c6c4ecddc1bcae588c58..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1,13 +0,0 @@
-QEMU_TASKSET_CPUS="0-3"
-QEMU_SMP_OPT="-smp 4"
-QEMU_MEM_OPT="-m 4G"
-# With touchscreen plugged into the bottom connector of the 2x USB 2.0
-# on the reference hardware
-QEMU_INPUT_OPT="-device qemu-xhci -usb -device usb-host,hostbus=5,hostport=1"
-# Fallback for touchscreen or other pointing device plugged in elsewhere
-#QEMU_INPUT_OPT="-device virtio-tablet-device"
-QEMU_AUDIO_OPT="-audiodev alsa,id=agl -device intel-hda -device hda-duplex,audiodev=agl"
-QEMU_NET_OPT="-netdev bridge,br=vmnet0,id=net0 -device virtio-net-device,mac=52:54:00:12:00:02,netdev=net0"
-QEMU_CAN_OPT="-object can-bus,id=canbus0 -object can-host-socketcan,id=canhost0,if=can0,canbus=canbus0 -device kvaser_pci,canbus=canbus0"
-QEMU_KERNEL_CMDLINE_APPEND="root=/dev/vda rw mem=4196M video=Virtual-1:1920x1080"
-QEMU_XDG_APP_ID="agl-ivi-demo"
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..e4281fba1b1bd458b330a856379ae27b70e00b37
--- /dev/null
@@ -0,0 +1 @@
+agl-ivi-demo-flutter-guest.conf
\ No newline at end of file
deleted file mode 100644 (file)
index c2d420eb6f267742e688c6c4ecddc1bcae588c58..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1,13 +0,0 @@
-QEMU_TASKSET_CPUS="0-3"
-QEMU_SMP_OPT="-smp 4"
-QEMU_MEM_OPT="-m 4G"
-# With touchscreen plugged into the bottom connector of the 2x USB 2.0
-# on the reference hardware
-QEMU_INPUT_OPT="-device qemu-xhci -usb -device usb-host,hostbus=5,hostport=1"
-# Fallback for touchscreen or other pointing device plugged in elsewhere
-#QEMU_INPUT_OPT="-device virtio-tablet-device"
-QEMU_AUDIO_OPT="-audiodev alsa,id=agl -device intel-hda -device hda-duplex,audiodev=agl"
-QEMU_NET_OPT="-netdev bridge,br=vmnet0,id=net0 -device virtio-net-device,mac=52:54:00:12:00:02,netdev=net0"
-QEMU_CAN_OPT="-object can-bus,id=canbus0 -object can-host-socketcan,id=canhost0,if=can0,canbus=canbus0 -device kvaser_pci,canbus=canbus0"
-QEMU_KERNEL_CMDLINE_APPEND="root=/dev/vda rw mem=4196M video=Virtual-1:1920x1080"
-QEMU_XDG_APP_ID="agl-ivi-demo"
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..e4281fba1b1bd458b330a856379ae27b70e00b37
--- /dev/null
@@ -0,0 +1 @@
+agl-ivi-demo-flutter-guest.conf
\ No newline at end of file
diff --git a/meta-agl-kvm-demo/recipes-config/qemu-config/files/rpi/agl-cluster-demo-flutter-guest-preconfigured-gateway.conf b/meta-agl-kvm-demo/recipes-config/qemu-config/files/rpi/agl-cluster-demo-flutter-guest-preconfigured-gateway.conf
new file mode 120000 (symlink)
index 0000000..fb7fe7b
--- /dev/null
@@ -0,0 +1 @@
+agl-cluster-demo-flutter-guest.conf
\ No newline at end of file
diff --git a/meta-agl-kvm-demo/recipes-config/qemu-config/files/rpi/agl-cluster-demo-flutter-guest-preconfigured.conf b/meta-agl-kvm-demo/recipes-config/qemu-config/files/rpi/agl-cluster-demo-flutter-guest-preconfigured.conf
new file mode 120000 (symlink)
index 0000000..fb7fe7b
--- /dev/null
@@ -0,0 +1 @@
+agl-cluster-demo-flutter-guest.conf
\ No newline at end of file
diff --git a/meta-agl-kvm-demo/recipes-config/qemu-config/files/rpi/agl-cluster-demo-flutter-guest.conf b/meta-agl-kvm-demo/recipes-config/qemu-config/files/rpi/agl-cluster-demo-flutter-guest.conf
new file mode 100644 (file)
index 0000000..ea875a6
--- /dev/null
@@ -0,0 +1,6 @@
+QEMU_TASKSET_CPUS="3"
+QEMU_SMP_OPT="-smp 1"
+QEMU_MEM_OPT="-m 1G"
+QEMU_NET_OPT="-netdev bridge,br=vmnet0,id=net0 -device virtio-net-device,mac=52:54:00:12:00:03,netdev=net0"
+QEMU_KERNEL_CMDLINE_APPEND="root=/dev/vda rw mem=1024M video=Virtual-1:1920x1080"
+QEMU_XDG_APP_ID="agl-cluster-demo"
diff --git a/meta-agl-kvm-demo/recipes-config/qemu-config/files/rpi/agl-ivi-demo-flutter-guest-preconfigured-gateway.conf b/meta-agl-kvm-demo/recipes-config/qemu-config/files/rpi/agl-ivi-demo-flutter-guest-preconfigured-gateway.conf
new file mode 120000 (symlink)
index 0000000..e4281fb
--- /dev/null
@@ -0,0 +1 @@
+agl-ivi-demo-flutter-guest.conf
\ No newline at end of file
diff --git a/meta-agl-kvm-demo/recipes-config/qemu-config/files/rpi/agl-ivi-demo-flutter-guest-preconfigured.conf b/meta-agl-kvm-demo/recipes-config/qemu-config/files/rpi/agl-ivi-demo-flutter-guest-preconfigured.conf
new file mode 120000 (symlink)
index 0000000..e4281fb
--- /dev/null
@@ -0,0 +1 @@
+agl-ivi-demo-flutter-guest.conf
\ No newline at end of file
diff --git a/meta-agl-kvm-demo/recipes-config/qemu-config/files/rpi/agl-ivi-demo-flutter-guest.conf b/meta-agl-kvm-demo/recipes-config/qemu-config/files/rpi/agl-ivi-demo-flutter-guest.conf
new file mode 100644 (file)
index 0000000..62699be
--- /dev/null
@@ -0,0 +1,13 @@
+QEMU_TASKSET_CPUS="1-2"
+QEMU_SMP_OPT="-smp 2"
+QEMU_MEM_OPT="-m 3G"
+# With touchscreen plugged into the bottom connector of the 2x USB 2.0
+# on the reference hardware
+QEMU_INPUT_OPT="-device qemu-xhci -usb -device usb-host,hostbus=3,hostport=2"
+# Fallback for touchscreen or other pointing device plugged in elsewhere
+#QEMU_INPUT_OPT="-device virtio-tablet-device"
+QEMU_AUDIO_OPT="-audiodev alsa,id=agl -device intel-hda -device hda-duplex,audiodev=agl"
+QEMU_NET_OPT="-netdev bridge,br=vmnet0,id=net0 -device virtio-net-device,mac=52:54:00:12:00:02,netdev=net0"
+QEMU_CAN_OPT="-object can-bus,id=canbus0 -object can-host-socketcan,id=canhost0,if=can0,canbus=canbus0 -device kvaser_pci,canbus=canbus0"
+QEMU_KERNEL_CMDLINE_APPEND="root=/dev/vda rw mem=3072M video=Virtual-1:1920x1080"
+QEMU_XDG_APP_ID="agl-ivi-demo"
index dd82053..de9a0e3 100755 (executable)
@@ -47,6 +47,9 @@ export XDG_RUNTIME_DIR=/run/user/1001
 # is used.
 export SDL_VIDEO_WAYLAND_WMCLASS="${QEMU_XDG_APP_ID:-${image}}"
 
+# Default to GLES, allowing a conf file to override
+QEMU_SDL_GL_FLAVOR="${QEMU_SDL_GL_FLAVOR:-es}"
+
 ${TASKSET_CMD} \
 qemu-system-${arch} \
        -enable-kvm \
@@ -65,7 +68,7 @@ qemu-system-${arch} \
        ${QEMU_INPUT_OPT} \
        -global virtio-mmio.force-legacy=false \
        -device virtio-gpu-gl-device \
-       -display sdl,gl=on \
+       -display sdl,gl=${QEMU_SDL_GL_FLAVOR} \
        ${QEMU_AUDIO_OPT} \
        ${QEMU_CAN_OPT} \
        ${QEMU_EXTRA_OPT} \