summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-standalone-sdt
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@amd.com>2024-08-02 12:38:34 -0500
committerMark Hatle <mark.hatle@amd.com>2024-08-05 13:44:05 -0500
commit11b608fbcaf7416c025bcbbdfd12932bc3a76f19 (patch)
tree505d79f2aaedd65a54b7ca1130f6c4b33abe5dc2 /meta-xilinx-standalone-sdt
parentf14e51e278b2e88f51686e5924d12fb35dcf0b8b (diff)
downloadmeta-xilinx-11b608fbcaf7416c025bcbbdfd12932bc3a76f19.tar.gz
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 <mark.hatle@amd.com>
Diffstat (limited to 'meta-xilinx-standalone-sdt')
-rw-r--r--meta-xilinx-standalone-sdt/recipes-applications/openamp-fw/openamp-fw.inc18
1 files changed, 16 insertions, 2 deletions
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
2LICENSE = "MIT" 2LICENSE = "MIT"
3INSANE_SKIP:${PN} = "arch" 3INSANE_SKIP:${PN} = "arch"
4 4
5COMPATIBLE_HOST = ".*"
6
5FW_LIB_DIR = "${nonarch_base_libdir}/firmware" 7FW_LIB_DIR = "${nonarch_base_libdir}/firmware"
6INSANE_SKIP:${PN} = "arch" 8INSANE_SKIP:${PN} = "arch"
7 9
@@ -15,17 +17,29 @@ FW_OS ?= "baremetal"
15 17
16FW_TARGET ?= "${MACHINE}-${FW_MACHINE}-${FW_OS}" 18FW_TARGET ?= "${MACHINE}-${FW_MACHINE}-${FW_OS}"
17 19
18OPENAMP_FW_DEPLOY_DIR ?= "tmp-${FW_TARGET}/deploy" 20OPENAMP_FW_DEPLOY_DIR ?= "tmp-${FW_TARGET}/deploy/images/${MACHINE}"
21#OPENAMP_FW_DEPLOY_DIR ?= "tmp-${FW_TARGET}/deploy/"
19 22
20DEPENDS = " open-amp-xlnx " 23DEPENDS = " open-amp-xlnx "
21do_install[mcdepends] += "mc::${FW_TARGET}:open-amp-xlnx:do_deploy" 24do_install[mcdepends] += "mc::${FW_TARGET}:open-amp-xlnx:do_deploy"
22do_install() { 25do_install() {
23 install -d ${D}${FW_LIB_DIR}
24 src=${TOPDIR}/${OPENAMP_FW_DEPLOY_DIR}/${OPENAMP_FW_SRC_NAME} 26 src=${TOPDIR}/${OPENAMP_FW_DEPLOY_DIR}/${OPENAMP_FW_SRC_NAME}
25 dest=${D}${FW_LIB_DIR}/${OPENAMP_FW_NAME} 27 dest=${D}${FW_LIB_DIR}/${OPENAMP_FW_NAME}
28 if [ ! -e $src ]; then
29 bberror "Multiconfig firmware $src is not found. Set OPENAMP_FW_DEPLOY_DIR:pn-${PN} if necessary."
30 exit 1
31 fi
32 install -d ${D}${FW_LIB_DIR}
26 install -m 0644 ${src} ${dest} 33 install -m 0644 ${src} ${dest}
27} 34}
28 35
29do_compile[noexec] = "1" 36do_compile[noexec] = "1"
30 37
31FILES:${PN} = "${FW_LIB_DIR}/${OPENAMP_FW_NAME}" 38FILES:${PN} = "${FW_LIB_DIR}/${OPENAMP_FW_NAME}"
39
40python() {
41 multiconfigs = (d.getVar('BBMULTICONFIG') or '').split()
42 fw_target = d.getVar('FW_TARGET')
43 if not fw_target in multiconfigs:
44 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')))
45}