[Buildroot] [PATCH v3 1/6] package/binutils-bare-metal: new package

Luca Ceresoli luca.ceresoli at bootlin.com
Mon Sep 25 02:59:44 UTC 2023


Hi Neal, Ibai,

On Sat, 23 Sep 2023 09:50:34 +0000
"Frager, Neal" <neal.frager at amd.com> wrote:

> > > From my view, it is easier for me to maintain this if we either take
> > > all of the  
> > patches as is or none at all.
> >  
> > > Agreed it is simpler to maintain, so this boils down to the question:
> > > are those patches being actively mainlined? I have a sad feeling
> > > about it as  
> > the number and overall quality of those patches seems the same I saw
> > more than an year ago.
> >
> > As a quick test, I tried removing the Xilinx patch set to see if the
> > build would still work.
> >
> > I ended up getting the following build error with the zynqmp pmufw:
> > microblaze_sleep.c:81:9: note: '#pragma message: For the sleep
> > routines, assembly instructions are used'
> >    81 | #pragma message ("For the sleep routines, assembly
> > instructions are
> > used")
> >       |         ^~~~~~~
> > microblaze_selftest.S: Assembler messages:
> > microblaze_selftest.S:554: Error: unknown opcode "bsifi"
> > microblaze_selftest.S:555: Error: unknown opcode "bsefi"
> >
> > This is the same error we see when using the zynqmp-pmufw-builder.
> >
> > I will go through the gcc patch set.  Perhaps instead of applying all
> > patches, I just look for the one that fixes the above issue and apply that.
> >  
> 
> > Note that the microblaze toolchain build in Yocto where these patches are coming from, is a multilib configuration to support different microblaze configurations. As the goal of this package is to build just a toolchain for the PMU (and PMC in Versal) there is no need for multilib configuration and neither for some of these patches (i.e. 64bit architecture). The tricky point is to figure out which ones are really needed for this use case 😊  
> 
> I tried cherry-picking the patches needed for the bsifi and bsefi instructions.  Unfortunately, both the binutils and gcc patch sets include many modifications of the same source files.
> 
> For example, if I only apply the gcc patch 0024-Patch-MicroBlaze-this-patch-has-1.Fixed-the-bug-in.patch that adds the bsifi and bsefi functionality, it cannot apply unless I have several proceeding patches included too.  And then when I only include the patches needed for applying this update, gcc does not build properly unless I include even more patches.
> 
> The only way I can easily find for adding the patches for the bsifi and bsefi instructions is to just include the full set of 54 patches.  When I do this, I can build gcc and the zynqmp pmufw without errors.
> 
> Since patches are required in both the binutils set and the gcc set, I think the easiest solution for us is to just take the full patch set for each that yocto is using.
> 
> I do not believe there is currently any organized effort to upstream any of these patches, but every AMD Xilinx software release will include a microblaze compiler with a patch set that we can apply.  To keep maintenance of all this as easy as possible, I believe the best solution is to just apply the full patch set for binutils and gcc every time.
> 
> 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

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



More information about the buildroot mailing list