diff options
author | Denys Drozdov <denys.drozdov@toradex.com> | 2021-03-02 06:42:32 +0200 |
---|---|---|
committer | Philippe Schenker <philippe.schenker@toradex.com> | 2021-03-02 13:28:12 +0000 |
commit | a4f005089d9c286fa33f4fb5f2e41f1a0ee614d6 (patch) | |
tree | dac2a1e5a1da8b4993b1ced40938ca275ce09441 /classes/image_type_tezi.bbclass | |
parent | 9ececa26080b7abdc96dc1b4b910e735b6eafcfd (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>
Diffstat (limited to 'classes/image_type_tezi.bbclass')
-rw-r--r-- | classes/image_type_tezi.bbclass | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/classes/image_type_tezi.bbclass b/classes/image_type_tezi.bbclass index 9706dc7..fe52818 100644 --- a/classes/image_type_tezi.bbclass +++ b/classes/image_type_tezi.bbclass @@ -39,6 +39,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. @@ -284,8 +287,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: @@ -363,7 +367,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}. @@ -371,7 +376,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}" |