diff options
Diffstat (limited to 'meta-agl-kvm-demo')
6 files changed, 69 insertions, 4 deletions
diff --git a/meta-agl-kvm-demo/conf/include/agl-kvm.inc b/meta-agl-kvm-demo/conf/include/agl-kvm.inc new file mode 100644 index 000000000..894a45790 --- /dev/null +++ b/meta-agl-kvm-demo/conf/include/agl-kvm.inc @@ -0,0 +1,34 @@ +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. +# + +# Define a default, for now use one that will cause an immediate error. +AGL_GUEST_MACHINE = "INVALID" + +# 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}" + +BBMULTICONFIG = "agl-kvm-guest" + +AGL_FEATURES:append = " agl-kvm" + +# Override remote display network configuration to use KVM demo's +# network configuration +REMOTING_OUTPUT_HOST = "172.16.10.3" + +# Override cluster dashboard VIS server host for KVM demo's network +# configuration +CLUSTER_DEMO_VSS_HOSTNAME = "172.16.10.1" + +include mc-conf-${BB_CURRENT_MC}.inc diff --git a/meta-agl-kvm-demo/conf/include/mc-conf-agl-kvm-guest.inc b/meta-agl-kvm-demo/conf/include/mc-conf-agl-kvm-guest.inc new file mode 100644 index 000000000..6777b2c68 --- /dev/null +++ b/meta-agl-kvm-demo/conf/include/mc-conf-agl-kvm-guest.inc @@ -0,0 +1,3 @@ +# Override the default virtio-can configuration, as we do not have +# a backend to be able to use it. +CANBUS_NETWORK_CONFIG:virtio-all = "canbus-can.network" diff --git a/meta-agl-kvm-demo/conf/include/mc-conf-default.inc b/meta-agl-kvm-demo/conf/include/mc-conf-default.inc new file mode 100644 index 000000000..c60c999b3 --- /dev/null +++ b/meta-agl-kvm-demo/conf/include/mc-conf-default.inc @@ -0,0 +1,3 @@ +# We don't want the app framework bits (specifically the user session) in +# the KVM host image. +AGL_FEATURES:remove = "agl-app-fw" diff --git a/meta-agl-kvm-demo/conf/multiconfig/agl-kvm-guest.conf b/meta-agl-kvm-demo/conf/multiconfig/agl-kvm-guest.conf new file mode 100644 index 000000000..b17740c3d --- /dev/null +++ b/meta-agl-kvm-demo/conf/multiconfig/agl-kvm-guest.conf @@ -0,0 +1,25 @@ +TMPDIR = "${TOPDIR}/tmp-${BB_CURRENT_MC}" + +MACHINE = "${AGL_GUEST_MACHINE}" + +# Avoid parse errors caused by linux-renesas, and all the other +# random bbappends in meta-rcar-gen3. +BBMASK += "meta-rcar-gen3/ meta-rcar-gen3-adas/ meta-agl-refhw-gen3/" + +DISTRO_FEATURES:append = " kvm virtualization" + +AGL_FEATURES:append = " agl-virtio-guest" + +# Use our own wks file +WKS_FILE = "directdisk.wks.in" + +# We only need ext4 images for guests for now +AGL_DEFAULT_IMAGE_FSTYPES = "ext4" +AGL_EXTRA_IMAGE_FSTYPES = "" + +# Need to run QEMU with virtio-gpu device, and we do not need gtk support +PACKAGECONFIG:append:pn-qemu-system-target = " virglrenderer glx" + +# Until aglsetup.sh potentially changes to split features per multiconfig, +# remove problematic ones from the host build here +AGL_FEATURES:remove = "agl-refhw-h3" diff --git a/meta-agl-kvm-demo/recipes-extended/agl-qemu-runner/files/agl-qemu-runner.sh b/meta-agl-kvm-demo/recipes-extended/agl-qemu-runner/files/agl-qemu-runner.sh index f0136b6d5..dd8205313 100755 --- a/meta-agl-kvm-demo/recipes-extended/agl-qemu-runner/files/agl-qemu-runner.sh +++ b/meta-agl-kvm-demo/recipes-extended/agl-qemu-runner/files/agl-qemu-runner.sh @@ -20,7 +20,7 @@ if [ -z "$QEMU_IMAGE_ARCH" ]; then QEMU_IMAGE_ARCH="virtio-${arch}" fi -disk="/var/lib/machines/${image}/${image}-${QEMU_IMAGE_ARCH}.ext4" +disk="/var/lib/machines/${image}/${image}-${QEMU_IMAGE_ARCH}.rootfs.ext4" if [ ! -f "$disk" ]; then echo "No disk image for $image" exit 1 @@ -65,7 +65,7 @@ qemu-system-${arch} \ ${QEMU_INPUT_OPT} \ -global virtio-mmio.force-legacy=false \ -device virtio-gpu-gl-device \ - -display sdl,gl=on -vga std \ + -display sdl,gl=on \ ${QEMU_AUDIO_OPT} \ ${QEMU_CAN_OPT} \ ${QEMU_EXTRA_OPT} \ diff --git a/meta-agl-kvm-demo/recipes-platform/images/agl-kvm-demo.bb b/meta-agl-kvm-demo/recipes-platform/images/agl-kvm-demo.bb index 33f2b921f..b9ae413e5 100644 --- a/meta-agl-kvm-demo/recipes-platform/images/agl-kvm-demo.bb +++ b/meta-agl-kvm-demo/recipes-platform/images/agl-kvm-demo.bb @@ -30,7 +30,7 @@ IMAGE_INSTALL += " \ #IMAGE_LINGUAS = " " #NO_RECOMMENDATIONS = "1" -GUEST_MACHINE ?= "virtio-${TUNE_ARCH}" +GUEST_MACHINE ?= "${AGL_GUEST_MACHINE}" GUEST_VM1_IMAGE ?= "agl-ivi-demo-flutter-guest" GUEST_VM2_IMAGE ?= "agl-cluster-demo-flutter-guest" @@ -56,7 +56,7 @@ install_guest_images() { name=${image} rm -rf ${IMAGE_ROOTFS}/var/lib/machines/${name} install -m 0755 -d ${IMAGE_ROOTFS}/var/lib/machines/${name} - src="${TOPDIR}/tmp-${config}/deploy/images/${GUEST_MACHINE}/${image}-${GUEST_MACHINE}.ext4" + src="${TOPDIR}/tmp-${config}/deploy/images/${GUEST_MACHINE}/${image}-${GUEST_MACHINE}${IMAGE_NAME_SUFFIX}.ext4" bbnote "Installing ${src}" install -m 0600 ${src} ${IMAGE_ROOTFS}/var/lib/machines/${name}/ # Placeholder until booting from kernel in VM image is worked out |