kumquat-buildroot/boot/arm-trusted-firmware
Louis Chauvet 678146f2ad boot/arm-trusted-firmware: fix the RPATH of fiptool
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 a957d9a90a
("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>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
(cherry picked from commit e7d16c35ae)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-01-03 12:04:45 +01:00
..
v2.2 boot/arm-trusted-firmware: fix build issue with binutils 2.39+ 2023-07-10 23:39:18 +02:00
v2.3 boot/arm-trusted-firmware: fix build issue with binutils 2.39+ 2023-07-10 23:39:18 +02:00
v2.4 boot/arm-trusted-firmware: fix build issue with binutils 2.39+ 2023-07-10 23:39:18 +02:00
v2.5 boot/arm-trusted-firmware: fix build issue with binutils 2.39+ 2023-07-10 23:39:18 +02:00
v2.6 boot/arm-trusted-firmware: fix build issue with binutils 2.39+ 2023-07-10 23:39:18 +02:00
v2.7 boot/arm-trusted-firmware: fix build issue with binutils 2.39+ 2023-07-10 23:39:18 +02:00
v2.8 boot/arm-trusted-firmware: add patch to fix fiptool link 2023-07-23 19:28:21 +02:00
v2.9 boot/arm-trusted-firmware: add patch to fix fiptool link 2023-07-23 19:28:21 +02:00
arm-trusted-firmware.hash boot/arm-trusted-firmware: bump version to 2.7 2022-07-23 21:10:46 +02:00
arm-trusted-firmware.mk boot/arm-trusted-firmware: fix the RPATH of fiptool 2024-01-03 12:04:45 +01:00
Config.in boot/arm-trusted-firmware: introduce a choice to select the BL33 image 2023-08-12 22:17:14 +02:00