From 5c6de742880a176a4f412753f49925306cdac33c Mon Sep 17 00:00:00 2001 From: Jose Diaz de Grenu de Pedro Date: Mon, 13 Jun 2016 17:40:56 +0200 Subject: [PATCH] meta-digi-dey: trustfence: Explicitely check for "1" for variable enable. https://jira.digi.com/browse/DEL-2603 Signed-off-by: Alex Gonzalez Signed-off-by: Jose Diaz de Grenu de Pedro --- meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb | 6 +++--- meta-digi-dey/classes/trustfence.bbclass | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb index e48d06515..f7d9d0285 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb @@ -65,7 +65,7 @@ do_compile () { cp ${S}/${config}/${UBOOT_BINARY} ${S}/${config}/u-boot-${type}.${UBOOT_SUFFIX} # Secure boot artifacts - if [ -n "${TRUSTFENCE_UBOOT_SIGN}" ] + if [ "${TRUSTFENCE_UBOOT_SIGN}" = "1" ] then cp ${S}/${config}/u-boot-signed.imx ${S}/${config}/u-boot-signed-${type}.${UBOOT_SUFFIX} fi @@ -100,13 +100,13 @@ do_deploy_append() { cd ${DEPLOYDIR} rm -r ${UBOOT_BINARY}-${type} ${UBOOT_SYMLINK}-${type} ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} u-boot-${type}.${UBOOT_SUFFIX} - if [ -n "${TRUSTFENCE_UBOOT_SIGN}" ] + if [ "${TRUSTFENCE_UBOOT_SIGN}" = "1" ] then install ${S}/${config}/SRK_efuses.bin SRK_efuses-${PV}-${PR}.bin install ${S}/${config}/u-boot-signed-${type}.${UBOOT_SUFFIX} u-boot-signed-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ln -sf u-boot-signed-${type}-${PV}-${PR}.${UBOOT_SUFFIX} u-boot-signed-${type}.${UBOOT_SUFFIX} ln -sf SRK_efuses-${PV}-${PR}.bin SRK_efuses.bin - if [ -n "${TRUSTFENCE_UBOOT_ENCRYPT}" ] + if [ "${TRUSTFENCE_UBOOT_ENCRYPT}" = "1" ] then # Move the data encryption key in plain text directly to the deployment directory. # Do not leave any other copies in the machine. diff --git a/meta-digi-dey/classes/trustfence.bbclass b/meta-digi-dey/classes/trustfence.bbclass index e37dc54d2..b40e5efe5 100644 --- a/meta-digi-dey/classes/trustfence.bbclass +++ b/meta-digi-dey/classes/trustfence.bbclass @@ -35,9 +35,9 @@ python () { d.appendVar("UBOOT_EXTRA_CONF", " CONFIG_CONSOLE_ENABLE_GPIO=y CONFIG_CCIMX6SBC_CONSOLE_ENABLE_GPIO_NR=%s " % d.getVar("TRUSTFENCE_CONSOLE_GPIO_ENABLE")) # Secure boot configuration - if d.getVar("TRUSTFENCE_CHECK_KERNEL", True): + if (d.getVar("TRUSTFENCE_CHECK_KERNEL", True) == "1"): d.appendVar("UBOOT_EXTRA_CONF", "CONFIG_SECURE_BOOT=y ") - if d.getVar("TRUSTFENCE_UBOOT_SIGN", True): + if (d.getVar("TRUSTFENCE_UBOOT_SIGN", True) == "1"): d.appendVar("UBOOT_EXTRA_CONF", "CONFIG_SIGN_IMAGE=y ") if d.getVar("TRUSTFENCE_CST_PATH", True): d.appendVar("UBOOT_EXTRA_CONF", 'CONFIG_CST_PATH=\\"%s\\" ' % d.getVar("TRUSTFENCE_CST_PATH")) @@ -45,7 +45,7 @@ python () { d.appendVar("UBOOT_EXTRA_CONF", "CONFIG_CSF_SIZE=%s " % d.getVar("TRUSTFENCE_CSF_SIZE")) if d.getVar("TRUSTFENCE_KEY_INDEX", True): d.appendVar("UBOOT_EXTRA_CONF", "CONFIG_KEY_INDEX=%s " % d.getVar("TRUSTFENCE_KEY_INDEX")) - if d.getVar("TRUSTFENCE_UBOOT_ENCRYPT", True): + if (d.getVar("TRUSTFENCE_UBOOT_ENCRYPT", True) == "1"): d.appendVar("UBOOT_EXTRA_CONF", "CONFIG_ENCRYPT_IMAGE=y ") if d.getVar("TRUSTFENCE_UBOOT_DEK_SIZE", True): d.appendVar("UBOOT_EXTRA_CONF", "CONFIG_DEK_SIZE=%s " % d.getVar("TRUSTFENCE_UBOOT_DEK_SIZE"))