Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Neal Frager via buildroot <buildroot@buildroot.org>
Cc: michal.simek@amd.com, ibai.erkiaga-elorza@amd.com,
	luca.ceresoli@bootlin.com, Neal Frager <neal.frager@amd.com>
Subject: Re: [Buildroot] [PATCH v6 04/10] toolchain/toolchain-bare-metal-buildroot: new toolchain
Date: Tue, 31 Oct 2023 13:51:10 +0100	[thread overview]
Message-ID: <20231031135110.3927dd18@windsurf> (raw)
In-Reply-To: <20231020114236.4129636-4-neal.frager@amd.com>

Hello,

On Fri, 20 Oct 2023 12:42:30 +0100
Neal Frager via buildroot <buildroot@buildroot.org> wrote:


> diff --git a/toolchain/Config.in b/toolchain/Config.in
> index d8081f1b9d..b1333f92f0 100644
> --- a/toolchain/Config.in
> +++ b/toolchain/Config.in
> @@ -59,6 +59,7 @@ config BR2_TOOLCHAIN_EXTERNAL
>  
>  endchoice
>  
> +source "toolchain/toolchain-bare-metal-buildroot/Config.in"
>  source "toolchain/toolchain-buildroot/Config.in"
>  source "toolchain/toolchain-external/Config.in"

I'm not really happy with where this ends up showing in menuconfig.
Indeed, in menuconfig, we end up seeing something like this:

    Toolchain type (External toolchain)  --->
[*] host toolchain-bare-metal
-*-   host binutils-bare-metal
-*-   host gcc-bare-metal
-*-   host newlib-bare-metal
    *** Toolchain External Options ***
    Toolchain (Bootlin toolchains)  --->

So basically, right in the middle of the settings for the "normal"
toolchain, we have those options about the bare-metal toolchain.

Maybe something like this instead:

diff --git a/toolchain/Config.in b/toolchain/Config.in
index b1333f92f0..278d1de65c 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -59,7 +59,6 @@ config BR2_TOOLCHAIN_EXTERNAL
 
 endchoice
 
-source "toolchain/toolchain-bare-metal-buildroot/Config.in"
 source "toolchain/toolchain-buildroot/Config.in"
 source "toolchain/toolchain-external/Config.in"
 
@@ -919,4 +918,8 @@ config BR2_TOOLCHAIN_HAS_LIBQUADMATH
        default y if BR2_i386 || BR2_x86_64
        default y if BR2_POWERPC_CPU_HAS_VSX
 
+comment "Bare metal toolchain"
+
+source "toolchain/toolchain-bare-metal-buildroot/Config.in"
+
 endmenu

Basically, move it at the end of toolchain/Config.in, with a small
Config.in comment separating it from the rest.

>  
> diff --git a/toolchain/toolchain-bare-metal-buildroot/Config.in b/toolchain/toolchain-bare-metal-buildroot/Config.in
> new file mode 100644
> index 0000000000..6ebf2cdf86
> --- /dev/null
> +++ b/toolchain/toolchain-bare-metal-buildroot/Config.in
> @@ -0,0 +1,21 @@
> +config BR2_PACKAGE_HOST_TOOLCHAIN_BARE_METAL_BUILDROOT
> +	bool "host toolchain-bare-metal"
> +	select BR2_PACKAGE_HOST_BINUTILS_BARE_METAL
> +	select BR2_PACKAGE_HOST_GCC_BARE_METAL
> +	select BR2_PACKAGE_HOST_NEWLIB_BARE_METAL

Those selects are no longer needed, as all those options will be gone.

> +	help
> +	  Build a bare-metal toolchain in addition to the main Linux toolchain
> +
> +if BR2_PACKAGE_HOST_TOOLCHAIN_BARE_METAL_BUILDROOT
> +
> +config BR2_PACKAGE_HOST_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH
> +	string

This option needs to be made visible (with a prompt), otherwise nobody
can chose a different architecture/tuple.

> +	default "microblazeel-xilinx"

Is "xilinx" really relevant here? I don't think it is. I'm also
wondering whether having a default value actually makes sense. It
should probably just stay empty by default, and be defined by the
specific defconfigs that need this?

> +	help
> +	  select architecture for bare-metal toolchain
> +
> +source "package/binutils-bare-metal/Config.in.host"
> +source "package/gcc-bare-metal/Config.in.host"
> +source "package/newlib-bare-metal/Config.in.host"

These file inclusions can be dropped.

> +++ b/toolchain/toolchain-bare-metal-buildroot/toolchain-bare-metal-buildroot.mk
> @@ -0,0 +1,7 @@
> +################################################################################
> +#
> +# toolchain-bare-metal-buildroot
> +#
> +################################################################################
> +
> +(eval $(host-virtual-package))

