Return-Path: Received: from mailout4.zoneedit.com (mailout4.zoneedit.com [64.68.198.64]) by arago-project.org (Postfix) with ESMTPS id 12A2252A5A for ; Fri, 13 Aug 2021 02:14:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mailout4.zoneedit.com (Postfix) with ESMTP id C058B40C1C for ; Fri, 13 Aug 2021 02:14:30 +0000 (UTC) Received: from mailout4.zoneedit.com ([127.0.0.1]) by localhost (zmo14-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GkgEGgCKiRwU for ; Fri, 13 Aug 2021 02:14:30 +0000 (UTC) Received: from mail.denix.org (pool-100-15-86-127.washdc.fios.verizon.net [100.15.86.127]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout4.zoneedit.com (Postfix) with ESMTPSA id ABED040C16 for ; Fri, 13 Aug 2021 02:14:29 +0000 (UTC) Received: from gimli.denix (unknown [192.168.30.6]) by mail.denix.org (Postfix) with ESMTP id E5817174655 for ; Thu, 12 Aug 2021 22:14:28 -0400 (EDT) From: Denys Dmytriyenko To: meta-arago@arago-project.org Date: Thu, 12 Aug 2021 22:14:28 -0400 Message-Id: <1628820868-53610-1-git-send-email-denis@denix.org> X-Mailer: git-send-email 2.7.4 Subject: [dunfell][PATCH v2] grub: fix do_configure() breakage with external-arm toolchain X-BeenThere: meta-arago@arago-project.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Arago metadata layer for TI SDKs - OE-Core/Yocto compatible List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Aug 2021 02:14:11 -0000 From: Denys Dmytriyenko 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. Note: similar patch has been submitted upstream to meta-arm-toolchain: https://lists.yoctoproject.org/g/meta-arm/message/2163 Signed-off-by: Denys Dmytriyenko Cc: Tom Rini --- v2 - subject line in commit log got lost, fix it, no other changes meta-arago-distro/recipes-bsp/grub/grub%.bbappend | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 meta-arago-distro/recipes-bsp/grub/grub%.bbappend diff --git a/meta-arago-distro/recipes-bsp/grub/grub%.bbappend b/meta-arago-distro/recipes-bsp/grub/grub%.bbappend new file mode 100644 index 0000000..1e5ea43 --- /dev/null +++ b/meta-arago-distro/recipes-bsp/grub/grub%.bbappend @@ -0,0 +1,9 @@ +# When external-arm toolchain is not in use, EAT_TARGET_SYS is undefined, +# causing below _append expansion to break - just weakly set it to empty +EAT_TARGET_SYS ?= "" + +# 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}'][d.getVar('TCMODE') == 'external-arm']}" -- 2.7.4