[PATCH 1/1] spl: blk: use CONFIG_SPL_FS_LOAD_PAYLOAD_NAME

mchitale at ventanamicro.com mchitale at ventanamicro.com
Sun Jul 30 17:49:59 CEST 2023


On Fri, 2023-07-21 at 14:09 +0200, Heinrich Schuchardt wrote:
> We should target to unify the code for different block devices in SPL
> to
> reduce code size.
> 
> MMC, USB, SATA, and Semihosting use CONFIG_SPL_FS_LOAD_PAYLOAD_NAME
> to
> indicate the filename to load.
> 
> NVMe uses CONFIG_SPL_PAYLOAD in spl_blk_load_image().
> 
> CONFIG_SPL_PAYLOAD is meant to define which binary to integrate into
> u-boot-with-spl.bin. See commit
> 7550dbe38b3f ("spl: Add option SPL_PAYLOAD").
> 
> Change spl_blk_load_image() to use CONFIG_SPL_FS_LOAD_PAYLOAD_NAME.
> 
> Fixes: 8ce6a2e17577 ("spl: blk: Support loading images from fs")
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com
> >
> ---
>  common/spl/spl_blk_fs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/spl/spl_blk_fs.c b/common/spl/spl_blk_fs.c
> index d97adc4d39..d4161fa850 100644
> --- a/common/spl/spl_blk_fs.c
> +++ b/common/spl/spl_blk_fs.c
> @@ -43,7 +43,7 @@ int spl_blk_load_image(struct spl_image_info
> *spl_image,
>  		       struct spl_boot_device *bootdev,
>  		       enum uclass_id uclass_id, int devnum, int
> partnum)
>  {
> -	const char *filename = CONFIG_SPL_PAYLOAD;
> +	const char *filename = CONFIG_SPL_FS_LOAD_PAYLOAD_NAME;
>  	struct disk_partition part_info = {};
>  	struct legacy_img_hdr *header;
>  	struct blk_desc *blk_desc;

Reviewed-by: Mayuresh Chitale <mchitale at ventanamicro.com>



More information about the U-Boot mailing list