meta-arm.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
From: "Jon Mason" <jdmason@kudzu.us>
To: Denys Dmytriyenko <denis@denix.org>
Cc: meta-arm@lists.yoctoproject.org,
	Denys Dmytriyenko <denys@konsulko.com>,
	 Tom Rini <trini@konsulko.com>
Subject: Re: [meta-arm] [PATCH] arm-toolchain: grub: fix do_configure() breakage with external-arm toolchain
Date: Thu, 12 Aug 2021 23:38:30 -0400	[thread overview]
Message-ID: <CAPoiz9w_ACnZms4PNEX11XMuwb7WH-dooqKYz77WSE+tdxMUMA@mail.gmail.com> (raw)
In-Reply-To: <1628791735-4366-1-git-send-email-denis@denix.org>

On Thu, Aug 12, 2021 at 2:09 PM Denys Dmytriyenko <denis@denix.org> wrote:
>
> From: Denys Dmytriyenko <denys@konsulko.com>
>
> 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>

With this change, CI no longer passes check-layers.  See
https://gitlab.com/jonmason00/meta-arm/-/jobs/1500144360


> ---
>  meta-arm-toolchain/recipes-bsp/grub/grub%.bbappend | 9 +++++++++
>  1 file changed, 9 insertions(+)
>  create mode 100644 meta-arm-toolchain/recipes-bsp/grub/grub%.bbappend
>
> diff --git a/meta-arm-toolchain/recipes-bsp/grub/grub%.bbappend b/meta-arm-toolchain/recipes-bsp/grub/grub%.bbappend
> new file mode 100644
> index 0000000..3bdfe3d
> --- /dev/null
> +++ b/meta-arm-toolchain/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
>
>
> 
>

      reply	other threads:[~2021-08-13  3:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-12 18:08 [PATCH] arm-toolchain: grub: fix do_configure() breakage with external-arm toolchain Denys Dmytriyenko
2021-08-13  3:38 ` Jon Mason [this message]

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=CAPoiz9w_ACnZms4PNEX11XMuwb7WH-dooqKYz77WSE+tdxMUMA@mail.gmail.com \
    --to=jdmason@kudzu.us \
    --cc=denis@denix.org \
    --cc=denys@konsulko.com \
    --cc=meta-arm@lists.yoctoproject.org \
    --cc=trini@konsulko.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;
as well as URLs for NNTP newsgroup(s).