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 <javier.viguera@digi.com>
This commit is contained in:
Javier Viguera 2023-02-24 16:24:47 +01:00
parent ad788b1d32
commit adbb511484
19 changed files with 63 additions and 63 deletions

View File

@ -6,7 +6,7 @@ inherit image_types
BOOTLOADER_IMAGE_RECIPE ?= "u-boot" BOOTLOADER_IMAGE_RECIPE ?= "u-boot"
def TRUSTFENCE_BOOTIMAGE_DEPENDS(d): 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 "" return "%s:do_image_complete" % tf_initramfs if tf_initramfs else ""
do_image_boot_vfat[depends] += " \ do_image_boot_vfat[depends] += " \

View File

@ -195,5 +195,5 @@ ROOTFS_EXT ?= ".ubifs"
BOOT_DEV_NAME ?= "linux" BOOT_DEV_NAME ?= "linux"
ROOTFS_DEV_NAME ?= "rootfs" ROOTFS_DEV_NAME ?= "rootfs"
ROOTFS_ENC_DEV = "${ROOTFS_DEV_NAME}" 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}')}"

View File

@ -52,5 +52,5 @@ ROOTFS_EXT ?= ".ext4.gz"
BOOT_DEV_NAME ?= "/dev/mmcblk0p1" BOOT_DEV_NAME ?= "/dev/mmcblk0p1"
ROOTFS_DEV_NAME ?= "/dev/mmcblk0p3" ROOTFS_DEV_NAME ?= "/dev/mmcblk0p3"
ROOTFS_ENC_DEV = "/dev/mapper/cryptrootfs" 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}')}"

View File

@ -58,7 +58,7 @@ ROOTFS_EXT ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", ".squa
BOOT_DEV_NAME ?= "linux" BOOT_DEV_NAME ?= "linux"
ROOTFS_DEV_NAME ?= "rootfs" ROOTFS_DEV_NAME ?= "rootfs"
ROOTFS_ENC_DEV = "${ROOTFS_DEV_NAME}" 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) # U-Boot environment offset (within partition)
UBOOT_ENV_OFFSET ?= "0x0" UBOOT_ENV_OFFSET ?= "0x0"

View File

@ -67,5 +67,5 @@ ROOTFS_EXT ?= ".ext4.gz"
BOOT_DEV_NAME ?= "/dev/mmcblk0p1" BOOT_DEV_NAME ?= "/dev/mmcblk0p1"
ROOTFS_DEV_NAME ?= "/dev/mmcblk0p3" ROOTFS_DEV_NAME ?= "/dev/mmcblk0p3"
ROOTFS_ENC_DEV = "/dev/mapper/cryptrootfs" 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}')}"

View File

@ -84,5 +84,5 @@ ROOTFS_EXT ?= ".ext4.gz"
BOOT_DEV_NAME ?= "/dev/mmcblk0p1" BOOT_DEV_NAME ?= "/dev/mmcblk0p1"
ROOTFS_DEV_NAME ?= "/dev/mmcblk0p3" ROOTFS_DEV_NAME ?= "/dev/mmcblk0p3"
ROOTFS_ENC_DEV = "/dev/mapper/cryptrootfs" 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}')}"

View File

@ -26,7 +26,7 @@ ROOTFS_EXT ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", ".squa
BOOT_DEV_NAME ?= "linux" BOOT_DEV_NAME ?= "linux"
ROOTFS_DEV_NAME ?= "rootfs" ROOTFS_DEV_NAME ?= "rootfs"
ROOTFS_ENC_DEV = "${ROOTFS_DEV_NAME}" 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) # U-Boot environment offset (within partition)
UBOOT_ENV_OFFSET ?= "0x0" UBOOT_ENV_OFFSET ?= "0x0"

View File

@ -27,7 +27,7 @@ python() {
# variable. # variable.
wolfssl_fips_local_path = d.getVar('WOLFSSL_FIPS_PKG_PATH') wolfssl_fips_local_path = d.getVar('WOLFSSL_FIPS_PKG_PATH')
if wolfssl_fips_local_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)) 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 # Yocto does not support unpacking password protected packages, so configure the

View File

