Skip to contentSkip to conversation

imx8m: Guard binman nodes with CONFIG_OPTEE

PATCH Superseded Fabio Estevam 3 participants 3 messages Jan 16, 2025

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 imx8m: Guard binman nodes with CONFIG_OPTEE

From: Fabio Estevam <[email protected]>

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

---
 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(+)
arch/arm/dts/imx8mm-u-boot.dtsi +2 -0
index ecc2319279ea..f1cc3fd2532b 100644
@@ -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";
arch/arm/dts/imx8mn-u-boot.dtsi +2 -0
index 4a4498b36b01..08a81ddc9cb2 100644
@@ -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";
arch/arm/dts/imx8mp-u-boot.dtsi +2 -0
index 9ede98a11e42..55be8e4f7cb0 100644
@@ -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";
arch/arm/dts/imx8mq-u-boot.dtsi +2 -0
index 93e2ef27f7ce..cdeacbac108b 100644
@@ -144,6 +144,7 @@
 					};
 #endif
 
+#ifdef CONFIG_OPTEE
 					tee: tee {
 						description = "OP-TEE";
 						type = "tee";
@@ -158,6 +159,7 @@
 							optional;
 						};
 					};
+#endif
 
 					fdt {
 						compression = "none";
Signature · 1 line
2.34.1
#1 lore raw
Quoted 108 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

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

---
 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(+)
arch/arm/dts/imx8mm-u-boot.dtsi +2 -0
index ecc2319279ea..f1cc3fd2532b 100644
@@ -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";
arch/arm/dts/imx8mn-u-boot.dtsi +2 -0
index 4a4498b36b01..08a81ddc9cb2 100644
@@ -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";
arch/arm/dts/imx8mp-u-boot.dtsi +2 -0
index 9ede98a11e42..55be8e4f7cb0 100644
@@ -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";
arch/arm/dts/imx8mq-u-boot.dtsi +2 -1
index 93e2ef27f7ce..cdeacbac108b 100644
@@ -144,6 +144,7 @@
                                        };
 #endif
 
+#ifdef CONFIG_OPTEE
                                        tee: tee {
                                                description = "OP-TEE";
                                                type = "tee";
@@ -158,6 +159,7 @@
                                                        optional;
                                                };
                                        };
+#endif
 
                                        fdt {
                                                compression = "none";
--
Quoted 2 lines

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

Reviewed-by on v1 1/1
#2 lore raw
In reply to Fabio Estevam
Quoted 14 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

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

Quoted 5 lines

Some images are invalid
make: *** [Makefile:1135: .binman_stamp] Error 103

Given that the earlier part of the dtsi already guards with OPTEE (except for the 'q' variant which doesn't have that entry to start with) this seems correct to me.

Signature · 1 line
Tom