meta-digi-dey: trustfence: Explicitely check for "1" for variable enable.

https://jira.digi.com/browse/DEL-2603

Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
Signed-off-by: Jose Diaz de Grenu de Pedro <Jose.DiazdeGrenudePedro@digi.com>
This commit is contained in:
Jose Diaz de Grenu de Pedro 2016-06-13 17:40:56 +02:00
parent 5308fad8bc
commit 5c6de74288
2 changed files with 6 additions and 6 deletions

View File

@ -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.

View File

@ -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"))