[PATCH 0/3] Add LoongArch support to nolibc

From: chris . chenfeiyang
Date: Mon Feb 06 2023 - 21:09:55 EST


From: Feiyang Chen <chenfeiyang@xxxxxxxxxxx>

Add statx() support to implement sys_stat().
Add support for LoongArch (32 and 64 bit) to nolibc.
It was tested on LoongArch64 only.

The latest QEMU support full-system emulation of a LoongArch64
machine, but for the moment we need to specify the firmware manually.
https://github.com/loongson/Firmware/tree/main/LoongArchVirtMachine

QEMU_ARGS_loongarch = -M virt -bios edk2-loongarch64-code.fd ...

Feiyang Chen (3):
nolibc: Add statx() support to implement sys_stat()
nolibc: Add support for LoongArch
selftests/nolibc: Add support for LoongArch

tools/include/nolibc/arch-loongarch.h | 223 ++++++++++++++++++++++++
tools/include/nolibc/arch.h | 2 +
tools/include/nolibc/sys.h | 36 +++-
tools/include/nolibc/types.h | 46 +++++
tools/testing/selftests/nolibc/Makefile | 78 +++++----
5 files changed, 345 insertions(+), 40 deletions(-)
create mode 100644 tools/include/nolibc/arch-loongarch.h

--
2.39.0