From 320bb61c3059f2590e3c7d16f86b6423e3ed7505 Mon Sep 17 00:00:00 2001 From: Tom Hochstein Date: Tue, 10 Jun 2025 14:14:37 -0700 Subject: [PATCH 1/3] imx93-evk.inc: Rework - Consolidate UBOOT_CONFIG and IMXBOOT_TARGETS setting in .inc - Drop UBOOT_CONFIG 'ld' which is not supported - Facilitate easy override of IMXBOOT_TARGETS types Signed-off-by: Tom Hochstein --- conf/machine/imx93-14x14-lpddr4x-evk.conf | 5 ----- conf/machine/include/imx93-evk.inc | 11 +++++++++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/conf/machine/imx93-14x14-lpddr4x-evk.conf b/conf/machine/imx93-14x14-lpddr4x-evk.conf index 57387a70..dff843a7 100644 --- a/conf/machine/imx93-14x14-lpddr4x-evk.conf +++ b/conf/machine/imx93-14x14-lpddr4x-evk.conf @@ -21,7 +21,6 @@ KERNEL_DEVICETREE:append:use-nxp-bsp = " \ " UBOOT_CONFIG_BASENAME = "imx93_14x14_evk" -IMXBOOT_TARGETS_BASENAME = "flash_singleboot" DDR_FIRMWARE_NAME = " \ lpddr4_dmem_1d_v202201.bin \ @@ -30,10 +29,6 @@ DDR_FIRMWARE_NAME = " \ lpddr4_imem_2d_v202201.bin \ " -UBOOT_CONFIG[fspi] = "${UBOOT_CONFIG_BASENAME}_defconfig" - -IMXBOOT_TARGETS = "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', '${IMXBOOT_TARGETS_BASENAME}_flexspi', '${IMXBOOT_TARGETS_BASENAME}', d)}" - WKS_FILE_DEPENDS:append:imx-nxp-bsp = " imx-m33-demos" IMAGE_BOOT_FILES:append:imx-nxp-bsp = " \ mcore-demos/imx93-14x14-evk_m33_TCM_power_mode_switch.bin \ diff --git a/conf/machine/include/imx93-evk.inc b/conf/machine/include/imx93-evk.inc index 8f5bb97f..d0851695 100644 --- a/conf/machine/include/imx93-evk.inc +++ b/conf/machine/include/imx93-evk.inc @@ -25,12 +25,19 @@ SPL_BINARY = "spl/u-boot-spl.bin" UBOOT_CONFIG ??= "sd" UBOOT_CONFIG[sd] = "${UBOOT_CONFIG_BASENAME}_defconfig,sdcard" UBOOT_CONFIG[ecc] = "${UBOOT_CONFIG_BASENAME}_inline_ecc_defconfig" -UBOOT_CONFIG[ld] = "${UBOOT_CONFIG_BASENAME}_ld_defconfig" +UBOOT_CONFIG[fspi] = "${UBOOT_CONFIG_BASENAME}_defconfig" # Set ATF platform name ATF_PLATFORM = "imx93" -IMXBOOT_TARGETS = "flash_singleboot" +IMXBOOT_TARGETS = \ + "${@bb.utils.contains('UBOOT_CONFIG', 'sd', '${IMXBOOT_TARGETS_SD}', \ + bb.utils.contains('UBOOT_CONFIG', 'ecc', '${IMXBOOT_TARGETS_ECC}', \ + bb.utils.contains('UBOOT_CONFIG', 'fspi', '${IMXBOOT_TARGETS_FSPI}', \ + 'INVALID', d), d), d)}" +IMXBOOT_TARGETS_SD = "flash_singleboot" +IMXBOOT_TARGETS_ECC = "flash_singleboot" +IMXBOOT_TARGETS_FSPI = "flash_singleboot_flexspi" IMX_BOOT_SOC_TARGET = "iMX9" IMX_BOOT_SEEK = "32" From fee9d5ef198290b054b98fc961b5686f7bb7dc2d Mon Sep 17 00:00:00 2001 From: Tom Hochstein Date: Tue, 10 Jun 2025 14:20:05 -0700 Subject: [PATCH 2/3] imx93-evk.inc: Add IMXBOOT_TARGETS for Glitch Detection (GDET) Signed-off-by: Tom Hochstein --- conf/machine/include/imx93-evk.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/conf/machine/include/imx93-evk.inc b/conf/machine/include/imx93-evk.inc index d0851695..e5a3f0e2 100644 --- a/conf/machine/include/imx93-evk.inc +++ b/conf/machine/include/imx93-evk.inc @@ -35,7 +35,12 @@ IMXBOOT_TARGETS = \ bb.utils.contains('UBOOT_CONFIG', 'ecc', '${IMXBOOT_TARGETS_ECC}', \ bb.utils.contains('UBOOT_CONFIG', 'fspi', '${IMXBOOT_TARGETS_FSPI}', \ 'INVALID', d), d), d)}" -IMXBOOT_TARGETS_SD = "flash_singleboot" +# Note different SD targets for different Glitch Detection (GDET) modes: +# | Target | Glitch Detection | +# | flash_singleboot | None | +# | flash_singleboot_gdet | Enabled | +# | flash_singleboot_gdet_auto | Enabled during EdgeLock Secure Enclave API calls | +IMXBOOT_TARGETS_SD = "flash_singleboot flash_singleboot_gdet flash_singleboot_gdet_auto" IMXBOOT_TARGETS_ECC = "flash_singleboot" IMXBOOT_TARGETS_FSPI = "flash_singleboot_flexspi" From 27fd0694c5f3e80eb50413fde909765e360e587c Mon Sep 17 00:00:00 2001 From: Tom Hochstein Date: Tue, 10 Jun 2025 15:10:22 -0700 Subject: [PATCH 3/3] imx-atf: Fix header guard error ``` | In file included from drivers/nxp/trdc/imx_trdc.c:13: | include/drivers/nxp/trdc/imx_trdc.h:7: error: header guard 'IMX_TRDC_H' followed by '#define' of a different macro [-Werror=header-guard] | 7 | #ifndef IMX_TRDC_H | include/drivers/nxp/trdc/imx_trdc.h:8: note: 'IMX_XRDC_H' is defined here; did you mean 'IMX_TRDC_H'? | 8 | #define IMX_XRDC_H ``` Fixes: #2301 Signed-off-by: Tom Hochstein --- .../0001-imx93-trdc-Fix-header-guard.patch | 35 +++++++++++++++++++ recipes-bsp/imx-atf/imx-atf_2.10.bb | 3 +- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 recipes-bsp/imx-atf/imx-atf/0001-imx93-trdc-Fix-header-guard.patch diff --git a/recipes-bsp/imx-atf/imx-atf/0001-imx93-trdc-Fix-header-guard.patch b/recipes-bsp/imx-atf/imx-atf/0001-imx93-trdc-Fix-header-guard.patch new file mode 100644 index 00000000..f475cf33 --- /dev/null +++ b/recipes-bsp/imx-atf/imx-atf/0001-imx93-trdc-Fix-header-guard.patch @@ -0,0 +1,35 @@ +From e82cafa7823cb2cad6ce933862b9ffdb880dba49 Mon Sep 17 00:00:00 2001 +From: Tom Hochstein +Date: Tue, 10 Jun 2025 15:04:32 -0700 +Subject: [PATCH] imx93: trdc: Fix header guard + +``` +| In file included from drivers/nxp/trdc/imx_trdc.c:13: +| include/drivers/nxp/trdc/imx_trdc.h:7: error: header guard 'IMX_TRDC_H' followed by '#define' of a different macro [-Werror=header-guard] +| 7 | #ifndef IMX_TRDC_H +| include/drivers/nxp/trdc/imx_trdc.h:8: note: 'IMX_XRDC_H' is defined here; did you mean 'IMX_TRDC_H'? +| 8 | #define IMX_XRDC_H +``` + +Upstream-Status: Submitted [https://github.com/nxp-imx/imx-atf/pull/2] +Signed-off-by: Tom Hochstein +--- + include/drivers/nxp/trdc/imx_trdc.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/drivers/nxp/trdc/imx_trdc.h b/include/drivers/nxp/trdc/imx_trdc.h +index 7a6200c8d..8c759c65d 100644 +--- a/include/drivers/nxp/trdc/imx_trdc.h ++++ b/include/drivers/nxp/trdc/imx_trdc.h +@@ -5,7 +5,7 @@ + */ + + #ifndef IMX_TRDC_H +-#define IMX_XRDC_H ++#define IMX_TRDC_H + + #define MBC_BLK_ALL U(255) + #define MRC_REG_ALL U(16) +-- +2.34.1 + diff --git a/recipes-bsp/imx-atf/imx-atf_2.10.bb b/recipes-bsp/imx-atf/imx-atf_2.10.bb index 8eacc1cf..13478bbe 100644 --- a/recipes-bsp/imx-atf/imx-atf_2.10.bb +++ b/recipes-bsp/imx-atf/imx-atf_2.10.bb @@ -7,7 +7,8 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/BSD-3-Clause;m PV .= "+git${SRCPV}" -SRC_URI = "git://github.com/nxp-imx/imx-atf.git;protocol=https;branch=${SRCBRANCH}" +SRC_URI = "git://github.com/nxp-imx/imx-atf.git;protocol=https;branch=${SRCBRANCH} \ + file://0001-imx93-trdc-Fix-header-guard.patch" SRCBRANCH = "lf_v2.10" SRCREV = "78a14c75a06dea39036c44ae0f9d23acc7bcaef2"