From 74f09a36a6f6fc7cca4f25968c0f03e9e67a6f79 Mon Sep 17 00:00:00 2001
From: Scott Murray <scott.murray@konsulko.com>
Date: Sun, 24 Nov 2024 17:29:14 -0500
Subject: agl-kvm: Fix AGL_GUEST_MACHINE definition

The override use for AGL_GUEST_MACHINE definition does not seem to
work reproducibly, so switch back to having virtio-aarch64 as a
default value, and provide a MACHINE based include hook to
potentially override it for specific host machine targets.

Bug-AGL: SPEC-5306

Change-Id: I76da46b8d02bf9ac0efc917fd401e1be3ac98906
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl-demo/+/30544
ci-image-build: Jenkins Job builder account
ci-image-boot-test: Jenkins Job builder account
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Tested-by: Jenkins Job builder account
(cherry picked from commit 8d4d9b9e357e8a233e1deee9ee96f5c52c31a3f3)
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl-demo/+/30743
---
 meta-agl-kvm-demo/conf/include/agl-kvm.inc | 22 ++++++++--------------
 1 file changed, 8 insertions(+), 14 deletions(-)

(limited to 'meta-agl-kvm-demo/conf')

diff --git a/meta-agl-kvm-demo/conf/include/agl-kvm.inc b/meta-agl-kvm-demo/conf/include/agl-kvm.inc
index 894a45790..6a2862796 100644
--- a/meta-agl-kvm-demo/conf/include/agl-kvm.inc
+++ b/meta-agl-kvm-demo/conf/include/agl-kvm.inc
@@ -1,23 +1,17 @@
 DISTRO_FEATURES:append = " virtualization"
 
 #
-# Attempt to make guest machine derived from host machine, as opposed to
-# hard-coding it in the multiconfig conf file.  Unfortunately, using any
-# of the expanded overrides or e.g. TUNE_ARCH from the host MACHINE seems
-# not feasible here with respect to BitBake conf file parse ordering, so
-# a generic mapping to e.g. virtio-${TUNE_ARCH} is sadly not currently
-# workable.
+# Unfortunately, using any of the expanded overrides or e.g. TUNE_ARCH
+# from the host MACHINE here seems not feasible due to BitBake conf
+# file parse ordering, so a generic mapping to e.g. virtio-${TUNE_ARCH}
+# is sadly not currently workable.
 #
 
-# Define a default, for now use one that will cause an immediate error.
-AGL_GUEST_MACHINE = "INVALID"
+# Set default guest machine
+AGL_GUEST_MACHINE = "virtio-aarch64"
 
-# Set for demo target machine
-AGL_GUEST_MACHINE:h3ulcb = "virtio-aarch64"
-
-# Force variable value to be live before multiconfigs are parsed to make
-# BitBake parser happy
-AGL_GUEST_MACHINE := "${AGL_GUEST_MACHINE}"
+# Hook to allow overriding AGL_GUEST_MACHINE for specific targets
+include agl-kvm-${MACHINE}.inc
 
 BBMULTICONFIG = "agl-kvm-guest"
 
-- 
cgit