From: Tom Rini Date: Fri, 12 Jul 2019 10:34:37 -0400 Subject: [U-Boot] [PATCH 3/3] spl: fit: Place OS_BOOT DTB at CONFIG_SYS_SPL_ARGS_ADDR if defined In-Reply-To: <20190528014915.6202-3-marex@denx.de> References: <20190528014915.6202-1-marex@denx.de> <20190528014915.6202-3-marex@denx.de> Message-ID: <20190712143437.GA17045@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.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 > Cc: Tom Rini > --- > 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: