From: WANG Xuerui <i.gentoo@xen0n.name>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [RFC] Plans for a Gentoo/LoongArch port
Date: Fri, 13 Aug 2021 13:56:17 +0800 [thread overview]
Message-ID: <332257f1-9c4e-89e7-50ad-746d8ff6eab2@xen0n.name> (raw)
In-Reply-To: <YRTv/tHjno0oNkDw@ofant>
Hi Yixun,
On 2021/8/12 17:55, Yixun Lan wrote:
> HI Xuerui:
>
> This must be a *HUGE* project and gonna put lots of effort in to it!
> So, first, good luck to you with all my best wishes!~
Thanks for your kindness!
>
> On 00:39 Thu 12 Aug , WANG Xuerui wrote:
>> Hi everyone,
>>
>> I'm your average Gentoo user who obviously thought his sleeping time is more
>> than enough, and just decided to start porting Gentoo to LoongArch. As this
>> is such a niche architecture with no upstreamed support so far, I'm posting
>> this to announce my intent and gather advice on how to best push this.
>>
>> I'll first give some background material to help people gain context, then
>> describe my porting plan. This is going to be a bit long; apologizes for
>> that.
>>
>>
>> Note: I'm not affiliated with Loongson in any way; I'm just doing this in my
>> spare time (once meant for some quality sleep).
>>
>>
>> ## A bit of introduction on the LoongArch
>>
>> LoongArch, as its name implies, is the brand-new ISA developed by the
>> Loongson Corporation, incompatible with MIPS which was implemented by
>> all previous Loongson processors. Currently only the base ISA specification
>> is publicly available; it has fixed-length 32-bit instructions, vastly more
>> instruction formats (39 distinct formats in the base ISA alone!), and its
>> instruction semantics mostly resemble RISC-V, with a bit of MIPS R6 here and
>> there. It is capable of 64-bit operations, obviously.
>>
>> ISA documentation: https://github.com/loongson/LoongArch-Documentation
>> ELF psABI draft: https://github.com/loongson/LoongArch-Documentation/pull/3
>>
>> The draft ABI is undergoing fierce review, and is subject to change,
>> especially the relocation types. Other parts like the register
>> convention and
>> data layout is unlikely to change much, though.
>>
>> There is little code upstreamed for basic software (GNU toolchain, QEMU,
>> Linux and the like), but many are open-sourced already. Nevertheless, the
>> code quality is still very much inferior, and much of it is obviously based
>> on respective MIPS support. There is continuous debate inside and outside
>> Loongson on this matter, too.
>>
> Didn't do any investigation, but if I read correctly, also see here [1]
>
> The fundamental pieces of softwares are open-sourced but *NOT* yet upstreamed
> So, I'd say, let's wait till it's actually accepted by upstream,
> before pushing to downsteam (Gentoo here). Sure, you're free to send
> a pull-request for review/comment, but collect peices under your own overlay
> would be a good idea ( in my humble opition ).
Sure; that's basic etiquette. However there are some parts that
definitely need upstreaming, otherwise complexity could explode; for
example, the multilib_env function and tc-ninja_magic_to_arch function.
Without fixing multilib_env we could only use the "default" ABI, and
without adapting tc-ninja_magic_to_arch even linux-headers is unable to
build. If we don't touch the upstream repo, a full fork is needed, and
that's going to be painful.
Additionally, I've already seen adaptations for experimental arches in
repo; so I thought upstreaming these minimal bits would be acceptable.
If that's deemed too early (and I totally understand the reasoning
behind that), doing work in forks is okay from my side.
next prev parent reply other threads:[~2021-08-13 5:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-11 16:39 [gentoo-dev] [RFC] Plans for a Gentoo/LoongArch port WANG Xuerui
2021-08-11 18:13 ` William Hubbs
2021-08-12 1:21 ` WANG Xuerui
2021-08-12 6:00 ` Michał Górny
2021-08-12 6:39 ` Ulrich Mueller
2021-08-24 3:30 ` WANG Xuerui
2021-08-24 8:46 ` Ulrich Mueller
2021-08-24 10:01 ` WANG Xuerui
2021-08-24 12:17 ` Ulrich Mueller
2021-08-12 9:55 ` Yixun Lan
2021-08-13 5:56 ` WANG Xuerui [this message]
2021-10-07 12:46 ` WANG Xuerui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=332257f1-9c4e-89e7-50ad-746d8ff6eab2@xen0n.name \
--to=i.gentoo@xen0n.name \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox