From: Baruch Siach via buildroot <buildroot@buildroot.org>
To: Peter Korsgaard <peter@korsgaard.com>
Cc: "Köry Maincent" <kory.maincent@bootlin.com>,
"Louis Chauvet" <louis.chauvet@bootlin.com>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
"Sergey Matyukevich" <geomatsi@gmail.com>,
buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v2] boot/arm-trusted-firmware: fix the RPATH of fiptool
Date: Wed, 03 Jan 2024 14:39:18 +0200 [thread overview]
Message-ID: <87cyui613a.fsf@tarshish> (raw)
In-Reply-To: <87cyui61o0.fsf@48ers.dk>
Hi Peter,
On Wed, Jan 03 2024, Peter Korsgaard wrote:
>>>>>> "Baruch" == Baruch Siach <baruch@tkos.co.il> writes:
>
> > Hi Peter,
> > On Wed, Jan 03 2024, Peter Korsgaard wrote:
> >>>>>>> "Louis" == Louis Chauvet via buildroot <buildroot@buildroot.org> writes:
> >>
> >> > The arm-trusted-firmware package builds a host tool called "fiptool",
> >> > which is used during the build process of arm-trusted-firmware
> >> > itself. This tool links against the OpenSSL host library, and
> >> > therefore needs to be built with the correct RPATH pointing to
> >> > $HOST_DIR/lib.
> >>
> >> > This is why commit a957d9a90ade4194dffe3eb2fc0136bc5d077c28
> >> > ("boot/arm-trusted-firmware: build fiptool separately with dependency
> >> > o n host-openssl") added the ARM_TRUSTED_FIRMWARE_BUILD_FIPTOOL
> >> > variable, which builds the fiptool tool first, with the right
> >> > variables set, before invoking the full build of TF-A. This ensured
> >> > that fiptool was built with the correct RPATH.
> >>
> >> > However, more recent versions of TF-A have modified their Makefile
> >> > machinery, and fiptool is being rebuilt even if it was built
> >> > before. Unfortunately, this rebuild is no longer done with the right
> >> > flags, so we end up with a fiptool binary that no longer has the right
> >> > RPATH, and fiptool fails to find the OpenSSL libraries from
> >> > $HOST_DIR/lib.
> >>
> >> > In order to fix this, we take a different approach: we do not build
> >> > fiptool separately first, but we inject the necessary flags through
> >> > the HOSTCC variable. Indeed, there's no HOST_LDFLAGS or HOST_LDLIBS
> >> > variable or similar that would allow us to pass the -Wl,-rpath flag
> >> > that is needed. Shoe-horning this flag into HOSTCC gets the job done,
> >> > and actually simplifies our arm-trusted-firmware.mk.
> >>
> >> > This patch break the compatibility with version prior to 1.4 (upstream
> >> > commit 72610c4102990 ("build: Introduce HOSTCC flag")). v1.4 is very old
> >> > (July 2017), not used anymore in-tree and probably not used anymore
> >> > outside the tree.
> >>
> >> > Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
> >> > Co-authored-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> >> > ---
> >> > Previous version:
> >> > https://lore.kernel.org/buildroot/20231206164437.22191-1-louis.chauvet@bootlin.com/
> >>
> >> > Changes v1->v2:
> >> > Update commit log about compatibilty
> >>
> >> Committed to 2023.02.x and 2023.11.x, thanks.
>
> > Köry Maincent reported that this commit breaks fiptool build for some
> > platforms.
>
> > https://lore.kernel.org/all/20231224162254.589b395c@kmaincent-XPS-13-7390/
>
> Hmm, yes. I didn't see any communication about this since then or
> defconfig failures, but I may have missed them. Louis?
The last defconfig test report shows these failures:
https://lists.buildroot.org/pipermail/buildroot/2023-December/681835.html
For example (solidrun_macchiatobin):
https://gitlab.com/buildroot.org/buildroot/-/jobs/5834758777
baruch
--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2024-01-03 12:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-08 17:42 [Buildroot] [PATCH v2] boot/arm-trusted-firmware: fix the RPATH of fiptool Louis Chauvet via buildroot
2023-12-08 21:29 ` Yann E. MORIN
2024-01-03 12:01 ` Peter Korsgaard
2024-01-03 12:10 ` Baruch Siach via buildroot
2024-01-03 12:29 ` Peter Korsgaard
2024-01-03 12:39 ` Baruch Siach via buildroot [this message]
2024-01-03 12:46 ` Thomas Petazzoni via buildroot
2024-01-03 13:31 ` Peter Korsgaard
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=87cyui613a.fsf@tarshish \
--to=buildroot@buildroot.org \
--cc=baruch@tkos.co.il \
--cc=geomatsi@gmail.com \
--cc=kory.maincent@bootlin.com \
--cc=louis.chauvet@bootlin.com \
--cc=peter@korsgaard.com \
--cc=thomas.petazzoni@bootlin.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