Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Ceresoli via buildroot <buildroot@buildroot.org>
To: "Frager, Neal" <neal.frager@amd.com>,
	"thomas.petazzoni@bootlin.com" <thomas.petazzoni@bootlin.com>
Cc: "buildroot@buildroot.org" <buildroot@buildroot.org>,
	"Simek, Michal" <michal.simek@amd.com>,
	"Erkiaga Elorza, Ibai" <ibai.erkiaga-elorza@amd.com>
Subject: Re: [Buildroot] [PATCH v3 1/6] package/binutils-bare-metal: new package
Date: Tue, 3 Oct 2023 09:15:39 +0200	[thread overview]
Message-ID: <20231003091539.5e26d558@booty> (raw)
In-Reply-To: <CH2PR12MB50046780037DB7AF933A119FF0C6A@CH2PR12MB5004.namprd12.prod.outlook.com>

Hi Neal, Peter,

On Sun, 1 Oct 2023 16:11:23 +0000
"Frager, Neal" <neal.frager@amd.com> wrote:

> Hello Peter,
> 
>  >>> Is this ok for both of you?  
>  >>
>  >> I'm OK with the whole approach, except for the sentence "I do not  >> believe there is currently any organized effort to upstream any of  >> these patches"... which is probably already clear to the recipients  >> of this message, and thus is not going to be solved in this thread,  >> however I just want to be sure my position is clear. I'd also like to  >> stress that I appreciate a lot the work you are doing to properly  >> support the pmufw in Buildroot. Thanks!
>  >>
>  >> Luca  
> 
>  > Your position is very clear.  And I can assure you that both Ibai and I agree with it.  
> 
>  > It would be much better if all of these binutils and gcc patches for  > microblaze go upstream, and both Ibai and I have pushed for it  > internally at AMD / Xilinx.  
> 
>  > The only thing I can say is that change is always possible.
>  > Yesterday, we could not build a zynqmp pmufw, versal plm or versal  > psmfw in buildroot.  Today, we have submitted a solution to change  > that.  
> 
>  > Tomorrow (figurative meaning the future), we hope to get all these  > binutils and gcc patches upstream, so the upstream toolchain matches  > the AMD Xilinx distributed toolchain.  
> 
>  > One step at a time.  
> 
> > Sure! Sorry, I am somewhat late to the review game here. I wonder how this fits with Luca's zynqmp-pmufw-builder?  
> 
> From my view, we can continue maintaining Luca's zynqmp-pmufw-builder in parallel.  Buildroot will still offer the option to accept a pre-built pmufw binary without needing to build a microblaze toolchain, so if users prefer to build the pmufw outside of buildroot (to have a faster buildroot build perhaps), this capability will still be available.

As Neal wrote, if/when Buildroot will be able to build a pmufw on its
own (with the proposed approach, or a downloaded toolchain, or
both), zynqmp-pmufw-builder can continue existing even though the use
cases for it will be reduced. I have no plan to stop maintaining it for
the foreseeable future.

> > E.G. today the setup is that the pmufw is built outside Buildroot and we just point the u-boot package to where it can fetch the prebuilt firmware binary - This is nice in the sense that it is fast and simple, but makes is somewhat annoying to make modifications to the firmware.  
> 
> > This series instead goes to the other extreme, E.G. we build the entire microblaze toolchain from scratch and then use it to build the firmware and use it in the u-boot package - This is nice because it is all in Buildroot and we have it all under control, but also brings quite some build time overhead for building the toolchain before building the  
> (small) toolchain. You can naturally "solve" it by using two defconfigs, E.G. one that builds the pmufw and another that uses the prebuilt one, but it isn't very handy either.

I think the approach taken here by Neal and Ibai is valuable,
especially as it would allow Buildroot defconfigs to be self-standing.
Additionally it is already proving useful as it prompted "the
community" (mostly Neal -- thanks about that) to upstream patches
needed to support Microblaze in binutils and gcc, that are currently
downstream.

