All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Max Krummenacher <max.oss.09@gmail.com>
Cc: u-boot@lists.denx.de, "Adam Ford" <aford173@gmail.com>,
	"Pali Rohár" <pali@kernel.org>,
	"U-Boot STM32" <uboot-stm32@st-md-mailman.stormreply.com>,
	"Patrick DELAUNAY" <patrick.delaunay@foss.st.com>,
	"Patrice CHOTARD" <patrice.chotard@foss.st.com>,
	"Max Krummenacher" <max.krummenacher@toradex.com>,
	"AKASHI Takahiro" <takahiro.akashi@linaro.org>,
	"Du Huanpeng" <dhu@hodcarrier.org>,
	"Heiko Thiery" <heiko.thiery@gmail.com>,
	"Heinrich Schuchardt" <xypron.glpk@gmx.de>,
	"Marek Behún" <kabel@kernel.org>,
	"Quentin Schulz" <quentin.schulz@theobroma-systems.com>,
	"Samuel Holland" <samuel@sholland.org>,
	"Simon Glass" <sjg@chromium.org>, "Stefan Roese" <sr@denx.de>
Subject: Re: [PATCH v5 1/1] u-boot-initial-env: rework make target
Date: Mon, 12 Dec 2022 09:00:28 -0500	[thread overview]
Message-ID: <20221212140028.GR3787616@bill-the-cat> (raw)
In-Reply-To: <CAEHkU3WR8PKLHHjU7k6FK32mvpwxBenGkW_piQeabs9m4ogbgg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1954 bytes --]

On Mon, Dec 12, 2022 at 02:39:09PM +0100, Max Krummenacher wrote:
> Hi Tom
> 
> On Thu, Dec 8, 2022 at 9:24 PM Tom Rini <trini@konsulko.com> wrote:
> >
> > On Mon, Nov 28, 2022 at 09:41:22AM +0100, Max Krummenacher wrote:
> >
> > > From: Max Krummenacher <max.krummenacher@toradex.com>
> > >
> > > With LTO enabled the U-Boot initial environment is no longer stored
> > > in an easy accessible section in env/common.o. I.e. the section name
> > > changes from build to build, its content maybe compressed and it is
> > > annotated with additional data.
> > >
> > > Drop trying to read the initial env with elf tools from the compiler
> > > specific object file in favour of adding and using a host tool with
> > > the only functionality of printing the initial env to stdout.
> > >
> > > See also:
> > > https://lore.kernel.org/all/927b122e-1f62-e790-f5ca-30bae4332c77@foss.st.com/
> > >
> > > Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
> > > Acked-by: Pali Rohár <pali@kernel.org>
> > > Reviewed-by: Simon Glass <sjg@chromium.org>
> >
> > Applied to u-boot/next, thanks!
> 
> The commit not only fixes the use case on arm64 with LTO enabled, it also
> fixes sandbox for x86-64. For me on Fedora with a `gcc (GCC) 11.3.1 20220421`
> both `make sandbox_defconfig; make u-boot-initial-env` and
> `make sandbox_defconfig; <unselect LTO>; make u-boot-initial-env` fail with
> ```
>   GENENV  u-boot-initial-env
> objcopy: env/common.o: can't dump section
> '.rodata.default_environment' - it does not exist: file format not
> recognized
> sed: can't read u-boot-initial-env: No such file or directory
> ```
> 
> Wouldn't that merit applying the commit to master, i.e. include it in v2023.01?

You can just disable LTO, and it's been an issue for a while now. It's
also easy enough to cherry-pick if there's cases out there that can't
wait.  Thanks again for addressing the problem!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

      reply	other threads:[~2022-12-12 14:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-28  8:41 [PATCH v5 0/1] Makefile: rework u-boot-initial-env target Max Krummenacher
2022-11-28  8:41 ` [PATCH v5 1/1] u-boot-initial-env: rework make target Max Krummenacher
2022-12-04 21:16   ` Simon Glass
2022-12-08 20:24   ` Tom Rini
2022-12-12 13:39     ` Max Krummenacher
2022-12-12 14:00       ` Tom Rini [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=20221212140028.GR3787616@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=aford173@gmail.com \
    --cc=dhu@hodcarrier.org \
    --cc=heiko.thiery@gmail.com \
    --cc=kabel@kernel.org \
    --cc=max.krummenacher@toradex.com \
    --cc=max.oss.09@gmail.com \
    --cc=pali@kernel.org \
    --cc=patrice.chotard@foss.st.com \
    --cc=patrick.delaunay@foss.st.com \
    --cc=quentin.schulz@theobroma-systems.com \
    --cc=samuel@sholland.org \
    --cc=sjg@chromium.org \
    --cc=sr@denx.de \
    --cc=takahiro.akashi@linaro.org \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-stm32@st-md-mailman.stormreply.com \
    --cc=xypron.glpk@gmx.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.