On 3/12/21 11:57 AM, Daniel Mack wrote:
> Hi,
> 
> I'm using Yocto with the gatesgarth branches of poky and meta-xilinx to
> build a kernel image for a custom MicroBlaze design. This results in
> kernel images that silently fail to boot.

The compiler in Zeus -02 and Gatesgarth -02 changed the default options.
Gatesgarth (and newer) now includes -ftree-loop-distribute-patterns by default.
 This causes kernel (and baremetal) build failures.

The temporary workaround is to disable that by default, setting
-fno-tree-loop-distribute-patterns.

> After many hours of failed attempts, I found a blog post[*] that uses
> buildroot for a similar setup and out of despair, I tried that. I used
> the latest release of buildroot (2021.02) and selected gcc 10.2.0 to
> match the version that is currently used in Yocto. Much to my surprise,
> this resulted in a toolchain that is able to build bootable kernel
> images. Which proofs that the FPGA design and the rest of the setup is fine.

Sounds like they changed the default in some way.

The issue is being worked on.

--Mark

> So I have two toolchains now, and I'm trying to understand what causes
> the difference in behavior. Funny enough, buildroot doesn't apply any
> patches to binutils or gcc that seem relevant for MicroBlaze, so for
> testing, I disabled all patches for those components on the Yocto side
> as well, but that didn't help either.
> 
> I've also played with different TUNE_FEATURES, but AFAIU, in case of the
> kernel these flags are set by the kernel build system directly anyway,
> and hence they are the same for both toolchains.
> 
> Setting BUILD_OPTIMIZATION="-Os" (which is the default in buildroot)
> doesn't change anything, neither does building buildroot with -O2.
> 
> A recursive diff of the trees produced by the two toolchains show the
> following files are different, while all other binary object files are
> identical:
> 
>  ./arch/microblaze/lib/memset.o
>  ./block/elevator.o
>  ./fs/dcache.o
>  ./fs/buffer.o
>  ./fs/io_uring.o
>  ./init/main.o
>  ./init/version.o
>  ./kernel/irq/irqdomain.o
>  ./kernel/user.o
>  ./kernel/workqueue.o
>  ./kernel/configs.o
>  ./lib/vsprintf.o
>  ./lib/rhashtable.o
>  ./mm/mincore.o
>  ./vmlinux.o
> 
> 
> I would certainly appreciate any pointer on where to continue digging,
> as I need to have this working in Yocto. What MicroBlaze designs have
> successfully booted with meta-xilinx/gatesgarth at this point?
> 
> 
> Best regards,
> Daniel
> 
> 
> 
> [*]
> https://numato.com/kb/saturn-microblaze-and-linux-how-run-linux-saturn-spartan-6-fpga-module-part-ii/
> 
> 
> 
> 
> 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#4868): 
https://lists.yoctoproject.org/g/meta-xilinx/message/4868
Mute This Topic: https://lists.yoctoproject.org/mt/81285762/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-xilinx/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to