> > Would an in between option not be more interesting, E.G. use (or  
> download) a prebuilt microblaze toolchain and use that to build the firmware? That would still give the flexibility to easily tweak the firmware, but not the overhead of building the toolchain every time?
> 
> > I guess the problems with that are what to do about the meta-xilinx patches and where/who wants to host a prebuilt one?  
> 
> This is a good point.  As for the meta-xilinx patches, Ibai and I have started going through them and have even started upstreaming a few.  The majority of the meta-xilinx patches are actually for enabling 64-bit microblaze support, which is not available in the upstream gnu binutils or gcc.  Since we do not need 64-bit microblaze for the zynqmp pmufw or the versal plm and psmfw applications, we can easily skip these patches.
> 
> Our current objective is to get all microblaze 32-bit bug fix and feature support patches (such as the barrel shift instructions used by the pmufw) upstreamed.  Since this appears to be a small subset of the overall meta-xilinx patches, we hope to be able to enable the use of the upstream gnu binutils and gcc, so that the meta-xilinx patches will no longer be needed for our use case of building the zynqmp pmufw, versal plm and versal psmfw applications.
> 
> However, in order to achieve what you are asking for, we would still need someone to host a pre-built microblaze compiler somewhere, if we would want to go this route.  At the moment, it is not in the AMD Xilinx plan to host the toolchains somewhere outside of a Petalinux or Vitis download.
> 
> If the upstream toolchain included all the necessary meta-xilinx patches, could bootlin potentially host a pre-built toolchain somewhere?

I fyou are thinking about toolchains.bootlin.com, I am not the
maintainer of those toolchains but I think the idea is to only have
Linux toolchains there, not bare metal ones, thus newlib is not
supported. Also I'm pretty sure downstream feature patches are
absolutely not welcome there.

Luca

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2023-10-03  7:15 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-04 10:04 [Buildroot] [PATCH v3 1/6] package/binutils-bare-metal: new package Neal Frager via buildroot
2023-09-04 10:04 ` [Buildroot] [PATCH v3 2/6] package/gcc-bare-metal: " Neal Frager via buildroot
2023-09-22 12:53   ` Luca Ceresoli via buildroot
2023-09-04 10:04 ` [Buildroot] [PATCH v3 3/6] package/newlib-bare-metal: " Neal Frager via buildroot
2023-09-22 12:54   ` Luca Ceresoli via buildroot
2023-09-04 10:04 ` [Buildroot] [PATCH v3 4/6] package/toolchain-bare-metal: " Neal Frager via buildroot
2023-09-22 12:55   ` Luca Ceresoli via buildroot
2023-09-04 10:04 ` [Buildroot] [PATCH v3 5/6] boot/zynqmp-firmware: new boot firmware Neal Frager via buildroot
2023-09-22 12:57   ` Luca Ceresoli via buildroot
2023-09-04 10:04 ` [Buildroot] [PATCH v3 6/6] boot/uboot.mk: new zynqmp pmufw build option Neal Frager via buildroot
2023-09-22 12:58   ` Luca Ceresoli via buildroot
2023-09-22 12:52 ` [Buildroot] [PATCH v3 1/6] package/binutils-bare-metal: new package Luca Ceresoli via buildroot
2023-09-22 13:34   ` Frager, Neal via buildroot
2023-09-22 13:57     ` Luca Ceresoli via buildroot
2023-09-22 14:57       ` Frager, Neal via buildroot
     [not found]         ` <MN0PR12MB60045761B225083426E7B1A1A0FFA@MN0PR12MB6004.namprd12.prod.outlook.com>
2023-09-23  9:50           ` Frager, Neal via buildroot
2023-09-25  2:59             ` Luca Ceresoli via buildroot
2023-09-25  3:43               ` Frager, Neal via buildroot
2023-10-01 11:24                 ` Peter Korsgaard
2023-10-01 16:11                   ` Frager, Neal via buildroot
2023-10-03  7:15                     ` Luca Ceresoli via buildroot [this message]
2023-10-04 21:57                       ` Thomas Petazzoni via buildroot
2023-10-05  5:59                         ` Frager, Neal 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=20231003091539.5e26d558@booty \
    --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