From 76a4f781e359b7e9fc362cab2780ebcab6654749 Mon Sep 17 00:00:00 2001 From: Arturo Buzarra Date: Thu, 13 Mar 2025 13:58:59 +0100 Subject: [PATCH] stm-st-stm32mp: fip-stm32mp: add OP-TEE USB FIP configuration The FIP flavor for OP-TEE + USB is managed in the meta-st-stm32mp layer through the "optee-programmer-usb". However, since we do not require the additional overhead introduced by the STM32CubeProgrammer tool, this commit introduces a new FIP configuration based on OP-TEE for booting from USB. https://onedigi.atlassian.net/browse/DEL-9442 Signed-off-by: Arturo Buzarra --- meta-digi-arm/conf/machine/ccmp25-dvk.conf | 1 + meta-digi-arm/conf/machine/include/ccmp2.inc | 2 +- .../recipes-bsp/fip-stm32mp/fip-stm32mp.bbappend | 7 ++++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/meta-digi-arm/conf/machine/ccmp25-dvk.conf b/meta-digi-arm/conf/machine/ccmp25-dvk.conf index b083a1dce..e52935aed 100644 --- a/meta-digi-arm/conf/machine/ccmp25-dvk.conf +++ b/meta-digi-arm/conf/machine/ccmp25-dvk.conf @@ -40,6 +40,7 @@ UBOOT_DEVICETREE = "${STM32MP_DEVICETREE}" # Define list of devicetree per supported storage STM32MP_DT_FILES_EMMC = "ccmp25-dvk" STM32MP_DT_FILES_SDCARD = "${STM32MP_DT_FILES_EMMC}" +STM32MP_DT_FILES_USB = "${STM32MP_DT_FILES_EMMC}" # Extra DTB for board - need to specify it with .dtb ... STM32MP_KERNEL_DEVICETREE:ccmp25-dvk += " \ diff --git a/meta-digi-arm/conf/machine/include/ccmp2.inc b/meta-digi-arm/conf/machine/include/ccmp2.inc index aa327ba95..70f4167f4 100644 --- a/meta-digi-arm/conf/machine/include/ccmp2.inc +++ b/meta-digi-arm/conf/machine/include/ccmp2.inc @@ -63,7 +63,7 @@ ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS' STM32MP_DEVICETREE_PROGRAMMER_ENABLE ?= "0" # List of supported boot devices -BOOTDEVICE_LABELS ?= "emmc" +BOOTDEVICE_LABELS ?= "emmc usb" # Supported boot schemes BOOTSCHEME_LABELS ?= "optee" diff --git a/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-bsp/fip-stm32mp/fip-stm32mp.bbappend b/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-bsp/fip-stm32mp/fip-stm32mp.bbappend index db8e28501..8601ff512 100644 --- a/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-bsp/fip-stm32mp/fip-stm32mp.bbappend +++ b/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-bsp/fip-stm32mp/fip-stm32mp.bbappend @@ -1,7 +1,12 @@ # -# Copyright (C) 2024, Digi International Inc. +# Copyright (C) 2024,2025, Digi International Inc. # +# Add optee-usb FIP configuration +STM32MP_DEVICETREE_USB = " ${@' '.join('%s' % dt_file for dt_file in list(dict.fromkeys((d.getVar('STM32MP_DT_FILES_USB') or '').split())))} " +FIP_CONFIG[optee-usb] ?= "optee,${STM32MP_DEVICETREE_USB},default:optee,usb" +FIP_CONFIG += "${@bb.utils.contains('BOOTSCHEME_LABELS', 'optee', bb.utils.contains('BOOTDEVICE_LABELS', 'usb', 'optee-usb', '', d), '', d)}" + # Addons parameters for FIP_WRAPPER FIP_SOC_SEARCH ?= "" FIP_SOC_SEARCH:ccmp2 ?= " stm32mp25 "