swupdate: enable SWU authentication when Trustfence is enabled

This commit enables SWU image authentication when TrustFence
is enabled instead of when signing of images is enabled.
This allows the system to authenticate SWU images on images that
have been externally signed.

https://onedigi.atlassian.net/browse/DEL-8891

Signed-off-by: Mike Engel <Mike.Engel@digi.com>
This commit is contained in:
Mike Engel 2024-07-29 13:02:42 +02:00
parent 6f15713cc4
commit 16525cca53
3 changed files with 3 additions and 3 deletions

View File

@ -93,7 +93,7 @@ SWUPDATE_UBOOT_SCRIPT_NAME = "${@os.path.basename(d.getVar('SWUPDATE_UBOOT_SCRIP
# Retrieve the correct U-Boot prefix. # Retrieve the correct U-Boot prefix.
def get_uboot_prefix(d): def get_uboot_prefix(d):
prefix = d.getVar('UBOOT_PREFIX') prefix = d.getVar('UBOOT_PREFIX')
if d.getVar('DEY_SOC_VENDOR') == "NXP" and d.getVar('TRUSTFENCE_SIGN') == "1": if d.getVar('DEY_SOC_VENDOR') == "NXP" and d.getVar('TRUSTFENCE_ENABLED') == "1":
if "ccimx6" in d.getVar('MACHINE'): if "ccimx6" in d.getVar('MACHINE'):
prefix = f"{prefix}-dtb" prefix = f"{prefix}-dtb"
if d.getVar('TRUSTFENCE_DEK_PATH') and d.getVar('TRUSTFENCE_DEK_PATH') != "0": if d.getVar('TRUSTFENCE_DEK_PATH') and d.getVar('TRUSTFENCE_DEK_PATH') != "0":

View File

@ -57,7 +57,7 @@ python do_swuimage:prepend() {
import shutil import shutil
# Set signing key for trustfence enabled updates. # Set signing key for trustfence enabled updates.
if (d.getVar('TRUSTFENCE_SIGN') == "1"): if (d.getVar('TRUSTFENCE_ENABLED') == "1"):
d.setVar('SWUPDATE_PRIVATE_KEY', glob.glob(d.getVar('SWUPDATE_PRIVATE_KEY_TEMPLATE'))[0]) d.setVar('SWUPDATE_PRIVATE_KEY', glob.glob(d.getVar('SWUPDATE_PRIVATE_KEY_TEMPLATE'))[0])
# Copy script file. # Copy script file.

View File

@ -11,7 +11,7 @@ SRC_URI += " \
file://0003-handlers-rdiff-handler-for-applying-librsync-s-rdiff.patch \ file://0003-handlers-rdiff-handler-for-applying-librsync-s-rdiff.patch \
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'file://systemd.cfg', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'file://systemd.cfg', '', d)} \
${@bb.utils.contains('STORAGE_MEDIA', 'mtd', 'file://mtd.cfg', '', d)} \ ${@bb.utils.contains('STORAGE_MEDIA', 'mtd', 'file://mtd.cfg', '', d)} \
${@oe.utils.conditional('TRUSTFENCE_SIGN', '1', 'file://signed_images.cfg', '', d)} \ ${@oe.utils.conditional('TRUSTFENCE_ENABLED', '1', 'file://signed_images.cfg', '', d)} \
file://swupdate.config \ file://swupdate.config \
" "