summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-standalone-sdt/classes-recipe/esw_apps_common.bbclass
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@amd.com>2024-05-23 09:49:48 -0600
committerMark Hatle <mark.hatle@amd.com>2024-11-21 10:43:43 -0600
commit3fb0ec778d76d509c30dcf1e07dcdd659f823be7 (patch)
treecbc9c3a8458add6f673b3124ccbd8688767c934e /meta-xilinx-standalone-sdt/classes-recipe/esw_apps_common.bbclass
parentafad32c5d133a1f8a6e59e51d228161b9f47bb10 (diff)
downloadmeta-xilinx-3fb0ec778d76d509c30dcf1e07dcdd659f823be7.tar.gz
meta-xilinx-standalone-sdt: Rename from ...-experimental
Add symlink to old name for temporarily compatibility. Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Diffstat (limited to 'meta-xilinx-standalone-sdt/classes-recipe/esw_apps_common.bbclass')
-rw-r--r--meta-xilinx-standalone-sdt/classes-recipe/esw_apps_common.bbclass31
1 files changed, 31 insertions, 0 deletions
diff --git a/meta-xilinx-standalone-sdt/classes-recipe/esw_apps_common.bbclass b/meta-xilinx-standalone-sdt/classes-recipe/esw_apps_common.bbclass
new file mode 100644
index 00000000..134d3cd2
--- /dev/null
+++ b/meta-xilinx-standalone-sdt/classes-recipe/esw_apps_common.bbclass
@@ -0,0 +1,31 @@
1#
2# Copyright (C) 2024, Advanced Micro Devices, Inc. All rights reserved.
3#
4# SPDX-License-Identifier: MIT
5#
6# This bbclass is inherited by esw application recipes. This class provides
7# common code for elf name, bitbake install and deploy task functionality for
8# multiconfig target images.
9
10inherit deploy image-artifact-names
11
12APP_IMAGE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${BB_CURRENT_MC}${IMAGE_VERSION_SUFFIX}"
13
14ESW_EXECUTABLE_NAME ?= ""
15
16do_install() {
17 install -d ${D}/${base_libdir}/firmware
18 # Note that we have to make the ELF executable for it to be stripped
19 install -m 0755 ${B}/${ESW_EXECUTABLE_NAME}* ${D}/${base_libdir}/firmware
20}
21
22do_deploy() {
23 # We need to deploy the stripped elf, hence why not doing it from ${D}
24 install -Dm 0644 ${UNPACKDIR}/package/${base_libdir}/firmware/${ESW_EXECUTABLE_NAME}.elf ${DEPLOYDIR}/${APP_IMAGE_NAME}.elf
25 ln -sf ${APP_IMAGE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}-${BB_CURRENT_MC}.elf
26 ${OBJCOPY} -O binary ${UNPACKDIR}/package/${base_libdir}/firmware/${ESW_EXECUTABLE_NAME}.elf ${UNPACKDIR}/package/${base_libdir}/firmware/${ESW_EXECUTABLE_NAME}.bin
27 install -m 0644 ${UNPACKDIR}/package/${base_libdir}/firmware/${ESW_EXECUTABLE_NAME}.bin ${DEPLOYDIR}/${APP_IMAGE_NAME}.bin
28 ln -sf ${APP_IMAGE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}-${BB_CURRENT_MC}.bin
29}
30
31addtask deploy before do_build after do_package