summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-core
diff options
context:
space:
mode:
authorJohn Toomey <john.toomey@amd.com>2024-04-03 15:36:32 +0100
committerMark Hatle <mark.hatle@amd.com>2024-04-03 14:51:34 -0500
commitc6ae24ee38a69e4bcd463337aed43276d70845df (patch)
tree4766fc076a8c6bf9d82e984a589cb007b5894542 /meta-xilinx-core
parentcdeb46c57358e579be9f1c1be95a544fd0e713e4 (diff)
downloadmeta-xilinx-c6ae24ee38a69e4bcd463337aed43276d70845df.tar.gz
bootbin-version-string: Add text version file
Add a version header file in plain text format required for Versal machines using the optional data field in the BIF file for version information Signed-off-by: John Toomey <john.toomey@amd.com> Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Diffstat (limited to 'meta-xilinx-core')
-rw-r--r--meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-string.bb32
1 files changed, 32 insertions, 0 deletions
diff --git a/meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-string.bb b/meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-string.bb
new file mode 100644
index 00000000..af30a17d
--- /dev/null
+++ b/meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-string.bb
@@ -0,0 +1,32 @@
1DESCRIPTION = "Bootbin version file - text format"
2SUMMARY = "The BIF file for bootbin requires a version file in a text format"
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
5
6COMPATIBLE_MACHINE = "^$"
7
8PACKAGE_ARCH = "${MACHINE_ARCH}"
9
10BOOTBIN_VER_MAIN ?= ""
11BOOTBIN_VER_SUFFIX ?= "${@(d.getVar('XILINX_VER_BUILD') or '')[:8] if d.getVar('XILINX_VER_UPDATE') != 'release' and not d.getVar('XILINX_VER_UPDATE').startswith('update') else ''}"
12BOOTBIN_VER_FILE = "bootbin-version-string.txt"
13
14#BOOTBIN_MANIFEST_FILE ?= "bootbin-version-header.manifest"
15
16inherit deploy image-artifact-names
17
18python do_configure() {
19 if d.getVar("BOOTBIN_VER_SUFFIX"):
20 version = version + "-" + d.getVar("BOOTBIN_VER_SUFFIX")
21 with open(d.expand("${B}/${BOOTBIN_VER_FILE}"), "w") as f:
22 f.write(version)
23}
24
25do_deploy() {
26 install -m 0644 ${B}/${BOOTBIN_VER_FILE} ${DEPLOYDIR}/${IMAGE_NAME}.txt
27 ln -s ${IMAGE_NAME}.txt ${DEPLOYDIR}/${IMAGE_LINK_NAME}.txt
28# install -m 0644 ${B}/${BOOTBIN_MANIFEST_FILE} ${DEPLOYDIR}/${IMAGE_NAME}.manifest
29# ln -s ${IMAGE_NAME}.manifest ${DEPLOYDIR}/${IMAGE_LINK_NAME}.manifest
30}
31
32addtask deploy after do_compile