* [Buildroot] [Help] Using an external toolchain
@ 2025-01-11 13:32 Kilian Zinnecker via buildroot
2025-01-11 22:41 ` Mattia Narducci
0 siblings, 1 reply; 3+ messages in thread
From: Kilian Zinnecker via buildroot @ 2025-01-11 13:32 UTC (permalink / raw)
To: buildroot
Hello,
I'd like to use an external toolchain, to speedup building my images.
Buildroot supports this and also has a subsection (6.1.2) about this in the
manual [1]. However, I was not able to straight forward set up using an
external bootlin toolchain from the manual. I.e., I wanted to set up the
easiest way, i.e., to use a predefined external toolchain profile. Hence, I
set:
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_RISCV64_LP64D_GLIBC_STABLE=y
However, with only these settings, I get errors, e.g., that the headers are
not correct (2.6 in opposite to 5.4). Therefore, step by step, I add more
options:
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_RISCV64_LP64D_GLIBC_STABLE=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_4=y
BR2_TOOLCHAIN_EXTERNAL_GCC_13=y
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_TOOLCHAIN_EXTERNAL_OPENMP=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
# BR2_TOOLCHAIN_EXTERNAL_INET_RPC is not set
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
BR2_TOOLCHAIN_EXTERNAL_URL="https://toolchains.bootlin.com/downloads/releases/
toolchains/riscv64-lp64d/tarballs/riscv64-lp64d--glibc--
stable-2024.05-1.tar.xz"
With all these options, I can then use the bootlin toolchain. However, I am
not so sure, whether this is correct this way? In
toolchain-external-bootlin/Config.in.options there are a lot of options
already set, e.g., BR2_TOOLCHAIN_HAS_OPENMP, so I think that maybe I should
not have to manually set this? So maybe I am doing something wrong here? Any
help appreciated!
I also believe to remember, that in the past I saw some protocol/log from last
year's buildroot developer meeting, and I believe to remember that it
encouraged using external toolchains for board supports - but I can be wrong
about this. I also don't find that protocol anymore, does it still exist
somewhere? And what is the current best practise for external toolchains and
board supports? I.e., when contributing a new board support, may that board
support use an external toolchain?
Thanks and best regards,
Kilian
[1] https://buildroot.org/downloads/manual/
manual.html#_cross_compilation_toolchain
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [Help] Using an external toolchain
2025-01-11 13:32 [Buildroot] [Help] Using an external toolchain Kilian Zinnecker via buildroot
@ 2025-01-11 22:41 ` Mattia Narducci
2025-01-11 22:49 ` Kilian Zinnecker via buildroot
0 siblings, 1 reply; 3+ messages in thread
From: Mattia Narducci @ 2025-01-11 22:41 UTC (permalink / raw)
To: Kilian Zinnecker; +Cc: buildroot
On Sat, 11 Jan 2025 14:32:05 +0100 Kilian Zinnecker wrote:
> Hello,
>
> I'd like to use an external toolchain, to speedup building my images.
> Buildroot supports this and also has a subsection (6.1.2) about this in the
> manual [1]. However, I was not able to straight forward set up using an
> external bootlin toolchain from the manual. I.e., I wanted to set up the
> easiest way, i.e., to use a predefined external toolchain profile. Hence, I
> set:
>
> BR2_TOOLCHAIN_EXTERNAL=y
> BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
> BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_RISCV64_LP64D_GLIBC_STABLE=y
>
> However, with only these settings, I get errors, e.g., that the headers are
> not correct (2.6 in opposite to 5.4). Therefore, step by step, I add more
> options:
Hello Kilian,
I just tried building qemu_riscv64_virt_defconfig with the same
toolchain you selected:
diff --git a/configs/qemu_riscv64_virt_defconfig b/configs/qemu_riscv64_virt_defconfig
index d9f715198a..aa7eb55091 100644
--- a/configs/qemu_riscv64_virt_defconfig
+++ b/configs/qemu_riscv64_virt_defconfig
@@ -1,5 +1,6 @@
BR2_riscv=y
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
+BR2_TOOLCHAIN_EXTERNAL=y
+BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_RISCV64_LP64D_GLIBC_STABLE=y
BR2_GLOBAL_PATCH_DIR="board/qemu/patches"
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
BR2_SYSTEM_DHCP="eth0"
and I can't see any problem.
Maybe you missed BR2_riscv=y, the target architecture for your board,
which the bootlin toolchain for RISCV64 depends on?
Best regards,
Mattia
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [Help] Using an external toolchain
2025-01-11 22:41 ` Mattia Narducci
@ 2025-01-11 22:49 ` Kilian Zinnecker via buildroot
0 siblings, 0 replies; 3+ messages in thread
From: Kilian Zinnecker via buildroot @ 2025-01-11 22:49 UTC (permalink / raw)
To: Mattia Narducci; +Cc: buildroot
Hello Mattia,
[--SNIP--]
> I just tried building qemu_riscv64_virt_defconfig with the same
> toolchain you selected:
>
> diff --git a/configs/qemu_riscv64_virt_defconfig
> b/configs/qemu_riscv64_virt_defconfig index d9f715198a..aa7eb55091 100644
> --- a/configs/qemu_riscv64_virt_defconfig
> +++ b/configs/qemu_riscv64_virt_defconfig
> @@ -1,5 +1,6 @@
> BR2_riscv=y
> -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
> +BR2_TOOLCHAIN_EXTERNAL=y
> +BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_RISCV64_LP64D_GLIBC_STABLE=y
> BR2_GLOBAL_PATCH_DIR="board/qemu/patches"
> BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
> BR2_SYSTEM_DHCP="eth0"
>
> and I can't see any problem.
>
> Maybe you missed BR2_riscv=y, the target architecture for your board,
> which the bootlin toolchain for RISCV64 depends on?
I do have BR2_riscv=y in my defconfig. However, I didn't remove the config for
the custom headers, in my case BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_12=y.
Why is it necessary to remove this parameter, and could not removing it have
caused my problems?
Thanks and best regards,
Kilian
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-01-11 22:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-11 13:32 [Buildroot] [Help] Using an external toolchain Kilian Zinnecker via buildroot
2025-01-11 22:41 ` Mattia Narducci
2025-01-11 22:49 ` Kilian Zinnecker via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox