Re: [PATCH 0/3] tools/nolibc: add support for SuperH

From: Thomas Weißschuh
Date: Mon Jun 09 2025 - 06:05:30 EST


Hi Adrian,

On 2025-06-09 11:53:25+0200, John Paul Adrian Glaubitz wrote:
> On Mon, 2025-06-09 at 11:28 +0200, Thomas Weißschuh wrote:
> > Add support for SuperH/"sh" to nolibc.
> > Only sh4 is tested for now.
> >
> > This is only tested on QEMU so far.
> > Additional testing would be very welcome.
> >
> > Signed-off-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>
> > ---
> > Thomas Weißschuh (3):
> > selftests/nolibc: fix EXTRACONFIG variables ordering
> > selftests/nolibc: use file driver for QEMU serial
> > tools/nolibc: add support for SuperH
> >
> > tools/include/nolibc/arch-sh.h | 162 ++++++++++++++++++++++++++++
> > tools/include/nolibc/arch.h | 2 +
> > tools/testing/selftests/nolibc/Makefile | 15 ++-
> > tools/testing/selftests/nolibc/run-tests.sh | 3 +-
> > 4 files changed, 177 insertions(+), 5 deletions(-)
> > ---
> > base-commit: 6275a61db2f0586b8a5d651dfc7b4aacf9d0b2d6
> > change-id: 20250528-nolibc-sh-8b4e3bb8efcb
>
> I have no experience with the selftest code but I can definitely test
> on real hardware if you can point me to some instructions on how to
> run the tests.

That would be much appreciated.
You can compile the selftests like this:

$ cd tools/testing/selftests/nolibc
$ make [CC= CFLAGS_EXTRA=] nolibc-test
$ ./nolibc-test

The test executable is fully self-contained, you can also cross-compile
it and copy it around.


Thomas