imx8m: Guard binman nodes with CONFIG_OPTEE
authorFabio Estevam <festevam@denx.de>
Fri, 17 Jan 2025 01:56:42 +0000 (22:56 -0300)
committerFabio Estevam <festevam@gmail.com>
Mon, 20 Jan 2025 11:41:01 +0000 (08:41 -0300)
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

While at it, only pass tee to the loadables lines when CONFIG_OPTEE is
defined.

Reported-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Tested-by: Yannic Moog <y.moog@phytec.de>
arch/arm/dts/imx8mm-u-boot.dtsi
arch/arm/dts/imx8mn-u-boot.dtsi
arch/arm/dts/imx8mp-u-boot.dtsi
arch/arm/dts/imx8mq-u-boot.dtsi

index ecc2319..8608fa0 100644 (file)
                                        };
 #endif
 
+#ifdef CONFIG_OPTEE
                                        tee: tee {
                                                description = "OP-TEE";
                                                type = "tee";
                                                        optional;
                                                };
                                        };
+#endif
 
                                        binman_fip: fip {
                                                arch = "arm64";
                                                fdt = "fdt-SEQ";
                                                firmware = "uboot";
 #ifndef CONFIG_ARMV8_PSCI
+#ifdef CONFIG_OPTEE
                                                loadables = "atf", "tee";
+#else
+                                               loadables = "atf";
+#endif
 #endif
                                        };
                                };
index 4a4498b..bf2bb0f 100644 (file)
                                        };
 #endif
 
+#ifdef CONFIG_OPTEE
                                        tee: tee {
                                                description = "OP-TEE";
                                                type = "tee";
                                                        optional;
                                                };
                                        };
+#endif
 
                                        binman_fip: fip {
                                                arch = "arm64";
                                                fdt = "fdt-SEQ";
                                                firmware = "uboot";
 #ifndef CONFIG_ARMV8_PSCI
+#ifdef CONFIG_OPTEE
                                                loadables = "atf", "tee";
+#else
+                                               loadables = "atf";
+#endif
 #endif
                                        };
                                };
index 9ede98a..9e590c3 100644 (file)
                                        };
 #endif
 
+#ifdef CONFIG_OPTEE
                                        tee: tee {
                                                description = "OP-TEE";
                                                type = "tee";
                                                        optional;
                                                };
                                        };
+#endif
 
                                        @fdt-SEQ {
                                                description = "NAME";
                                                fdt = "fdt-SEQ";
                                                firmware = "uboot";
 #ifndef CONFIG_ARMV8_PSCI
+#ifdef CONFIG_OPTEE
                                                loadables = "atf", "tee";
+#else
+                                               loadables = "atf";
+#endif
 #endif
                                        };
                                };
index 93e2ef2..458657f 100644 (file)
                                        };
 #endif
 
+#ifdef CONFIG_OPTEE
                                        tee: tee {
                                                description = "OP-TEE";
                                                type = "tee";
                                                        optional;
                                                };
                                        };
+#endif
 
                                        fdt {
                                                compression = "none";
                                                fdt = "fdt";
                                                firmware = "uboot";
 #ifndef CONFIG_ARMV8_PSCI
+#ifdef CONFIG_OPTEE
                                                loadables = "atf", "tee";
+#else
+                                               loadables = "atf";
+#endif
 #endif
                                        };
                                };