@ -44,7 +44,7 @@ inherit ${@oe.utils.conditional('DEY_BUILD_PLATFORM', 'NXP', 'fsl-u-boot-localve
UBOOT_INITIAL_ENV = "" UBOOT_INITIAL_ENV = ""
python __anonymous() { 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\")") 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)}" TF_BOOTSCRIPT_SEDFILTER = "${@tf_bootscript_sedfilter(d)}"
def 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 "" 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() { build_uboot_scripts() {

View File

@ -70,7 +70,7 @@ def get_log_level(d):
levels = ['error', 'warn', 'info', 'debug', 'trace'] levels = ['error', 'warn', 'info', 'debug', 'trace']
log_flags = "" log_flags = ""
log_level = d.getVar('AWS_IOT_LOGGING_LEVEL', True) log_level = d.getVar('AWS_IOT_LOGGING_LEVEL')
if log_level == 'none': if log_level == 'none':
return "" return ""
if log_level not in levels: if log_level not in levels:

View File

@ -40,50 +40,50 @@ python () {
import os import os
# Secure console configuration # 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 ") d.appendVar("UBOOT_TF_CONF", "CONFIG_CONSOLE_DISABLE=y ")
if d.getVar("TRUSTFENCE_CONSOLE_PASSPHRASE_ENABLE", True): if d.getVar("TRUSTFENCE_CONSOLE_PASSPHRASE_ENABLE"):
passphrase_hash = hashlib.sha256(d.getVar("TRUSTFENCE_CONSOLE_PASSPHRASE_ENABLE", True).encode()).hexdigest() 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) 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): 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", True)) 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 # Secure boot configuration
if (d.getVar("TRUSTFENCE_SIGN_KEYS_PATH", True) == "default"): if (d.getVar("TRUSTFENCE_SIGN_KEYS_PATH") == "default"):
d.setVar("TRUSTFENCE_SIGN_KEYS_PATH", d.getVar("TOPDIR", True) + "/trustfence"); d.setVar("TRUSTFENCE_SIGN_KEYS_PATH", d.getVar("TOPDIR") + "/trustfence");
if (d.getVar("TRUSTFENCE_DEK_PATH", True) == "default"): if (d.getVar("TRUSTFENCE_DEK_PATH") == "default"):
d.setVar("TRUSTFENCE_DEK_PATH", d.getVar("TRUSTFENCE_SIGN_KEYS_PATH", True) + "/dek.bin"); 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 ") 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 ") d.appendVar("UBOOT_TF_CONF", "CONFIG_AUTHENTICATE_SQUASHFS_ROOTFS=y ")
if d.getVar("TRUSTFENCE_SIGN_KEYS_PATH", True): if d.getVar("TRUSTFENCE_SIGN_KEYS_PATH"):
d.appendVar("UBOOT_TF_CONF", 'CONFIG_SIGN_KEYS_PATH="%s" ' % d.getVar("TRUSTFENCE_SIGN_KEYS_PATH", True)) d.appendVar("UBOOT_TF_CONF", 'CONFIG_SIGN_KEYS_PATH="%s" ' % d.getVar("TRUSTFENCE_SIGN_KEYS_PATH"))
if (d.getVar("TRUSTFENCE_UNLOCK_KEY_REVOCATION", True) == "1"): if (d.getVar("TRUSTFENCE_UNLOCK_KEY_REVOCATION") == "1"):
d.appendVar("UBOOT_TF_CONF", "CONFIG_UNLOCK_SRK_REVOKE=y ") d.appendVar("UBOOT_TF_CONF", "CONFIG_UNLOCK_SRK_REVOKE=y ")
if d.getVar("TRUSTFENCE_KEY_INDEX", True): if d.getVar("TRUSTFENCE_KEY_INDEX"):
d.appendVar("UBOOT_TF_CONF", "CONFIG_KEY_INDEX=%s " % d.getVar("TRUSTFENCE_KEY_INDEX", True)) d.appendVar("UBOOT_TF_CONF", "CONFIG_KEY_INDEX=%s " % d.getVar("TRUSTFENCE_KEY_INDEX"))
if (d.getVar("TRUSTFENCE_DEK_PATH", True) not in [None, "0"]): if (d.getVar("TRUSTFENCE_DEK_PATH") not in [None, "0"]):
d.appendVar("UBOOT_TF_CONF", 'CONFIG_DEK_PATH="%s" ' % d.getVar("TRUSTFENCE_DEK_PATH", True)) d.appendVar("UBOOT_TF_CONF", 'CONFIG_DEK_PATH="%s" ' % d.getVar("TRUSTFENCE_DEK_PATH"))
if d.getVar("TRUSTFENCE_SIGN_MODE", True): if d.getVar("TRUSTFENCE_SIGN_MODE"):
d.appendVar("UBOOT_TF_CONF", 'CONFIG_SIGN_MODE="%s" ' % d.getVar("TRUSTFENCE_SIGN_MODE", True)) d.appendVar("UBOOT_TF_CONF", 'CONFIG_SIGN_MODE="%s" ' % d.getVar("TRUSTFENCE_SIGN_MODE"))
if (d.getVar("TRUSTFENCE_ENCRYPT_ENVIRONMENT", True) == "1"): if (d.getVar("TRUSTFENCE_ENCRYPT_ENVIRONMENT") == "1"):
d.appendVar("UBOOT_TF_CONF", "CONFIG_ENV_AES=y CONFIG_ENV_AES_CAAM_KEY=y ") 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 # 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. # Enable package signing.
d.setVar("SWUPDATE_SIGNING", "RSA") d.setVar("SWUPDATE_SIGNING", "RSA")
# Retrieve the keys path to use. # 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. # Retrieve the key index to use.
key_index = 0 key_index = 0
if (d.getVar("TRUSTFENCE_KEY_INDEX", True)): if (d.getVar("TRUSTFENCE_KEY_INDEX")):
key_index = int(d.getVar("TRUSTFENCE_KEY_INDEX", True)) key_index = int(d.getVar("TRUSTFENCE_KEY_INDEX"))
key_index_1 = key_index + 1 key_index_1 = key_index + 1
# Set the private key template, it will be expanded later in 'swu' recipes once keys are generated. # 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") d.setVar("SWUPDATE_PASSWORD_FILE", keys_path + "/keys/key_pass.txt")
# Enable partition encryption if rootfs encryption is enabled # 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"); d.setVar("TRUSTFENCE_ENCRYPT_PARTITIONS", "1");
# Enable the trustfence initramfs if and only if partition encryption is enabled # Enable the trustfence initramfs if and only if partition encryption is enabled
# and not using a read-only rootfs # and not using a read-only rootfs
if (d.getVar("TRUSTFENCE_ENCRYPT_PARTITIONS", True) == "1" and \ if (d.getVar("TRUSTFENCE_ENCRYPT_PARTITIONS") == "1" and \
d.getVar("STORAGE_MEDIA", True) == "mmc" and \ d.getVar("STORAGE_MEDIA") == "mmc" and \
d.getVar("TRUSTFENCE_READ_ONLY_ROOTFS", True) == "0"): d.getVar("TRUSTFENCE_READ_ONLY_ROOTFS") == "0"):
d.setVar("TRUSTFENCE_INITRAMFS_IMAGE", "dey-image-trustfence-initramfs"); d.setVar("TRUSTFENCE_INITRAMFS_IMAGE", "dey-image-trustfence-initramfs");
else: else:
d.setVar("TRUSTFENCE_INITRAMFS_IMAGE", ""); d.setVar("TRUSTFENCE_INITRAMFS_IMAGE", "");

View File

@ -25,9 +25,9 @@ GG_TARBALL_LOCAL_PATH ?= ""
# a PREMIRROR to a local directory that can be configured in the project's # a PREMIRROR to a local directory that can be configured in the project's
# local.conf file using GG_TARBALL_LOCAL_PATH variable. # local.conf file using GG_TARBALL_LOCAL_PATH variable.
python() { 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: 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)) d.setVar('PREMIRRORS', "http:///not/exist/greengrass.* file://%s \\n %s" % (gg_tarball_local_path, premirrors))
} }

View File

@ -72,7 +72,7 @@ LIC_FILES_CHKSUM = " \
# Bitbake does not support spaces in filenames, but GG License does have spaces, # Bitbake does not support spaces in filenames, but GG License does have spaces,
# so workaround the problem by renaming the file before using it. # 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 = "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" LIC_FILES_CHKSUM += "file://ggc/core/LICENSE/${GG_LIC_FILENAME_NOSPACES};md5=7df5bf535d02b2f83c260250fe330b6c"
SRC_URI[arm.md5sum] = "93ae820af2bf2527bafdb34598d174ed" SRC_URI[arm.md5sum] = "93ae820af2bf2527bafdb34598d174ed"

View File

@ -97,13 +97,13 @@ FILES:${PN}-testtools = "${libdir}/bluez/test/*"
def get_noinst_tools_paths (d, bb, tools): def get_noinst_tools_paths (d, bb, tools):
s = list() s = list()
bindir = d.getVar("bindir", True) bindir = d.getVar("bindir")
for bdp in tools.split(): for bdp in tools.split():
f = os.path.basename(bdp) f = os.path.basename(bdp)
s.append("%s/%s" % (bindir, f)) s.append("%s/%s" % (bindir, f))
return "\n".join(s) 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" RDEPENDS:${PN}-testtools += "python3-core python3-dbus python3-pygobject"

