From ad58d4ea81b8d25fd1e25d4d23496b4546b06544 Mon Sep 17 00:00:00 2001 From: Diego Sueiro Date: Thu, 7 May 2020 11:30:29 +0100 Subject: [PATCH] arm-autonomy: firmware-image-juno: Add xen-devicetree dependency The do_deploy task depends on xen-devicetree:do_deploy in order to include the generated xen dtbs in the firmware image. To avoid dependency loop between firmware-image-juno:do_install, xen:do_deploy and xen-devicetree:do_deploy when INITRAMFS_IMAGE_BUNDLE = "1", we need to handle the xen and xen-devicetree binaries copying in the do_deploy task. Also Use OVERRIDES to minimize the usage of "@bb.utils.contains('DISTRO_FEATURES', 'xen', ..." Change-Id: I8da476435de73445fb6d895ec418d85861b8c46c Issue-Id: SCM-990 Signed-off-by: Diego Sueiro Reviewed-by: Bertrand Marquis Signed-off-by: Jon Mason --- .../images/firmware-image-juno.bbappend | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-bsp/images/firmware-image-juno.bbappend b/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-bsp/images/firmware-image-juno.bbappend index 2904e0b2..b0aae695 100644 --- a/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-bsp/images/firmware-image-juno.bbappend +++ b/meta-arm-autonomy/dynamic-layers/meta-arm-bsp/recipes-bsp/images/firmware-image-juno.bbappend @@ -1,14 +1,21 @@ -FILESEXTRAPATHS_prepend := "${@bb.utils.contains('DISTRO_FEATURES', 'xen', '${THISDIR}/${PN}:', '', d)}" +# Use OVERRIDES to minimize the usage of +# ${@bb.utils.contains('DISTRO_FEATURES', 'xen', ... +OVERRIDES_append = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ':xen', '', d)}" -INSTALL_EXTRA_DEPS = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'xen:do_deploy', '', d)}" +FILESEXTRAPATHS_prepend_xen := "${THISDIR}/${PN}:" -do_install[depends] += "${INSTALL_EXTRA_DEPS}" +DEPLOY_EXTRA_DEPS ??= "" +DEPLOY_EXTRA_DEPS_xen = "xen:do_deploy xen-devicetree:do_deploy" -do_install_append() { - if [ "${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'yes', 'no', d)}" = "yes" ]; then - cp ${DEPLOY_DIR_IMAGE}/xen-${COMPATIBLE_MACHINE}.efi \ - ${D}/${UNPACK_DIR}/SOFTWARE/xen - cp ${DEPLOY_DIR_IMAGE}/*xen.dtb \ - ${D}/${UNPACK_DIR}/SOFTWARE/ - fi +do_deploy[depends] += "${DEPLOY_EXTRA_DEPS}" + +do_deploy_prepend_xen() { + # To avoid dependency loop between firmware-image-juno:do_install, + # xen:do_deploy and xen-devicetree:do_deploy when + # INITRAMFS_IMAGE_BUNDLE = "1", we need to handle the xen and + # xen-devicetree binaries copying in the do_deploy task. + cp ${DEPLOY_DIR_IMAGE}/xen-${COMPATIBLE_MACHINE}.efi \ + ${D}/${UNPACK_DIR}/SOFTWARE/xen + cp ${DEPLOY_DIR_IMAGE}/*xen.dtb \ + ${D}/${UNPACK_DIR}/SOFTWARE/ }