From 52dc3343fdea10a4409b1f9e3926d8b72ed0befb Mon Sep 17 00:00:00 2001
From: Andrew Davis <afd@ti.com>
Date: Wed, 4 May 2022 15:52:27 -0500
Subject: [PATCH] boot: Kconfig: Disable non-FIT loading for TI secure devices

Non-FIT image loading support should be disabled for TI secure
devices as the image handlers for those image types do not follow
our secure boot checks.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
---
 boot/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/boot/Kconfig b/boot/Kconfig
index 4b0802b8c6..9780473190 100644
--- a/boot/Kconfig
+++ b/boot/Kconfig
@@ -405,7 +405,7 @@ endif
 
 config LEGACY_IMAGE_FORMAT
 	bool "Enable support for the legacy image format"
-	default y if !FIT_SIGNATURE
+	default y if !FIT_SIGNATURE && !TI_SECURE_DEVICE
 	help
 	  This option enables the legacy image format. It is enabled by
 	  default for backward compatibility, unless FIT_SIGNATURE is
-- 
2.39.5