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