From: Anshul Dalal <anshuld@ti.com>
To: <u-boot@lists.denx.de>
Cc: Anshul Dalal <anshuld@ti.com>, <vigneshr@ti.com>, <trini@konsulko.com>
Subject: [PATCH v5] spl: remove usage of CMD_BOOT[IZ] from image parsing
Date: Fri, 14 Mar 2025 09:25:04 +0530 [thread overview]
Message-ID: <20250314035505.4029331-1-anshuld@ti.com> (raw)
Using CMD_* configs from spl doesn't make logical sense. Therefore this
patch replaces the checks for CMD_BOOT[IZ] with newly added configs
SPL_HAS_BOOT[IZ].
SPL_HAS_BOOTZ is enabled by default for 32-bit ARM systems and
SPL_HAS_BOOTI is enabled by default for 64-bit ARM and RISCV. This
ensures configs relying on CMD_BOOT[IZ] in falcon boot still work.
Signed-off-by: Anshul Dalal <anshuld@ti.com>
---
Changes in v5:
* Remove imply clause for CMD_BOOTZ instead add default y for SPL_HAS_BOOTZ
* Update commit message to reflect the changes
* Remove 'More info' link
v4: https://lore.kernel.org/u-boot/20250313032842.1189977-1-anshuld@ti.com/
Changes in v4:
* Don't set SPL_HAS_BOOTI for sandbox by default
* Updated prompts for SPL_HAS_BOOT[IZ]
* Removed check for SPL_HAS_FRAMEWORK from Makefile
v3: https://lore.kernel.org/u-boot/20250312124757.789013-1-anshuld@ti.com/
Changes in v3:
* Add imply clause for CMD_BOOTZ to enable SPL_HAS_BOOTZ
* Fix broken check for bootz_setup
v2: https://lore.kernel.org/u-boot/20250312094241.629707-1-anshuld@ti.com/
Changes in v2:
* Add SPL_HAS_BOOT[IZ] configs
v1: https://lore.kernel.org/u-boot/20250311093709.3372104-1-anshuld@ti.com/
---
arch/arm/lib/Makefile | 6 ++----
common/spl/Kconfig | 14 ++++++++++++++
common/spl/spl.c | 5 +++--
3 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile
index 1c95dd6fed2..e409f7a7947 100644
--- a/arch/arm/lib/Makefile
+++ b/arch/arm/lib/Makefile
@@ -35,10 +35,8 @@ obj-$(CONFIG_CMD_BOOTM) += bootm.o
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
-endif
+obj-$(CONFIG_SPL_HAS_BOOTI) += image.o
+obj-$(CONFIG_SPL_HAS_BOOTZ) += zimage.o
obj-$(CONFIG_OF_LIBFDT) += bootm-fdt.o
endif
ifdef CONFIG_ARM64
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 21a5cefee7a..1d690bee389 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -1153,6 +1153,20 @@ config SPL_OS_BOOT
Enable booting directly to an OS from SPL.
for more info read doc/README.falcon
+config SPL_HAS_BOOTZ
+ bool "Allow booting a zImage style Linux kernel from SPL"
+ depends on SPL_OS_BOOT
+ default y if ARM && !ARM64
+ help
+ Boot a linux zimage from memory in falcon boot.
+
+config SPL_HAS_BOOTI
+ bool "Allow booting an Image style Linux kernel from SPL"
+ depends on SPL_OS_BOOT
+ default y if ARM64 || RISCV
+ help
+ Boot an uncompressed linux kernel image from memory in falcon boot.
+
config SPL_PAYLOAD_ARGS_ADDR
hex "Address in memory to load 'args' file for Falcon Mode to"
depends on SPL_OS_BOOT || SPL_LOAD_FIT_OPENSBI_OS_BOOT
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 76fd56dfe4b..445c3ef24fe 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -335,7 +335,7 @@ 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)) {
+ if (CONFIG_IS_ENABLED(OS_BOOT) && IS_ENABLED(CONFIG_SPL_HAS_BOOTI)) {
ulong start, size;
if (!booti_setup((ulong)header, &start, &size, 0)) {
@@ -349,7 +349,8 @@ 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)) {
+ } else if (CONFIG_IS_ENABLED(OS_BOOT) &&
+ IS_ENABLED(CONFIG_SPL_HAS_BOOTZ)) {
ulong start, end;
if (!bootz_setup((ulong)header, &start, &end)) {
--
2.43.0
next reply other threads:[~2025-03-14 3:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-14 3:55 Anshul Dalal [this message]
2025-03-14 14:54 ` [PATCH v5] spl: remove usage of CMD_BOOT[IZ] from image parsing Tom Rini
2025-03-31 23:03 ` Tom Rini
2025-04-02 10:30 ` Anshul Dalal
2025-04-02 14:00 ` Tom Rini
2025-04-03 22:07 ` Anshul Dalal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250314035505.4029331-1-anshuld@ti.com \
--to=anshuld@ti.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox