Since
b57ed147939c ("dts: imx8m{m,n,p,q}: Make optee packaging optional")
the TEE node is always present in U-Boot proper fitImage, even if the
CONFIG_OPTEE is disabled because the u-boot.itb should not contain any
tee.bin. This is wasteful, and produces the following warning which is
also confusing to users:
"
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
"
Reinstate the CONFIG_OPTEE ifdeffery to mitigate the problem, but retain the
binman "optional" keyword at tee.bin .
Before:
"
$ mkimage -l u-boot.itb
FIT description: Configuration to load ATF before U-Boot
Created: Tue Jun 30 17:23:54 2026
Image 0 (uboot)
...
Image 2 (tee) <------------------------------ bogus empty image entry
Description: OP-TEE |
Created: Tue Jun 30 17:23:54 2026 |
Type: Trusted Execution Environment Image |
Compression: uncompressed |
Data Size: 0 Bytes = 0.00 KiB = 0.00 MiB <--------'
Image 3 (fdt-1)
...
"
After:
"
$ mkimage -l u-boot.itb
FIT description: Configuration to load ATF before U-Boot
Created: Tue Jun 30 17:58:15 2026
Image 0 (uboot)
...
Image 1 (atf)
...
Image 2 (fdt-1)
...
"
Fixes: b57ed147939c ("dts: imx8m{m,n,p,q}: Make optee packaging optional")
Signed-off-by: Marek Vasut <marex@nabladev.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
};
#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
};
};
};
#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
};
};
};
#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
};
};
};
#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
};
};