From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: "Vincent Stehlé" <vincent.stehle@arm.com>
Cc: Sergey Matyukevich <geomatsi@gmail.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v2] boot/arm-trusted-firmware: add patch to fix fiptool link
Date: Sun, 23 Jul 2023 19:33:30 +0200 [thread overview]
Message-ID: <20230723173330.GN2503916@scaer> (raw)
In-Reply-To: <20230721130959.899919-1-vincent.stehle@arm.com>
Vincent, All,
On 2023-07-21 15:09 +0200, Vincent Stehlé spake thusly:
> When building a fip firmware (BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP=y), the
> TF-A build recipe starts by building the host program fiptool with the
> proper build environment variables. Then the main TF-A target firmware
> build step takes place, with the expectation that the fiptool program will
> be used under the hood if necessary.
>
> In TF-A, the build recipe for the host program fiptool has subtly changed
> after v2.7, in commit cf2dd17ddda2 ("refactor(security): add OpenSSL 1.x
> compatibility"). This change has the effect to force re-linking fiptool
> each time.
>
> If we try to build with Buildroot a fip firmware with a TF-A version after
> v2.7 comprising the aforementioned change, the fiptool program is forcibly
> re-linked during the main firmware build step. This happens without the
> proper build environment variables and consequently, if openssl is not
> installed on the host, the libcrypto shared library will not be found by
> the linker and the link will fail with the following error:
>
> /usr/bin/ld: cannot find -lcrypto: No such file or directory
>
> A patch has been integrated into TF-A to avoid re-linking fiptool when not
> necessary, which should solve the problem starting with version v2.10. Add
> that patch in Buildroot for versions v2.8 and v2.9, to repair the build in
> the cases described above.
>
> Fixes:
>
> https://gitlab.com/buildroot.org/buildroot/-/jobs/4664845767
>
> Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
> Cc: Dick Olsson <hi@senzilla.io>
> Cc: Sergey Matyukevich <geomatsi@gmail.com>
> ---
[--SNIP--]
> diff --git a/boot/arm-trusted-firmware/v2.8/0001-build-tools-avoid-unnecessary-link.patch b/boot/arm-trusted-firmware/v2.8/0001-build-tools-avoid-unnecessary-link.patch
> new file mode 100644
> index 0000000000..9e0ea74248
> --- /dev/null
> +++ b/boot/arm-trusted-firmware/v2.8/0001-build-tools-avoid-unnecessary-link.patch
So now there are two files with the same numbered prefix, which defeats
the very purpose of having numbered prefixes. So I renumbered this new
patch as 0002.
[--SNIP--]
> diff --git a/boot/arm-trusted-firmware/v2.9/0001-build-tools-avoid-unnecessary-link.patch b/boot/arm-trusted-firmware/v2.9/0001-build-tools-avoid-unnecessary-link.patch
> new file mode 120000
> index 0000000000..e414b46e0f
> --- /dev/null
> +++ b/boot/arm-trusted-firmware/v2.9/0001-build-tools-avoid-unnecessary-link.patch
> @@ -0,0 +1 @@
> +../v2.8/0001-build-tools-avoid-unnecessary-link.patch
> \ No newline at end of file
I can understand the rationale for having a symlink, but in practice it
fails: if we ever remove/update/renumber the patch for v2.8, then the
symlink in v2.9 is dangling. Which happened when I renumbered the patch
in v2.8.
Instead, I just duplicated the patch in v2.9
Applied to master with these changes, thanks.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-07-23 17:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-19 12:53 [Buildroot] [PATCH] boot/arm-trusted-firmware: add patch to fix fiptool link Vincent Stehlé
2023-07-20 21:28 ` Thomas Petazzoni via buildroot
2023-07-21 12:58 ` Vincent Stehlé
2023-07-21 13:09 ` [Buildroot] [PATCH v2] " Vincent Stehlé
2023-07-23 17:33 ` Yann E. MORIN [this message]
2023-08-30 6:13 ` 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=20230723173330.GN2503916@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=geomatsi@gmail.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=vincent.stehle@arm.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.