1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-07-16 15:57:19 +00:00

arm-autonomy/xenguest: Generate xenguest.env containing variable values

Added task "do_deploy_xenguestenv" to xenguest_image.bbclass which creates
intermediary files for each recipe that inherits xenguest_image. These files
are merged into the main xenguest.env file in DEPLOY_DIR_IMAGE by the task
"do_merge_xenguestenv" in image_types_xenguest.bbclass, which has a dependency
on all do_deploy_xenguestenv in recipes it depends on.

Variables to write to the file are listed in XENGUEST_IMAGE_VARS, and any
extra variables in child recipes should be added to XENGUEST_IMAGE_VARS_EXTRA

xenguest-image had to be renamed xenguest_image to use EXPORT, since dash is
illegal in bash function names.

Issue-Id: SCM-2035
Signed-off-by: Nathan Dunne <Nathan.Dunne@arm.com>
Change-Id: I6fe45b8a5db6eb7a757c6150515da0b4de8a7205
Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Nathan Dunne
2021-03-10 17:32:52 +00:00
committed by Jon Mason
parent 4865c69658
commit 7c1cb547b9
8 changed files with 147 additions and 22 deletions
@@ -3,7 +3,10 @@
# This is done using kernel-fitimage as model
# To activate this, kernel-xenguest must be added to KERNEL_CLASSES
inherit xenguest-image
# Add a variable name to XENGUEST_IMAGE_VARS_EXTRA if you want it to
# appear in xenguest.env when the image is deployed
inherit xenguest_image
# use a local copy to pack all together
XENGUEST_IMAGE_DEPLOY_DIR = "${WORKDIR}/tmp-xenguest"
@@ -24,7 +27,7 @@ do_assemble_xenguest_initramfs() {
rm -f ${B}/${KERNEL_OUTPUT_DIR}/Image-initramfs.xenguest
call_xenguest_mkimage pack ${B}/${KERNEL_OUTPUT_DIR}/Image-initramfs.xenguest
}
do_assemble_xenguest_initramfs[depends] += "${INITRAMFS_IMAGE}:do_image_complete"
do_assemble_xenguest_initramfs[depends] += "${INITRAMFS_IMAGE}:do_merge_xenguestenv"
kernel_do_deploy_append() {
if [ -f "${B}/${KERNEL_OUTPUT_DIR}/Image-initramfs.xenguest" ]; then