diff options
-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 | ||