I'm a bit rusty with virtual packages, but I don't see where this
virtual package pulls in host-newlib-bare-metal as a dependency. Don't
you need:

TOOLCHAIN_BARE_METAL_BUILDROOT_DEPENDENCIES = host-newlib-bare-metal

to make sure you trigger the build of host-newlib-bare-metal ->
host-gcc-bare-metal -> host-binutils-bare-metal ?

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2023-10-31 12:51 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-20 11:42 [Buildroot] [PATCH v6 01/10] package/binutils-bare-metal: new package Neal Frager via buildroot
2023-10-20 11:42 ` [Buildroot] [PATCH v6 02/10] package/gcc-bare-metal: " Neal Frager via buildroot
2023-10-26 16:06   ` Luca Ceresoli via buildroot
2023-10-31 12:41   ` Thomas Petazzoni via buildroot
2023-10-20 11:42 ` [Buildroot] [PATCH v6 03/10] package/newlib-bare-metal: " Neal Frager via buildroot
2023-10-26 16:07   ` Luca Ceresoli via buildroot
2023-10-31 12:43   ` Thomas Petazzoni via buildroot
2023-11-01 11:43     ` Frager, Neal via buildroot
2023-11-01 11:50       ` Thomas Petazzoni via buildroot
2023-11-01 13:23         ` Frager, Neal via buildroot
2023-11-01 13:42           ` Yann E. MORIN
2023-11-02  9:35             ` Frager, Neal via buildroot
2023-11-02  9:37               ` Thomas Petazzoni via buildroot
2023-11-02 10:27                 ` Frager, Neal via buildroot
2023-11-14  5:47             ` Frager, Neal via buildroot
2023-11-15 18:12               ` Yann E. MORIN
2023-11-16 10:20                 ` Frager, Neal via buildroot
2023-11-16 11:32                   ` Frager, Neal via buildroot
2023-10-31 12:52   ` Thomas Petazzoni via buildroot
2023-10-20 11:42 ` [Buildroot] [PATCH v6 04/10] toolchain/toolchain-bare-metal-buildroot: new toolchain Neal Frager via buildroot
2023-10-26 16:07   ` Luca Ceresoli via buildroot
2023-10-31 12:51   ` Thomas Petazzoni via buildroot [this message]
2023-11-02  9:47     ` Frager, Neal via buildroot
2023-10-20 11:42 ` [Buildroot] [PATCH v6 05/10] boot/zynqmp-firmware: new boot firmware Neal Frager via buildroot
2023-10-26 16:07   ` Luca Ceresoli via buildroot
2023-10-31 12:54   ` Thomas Petazzoni via buildroot
2023-10-31 19:07     ` Frager, Neal via buildroot
2023-11-01  9:24       ` Thomas Petazzoni via buildroot
2023-11-01 10:18         ` Frager, Neal via buildroot
2023-10-20 11:42 ` [Buildroot] [PATCH v6 06/10] boot/uboot.mk: new zynqmp pmufw build option Neal Frager via buildroot
2023-10-26 16:07   ` Luca Ceresoli via buildroot
2023-10-20 11:42 ` [Buildroot] [PATCH v6 07/10] configs/zynqmp*: build pmufw source Neal Frager via buildroot
2023-10-26 16:07   ` Luca Ceresoli via buildroot
2023-10-20 11:42 ` [Buildroot] [PATCH v6 08/10] boot/versal-firmware: new boot firmware Neal Frager via buildroot
2023-10-26 16:08   ` Luca Ceresoli via buildroot
2023-10-31 12:57   ` Thomas Petazzoni via buildroot
2023-10-20 11:42 ` [Buildroot] [PATCH v6 09/10] configs/versal_vck190_defconfig: build plm and psmfw source Neal Frager via buildroot
2023-10-26 16:08   ` Luca Ceresoli via buildroot
2023-10-20 11:42 ` [Buildroot] [PATCH v6 10/10] package/versal-firmware: remove package Neal Frager via buildroot
2023-10-26 16:08   ` Luca Ceresoli via buildroot
2023-10-26 11:59 ` [Buildroot] [PATCH v6 01/10] package/binutils-bare-metal: new package Frager, Neal via buildroot
2023-10-26 16:06 ` Luca Ceresoli via buildroot
2023-10-31  7:32   ` Frager, Neal via buildroot
2023-10-31 12:37 ` 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=20231031135110.3927dd18@windsurf \
    --to=buildroot@buildroot.org \
    --cc=ibai.erkiaga-elorza@amd.com \
    --cc=luca.ceresoli@bootlin.com \
    --cc=michal.simek@amd.com \
    --cc=neal.frager@amd.com \
    --cc=thomas.petazzoni@bootlin.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