From adbb5114841adab4ae19dd81f1464b5a00a79c3b Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Fri, 24 Feb 2023 16:24:47 +0100 Subject: [PATCH] meta-digi: remove True option to getVar True is the default since long time ago, and thus not necessary. This follows similar changes done in other layers. Command used: sed -e 's|\(d\.getVar \?\)( \?\([^,()]*\), \?True)|\1(\2)|g' -i $(git grep -E 'getVar ?\( ?([^,()]*), ?True\)' | cut -d':' -f1 | sort -u) Signed-off-by: Javier Viguera --- .../classes/image_types_digi.bbclass | 2 +- meta-digi-arm/conf/machine/ccmp15-dvk.conf | 2 +- meta-digi-arm/conf/machine/include/ccimx6.inc | 2 +- .../conf/machine/include/ccimx6ul.inc | 2 +- .../conf/machine/include/ccimx8m.inc | 2 +- .../conf/machine/include/ccimx8x.inc | 2 +- meta-digi-arm/conf/machine/include/ccmp1.inc | 2 +- .../wolfssl/wolfssl_5.4.0-fips.bb | 2 +- .../recipes-bsp/u-boot/u-boot-dey.inc | 4 +- meta-digi-dey/classes/aws-iot.bbclass | 2 +- meta-digi-dey/classes/trustfence.bbclass | 58 +++++++++---------- .../recipes-aws/greengrass/greengrass.inc | 4 +- .../greengrass/greengrass_1.6.0.bb | 2 +- .../recipes-connectivity/bluez/bluez5.inc | 4 +- .../systemd/systemd-serialgetty.bbappend | 2 +- .../sysvinit-inittab_2.88dsf.bbappend | 2 +- .../crank-demos/crank-demos_7.2.bb | 6 +- .../crank-sbengine/crank-sbengine_7.2.bb | 6 +- meta-digi-dey/recipes-digi/swu-images/swu.inc | 20 +++---- 19 files changed, 63 insertions(+), 63 deletions(-) diff --git a/meta-digi-arm/classes/image_types_digi.bbclass b/meta-digi-arm/classes/image_types_digi.bbclass index 059a3e44f..9691b0921 100644 --- a/meta-digi-arm/classes/image_types_digi.bbclass +++ b/meta-digi-arm/classes/image_types_digi.bbclass @@ -6,7 +6,7 @@ inherit image_types BOOTLOADER_IMAGE_RECIPE ?= "u-boot" def TRUSTFENCE_BOOTIMAGE_DEPENDS(d): - tf_initramfs = d.getVar('TRUSTFENCE_INITRAMFS_IMAGE',True) or "" + tf_initramfs = d.getVar('TRUSTFENCE_INITRAMFS_IMAGE') or "" return "%s:do_image_complete" % tf_initramfs if tf_initramfs else "" do_image_boot_vfat[depends] += " \ diff --git a/meta-digi-arm/conf/machine/ccmp15-dvk.conf b/meta-digi-arm/conf/machine/ccmp15-dvk.conf index 49ab2c42f..2cdd0510c 100644 --- a/meta-digi-arm/conf/machine/ccmp15-dvk.conf +++ b/meta-digi-arm/conf/machine/ccmp15-dvk.conf @@ -195,5 +195,5 @@ ROOTFS_EXT ?= ".ubifs" BOOT_DEV_NAME ?= "linux" ROOTFS_DEV_NAME ?= "rootfs" ROOTFS_ENC_DEV = "${ROOTFS_DEV_NAME}" -ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS', True) == '1', '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}" +ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS') == '1', '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}" diff --git a/meta-digi-arm/conf/machine/include/ccimx6.inc b/meta-digi-arm/conf/machine/include/ccimx6.inc index ee5a15621..525de6725 100644 --- a/meta-digi-arm/conf/machine/include/ccimx6.inc +++ b/meta-digi-arm/conf/machine/include/ccimx6.inc @@ -52,5 +52,5 @@ ROOTFS_EXT ?= ".ext4.gz" BOOT_DEV_NAME ?= "/dev/mmcblk0p1" ROOTFS_DEV_NAME ?= "/dev/mmcblk0p3" ROOTFS_ENC_DEV = "/dev/mapper/cryptrootfs" -ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS', True) == '1', '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}" +ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS') == '1', '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}" diff --git a/meta-digi-arm/conf/machine/include/ccimx6ul.inc b/meta-digi-arm/conf/machine/include/ccimx6ul.inc index c0bcd782f..3e7bc79bb 100644 --- a/meta-digi-arm/conf/machine/include/ccimx6ul.inc +++ b/meta-digi-arm/conf/machine/include/ccimx6ul.inc @@ -58,7 +58,7 @@ ROOTFS_EXT ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", ".squa BOOT_DEV_NAME ?= "linux" ROOTFS_DEV_NAME ?= "rootfs" ROOTFS_ENC_DEV = "${ROOTFS_DEV_NAME}" -ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS', True) == '1', '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}" +ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS') == '1', '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}" # U-Boot environment offset (within partition) UBOOT_ENV_OFFSET ?= "0x0" diff --git a/meta-digi-arm/conf/machine/include/ccimx8m.inc b/meta-digi-arm/conf/machine/include/ccimx8m.inc index aed474ebe..a78eb6206 100644 --- a/meta-digi-arm/conf/machine/include/ccimx8m.inc +++ b/meta-digi-arm/conf/machine/include/ccimx8m.inc @@ -67,5 +67,5 @@ ROOTFS_EXT ?= ".ext4.gz" BOOT_DEV_NAME ?= "/dev/mmcblk0p1" ROOTFS_DEV_NAME ?= "/dev/mmcblk0p3" ROOTFS_ENC_DEV = "/dev/mapper/cryptrootfs" -ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS', True) == '1', '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}" +ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS') == '1', '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}" diff --git a/meta-digi-arm/conf/machine/include/ccimx8x.inc b/meta-digi-arm/conf/machine/include/ccimx8x.inc index c768ed1ea..66f457243 100644 --- a/meta-digi-arm/conf/machine/include/ccimx8x.inc +++ b/meta-digi-arm/conf/machine/include/ccimx8x.inc @@ -84,5 +84,5 @@ ROOTFS_EXT ?= ".ext4.gz" BOOT_DEV_NAME ?= "/dev/mmcblk0p1" ROOTFS_DEV_NAME ?= "/dev/mmcblk0p3" ROOTFS_ENC_DEV = "/dev/mapper/cryptrootfs" -ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS', True) == '1', '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}" +ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS') == '1', '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}" diff --git a/meta-digi-arm/conf/machine/include/ccmp1.inc b/meta-digi-arm/conf/machine/include/ccmp1.inc index 7ebd2a994..49c5f4c1b 100644 --- a/meta-digi-arm/conf/machine/include/ccmp1.inc +++ b/meta-digi-arm/conf/machine/include/ccmp1.inc @@ -26,7 +26,7 @@ ROOTFS_EXT ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", ".squa BOOT_DEV_NAME ?= "linux" ROOTFS_DEV_NAME ?= "rootfs" ROOTFS_ENC_DEV = "${ROOTFS_DEV_NAME}" -ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS', True) == '1', '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}" +ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS') == '1', '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}" # U-Boot environment offset (within partition) UBOOT_ENV_OFFSET ?= "0x0" diff --git a/meta-digi-arm/dynamic-layers/wolfssl/recipes-wolfssl/wolfssl/wolfssl_5.4.0-fips.bb b/meta-digi-arm/dynamic-layers/wolfssl/recipes-wolfssl/wolfssl/wolfssl_5.4.0-fips.bb index 083c447d6..5898114fd 100644 --- a/meta-digi-arm/dynamic-layers/wolfssl/recipes-wolfssl/wolfssl/wolfssl_5.4.0-fips.bb +++ b/meta-digi-arm/dynamic-layers/wolfssl/recipes-wolfssl/wolfssl/wolfssl_5.4.0-fips.bb @@ -27,7 +27,7 @@ python() { # variable. wolfssl_fips_local_path = d.getVar('WOLFSSL_FIPS_PKG_PATH') if wolfssl_fips_local_path: - premirrors = d.getVar('PREMIRRORS', True) + premirrors = d.getVar('PREMIRRORS') d.setVar('PREMIRRORS', "http:///not/exist/${WOLFSSL_FIPS_PKG_NAME}.7z file://%s \\n %s" % (wolfssl_fips_local_path, premirrors)) # Yocto does not support unpacking password protected packages, so configure the diff --git a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey.inc b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey.inc index 2b4c5f44c..45763922b 100644 --- a/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey.inc +++ b/meta-digi-arm/recipes-bsp/u-boot/u-boot-dey.inc @@ -44,7 +44,7 @@ inherit ${@oe.utils.conditional('DEY_BUILD_PLATFORM', 'NXP', 'fsl-u-boot-localve UBOOT_INITIAL_ENV = "" python __anonymous() { - if (d.getVar("TRUSTFENCE_DEK_PATH", True) not in ["0", None]) and (d.getVar("TRUSTFENCE_SIGN", True) != "1"): + if (d.getVar("TRUSTFENCE_DEK_PATH") not in ["0", None]) and (d.getVar("TRUSTFENCE_SIGN") != "1"): bb.fatal("Only signed U-Boot images can be encrypted. Generate signed images (TRUSTFENCE_SIGN = \"1\") or remove encryption (TRUSTFENCE_DEK_PATH = \"0\")") } @@ -60,7 +60,7 @@ python trustfence_config() { TF_BOOTSCRIPT_SEDFILTER = "${@tf_bootscript_sedfilter(d)}" def tf_bootscript_sedfilter(d): - tf_initramfs = d.getVar('TRUSTFENCE_INITRAMFS_IMAGE',True) or "" + tf_initramfs = d.getVar('TRUSTFENCE_INITRAMFS_IMAGE') or "" return "s,\(^[[:blank:]]*\)true.*,\\1setenv boot_initrd true\\n\\1setenv initrd_file %s-${MACHINE}.cpio.gz.u-boot.tf,g" % tf_initramfs if tf_initramfs else "" build_uboot_scripts() { diff --git a/meta-digi-dey/classes/aws-iot.bbclass b/meta-digi-dey/classes/aws-iot.bbclass index 259506024..12bdc12a5 100644 --- a/meta-digi-dey/classes/aws-iot.bbclass +++ b/meta-digi-dey/classes/aws-iot.bbclass @@ -70,7 +70,7 @@ def get_log_level(d): levels = ['error', 'warn', 'info', 'debug', 'trace'] log_flags = "" - log_level = d.getVar('AWS_IOT_LOGGING_LEVEL', True) + log_level = d.getVar('AWS_IOT_LOGGING_LEVEL') if log_level == 'none': return "" if log_level not in levels: diff --git a/meta-digi-dey/classes/trustfence.bbclass b/meta-digi-dey/classes/trustfence.bbclass index e5664d467..663204290 100644 --- a/meta-digi-dey/classes/trustfence.bbclass +++ b/meta-digi-dey/classes/trustfence.bbclass @@ -40,50 +40,50 @@ python () { import os # Secure console configuration - if (d.getVar("TRUSTFENCE_CONSOLE_DISABLE", True) == "1"): + if (d.getVar("TRUSTFENCE_CONSOLE_DISABLE") == "1"): d.appendVar("UBOOT_TF_CONF", "CONFIG_CONSOLE_DISABLE=y ") - if d.getVar("TRUSTFENCE_CONSOLE_PASSPHRASE_ENABLE", True): - passphrase_hash = hashlib.sha256(d.getVar("TRUSTFENCE_CONSOLE_PASSPHRASE_ENABLE", True).encode()).hexdigest() + if d.getVar("TRUSTFENCE_CONSOLE_PASSPHRASE_ENABLE"): + passphrase_hash = hashlib.sha256(d.getVar("TRUSTFENCE_CONSOLE_PASSPHRASE_ENABLE").encode()).hexdigest() d.appendVar("UBOOT_TF_CONF", 'CONFIG_CONSOLE_ENABLE_PASSPHRASE=y CONFIG_CONSOLE_ENABLE_PASSPHRASE_KEY="%s" ' % passphrase_hash) - elif d.getVar("TRUSTFENCE_CONSOLE_GPIO_ENABLE", True): - d.appendVar("UBOOT_TF_CONF", "CONFIG_CONSOLE_ENABLE_GPIO=y CONFIG_CONSOLE_ENABLE_GPIO_NR=%s " % d.getVar("TRUSTFENCE_CONSOLE_GPIO_ENABLE", True)) + elif d.getVar("TRUSTFENCE_CONSOLE_GPIO_ENABLE"): + d.appendVar("UBOOT_TF_CONF", "CONFIG_CONSOLE_ENABLE_GPIO=y CONFIG_CONSOLE_ENABLE_GPIO_NR=%s " % d.getVar("TRUSTFENCE_CONSOLE_GPIO_ENABLE")) # Secure boot configuration - if (d.getVar("TRUSTFENCE_SIGN_KEYS_PATH", True) == "default"): - d.setVar("TRUSTFENCE_SIGN_KEYS_PATH", d.getVar("TOPDIR", True) + "/trustfence"); + if (d.getVar("TRUSTFENCE_SIGN_KEYS_PATH") == "default"): + d.setVar("TRUSTFENCE_SIGN_KEYS_PATH", d.getVar("TOPDIR") + "/trustfence"); - if (d.getVar("TRUSTFENCE_DEK_PATH", True) == "default"): - d.setVar("TRUSTFENCE_DEK_PATH", d.getVar("TRUSTFENCE_SIGN_KEYS_PATH", True) + "/dek.bin"); + if (d.getVar("TRUSTFENCE_DEK_PATH") == "default"): + d.setVar("TRUSTFENCE_DEK_PATH", d.getVar("TRUSTFENCE_SIGN_KEYS_PATH") + "/dek.bin"); - if (d.getVar("TRUSTFENCE_SIGN", True) == "1"): + if (d.getVar("TRUSTFENCE_SIGN") == "1"): d.appendVar("UBOOT_TF_CONF", "CONFIG_SIGN_IMAGE=y CONFIG_AUTH_ARTIFACTS=y ") - if (d.getVar("TRUSTFENCE_READ_ONLY_ROOTFS", True) == "1"): + if (d.getVar("TRUSTFENCE_READ_ONLY_ROOTFS") == "1"): d.appendVar("UBOOT_TF_CONF", "CONFIG_AUTHENTICATE_SQUASHFS_ROOTFS=y ") - if d.getVar("TRUSTFENCE_SIGN_KEYS_PATH", True): - d.appendVar("UBOOT_TF_CONF", 'CONFIG_SIGN_KEYS_PATH="%s" ' % d.getVar("TRUSTFENCE_SIGN_KEYS_PATH", True)) - if (d.getVar("TRUSTFENCE_UNLOCK_KEY_REVOCATION", True) == "1"): + if d.getVar("TRUSTFENCE_SIGN_KEYS_PATH"): + d.appendVar("UBOOT_TF_CONF", 'CONFIG_SIGN_KEYS_PATH="%s" ' % d.getVar("TRUSTFENCE_SIGN_KEYS_PATH")) + if (d.getVar("TRUSTFENCE_UNLOCK_KEY_REVOCATION") == "1"): d.appendVar("UBOOT_TF_CONF", "CONFIG_UNLOCK_SRK_REVOKE=y ") - if d.getVar("TRUSTFENCE_KEY_INDEX", True): - d.appendVar("UBOOT_TF_CONF", "CONFIG_KEY_INDEX=%s " % d.getVar("TRUSTFENCE_KEY_INDEX", True)) - if (d.getVar("TRUSTFENCE_DEK_PATH", True) not in [None, "0"]): - d.appendVar("UBOOT_TF_CONF", 'CONFIG_DEK_PATH="%s" ' % d.getVar("TRUSTFENCE_DEK_PATH", True)) - if d.getVar("TRUSTFENCE_SIGN_MODE", True): - d.appendVar("UBOOT_TF_CONF", 'CONFIG_SIGN_MODE="%s" ' % d.getVar("TRUSTFENCE_SIGN_MODE", True)) - if (d.getVar("TRUSTFENCE_ENCRYPT_ENVIRONMENT", True) == "1"): + if d.getVar("TRUSTFENCE_KEY_INDEX"): + d.appendVar("UBOOT_TF_CONF", "CONFIG_KEY_INDEX=%s " % d.getVar("TRUSTFENCE_KEY_INDEX")) + if (d.getVar("TRUSTFENCE_DEK_PATH") not in [None, "0"]): + d.appendVar("UBOOT_TF_CONF", 'CONFIG_DEK_PATH="%s" ' % d.getVar("TRUSTFENCE_DEK_PATH")) + if d.getVar("TRUSTFENCE_SIGN_MODE"): + d.appendVar("UBOOT_TF_CONF", 'CONFIG_SIGN_MODE="%s" ' % d.getVar("TRUSTFENCE_SIGN_MODE")) + if (d.getVar("TRUSTFENCE_ENCRYPT_ENVIRONMENT") == "1"): d.appendVar("UBOOT_TF_CONF", "CONFIG_ENV_AES=y CONFIG_ENV_AES_CAAM_KEY=y ") # Provide sane default values for SWUPDATE class in case Trustfence is enabled - if (d.getVar("TRUSTFENCE_SIGN", True) == "1"): + if (d.getVar("TRUSTFENCE_SIGN") == "1"): # Enable package signing. d.setVar("SWUPDATE_SIGNING", "RSA") # Retrieve the keys path to use. - keys_path = d.getVar("TRUSTFENCE_SIGN_KEYS_PATH", True) + keys_path = d.getVar("TRUSTFENCE_SIGN_KEYS_PATH") # Retrieve the key index to use. key_index = 0 - if (d.getVar("TRUSTFENCE_KEY_INDEX", True)): - key_index = int(d.getVar("TRUSTFENCE_KEY_INDEX", True)) + if (d.getVar("TRUSTFENCE_KEY_INDEX")): + key_index = int(d.getVar("TRUSTFENCE_KEY_INDEX")) key_index_1 = key_index + 1 # Set the private key template, it will be expanded later in 'swu' recipes once keys are generated. @@ -98,14 +98,14 @@ python () { d.setVar("SWUPDATE_PASSWORD_FILE", keys_path + "/keys/key_pass.txt") # Enable partition encryption if rootfs encryption is enabled - if (d.getVar("TRUSTFENCE_ENCRYPT_ROOTFS", True) == "1"): + if (d.getVar("TRUSTFENCE_ENCRYPT_ROOTFS") == "1"): d.setVar("TRUSTFENCE_ENCRYPT_PARTITIONS", "1"); # Enable the trustfence initramfs if and only if partition encryption is enabled # and not using a read-only rootfs - if (d.getVar("TRUSTFENCE_ENCRYPT_PARTITIONS", True) == "1" and \ - d.getVar("STORAGE_MEDIA", True) == "mmc" and \ - d.getVar("TRUSTFENCE_READ_ONLY_ROOTFS", True) == "0"): + if (d.getVar("TRUSTFENCE_ENCRYPT_PARTITIONS") == "1" and \ + d.getVar("STORAGE_MEDIA") == "mmc" and \ + d.getVar("TRUSTFENCE_READ_ONLY_ROOTFS") == "0"): d.setVar("TRUSTFENCE_INITRAMFS_IMAGE", "dey-image-trustfence-initramfs"); else: d.setVar("TRUSTFENCE_INITRAMFS_IMAGE", ""); diff --git a/meta-digi-dey/recipes-aws/greengrass/greengrass.inc b/meta-digi-dey/recipes-aws/greengrass/greengrass.inc index 289c33b0e..efd73308d 100644 --- a/meta-digi-dey/recipes-aws/greengrass/greengrass.inc +++ b/meta-digi-dey/recipes-aws/greengrass/greengrass.inc @@ -25,9 +25,9 @@ GG_TARBALL_LOCAL_PATH ?= "" # a PREMIRROR to a local directory that can be configured in the project's # local.conf file using GG_TARBALL_LOCAL_PATH variable. python() { - gg_tarball_local_path = d.getVar('GG_TARBALL_LOCAL_PATH', True) + gg_tarball_local_path = d.getVar('GG_TARBALL_LOCAL_PATH') if gg_tarball_local_path: - premirrors = d.getVar('PREMIRRORS', True) + premirrors = d.getVar('PREMIRRORS') d.setVar('PREMIRRORS', "http:///not/exist/greengrass.* file://%s \\n %s" % (gg_tarball_local_path, premirrors)) } diff --git a/meta-digi-dey/recipes-aws/greengrass/greengrass_1.6.0.bb b/meta-digi-dey/recipes-aws/greengrass/greengrass_1.6.0.bb index 3378dbac4..a3a4e5a4d 100644 --- a/meta-digi-dey/recipes-aws/greengrass/greengrass_1.6.0.bb +++ b/meta-digi-dey/recipes-aws/greengrass/greengrass_1.6.0.bb @@ -72,7 +72,7 @@ LIC_FILES_CHKSUM = " \ # Bitbake does not support spaces in filenames, but GG License does have spaces, # so workaround the problem by renaming the file before using it. GG_LIC_FILENAME = "Greengrass AWS SW License (IoT additional) vr6.txt" -GG_LIC_FILENAME_NOSPACES = "${@d.getVar('GG_LIC_FILENAME', True).replace(' ','_')}" +GG_LIC_FILENAME_NOSPACES = "${@d.getVar('GG_LIC_FILENAME').replace(' ','_')}" LIC_FILES_CHKSUM += "file://ggc/core/LICENSE/${GG_LIC_FILENAME_NOSPACES};md5=7df5bf535d02b2f83c260250fe330b6c" SRC_URI[arm.md5sum] = "93ae820af2bf2527bafdb34598d174ed" diff --git a/meta-digi-dey/recipes-connectivity/bluez/bluez5.inc b/meta-digi-dey/recipes-connectivity/bluez/bluez5.inc index a2f9e7a0f..470927e43 100644 --- a/meta-digi-dey/recipes-connectivity/bluez/bluez5.inc +++ b/meta-digi-dey/recipes-connectivity/bluez/bluez5.inc @@ -97,13 +97,13 @@ FILES:${PN}-testtools = "${libdir}/bluez/test/*" def get_noinst_tools_paths (d, bb, tools): s = list() - bindir = d.getVar("bindir", True) + bindir = d.getVar("bindir") for bdp in tools.split(): f = os.path.basename(bdp) s.append("%s/%s" % (bindir, f)) return "\n".join(s) -FILES:${PN}-noinst-tools = "${@get_noinst_tools_paths(d, bb, d.getVar('NOINST_TOOLS', True))}" +FILES:${PN}-noinst-tools = "${@get_noinst_tools_paths(d, bb, d.getVar('NOINST_TOOLS'))}" RDEPENDS:${PN}-testtools += "python3-core python3-dbus python3-pygobject" diff --git a/meta-digi-dey/recipes-core/systemd/systemd-serialgetty.bbappend b/meta-digi-dey/recipes-core/systemd/systemd-serialgetty.bbappend index f489f61be..e642836db 100644 --- a/meta-digi-dey/recipes-core/systemd/systemd-serialgetty.bbappend +++ b/meta-digi-dey/recipes-core/systemd/systemd-serialgetty.bbappend @@ -1,6 +1,6 @@ # Copyright (C) 2016 Digi International. python __anonymous () { - if (d.getVar("TRUSTFENCE_CONSOLE_DISABLE", True) == "1"): + if (d.getVar("TRUSTFENCE_CONSOLE_DISABLE") == "1"): d.setVar("SERIAL_CONSOLES", "") } diff --git a/meta-digi-dey/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bbappend b/meta-digi-dey/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bbappend index f489f61be..e642836db 100644 --- a/meta-digi-dey/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bbappend +++ b/meta-digi-dey/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bbappend @@ -1,6 +1,6 @@ # Copyright (C) 2016 Digi International. python __anonymous () { - if (d.getVar("TRUSTFENCE_CONSOLE_DISABLE", True) == "1"): + if (d.getVar("TRUSTFENCE_CONSOLE_DISABLE") == "1"): d.setVar("SERIAL_CONSOLES", "") } diff --git a/meta-digi-dey/recipes-crank/crank-demos/crank-demos_7.2.bb b/meta-digi-dey/recipes-crank/crank-demos/crank-demos_7.2.bb index add670e35..152f7a253 100644 --- a/meta-digi-dey/recipes-crank/crank-demos/crank-demos_7.2.bb +++ b/meta-digi-dey/recipes-crank/crank-demos/crank-demos_7.2.bb @@ -29,11 +29,11 @@ CRANK_DEMO_PATH ?= "${datadir}/crank/apps/OpenGL_WideScreen/1280x720.gapp" # a PREMIRROR to a local directory that can be configured in the project's # local.conf file using CRANK_DEMOS_TARBALL_PATH variable. python() { - crank_demos_tarball_path = d.getVar('CRANK_DEMOS_TARBALL_PATH', True) + crank_demos_tarball_path = d.getVar('CRANK_DEMOS_TARBALL_PATH') if crank_demos_tarball_path: - premirrors = d.getVar('PREMIRRORS', True) + premirrors = d.getVar('PREMIRRORS') d.setVar('PREMIRRORS', "http:///not/exist/crank-demos-.* %s \\n %s" % (crank_demos_tarball_path, premirrors)) - crank_demos_tarball_sha256 = d.getVar('CRANK_DEMOS_TARBALL_SHA256', True) + crank_demos_tarball_sha256 = d.getVar('CRANK_DEMOS_TARBALL_SHA256') if crank_demos_tarball_sha256: d.setVarFlag("SRC_URI", "sha256sum", crank_demos_tarball_sha256) } diff --git a/meta-digi-dey/recipes-crank/crank-sbengine/crank-sbengine_7.2.bb b/meta-digi-dey/recipes-crank/crank-sbengine/crank-sbengine_7.2.bb index c5ce2271c..deb465344 100644 --- a/meta-digi-dey/recipes-crank/crank-sbengine/crank-sbengine_7.2.bb +++ b/meta-digi-dey/recipes-crank/crank-sbengine/crank-sbengine_7.2.bb @@ -22,11 +22,11 @@ CRANK_ENGINE_TARBALL_PATH ?= "" # a PREMIRROR to a local directory that can be configured in the project's # local.conf file using CRANK_ENGINE_TARBALL_PATH variable. python() { - crank_engine_tarball_path = d.getVar('CRANK_ENGINE_TARBALL_PATH', True) + crank_engine_tarball_path = d.getVar('CRANK_ENGINE_TARBALL_PATH') if crank_engine_tarball_path: - premirrors = d.getVar('PREMIRRORS', True) + premirrors = d.getVar('PREMIRRORS') d.setVar('PREMIRRORS', "http:///not/exist/crank-sbengine-.* %s \\n %s" % (crank_engine_tarball_path, premirrors)) - crank_engine_tarball_sha256 = d.getVar('CRANK_ENGINE_TARBALL_SHA256', True) + crank_engine_tarball_sha256 = d.getVar('CRANK_ENGINE_TARBALL_SHA256') if crank_engine_tarball_sha256: d.setVarFlag("SRC_URI", "sha256sum", crank_engine_tarball_sha256) } diff --git a/meta-digi-dey/recipes-digi/swu-images/swu.inc b/meta-digi-dey/recipes-digi/swu-images/swu.inc index c9aa55d89..f3e35c8ef 100644 --- a/meta-digi-dey/recipes-digi/swu-images/swu.inc +++ b/meta-digi-dey/recipes-digi/swu-images/swu.inc @@ -20,11 +20,11 @@ IMG_NAME = "${IMAGE_DEPENDS}" SWUPDATE_IMAGES = " \ ${IMG_NAME} \ - ${@oe.utils.ifelse(d.getVar('SWUPDATE_UBOOTIMG', True) == 'true', '${UBOOT_PREFIX}', '')} \ + ${@oe.utils.ifelse(d.getVar('SWUPDATE_UBOOTIMG') == 'true', '${UBOOT_PREFIX}', '')} \ " SOFTWARE_VERSION ?= "0.0.1" -DESCRIPTION = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS', True) == '1', 'Encrypted rootfs ${IMG_NAME} update', '${IMG_NAME} update')}" +DESCRIPTION = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS') == '1', 'Encrypted rootfs ${IMG_NAME} update', '${IMG_NAME} update')}" UBOOT_EXT ?= ".${UBOOT_SUFFIX}" @@ -33,22 +33,22 @@ UBOOTIMG_OFFSET ?= "${BOOTLOADER_SEEK_BOOT}" SWUPDATE_STORAGE_MEDIA = "${@oe.utils.conditional('STORAGE_MEDIA', 'mmc', 'swupdate_uboot_mmc.sh', 'swupdate_uboot_nand.sh', d)}" python () { - img_fstypes = d.getVar('BOOTFS_EXT', True) + " " + d.getVar('ROOTFS_EXT', True) - d.setVarFlag("SWUPDATE_IMAGES_FSTYPES", d.getVar('IMG_NAME', True), img_fstypes) - if (d.getVar('SWUPDATE_UBOOTIMG', True) == "true"): - uboot_fstypes = d.getVar('UBOOT_EXT', True) - d.setVarFlag("SWUPDATE_IMAGES_FSTYPES", d.getVar('UBOOT_PREFIX', True), uboot_fstypes) + img_fstypes = d.getVar('BOOTFS_EXT') + " " + d.getVar('ROOTFS_EXT') + d.setVarFlag("SWUPDATE_IMAGES_FSTYPES", d.getVar('IMG_NAME'), img_fstypes) + if (d.getVar('SWUPDATE_UBOOTIMG') == "true"): + uboot_fstypes = d.getVar('UBOOT_EXT') + d.setVarFlag("SWUPDATE_IMAGES_FSTYPES", d.getVar('UBOOT_PREFIX'), uboot_fstypes) } python do_swuimage:prepend() { import glob - if (d.getVar('TRUSTFENCE_SIGN', True) == "1"): - d.setVar('SWUPDATE_PRIVATE_KEY', glob.glob(d.getVar('SWUPDATE_PRIVATE_KEY_TEMPLATE', True))[0]) + if (d.getVar('TRUSTFENCE_SIGN') == "1"): + d.setVar('SWUPDATE_PRIVATE_KEY', glob.glob(d.getVar('SWUPDATE_PRIVATE_KEY_TEMPLATE'))[0]) } def get_baseimg_pn(d): - file_name = d.getVar('PN', True) + file_name = d.getVar('PN') return file_name[:file_name.find("-swu")]