spl: remove usage of CMD_BOOTx from image parsing
Using CMD_* configs from spl doesn't make logical sense. Therefore this patch replaces the checks for CMD_BOOTx with newly added library symbols LIB_BOOT[IMZ] and SPL_LIB_BOOT[IMZ] which are enabled by their respective CMD_* or SPL_* counterparts. On platforms with non-secure falcon mode, SPL_BOOTZ is enabled by default for 32-bit ARM systems and SPL_BOOTI is enabled by default for 64-bit ARM and RISCV. The respective C files (image.c/zimage.c) are compiled based on library symbols $(PHASE_)LIB_BOOTx instead which are in turn selected by both CMD_BOOTx and SPL_BOOTx as required. Signed-off-by: Anshul Dalal <anshuld@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
@@ -1216,6 +1216,22 @@ config SPL_OS_BOOT_SECURE
|
||||
to use falcon mode by disabling certain inherently non-securable options
|
||||
in the SPL boot flow.
|
||||
|
||||
config SPL_BOOTZ
|
||||
bool "Allow booting a zImage style Linux kernel from SPL"
|
||||
depends on SPL_OS_BOOT && !SPL_OS_BOOT_SECURE
|
||||
default y if ARM && !ARM64
|
||||
select SPL_LIB_BOOTZ
|
||||
help
|
||||
Boot a linux zimage from memory in falcon boot.
|
||||
|
||||
config SPL_BOOTI
|
||||
bool "Allow booting an Image style Linux kernel from SPL"
|
||||
depends on SPL_OS_BOOT && !SPL_OS_BOOT_SECURE
|
||||
default y if ARM64 || RISCV
|
||||
select SPL_LIB_BOOTI
|
||||
help
|
||||
Boot an uncompressed linux kernel image from memory in falcon boot.
|
||||
|
||||
config SPL_OS_BOOT_ARGS
|
||||
bool "Allow SPL to load args for kernel in falcon mode"
|
||||
depends on (SPL_OS_BOOT || SPL_LOAD_FIT_OPENSBI_OS_BOOT) && !SPL_OS_BOOT_SECURE
|
||||
|
||||
@@ -340,7 +340,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 (IS_ENABLED(CONFIG_SPL_OS_BOOT) && IS_ENABLED(CONFIG_SPL_BOOTI)) {
|
||||
ulong start, size;
|
||||
|
||||
if (!booti_setup((ulong)header, &start, &size, 0)) {
|
||||
@@ -354,7 +354,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 (IS_ENABLED(CONFIG_SPL_OS_BOOT) &&
|
||||
IS_ENABLED(CONFIG_SPL_BOOTZ)) {
|
||||
ulong start, end;
|
||||
|
||||
if (!bootz_setup((ulong)header, &start, &end)) {
|
||||
|
||||
Reference in New Issue
Block a user