All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anshul Dalal <anshuld@ti.com>
To: Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Marek Vasut <marek.vasut@mailbox.org>
Cc: Tom Rini <trini@konsulko.com>, Anshul Dalal <anshuld@ti.com>,
	"Beleswar Padhi" <b-padhi@ti.com>, <malysagreg@gmail.com>,
	<sughosh.ganu@linaro.org>, <philip.molloy@analog.com>,
	<marek.vasut+renesas@mailbox.org>, <james.hilliard1@gmail.com>,
	<afd@ti.com>, <nm@ti.com>, <vigneshr@ti.com>, <n-francis@ti.com>,
	<u-kumar1@ti.com>, <u-boot@lists.denx.de>
Subject: Re: [PATCH v2 2/2] ARM: OMAP2+: Pad SPL binary to 8-byte alignment before DTB
Date: Fri, 16 Jan 2026 10:22:32 +0530	[thread overview]
Message-ID: <DFPQT2IBGF8N.2F3UU414XE4Y@ti.com> (raw)
In-Reply-To: <CAC_iWj++nNLDMzJECV__VBQkNPwURGsRpnD5HUUt40+dA3w9Ow@mail.gmail.com>

On Thu Jan 15, 2026 at 1:30 PM IST, Ilias Apalodimas wrote:
> Hi Marek,
>
>
> On Thu, 15 Jan 2026 at 02:02, Marek Vasut <marek.vasut@mailbox.org> wrote:
>>
>> On 1/14/26 3:17 PM, Tom Rini wrote:
>>
>> Hello Tom,
>>
>> >>> OK. And why can't we make that check at $sym rounded up, and ensure our
>> >>> build targets pad? Going back to the commit message here, it's easy to
>> >>> tell the linker to place $sym at the right spot, but it's hard to make
>> >>> sure the output is padded. So having typed all that, maybe we need to
>> >>> do:
>> >>> d) Update linker scripts to ALIGN(8) the above symbols and have the make
>> >>> targets use dd to ensure padding prior to concatenation
>> >>> ?
>> >> d) looks like what we should do, yes
>> >
>> > Poking at this harder, I'm not actually sure we need to use dd at all,
>> > but we do need to fix our linker scripts, and then going back to when
>> > Ilias reworked and cleaned up a bunch of them, get the changes reviewed
>> > by the toolchain experts he got ahold of :)
>>
>> I wonder if LD can always guarantee trailing alignment of the binary. If
>> it can, then yes, dd would only be obscuring alignment problems and
>> trailing DT look up failures which are hard to debug. It would be nice
>> to drop the dd part, but I am not sure if we are able to do it reliably.
>
> LD won't pad align anything that doesn't have code afterwards. IOW
> inserting an . = ALIGN(8); just before the .end symbol won't guarantee
> alignement unless there's a section/code following.
> What you can do is add an ALIGN(8) inside the last section. That will
> guarantee that the last symbol is aligned. There's also the SUBALIGN
> command which messes around with the input section alignment -- that
> normally is automatically calculated, but Tom tested it yesterday
> without success.
>
> I'll have a closer look to the linker script in case I can come up
> with something more elegant. Which defconfig should I use to reproduce
> the issue?

We have reproduced the issue on multiple K3 SoCs, to start with you can
make use of the am62px_evm_r5_defconfig with arm-none-eabi toolchain
from ARM[1] with version 13.3.rel1.

[1]: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads

>
> Cheers
> /Ilias


  reply	other threads:[~2026-01-16  4:52 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-12 10:11 [PATCH v2 0/2] Fix TI DTB alignment issues with recent libfdt update Beleswar Padhi
2026-01-12 10:11 ` [PATCH v2 1/2] scripts/Makefile.xpl: Align filtered DTB to 8-byte within multidtb.fit Beleswar Padhi
2026-01-12 14:39   ` Marek Vasut
2026-01-12 17:25     ` Padhi, Beleswar
2026-01-12 21:57       ` Marek Vasut
2026-01-12 22:03         ` Tom Rini
2026-01-12 23:53           ` Marek Vasut
2026-01-13 10:25             ` Beleswar Prasad Padhi
2026-01-13 13:27               ` Marek Vasut
2026-01-13 15:00             ` Tom Rini
2026-01-13 16:38               ` Marek Vasut
2026-01-12 10:11 ` [PATCH v2 2/2] ARM: OMAP2+: Pad SPL binary to 8-byte alignment before DTB Beleswar Padhi
2026-01-12 13:08   ` Anshul Dalal
2026-01-12 16:48     ` Tom Rini
2026-01-12 21:56       ` Marek Vasut
2026-01-12 22:05         ` Tom Rini
2026-01-12 23:56           ` Marek Vasut
2026-01-13 15:00             ` Tom Rini
2026-01-13 16:34               ` Marek Vasut
2026-01-14 14:17                 ` Tom Rini
2026-01-15  0:02                   ` Marek Vasut
2026-01-15  8:00                     ` Ilias Apalodimas
2026-01-16  4:52                       ` Anshul Dalal [this message]
2026-01-13 19:45               ` Tom Rini
2026-01-12 14:40   ` Marek Vasut
2026-01-12 16:45     ` Tom Rini
2026-01-20 18:08 ` (subset) [PATCH v2 0/2] Fix TI DTB alignment issues with recent libfdt update 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=DFPQT2IBGF8N.2F3UU414XE4Y@ti.com \
    --to=anshuld@ti.com \
    --cc=afd@ti.com \
    --cc=b-padhi@ti.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=james.hilliard1@gmail.com \
    --cc=malysagreg@gmail.com \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=marek.vasut@mailbox.org \
    --cc=n-francis@ti.com \
    --cc=nm@ti.com \
    --cc=philip.molloy@analog.com \
    --cc=sughosh.ganu@linaro.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=u-kumar1@ti.com \
    --cc=vigneshr@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.