public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3] spl: fit: Place OS_BOOT DTB at CONFIG_SYS_SPL_ARGS_ADDR if defined
Date: Fri, 12 Jul 2019 10:34:37 -0400	[thread overview]
Message-ID: <20190712143437.GA17045@bill-the-cat> (raw)
In-Reply-To: <20190528014915.6202-3-marex@denx.de>

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@denx.de>
> Cc: Tom Rini <trini@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>

  reply	other threads:[~2019-07-12 14:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-28  1:49 [U-Boot] [PATCH 1/3] spl: ram: Do not memcpy() identical buffers Marek Vasut
2019-05-28  1:49 ` [U-Boot] [PATCH 2/3] spl: ubi: Add support for loading simple fitImage Marek Vasut
2019-07-12 18:31   ` Tom Rini
2019-05-28  1:49 ` [U-Boot] [PATCH 3/3] spl: fit: Place OS_BOOT DTB at CONFIG_SYS_SPL_ARGS_ADDR if defined Marek Vasut
2019-07-12 14:34   ` Tom Rini [this message]
2019-05-28  2:06 ` [U-Boot] [PATCH 1/3] spl: ram: Do not memcpy() identical buffers Tom Rini
2019-05-28  2:07   ` Marek Vasut
2019-05-28  2:42     ` Tom Rini
2019-05-28  2:44       ` Marek Vasut
2019-05-28  3:04         ` Tom Rini
2019-05-28  3:24           ` Marek Vasut
2019-05-28 11:19             ` Tom Rini
2019-05-28 14:18               ` J. William Campbell
2019-05-28 17:52               ` Marek Vasut

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=20190712143437.GA17045@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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