1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-01-12 03:10:15 +00:00

arm-toolchain: grub: fix do_configure() breakage with external-arm toolchain

grub and grub-efi break in do_configure() when using external-arm toolchain:

| checking for aarch64-poky-linux-objcopy... no
| checking for objcopy... objcopy
| checking for aarch64-poky-linux-strip... no
| checking for strip... strip
| checking for aarch64-poky-linux-nm... no
| checking for nm... nm
| checking for aarch64-poky-linux-ranlib... no
| checking for ranlib... ranlib
...
| checking whether objcopy works for absolute addresses... configure: error: objcopy cannot create binary files

That is due to external-arm toolchain's target triplet aarch64-none-linux-gnu
being different from OE triplet like aarch64-poky-linux and configure script
trying to use it to find binutils binaries like objcopy, falling back to host
ones.

Help configure script to find correct objcopy and other binaries by passing
the correct target triplet with --target parameter set to EAT_TARGET_SYS,
overriding the default OE one.

Signed-off-by: Denys Dmytriyenko <denys@konsulko.com>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Denys Dmytriyenko
2021-08-13 17:50:57 -04:00
committed by Jon Mason
parent c561f356ed
commit 45642fca29
2 changed files with 6 additions and 0 deletions

View File

@@ -0,0 +1 @@
require ${@oe.utils.conditional('TCMODE', 'external-arm', 'grub-external-arm.inc', '', d)}

View File

@@ -0,0 +1,5 @@
# grub uses --target triplet to find binutils binaries such as objcopy
# Since external-arm toolchain uses aarch64-none-linux-gnu triplet,
# OE-defined TARGET_SYS differs from EAT_TARGET_SYS used by external-arm
# toolchain, grub needs passing the correct --target to configure script
CONFIGUREOPTS:append:class-target = " --target=${EAT_TARGET_SYS}"