All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Mukhin via U-Boot <u-boot@lists.u-boot-project.org>
To: Simon Glass <sjg@chromium.org>
Cc: dmukhin@ford.com, u-boot@lists.denx.de, trini@konsulko.com
Subject: Re: [PATCH v1] x86: add support for CONFIG_REMAKE_ELF
Date: Wed, 22 Jul 2026 17:48:52 -0700	[thread overview]
Message-ID: <amFk9Fy+c5fZHZ2L@kraken> (raw)
In-Reply-To: <CAFLszTgTACNfa+_LnLGvivq+vr1fjz9-c=Phfxe2Kgb4mLHh3A@mail.gmail.com>

On Sun, Jul 19, 2026 at 11:59:29AM -0600, Simon Glass wrote:
> Hi Denis,
> 
> On 2026-07-16T20:52:14, None <dmukhin@ford.com> wrote:
> > x86: add support for CONFIG_REMAKE_ELF
> >
> > Fix objcopy/ld parameters for x86 to enable CONFIG_REMAKE_ELF
> > configurations.
> >
> > That adds new 'PLATFORM_ELF_ELFLDFLAGS' make variable for injecting
> > proper linker arguments when u-boot.elf is requested.
> >
> > Signed-off-by: Denis Mukhin <dmukhin@ford.com>
> >
> > Makefile           | 1 +
> >  arch/x86/config.mk | 8 ++++++--
> >  2 files changed, 7 insertions(+), 2 deletions(-)
> 
> > That adds new 'PLATFORM_ELF_ELFLDFLAGS' make variable for injecting
> > proper linker arguments when u-boot.elf is requested.
> 
> The variable is actually called PLATFORM_ELFLDFLAGS - please can you
> fix the name here. Also, please use the imperative ("Add a new ...
> variable") and mention what fails today when CONFIG_REMAKE_ELF is
> enabled on x86 (presumably ld picking the wrong emulation).
> 
> > diff --git a/Makefile b/Makefile
> > @@ -2003,6 +2003,7 @@ u-boot-with-spl-pbl.bin: spl/u-boot-spl.pbl $(UBOOT_BINLOAD) FORCE
> >  quiet_cmd_u-boot-elf ?= LD      $@
> >       cmd_u-boot-elf ?= $(LD) u-boot-elf.o -o $@ \
> >       $(if $(CONFIG_SYS_BIG_ENDIAN),-EB,-EL) \
> > +     $(PLATFORM_ELFLDFLAGS) \
> 
> Please can you add the same to cmd_u-boot-spl-elf just below,
> otherwise CONFIG_SPL_REMAKE_ELF still fails on x86 (SPL is always
> 32-bit, so it wants -m elf_i386).
> 
> > diff --git a/arch/x86/config.mk b/arch/x86/config.mk
> > @@ -24,9 +24,13 @@ EFI_IS_32BIT :=
> > -PLATFORM_CPPFLAGS += -march=i386 -m32
> > +PLATFORM_CPPFLAGS    += -march=i386 -m32
> > +PLATFORM_ELFFLAGS    += -O elf32-i386 -B i386
> > +PLATFORM_ELFLDFLAGS  += -m elf_i386
> 
> Please drop the whitespace churn on the existing PLATFORM_CPPFLAGS
> lines - the rest of the file uses a single space before +=
> 
> BTW, further down this file there is already:
> 
>     KBUILD_LDFLAGS += -m $(if $(IS_32BIT),elf_i386,elf_x86_64)
> 
> so you could set PLATFORM_ELFLDFLAGS the same way in one line outside
> the ifeq, next to that. What do you think?

Will update!

> 
> I'm also interested in which x86 platform you are using - I am working
> on getting Alder Lake supported at the moment.

Thanks for asking.
Unfortunately, I'm not able to share details about the platform.

> 
> Regards,
> Simon

      reply	other threads:[~2026-07-23  0:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-16 20:52 [PATCH v1] x86: add support for CONFIG_REMAKE_ELF dmukhin
2026-07-17 20:39 ` Tom Rini
2026-07-19 17:59 ` Simon Glass
2026-07-23  0:48   ` Denis Mukhin via U-Boot [this message]

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=amFk9Fy+c5fZHZ2L@kraken \
    --to=u-boot@lists.u-boot-project.org \
    --cc=dmukhin@ford.com \
    --cc=sjg@chromium.org \
    --cc=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 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.