summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorDenys Drozdov <denys.drozdov@toradex.com>2021-03-02 06:42:32 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2021-03-23 17:34:45 +0100
commit6e7481b6373c18915abec98f1d56f684268e221b (patch)
tree1818a706ac2215900989fd2c14ca2e7b94ada0a3 /classes
parentd7680ebe631f5e97a461a9e4f54ff781dec11f75 (diff)
image_type_tezi.bbclass show license for tdxref builds only
The License window will be shown in case SHOW_EULA_FILE set to "1" Related-to: ELB-3485 Signed-off-by: Denys Drozdov <denys.drozdov@toradex.com> (cherry picked from commit a4f005089d9c286fa33f4fb5f2e41f1a0ee614d6)
Diffstat (limited to 'classes')
-rw-r--r--classes/image_type_tezi.bbclass13
1 files changed, 9 insertions, 4 deletions
diff --git a/classes/image_type_tezi.bbclass b/classes/image_type_tezi.bbclass
index 5af9ca3..e30201e 100644
--- a/classes/image_type_tezi.bbclass
+++ b/classes/image_type_tezi.bbclass
@@ -40,6 +40,9 @@ UBOOT_ENV_TEZI_RAWNAND ?= "${UBOOT_ENV_TEZI}"
DISTRO_FLAVOUR ??= ""
SUMMARY_append = "${DISTRO_FLAVOUR}"
+TEZI_EULA_URL ?= "https://www.nxp.com/docs/en/disclaimer/LA_OPT_NXP_SW.html"
+export TEZI_EULA_URL
+
# Append tar command to store uncompressed image size to ${T}.
# If a custom rootfs type is used make sure this file is created
# before compression.
@@ -285,8 +288,9 @@ def rootfs_tezi_json(d, flash_type, flash_data, json_file, uenv_file):
data["marketing"] = "marketing.tar"
if os.path.exists(os.path.join(deploydir, "toradexlinux.png")):
data["icon"] = "toradexlinux.png"
- if os.path.exists(os.path.join(deploydir, "LA_OPT_NXP_SW.html")):
- data["license"] = "LA_OPT_NXP_SW.html"
+ if d.getVar('TEZI_SHOW_EULA_LICENSE') == "1":
+ url = d.getVar('TEZI_EULA_URL')
+ data["license"] = os.path.basename(url)
product_ids = d.getVar('TORADEX_PRODUCT_IDS')
if product_ids is None:
@@ -397,7 +401,8 @@ IMAGE_CMD_teziimg () {
cp ${IMGDEPLOYDIR}/image*.json ${WORKDIR}/image-json/image.json
# Keep License up to date
- curl -k -O https://www.nxp.com/docs/en/disclaimer/LA_OPT_NXP_SW.html
+ curl -k -O ${TEZI_EULA_URL}
+ EULA_FILE=$(echo "${TEZI_EULA_URL##*/}")
# 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}.
@@ -405,7 +410,7 @@ IMAGE_CMD_teziimg () {
--transform='s/.*\///' \
--transform 's,^,${TEZI_IMAGE_NAME}-Tezi_${TEZI_VERSION}/,' \
-chf ${IMGDEPLOYDIR}/${TEZI_IMAGE_NAME}-Tezi_${TEZI_VERSION}.tar \
- toradexlinux.png marketing.tar prepare.sh wrapup.sh LA_OPT_NXP_SW.html \
+ toradexlinux.png marketing.tar prepare.sh wrapup.sh ${EULA_FILE} \
${WORKDIR}/image-json/image.json ${TEZI_ARTIFACTS}
}
do_image_teziimg[dirs] += "${WORKDIR}/image-json ${DEPLOY_DIR_IMAGE}"