From 62e0e1c6c60fd092021446b5d61b7b4b170deee9 Mon Sep 17 00:00:00 2001 From: Jose Diaz de Grenu de Pedro Date: Mon, 20 Jun 2016 15:03:05 +0200 Subject: [PATCH] meta-digi-arm: u-boot: fix trustfence checks logic There are several possible values for TRUSTFENCE_UBOOT_ENV_DEK: * Not defined: if the trustfence support is not included. Should not include the feature. * 32 characters: when defining a valid key. Should include the feature. * "0": when explicetily disabling the feature. Should not include the feature * : Invalid value, should trigger the error. This commits fixes the logic so that 'None' (no defined) is taken as a valid value. Signed-off-by: Jose Diaz de Grenu de Pedro --- meta-digi-arm/recipes-bsp/u-boot/u-boot-dey_2015.04.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 d51a43ea5..f749ccc3d 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 @@ -38,7 +38,7 @@ python __anonymous() { bb.fatal("NXP's CST tool needs to be installed and a PKI tree generated. Please download it from the NXP website at http://www.nxp.com/pages/i.mx-design-tools:IMX_DESIGN?fsrch=1&sr=1&pageNum=1") if (d.getVar("TRUSTFENCE_UBOOT_ENCRYPT", True) == "1") and (d.getVar("TRUSTFENCE_UBOOT_SIGN", True) != "1"): bb.fatal("Only signed U-Boot images can be encrypted. Generate signed images (TRUSTFENCE_UBOOT_SIGN=1) or remove encryption (TRUSTFENCE_UBOOT_ENCRYPT=0)") - if (d.getVar("TRUSTFENCE_UBOOT_ENV_DEK", True) != "0"): + if (d.getVar("TRUSTFENCE_UBOOT_ENV_DEK", True) not in [None, "0"]): if (d.getVar("TRUSTFENCE_UBOOT_ENCRYPT", True) != "1"): bb.warn("It is strongly recommended to encrypt the U-Boot image when using environment encrpytion. Consider defining TRUSTFENCE_UBOOT_ENCRYPT=1") if (len(d.getVar("TRUSTFENCE_UBOOT_ENV_DEK", True)) != 32):