public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: <Jamie.Gibbons@microchip.com>
To: <trini@konsulko.com>
Cc: <Valentina.FernandezAlanis@microchip.com>, <xypron.glpk@gmx.de>,
	<Conor.Dooley@microchip.com>, <Cyril.Jean@microchip.com>,
	<sjg@chromium.org>,  <u-boot@lists.denx.de>,
	<marek.vasut+renesas@mailbox.org>, <ycliang@andestech.com>
Subject: Re: [PATCH 1/2] boot: Fix dtbo application by ensuring overlay alignment
Date: Tue, 27 Jan 2026 10:26:33 +0000	[thread overview]
Message-ID: <36c8cbb602754cdad8a20221548da8a79d81b3a2.camel@microchip.com> (raw)
In-Reply-To: <20260123201540.GA2406606@bill-the-cat>

Hi Tom,

On Fri, 2026-01-23 at 14:15 -0600, Tom Rini wrote:
> On Tue, Jan 20, 2026 at 03:33:12PM +0000, Jamie Gibbons wrote:
> 
> > After U-Boot's DTC/libfdt update, device tree overlay application
> > could
> > fail with FDT_ERR_ALIGNMENT due to the overlay DTBO being loaded at
> > a
> > misaligned address. Change the FIT image loader option in image-
> > fit.c
> > from FIT_LOAD_IGNORED to FIT_LOAD_OPTIONAL_NON_ZERO, to ensure
> > overlays
> > are loaded at properly aligned addresses and any alignment errors
> > are
> > resolved.
> > 
> > Tested on: PolarFire SoC Icicle Kit
> > 
> > Fixes: 0535e46d55d ("scripts/dtc: Update to upstream version
> > v1.7.2-35-g52f07dcca47c")
> > Signed-off-by: Jamie Gibbons <jamie.gibbons@microchip.com>
> > ---
> >  boot/image-fit.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/boot/image-fit.c b/boot/image-fit.c
> > index 2d040e38d97..3a327d07784 100644
> > --- a/boot/image-fit.c
> > +++ b/boot/image-fit.c
> > @@ -2481,7 +2481,7 @@ int boot_get_fdt_fit(struct bootm_headers
> > *images, ulong addr,
> >  			addr, &uname, &uconfig,
> >  			arch, IH_TYPE_FLATDT,
> >  			BOOTSTAGE_ID_FIT_FDT_START,
> > -			FIT_LOAD_IGNORED, &ovload, &ovlen);
> > +			FIT_LOAD_OPTIONAL_NON_ZERO, &ovload,
> > &ovlen);
> >  		if (ov_noffset < 0) {
> >  			printf("load of %s failed\n", uname);
> >  			continue;
> 
> After talking with Marek about this more, we think this is the wrong
> approach. Can you please try dropping the load_op test from
> 8fbcc0e0e839
> and seeing if that also fixes your problem? If so, please post a
> patch
> with that and a Fixes tag, thanks!
> 
Dropping the load_op test added in commit 8fbcc0e0e839 does not solve
the issue - failed on fdt_open_into for DTO due to misalignment of ov.

Regards,
Jamie.

  reply	other threads:[~2026-01-27 13:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-20 15:33 [PATCH 0/2] Fixes for boot failures Jamie Gibbons
2026-01-20 15:33 ` [PATCH 1/2] boot: Fix dtbo application by ensuring overlay alignment Jamie Gibbons
2026-01-23 20:15   ` Tom Rini
2026-01-27 10:26     ` Jamie.Gibbons [this message]
2026-01-27 14:55       ` Tom Rini
2026-02-06 15:04         ` Jamie.Gibbons
2026-01-20 15:33 ` [PATCH 2/2] configs: microchip_mpfs_generic: fix boot failure Jamie Gibbons
2026-02-06 18:15 ` (subset) [PATCH 0/2] Fixes for boot failures Tom Rini

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=36c8cbb602754cdad8a20221548da8a79d81b3a2.camel@microchip.com \
    --to=jamie.gibbons@microchip.com \
    --cc=Conor.Dooley@microchip.com \
    --cc=Cyril.Jean@microchip.com \
    --cc=Valentina.FernandezAlanis@microchip.com \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    --cc=ycliang@andestech.com \
    /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