[PATCH] imx8m: Guard binman nodes with CONFIG_OPTEE

Tim Harvey tharvey at gateworks.com
Fri Jan 17 00:16:11 CET 2025


On Thu, Jan 16, 2025 at 3:10 PM Fabio Estevam <festevam at gmail.com> wrote:
>
> From: Fabio Estevam <festevam at denx.de>
>
> Guard binman nodes with CONFIG_OPTEE to fix the following error
> when building without optee support:
>
>   BINMAN  .binman_stamp
> Image 'image' has faked external blobs and is non-functional: tee.bin
>
> Image 'image' is missing optional external blobs but is still functional: tee-os
>
> /binman/section/fit/images/tee/tee-os (tee.bin):
>    See the documentation for your board. You may need to build Open Portable
>    Trusted Execution Environment (OP-TEE) and build with TEE=/path/to/tee.bin
>
> Some images are invalid
> make: *** [Makefile:1135: .binman_stamp] Error 103
>
> Reported-by: Tim Harvey <tharvey at gateworks.com>
> Signed-off-by: Fabio Estevam <festevam at denx.de>
> ---
>  arch/arm/dts/imx8mm-u-boot.dtsi | 2 ++
>  arch/arm/dts/imx8mn-u-boot.dtsi | 2 ++
>  arch/arm/dts/imx8mp-u-boot.dtsi | 2 ++
>  arch/arm/dts/imx8mq-u-boot.dtsi | 2 ++
>  4 files changed, 8 insertions(+)
>
> diff --git a/arch/arm/dts/imx8mm-u-boot.dtsi b/arch/arm/dts/imx8mm-u-boot.dtsi
> index ecc2319279ea..f1cc3fd2532b 100644
> --- a/arch/arm/dts/imx8mm-u-boot.dtsi
> +++ b/arch/arm/dts/imx8mm-u-boot.dtsi
> @@ -164,6 +164,7 @@
>                                         };
>  #endif
>
> +#ifdef CONFIG_OPTEE
>                                         tee: tee {
>                                                 description = "OP-TEE";
>                                                 type = "tee";
> @@ -178,6 +179,7 @@
>                                                         optional;
>                                                 };
>                                         };
> +#endif
>
>                                         binman_fip: fip {
>                                                 arch = "arm64";
> diff --git a/arch/arm/dts/imx8mn-u-boot.dtsi b/arch/arm/dts/imx8mn-u-boot.dtsi
> index 4a4498b36b01..08a81ddc9cb2 100644
> --- a/arch/arm/dts/imx8mn-u-boot.dtsi
> +++ b/arch/arm/dts/imx8mn-u-boot.dtsi
> @@ -240,6 +240,7 @@
>                                         };
>  #endif
>
> +#ifdef CONFIG_OPTEE
>                                         tee: tee {
>                                                 description = "OP-TEE";
>                                                 type = "tee";
> @@ -254,6 +255,7 @@
>                                                         optional;
>                                                 };
>                                         };
> +#endif
>
>                                         binman_fip: fip {
>                                                 arch = "arm64";
> diff --git a/arch/arm/dts/imx8mp-u-boot.dtsi b/arch/arm/dts/imx8mp-u-boot.dtsi
> index 9ede98a11e42..55be8e4f7cb0 100644
> --- a/arch/arm/dts/imx8mp-u-boot.dtsi
> +++ b/arch/arm/dts/imx8mp-u-boot.dtsi
> @@ -185,6 +185,7 @@
>                                         };
>  #endif
>
> +#ifdef CONFIG_OPTEE
>                                         tee: tee {
>                                                 description = "OP-TEE";
>                                                 type = "tee";
> @@ -199,6 +200,7 @@
>                                                         optional;
>                                                 };
>                                         };
> +#endif
>
>                                         @fdt-SEQ {
>                                                 description = "NAME";
> diff --git a/arch/arm/dts/imx8mq-u-boot.dtsi b/arch/arm/dts/imx8mq-u-boot.dtsi
> index 93e2ef27f7ce..cdeacbac108b 100644
> --- a/arch/arm/dts/imx8mq-u-boot.dtsi
> +++ b/arch/arm/dts/imx8mq-u-boot.dtsi
> @@ -144,6 +144,7 @@
>                                         };
>  #endif
>
> +#ifdef CONFIG_OPTEE
>                                         tee: tee {
>                                                 description = "OP-TEE";
>                                                 type = "tee";
> @@ -158,6 +159,7 @@
>                                                         optional;
>                                                 };
>                                         };
> +#endif
>
>                                         fdt {
>                                                 compression = "none";
> --
> 2.34.1
>

Hi Fabio,

Thanks, much better than the ugly message and make status code failure
if you don't have tee.bin.

I notice that loadables = "atf", "tee" now:
#ifndef CONFIG_ARMV8_PSCI
                                                loadables = "atf", "tee";
#endif

Does that need to be also protected against CONFIG_OPTEE?
#ifndef CONFIG_ARMV8_PSCI
#ifdef CONFIG_OPTEE
                                                loadables = "atf", "tee";
#else
#endif
                                                loadables = "atf";
#endif

Best Regards,

Tim


More information about the U-Boot mailing list