[U-Boot] [PATCH 3/3] spl: fit: Place OS_BOOT DTB at CONFIG_SYS_SPL_ARGS_ADDR if defined

Tom Rini trini at konsulko.com
Fri Jul 12 14:34:37 UTC 2019


On Tue, May 28, 2019 at 03:49:15AM +0200, Marek Vasut wrote:

> If SPL OS_BOOT is enabled and CONFIG_SYS_SPL_ARGS_ADDR is defined,
> place the kernel DTB at that location, so the rest of the OS_BOOT
> machinery in SPL has the DTB blob at the correct location.
> 
> Signed-off-by: Marek Vasut <marex at denx.de>
> Cc: Tom Rini <trini at konsulko.com>
> ---
>  common/spl/spl_fit.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
> index 87ecf0bb9e..e3312b3477 100644
> --- a/common/spl/spl_fit.c
> +++ b/common/spl/spl_fit.c
> @@ -291,7 +291,11 @@ static int spl_fit_append_fdt(struct spl_image_info *spl_image,
>  	 * Read the device tree and place it after the image.
>  	 * Align the destination address to ARCH_DMA_MINALIGN.
>  	 */
> +#if defined(CONFIG_SPL_OS_BOOT) && defined(CONFIG_SYS_SPL_ARGS_ADDR)
> +	image_info.load_addr = CONFIG_SYS_SPL_ARGS_ADDR;
> +#else
>  	image_info.load_addr = spl_image->load_addr + spl_image->size;
> +#endif
>  	ret = spl_load_fit_image(info, sector, fit, base_offset, node,
>  				 &image_info);
>  
> @@ -472,7 +476,7 @@ int spl_load_simple_fit(struct spl_image_info *spl_image,
>  	 * Booting a next-stage U-Boot may require us to append the FDT.
>  	 * We allow this to fail, as the U-Boot image might embed its FDT.
>  	 */
> -	if (spl_image->os == IH_OS_U_BOOT)
> +	if (spl_image->os == IH_OS_U_BOOT || spl_image->os == IH_OS_LINUX)
>  		spl_fit_append_fdt(spl_image, info, sector, fit,
>  				   images, base_offset);

As-is and I haven't tried to debug this yet, it breaks the U-Boot
booting case for am335x_evm.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190712/446f8cd8/attachment.sig>


More information about the U-Boot mailing list