[PATCH] arm64: zynqmp: Do not describe u-boot.itb if SPL is disabled

Heinrich Schuchardt xypron.glpk at gmx.de
Tue Mar 12 13:29:59 CET 2024


On 05.03.24 16:47, Ilias Apalodimas wrote:
> On Fri, Feb 23, 2024 at 05:18:42PM +0100, Michal Simek wrote:
>> There is no reason to describe u-boot.itb on system without SPL. Pretty
>> much this is cover all systems which are using only boot.bin which contains
>> all images inside.
>>
>> Signed-off-by: Michal Simek <michal.simek at amd.com>
>> ---
>>
>>   board/xilinx/common/board.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
>> index 9641ed307b75..4f38b7d27684 100644
>> --- a/board/xilinx/common/board.c
>> +++ b/board/xilinx/common/board.c
>> @@ -43,7 +43,7 @@ struct efi_fw_image fw_images[] = {
>>   		.image_index = 1,
>>   	},
>>   #endif
>> -#if defined(XILINX_UBOOT_IMAGE_GUID)
>> +#if defined(XILINX_UBOOT_IMAGE_GUID) && defined(CONFIG_SPL_FS_LOAD_PAYLOAD_NAME)
>
> What happens if this is defined with CONFIG_SPL_FS_LOAD_PAYLOAD_NAME="" ?

CONFIG_SPL_FS_LOAD_PAYLOAD_NAME depends on SPL_FS_EXT4 || SPL_FS_FAT ||
SPL_FS_SQUASHFS || SPL_SEMIHOSTING. So it is only defined if SPL could
load a file.

CONFIG_SPL_FS_LOAD_PAYLOAD_NAME defaults to a non-blank name. If a user
provides an invalid name, SPL will not be able to load the file.

What is wrong here is to assume that *.itb has to be load as a file. We
can configure U-Boot SPL to load the itb from a raw partition.

The check might be too restrictive.

Best regards

Heinrich

>
> Cheers
> /Ilias
>>   	{
>>   		.image_type_id = XILINX_UBOOT_IMAGE_GUID,
>>   		.fw_name = u"XILINX-UBOOT",
>> --
>> 2.36.1
>>



More information about the U-Boot mailing list