Re: [PATCH] Fix J-core aic warning spam
Rob Landley <[email protected]>
| Newsgroups | gmane.linux.ports.sh.devel |
|---|---|
| Message-ID | <[email protected]> |
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".) 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 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 That bash script is only ~350 lines and reasonably self contained, probably 15 minutes to read through if you're curious. (I keep meaning to put an explainer video on youtube...) I can send a cpio.gz if you like, or dig up a busybox one if you'd prefer that? >> The interesting bits for your purposes are probably: >> >> https://github.com/richfelker/musl-cross-make/blob/master/patches/gcc-9.4.0/0007-j2.diff >> >> https://github.com/richfelker/musl-cross-make/blob/master/patches/binutils-2.33.1/0001-j2.diff > > 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 > 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. 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... 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...) Rob