Using CMD_* configs from spl doesn't make logical sense. Therefore this
patch removes the check for CONFIG_CMD_BOOT(I|Z) from the image parsing
code during falcon boot and adds compilation targets for image.c and
zimage.c on SPL_OS_BOOT.

More info:
https://lore.kernel.org/u-boot/20250310135544.GV2640854@bill-the-cat/

Signed-off-by: Anshul Dalal <ansh...@ti.com>
---
 arch/arm/lib/Makefile | 3 +--
 common/spl/spl.c      | 6 ++----
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile
index 1c95dd6fed2..0e36d493aee 100644
--- a/arch/arm/lib/Makefile
+++ b/arch/arm/lib/Makefile
@@ -36,8 +36,7 @@ obj-$(CONFIG_CMD_BOOTZ) += bootm.o zimage.o
 else
 obj-$(CONFIG_$(PHASE_)FRAMEWORK) += spl.o
 ifdef CONFIG_SPL_FRAMEWORK
-obj-$(CONFIG_CMD_BOOTI) += image.o
-obj-$(CONFIG_CMD_BOOTZ) += zimage.o
+obj-$(CONFIG_SPL_OS_BOOT) += image.o zimage.o
 endif
 obj-$(CONFIG_OF_LIBFDT) += bootm-fdt.o
 endif
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 76fd56dfe4b..79149ba07db 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -335,8 +335,8 @@ int spl_parse_image_header(struct spl_image_info *spl_image,
                panic("** no mkimage signature but raw image not supported");
        }
 
-       if (CONFIG_IS_ENABLED(OS_BOOT) && IS_ENABLED(CONFIG_CMD_BOOTI)) {
-               ulong start, size;
+       if (CONFIG_IS_ENABLED(OS_BOOT)) {
+               ulong start, size, end;
 
                if (!booti_setup((ulong)header, &start, &size, 0)) {
                        spl_image->name = "Linux";
@@ -349,8 +349,6 @@ int spl_parse_image_header(struct spl_image_info *spl_image,
                              spl_image->load_addr, spl_image->size);
                        return 0;
                }
-       } else if (CONFIG_IS_ENABLED(OS_BOOT) && IS_ENABLED(CONFIG_CMD_BOOTZ)) {
-               ulong start, end;
 
                if (!bootz_setup((ulong)header, &start, &end)) {
                        spl_image->name = "Linux";
-- 
2.43.0

Reply via email to