From 2bc44548b94dc226c870714923b9758fca43f545 Mon Sep 17 00:00:00 2001 From: Nathan Dunne Date: Wed, 10 Mar 2021 17:32:54 +0000 Subject: [PATCH] arm-autonomy/host-image-minimal: use XENGUEST_MANAGER_GUEST_DIR in image recipe Created conf/xenguest.conf which defines XENGUEST_MANAGER_GUEST_DIR for both arm-autonomy-host-image-minimal and xenguest-manager to ensure the value is aligned. Issue-Id: SCM-2168 Signed-off-by: Nathan Dunne Change-Id: I9cd5a351b5910bb122b275f47d542798b2df7b1f Signed-off-by: Jon Mason --- meta-arm-autonomy/conf/xenguest.conf | 5 +++++ .../recipes-core/images/arm-autonomy-host-image-minimal.bb | 5 ++++- .../recipes-extended/xenguest/xenguest-manager.bb | 4 +++- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 meta-arm-autonomy/conf/xenguest.conf diff --git a/meta-arm-autonomy/conf/xenguest.conf b/meta-arm-autonomy/conf/xenguest.conf new file mode 100644 index 00000000..3c18cc56 --- /dev/null +++ b/meta-arm-autonomy/conf/xenguest.conf @@ -0,0 +1,5 @@ +# This file will be required by different xenguest recipes to provide +# common variables, which can be configured in local.conf + +# Xenguest image file install location +XENGUEST_MANAGER_GUEST_DIR ?= "${datadir}/guests/" diff --git a/meta-arm-autonomy/recipes-core/images/arm-autonomy-host-image-minimal.bb b/meta-arm-autonomy/recipes-core/images/arm-autonomy-host-image-minimal.bb index 7960a35a..ea5d889a 100644 --- a/meta-arm-autonomy/recipes-core/images/arm-autonomy-host-image-minimal.bb +++ b/meta-arm-autonomy/recipes-core/images/arm-autonomy-host-image-minimal.bb @@ -83,6 +83,9 @@ do_image[mcdepends] += "${DO_IMAGE_MCDEPENDS}" REQUIRED_DISTRO_FEATURES += 'arm-autonomy-host' REQUIRED_DISTRO_FEATURES += 'xen' +# Configurable guest variables +require conf/xenguest.conf + python __anonymous() { import re guestfile_pattern = re.compile(r"^([^;]+);") @@ -133,7 +136,7 @@ python __anonymous() { python add_extern_guests () { # Destination directory on the rootfs - guestdir = d.getVar('IMAGE_ROOTFS') + d.getVar('datadir') + '/guests' + guestdir = d.getVar('IMAGE_ROOTFS') + d.getVar('XENGUEST_MANAGER_GUEST_DIR') # Parse SRC_URI for files with ;guestname= parameter src_uri = d.getVar('SRC_URI') diff --git a/meta-arm-autonomy/recipes-extended/xenguest/xenguest-manager.bb b/meta-arm-autonomy/recipes-extended/xenguest/xenguest-manager.bb index d7b256f4..e7034ca3 100644 --- a/meta-arm-autonomy/recipes-extended/xenguest/xenguest-manager.bb +++ b/meta-arm-autonomy/recipes-extended/xenguest/xenguest-manager.bb @@ -29,8 +29,10 @@ S = "${WORKDIR}" # parameters XENGUEST_MANAGER_VOLUME_DEVICE ?= "/dev/sda2" XENGUEST_MANAGER_VOLUME_NAME ?= "vg-xen-$(basename ${XENGUEST_MANAGER_VOLUME_DEVICE})" -XENGUEST_MANAGER_GUEST_DIR ?= "${datadir}/guests/" XENGUEST_MANAGER_LOG_LEVEL ?= "ERROR" +#XENGUEST_MANAGER_GUEST_DIR set in xenguest.conf + +require conf/xenguest.conf # We add an init script to create and start guests automatically # run start script after xen-tools and run stop script before xen-tools