spl: remove usage of CMD_(BOOTI|BOOTZ) from image parsing
PATCH 1/1 spl: remove usage of CMD_(BOOTI|BOOTZ) from image parsing
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/
--- arch/arm/lib/Makefile | 3 +-- common/spl/spl.c | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-)
arch/arm/lib/Makefile +1 -2
@@ -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
common/spl/spl.c +2 -4
@@ -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" ;
Signature · 1 line
2.43.0
Quoted 44 lines · Anshul Dalal
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 forimage.candzimage.conSPL_OS_BOOT.More info:
https://lore.kernel.org/u-boot/20250310135544.GV2640854@bill-the-cat/Signed-off-by Anshul Dalal <[email protected]>--- arch/arm/lib/Makefile | 3 +-- common/spl/spl.c | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-)arch/arm/lib/Makefile +1
-2@@ -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 endifcommon/spl/spl.c +2
-2@@ -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" ;
common/spl/spl.c int spl_parse_image_header(struct spl_image_info *spl_image, · line 354
Quoted 8 lines
common/spl/spl.c +0
-2@@ -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" ;
We need something more clever here now however, likely some new HAS_... symbols. What you do here means that all OS_BOOT platforms will have 32 and 64bit image support, which isn't what we usually want.
Signature · 1 line
Tom