From 11b608fbcaf7416c025bcbbdfd12932bc3a76f19 Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Fri, 2 Aug 2024 12:38:34 -0500 Subject: meta-xilinx-standalone-sdt: openamp-fw: Expand error message / Fix path Make it clear the package can't not be built if the specified multiconf is not available in the users configuration. Also fix the default deploy path. Signed-off-by: Mark Hatle --- .../recipes-applications/openamp-fw/openamp-fw.inc | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'meta-xilinx-standalone-sdt') diff --git a/meta-xilinx-standalone-sdt/recipes-applications/openamp-fw/openamp-fw.inc b/meta-xilinx-standalone-sdt/recipes-applications/openamp-fw/openamp-fw.inc index 0aa6ae4b..dd2835ab 100644 --- a/meta-xilinx-standalone-sdt/recipes-applications/openamp-fw/openamp-fw.inc +++ b/meta-xilinx-standalone-sdt/recipes-applications/openamp-fw/openamp-fw.inc @@ -2,6 +2,8 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda LICENSE = "MIT" INSANE_SKIP:${PN} = "arch" +COMPATIBLE_HOST = ".*" + FW_LIB_DIR = "${nonarch_base_libdir}/firmware" INSANE_SKIP:${PN} = "arch" @@ -15,17 +17,29 @@ FW_OS ?= "baremetal" FW_TARGET ?= "${MACHINE}-${FW_MACHINE}-${FW_OS}" -OPENAMP_FW_DEPLOY_DIR ?= "tmp-${FW_TARGET}/deploy" +OPENAMP_FW_DEPLOY_DIR ?= "tmp-${FW_TARGET}/deploy/images/${MACHINE}" +#OPENAMP_FW_DEPLOY_DIR ?= "tmp-${FW_TARGET}/deploy/" DEPENDS = " open-amp-xlnx " do_install[mcdepends] += "mc::${FW_TARGET}:open-amp-xlnx:do_deploy" do_install() { - install -d ${D}${FW_LIB_DIR} src=${TOPDIR}/${OPENAMP_FW_DEPLOY_DIR}/${OPENAMP_FW_SRC_NAME} dest=${D}${FW_LIB_DIR}/${OPENAMP_FW_NAME} + if [ ! -e $src ]; then + bberror "Multiconfig firmware $src is not found. Set OPENAMP_FW_DEPLOY_DIR:pn-${PN} if necessary." + exit 1 + fi + install -d ${D}${FW_LIB_DIR} install -m 0644 ${src} ${dest} } do_compile[noexec] = "1" FILES:${PN} = "${FW_LIB_DIR}/${OPENAMP_FW_NAME}" + +python() { + multiconfigs = (d.getVar('BBMULTICONFIG') or '').split() + fw_target = d.getVar('FW_TARGET') + if not fw_target in multiconfigs: + raise bb.parse.SkipRecipe("Required multiconfig %s is not available. Either add the multiconfig to your configuration or adjust FW_TARGET:pn-%s." % (fw_target, d.getVar('PN'))) +} -- cgit v1.2.3-54-g00ecf