summaryrefslogtreecommitdiffstats
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 15:11:43 -0500
commitd52eb2c02f0f69b927066f70c30010374fdb7d0b (patch)
tree8fc46fe9c58a4070ccfec6bc0c9427f91a5dc44d
parentd59a688a54f219c3b5725a24375e3a39f5088ef7 (diff)
downloadmeta-xilinx-d52eb2c02f0f69b927066f70c30010374fdb7d0b.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> (cherry picked from commit c6ae24ee38a69e4bcd463337aed43276d70845df) Signed-off-by: Mark Hatle <mark.hatle@amd.com>
-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