summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthijs Kooijman <matthijs@stdin.nl>2023-12-20 09:50:36 -0300
committerMax Krummenacher <max.krummenacher@toradex.com>2024-01-21 13:46:29 +0100
commiteef25f70d4153b65059d107121bf435780957a5e (patch)
tree8f13c93891964eb51e618e64282718150e64f074
parent940907a1ce6f7fb3f53fde83885f8ad06c2c24fa (diff)
image_type_tezi: Create unversioned symlink to tarball
This makes it easier to reference a custom produced image in a deploy or customization (e.g. with torizoncore-builder) workflow. Variable names and the link command are modeled after /meta-toradex-torizon/recipes-bsp/u-boot/u-boot-ota.inc Signed-off-by: Rafael Beims <rafael.beims@toradex.com> Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl> (cherry picked from commit 92816700a8c6e2650198420f98bd834fe9213c13)
-rw-r--r--classes/image_type_tezi.bbclass8
1 files changed, 7 insertions, 1 deletions
diff --git a/classes/image_type_tezi.bbclass b/classes/image_type_tezi.bbclass
index 2c7c432..89396b3 100644
--- a/classes/image_type_tezi.bbclass
+++ b/classes/image_type_tezi.bbclass
@@ -479,14 +479,20 @@ IMAGE_CMD:teziimg () {
curl -k --retry 5 -O ${TEZI_EULA_URL} || true
fi
+ local outfile stdoutfile
+ outfile=${TEZI_IMAGE_NAME}-Tezi_${TEZI_VERSION}.tar
+ stdoutfile=${TEZI_IMAGE_NAME}-Tezi.tar
+
# The first transform strips all folders from the files to tar, the
# second transform "moves" them in a subfolder ${TEZI_IMAGE_NAME}-Tezi_${TEZI_VERSION}.
${IMAGE_CMD_TAR} \
--transform='s/.*\///' \
--transform 's,^,${TEZI_IMAGE_NAME}-Tezi_${TEZI_VERSION}/,' \
- -chf ${IMGDEPLOYDIR}/${TEZI_IMAGE_NAME}-Tezi_${TEZI_VERSION}.tar \
+ -chf "${IMGDEPLOYDIR}/${outfile}" \
toradexlinux.png marketing.tar prepare.sh wrapup.sh ${TEZI_EULA_FILE} \
${WORKDIR}/image-json/image.json ${TEZI_ARTIFACTS}
+
+ ln -sf "${outfile}" "${IMGDEPLOYDIR}/${stdoutfile}"
}
do_image_teziimg[dirs] += "${WORKDIR}/image-json ${DEPLOY_DIR_IMAGE}"
do_image_teziimg[cleandirs] += "${WORKDIR}/image-json"