New architecture LoongArch64 porting
Hi all,
The purpose of creating this issue is to discuss with the community the addition of the new architecture LoongArch port to the aports project.
In March this year, we began to transplant the alpine Linux edge version (commit: 31aac06d3eaf0ff86c42eb5e4793fd9215fd3c79) on the LoongArch64 platform. The transplantation status at that time was: the bootstrap process was completed, minirootfs was built and produced, and the basic system construction of Alpine Linux was completed locally. Considering that the upstream of musl does not yet support the LoongAarch64 architecture, so we paused after building about 12000 apk packages.
Recently, the musl community mail has received new feedback on LoongArch64 architecture support. Judging from the feedback, the patch is basically qualified. Therefore, I recently built the alpine system based on the community's latest aports source code. The bootstrap phase is currently about to be completed. In this build, I'm using the latest patch for musl from loongarch64's upstream commit 0001-add-loongarch64-port-v7.patch (https://www.openwall.com/lists/musl/2023/04/18/1).
And I have one questions want to discuss:
Can we submit LoongArch64 support for aports before musl upstream doesn't support LoongArch64?
We very much hope to share our results with the community and look forward to contributing to the alpine community. After the above questions are solved, I think we can make an aports porting plan.Thanks!
A bit of introduction on the LoongArch:
1、Introduction
LoongArch is a new RISC ISA, which is a bit like MIPS or RISC-V. LoongArch includes a reduced 32-bit version (LA32R), a standard 32-bit version (LA32S) and a 64-bit version (LA64).
Loongson and LoongArch documentations:
https://github.com/loongson/LoongArch-Documentation
2、Upstream software supports LoongArch
Kernel、Gcc、Glibc、Binutils、Gdb、Llvm、Rust、Golang have merged by upstream(github) projects and so on.
For examples,
Kernel: https://www.kernel.org/doc/html/latest/
Gcc: https://gcc.gnu.org/gcc-12/changes.html
Glibc: https://sourceware.org/pipermail/libc-alpha/2022-August/141193.html
Gdb: https://sourceware.org/gdb/
Llvm: https://github.com/llvm/llvm-project/tree/main/llvm/lib/Target
Rust: https://github.com/rust-lang/rust
Golang: https://go.dev/doc/go1.19
3、operating systems supports LoongArch
debian: https://wiki.debian.org/Ports/loong64
gentoo: https://wiki.gentoo.org/wiki/Project:LoongArch
archlinux: https://loongarchlinux.org/