diff options
| author | John Toomey <john.toomey@amd.com> | 2024-04-03 15:36:32 +0100 |
|---|---|---|
| committer | Mark Hatle <mark.hatle@amd.com> | 2024-04-03 15:11:43 -0500 |
| commit | d52eb2c02f0f69b927066f70c30010374fdb7d0b (patch) | |
| tree | 8fc46fe9c58a4070ccfec6bc0c9427f91a5dc44d /meta-xilinx-core/recipes-bsp | |
| parent | d59a688a54f219c3b5725a24375e3a39f5088ef7 (diff) | |
| download | meta-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>
Diffstat (limited to 'meta-xilinx-core/recipes-bsp')
| -rw-r--r-- | meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-string.bb | 32 |
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 @@ | |||
| 1 | DESCRIPTION = "Bootbin version file - text format" | ||
| 2 | SUMMARY = "The BIF file for bootbin requires a version file in a text format" | ||
| 3 | LICENSE = "MIT" | ||
| 4 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
| 5 | |||
| 6 | COMPATIBLE_MACHINE = "^$" | ||
| 7 | |||
| 8 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
| 9 | |||
| 10 | BOOTBIN_VER_MAIN ?= "" | ||
| 11 | BOOTBIN_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 ''}" | ||
| 12 | BOOTBIN_VER_FILE = "bootbin-version-string.txt" | ||
| 13 | |||
| 14 | #BOOTBIN_MANIFEST_FILE ?= "bootbin-version-header.manifest" | ||
| 15 | |||
| 16 | inherit deploy image-artifact-names | ||
| 17 | |||
| 18 | python 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 | |||
| 25 | do_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 | |||
| 32 | addtask deploy after do_compile | ||
