summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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