View File

@ -1,6 +1,6 @@
# Copyright (C) 2016 Digi International. # Copyright (C) 2016 Digi International.
python __anonymous () { python __anonymous () {
if (d.getVar("TRUSTFENCE_CONSOLE_DISABLE", True) == "1"): if (d.getVar("TRUSTFENCE_CONSOLE_DISABLE") == "1"):
d.setVar("SERIAL_CONSOLES", "") d.setVar("SERIAL_CONSOLES", "")
} }

View File

@ -1,6 +1,6 @@
# Copyright (C) 2016 Digi International. # Copyright (C) 2016 Digi International.
python __anonymous () { python __anonymous () {
if (d.getVar("TRUSTFENCE_CONSOLE_DISABLE", True) == "1"): if (d.getVar("TRUSTFENCE_CONSOLE_DISABLE") == "1"):
d.setVar("SERIAL_CONSOLES", "") d.setVar("SERIAL_CONSOLES", "")
} }

View File

@ -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 # a PREMIRROR to a local directory that can be configured in the project's
# local.conf file using CRANK_DEMOS_TARBALL_PATH variable. # local.conf file using CRANK_DEMOS_TARBALL_PATH variable.
python() { 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: 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)) 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: if crank_demos_tarball_sha256:
d.setVarFlag("SRC_URI", "sha256sum", crank_demos_tarball_sha256) d.setVarFlag("SRC_URI", "sha256sum", crank_demos_tarball_sha256)
} }

View File

@ -22,11 +22,11 @@ CRANK_ENGINE_TARBALL_PATH ?= ""
# a PREMIRROR to a local directory that can be configured in the project's # a PREMIRROR to a local directory that can be configured in the project's
# local.conf file using CRANK_ENGINE_TARBALL_PATH variable. # local.conf file using CRANK_ENGINE_TARBALL_PATH variable.
python() { 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: 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)) 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: if crank_engine_tarball_sha256:
d.setVarFlag("SRC_URI", "sha256sum", crank_engine_tarball_sha256) d.setVarFlag("SRC_URI", "sha256sum", crank_engine_tarball_sha256)
} }

View File

@ -20,11 +20,11 @@ IMG_NAME = "${IMAGE_DEPENDS}"
SWUPDATE_IMAGES = " \ SWUPDATE_IMAGES = " \
${IMG_NAME} \ ${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" 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}" 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)}" SWUPDATE_STORAGE_MEDIA = "${@oe.utils.conditional('STORAGE_MEDIA', 'mmc', 'swupdate_uboot_mmc.sh', 'swupdate_uboot_nand.sh', d)}"
python () { python () {
img_fstypes = d.getVar('BOOTFS_EXT', True) + " " + d.getVar('ROOTFS_EXT', True) img_fstypes = d.getVar('BOOTFS_EXT') + " " + d.getVar('ROOTFS_EXT')
d.setVarFlag("SWUPDATE_IMAGES_FSTYPES", d.getVar('IMG_NAME', True), img_fstypes) d.setVarFlag("SWUPDATE_IMAGES_FSTYPES", d.getVar('IMG_NAME'), img_fstypes)
if (d.getVar('SWUPDATE_UBOOTIMG', True) == "true"): if (d.getVar('SWUPDATE_UBOOTIMG') == "true"):
uboot_fstypes = d.getVar('UBOOT_EXT', True) uboot_fstypes = d.getVar('UBOOT_EXT')
d.setVarFlag("SWUPDATE_IMAGES_FSTYPES", d.getVar('UBOOT_PREFIX', True), uboot_fstypes) d.setVarFlag("SWUPDATE_IMAGES_FSTYPES", d.getVar('UBOOT_PREFIX'), uboot_fstypes)
} }
python do_swuimage:prepend() { python do_swuimage:prepend() {
import glob import glob
if (d.getVar('TRUSTFENCE_SIGN', True) == "1"): if (d.getVar('TRUSTFENCE_SIGN') == "1"):
d.setVar('SWUPDATE_PRIVATE_KEY', glob.glob(d.getVar('SWUPDATE_PRIVATE_KEY_TEMPLATE', True))[0]) d.setVar('SWUPDATE_PRIVATE_KEY', glob.glob(d.getVar('SWUPDATE_PRIVATE_KEY_TEMPLATE'))[0])
} }
def get_baseimg_pn(d): def get_baseimg_pn(d):
file_name = d.getVar('PN', True) file_name = d.getVar('PN')
return file_name[:file_name.find("-swu")] return file_name[:file_name.find("-swu")]