bedrocklinux / bedrocklinux-userland

This tracks development for the things such as scripts and (defaults for) config files for Bedrock Linux
https://bedrocklinux.org
GNU General Public License v2.0
602 stars 65 forks source link

(Feature request) Add riscv64,loongarch64 and sparc64 m68k (might not popular ) target support #252

Open naY9yjoS6ZqhOd35sIFH opened 2 years ago

naY9yjoS6ZqhOd35sIFH commented 2 years ago

loongarch64 have both gcc and qemu support https://github.com/loongson/gcc https://github.com/loongson/qemu riscv64 is newer Architecture with some linux distro support and sparc64 and m68k may not popular but someone have old computer to test

paradigm commented 2 years ago

The requirements to add an architecture to Bedrock Linux 0.7's release binaries are:

Without those, it'll be too much work for me to build a Bedrock release for the given architecture. As far as I can tell, every architecture you've requested fails at least one of these constraints.

That said, Bedrock doesn't have much actual architecture specific code. The only thing I can think of is brl fetch which has brl import as a viable alternative for scenarios where brl fetch doesn't work. If the architecture has gcc and musl support, and you have access to a box running some Linux distro on one of these architectures, you might be able to manually build Bedrock yourself.

I should note I'm strongly considering including Rust in the upcoming Bedrock Linux 0.8 which could further constrain the CPU architectures, e.g. it'll likely require dropping pre-i686 x86 architectures.

paradigm commented 2 years ago

Nice! If there are sufficiently small, simple patches I'm certainly amenable to upstreaming those into Bedrock to make it easier to support loongson on Bedrock Linux 0.7.x. Even if I don't have the resources to maintain another architecture, I'd certainly like to make it easier for others to do so if possible.

I've put thought toward the architecture support for Bedrock Linux 0.8. I think most of the blockers for riscv64 will be removed, and so I'll try to add the riscv64 support that OP requested at that time. However, it is likely that 0.8 will be at least partially written in Rust which sadly does not support loongson. 0.8.0 probably won't release with loongson support. However, I know there is effort to get Rust to compile with gcc's back-end that might lessen that constraint in the future; maybe eventually we'll get it.