From: Kilian Zinnecker via buildroot <buildroot@buildroot.org>
To: buildroot@buildroot.org
Cc: Yu Chien Peter Lin <peterlin@andestech.com>,
ycliang@andestech.com, thomas.petazzoni@bootlin.com
Subject: Re: [Buildroot] [PATCH] andes_ae350_45: Fix build issues of AE350
Date: Sat, 12 Aug 2023 14:00:00 +0200 [thread overview]
Message-ID: <2300152.ElGaqSPkdT@kilian-aisec> (raw)
In-Reply-To: <20230812110359.27170-1-peterlin@andestech.com>
Hello Yu Chien Peter,
> - Select RVA extension so the toolchain uses glibc by default
> - Enable Zifencei and Zicsr for gcc-12 to fix U-Boot build failure
Yeah, this zifencei_zicsr extension flag thing is annoying ...
> Fixes:
> - https://gitlab.com/buildroot.org/buildroot/-/jobs/4839059655
>
> Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
> ---
> configs/andes_ae350_45_defconfig | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/configs/andes_ae350_45_defconfig
> b/configs/andes_ae350_45_defconfig index 998276635b..faf29b8b6b 100644
> --- a/configs/andes_ae350_45_defconfig
> +++ b/configs/andes_ae350_45_defconfig
> @@ -1,6 +1,7 @@
> BR2_riscv=y
> BR2_riscv_custom=y
> BR2_RISCV_ISA_CUSTOM_RVM=y
> +BR2_RISCV_ISA_CUSTOM_RVA=y
> BR2_RISCV_ISA_CUSTOM_RVF=y
> BR2_RISCV_ISA_CUSTOM_RVD=y
> BR2_RISCV_ISA_CUSTOM_RVC=y
> @@ -38,7 +39,7 @@ BR2_TARGET_UBOOT_NEEDS_OPENSBI=y
> BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
> BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb"
> BR2_TARGET_UBOOT_SPL=y
> -BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="ARCH_FLAGS=-march=rv64imafdc"
> +BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="ARCH_FLAGS=-march=rv64imafdc_zifencei_zic
> sr" BR2_PACKAGE_HOST_DOSFSTOOLS=y
> BR2_PACKAGE_HOST_GENIMAGE=y
> BR2_PACKAGE_HOST_MTOOLS=y
I am not sure, whether you need to specify custom makeopts for uboot after
all: Looking at the current andes_ae350_45_defconfig (https://gitlab.com/
buildroot.org/buildroot/-/blob/4de60e41c3487946712da6d889ef89d325c2032a/
configs/andes_ae350_45_defconfig), it seems, that there is no special/custom gcc
version defined. Hence the gcc version should be buildroot's current default
version, i.e., v12.3.0. For this version, buildroot already adds the flags for
zifencei and zicsr extension, see here:
https://gitlab.com/buildroot.org/buildroot/-/blob/
4de60e41c3487946712da6d889ef89d325c2032a/arch/arch.mk.riscv#L38-39
And I also believe, that these defines should be sufficient to set the rv64imafdc
flags:
> BR2_RISCV_ISA_CUSTOM_RVM=y
> +BR2_RISCV_ISA_CUSTOM_RVA=y
> BR2_RISCV_ISA_CUSTOM_RVF=y
> BR2_RISCV_ISA_CUSTOM_RVD=y
> BR2_RISCV_ISA_CUSTOM_RVC=y
So I think setting BR2_RISCV_ISA_CUSTOM_RVA=y is correct. However, you could
try whether it works, if you then completely remove the
BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS?
Best regards,
Kilian
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-08-12 12:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-12 11:03 [Buildroot] [PATCH] andes_ae350_45: Fix build issues of AE350 Yu Chien Peter Lin
2023-08-12 12:00 ` Kilian Zinnecker via buildroot [this message]
2023-08-12 12:27 ` Thomas Petazzoni via buildroot
2023-08-14 2:19 ` Yu-Chien Peter Lin
2023-08-12 12:25 ` Thomas Petazzoni via buildroot
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=2300152.ElGaqSPkdT@kilian-aisec \
--to=buildroot@buildroot.org \
--cc=kilian.zinnecker@mail.de \
--cc=peterlin@andestech.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=ycliang@andestech.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