From a91cc4e79617f161dbb806e4d42a8cfb79200ee3 Mon Sep 17 00:00:00 2001 From: "Diaz de Grenu, Jose" Date: Thu, 23 Jun 2016 13:20:07 +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 explicitly 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: Diaz de Grenu, Jose --- meta-digi-dey/classes/trustfence.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-digi-dey/classes/trustfence.bbclass b/meta-digi-dey/classes/trustfence.bbclass index 0e734044a..8bacd48a3 100644 --- a/meta-digi-dey/classes/trustfence.bbclass +++ b/meta-digi-dey/classes/trustfence.bbclass @@ -60,6 +60,6 @@ python () { 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")) - if d.getVar("TRUSTFENCE_UBOOT_ENV_DEK", True): + if (d.getVar("TRUSTFENCE_UBOOT_ENV_DEK", True) not in [None, "0"]): d.appendVar("UBOOT_EXTRA_CONF", 'CONFIG_ENV_AES=y CONFIG_ENV_AES_KEY=\\"%s\\"' % d.getVar("TRUSTFENCE_UBOOT_ENV_DEK")) }