Re: [PATCH] Fix J-core aic warning spam

John Paul Adrian Glaubitz <[email protected]>
Newsgroups gmane.linux.ports.sh.devel
Message-ID <937ea351579dcf9f54b053e1272a11bbfbe6b6d4.camel@physik.fu-berlin.de>
Hi Rob!

On Sat, 2023-04-29 at 22:45 -0500, Rob Landley wrote:
> On 4/29/23 15:07, John Paul Adrian Glaubitz wrote:
> > Hi Rob!
> > 
> > On Wed, 2023-04-19 at 20:24 -0500, Rob Landley wrote:
> > > J-core binary toolchain tarball:
> > > 
> > > https://landley.net/toybox/downloads/binaries/toolchains/latest/sh2eb-linux-muslfdpic-cross.tar.xz
> > 
> > OK, I can actually build a J2 kernel with that. Are there instructions somewhere which explain
> > how to boot such a kernel on a Turtle board? Then I can give it a try on my personal one.
> 
> Just copy the vmlinux file to "vmlinux" on the sd card. (It needs an initramfs,
> or in theory a built-in kernel command line from kconfig doing the root= thing,
> but either way you should get serial output on the usb with something like "sudo
> busybox microcom -s 115200 /dev/ttyACM0".)

Thanks. I found my J2 board in the meantime.

> I built 6.3 with toybox's mkroot.sh and booted it on the board, although that
> was with a 10 patch stack in my tree. Only four of which are j-core related: one
> is the boot warning spam, of them adds the ugly ethernet driver, one makes uio
> work on nommu, and one adds support for a variable clock base because we plugged
> in some peripheral hardware that wasn't clocked in base 10 back in
> https://landley.net/notes-2020.html#04-11-2020 and... here, lemme just fling it
> all up github:
> 
>   https://github.com/landley/linux/commits/turtle-v6.3

We should get as many of these patches upstreamed as possible.

I will also continue reviewing old patches from the mailing list, I already
assembled a list of older patches many of which have not been applied.

If possible, the original author of the various J2 patches should post them
for review.

> That's my current stack forwarded ported on top of 6.3. You probably don't need
> most of that, but I booted it on the board a few days ago. (Yes, the ethernet
> driver is terrible.)
> 
> > And do you have a root filesystem available for J2 that I can use?
> 
> I mostly use a toybox mkroot build. The easy way to build it yourself is:
> 
>   git clone https://github.com/landley/toybox
>   cd toybox
>   mkroot/mkroot.sh CROSS_COMPILE=/path/to/sh2eb-linux-muslfdpic-
>   ls -l root/sh2eb

Thanks. That should be enough.

> > Do you know who authored these patches?
> 
> I think some came from Sato-san and the rest from Rich, but I'm not 100% sure?
> Rich has been the one maintaining them, and Jeff before that.
> 
> https://github.com/richfelker/musl-cross-make/commits/master/patches/gcc-5.3.0/0004-j2.diff
> implies that the patch came from Patrick Oppenlander, who sounds familiar?
> https://github.com/pattop

Doesn't ring a bell at the moment.

> > We should get these merged upstream which should be
> > easier these days since the FSF has lowered the barriers regarding the copyright assignment.
> 
> I'm all for it. Jeff had some more pending todo fixes for the toolchain that he
> might want to sweep up into such a push.

Jeff, your turn, please ;-).

> Me, I want to switch over to llvm but Jeff thinks its optimizer is still
> terrible for embedded systems. But then I've heard it had some pretty bad
> regressions 12.0 to, so...

While SuperH/J2 is not an official LLVM target, there is actually an LLVM toolchain
for J2, see:

> https://github.com/francisvm/j2-llvm

> I'm still using 9.4 because when I tried to build 11.2 back in February it went:
> 
> sh2eb-linux-muslfdpic/src_gcc/libstdc++-v3/../libgcc/unwind-pe.h:270:25: error:
> '_Unwind_gnu_Find_got' was not declared in this scope
>   270 |               result += _Unwind_gnu_Find_got ((_Unwind_Ptr) u);
> 
> And I haven't circled around to try to dig up why yet. (I want to bisect the gcc
> repo to see what commit broke it, but that involves getting the horrific
> autoconf dependency stack working which went REALLY WEIRD since the last time I
> looked at it, possibly version skew with debian oldstable package versions. The
> tarball versions ship cooked ./configure scripts that don't need the full
> gnu/aaaaaaaaah environment install with automake and everything...)

GCC for SH itself works fine for me, so I assume an issue with your build environment.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.