From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-dev+bounces-95758-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 42E91158086
	for <garchives@archives.gentoo.org>; Thu,  7 Oct 2021 12:46:51 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 2EE58E088C;
	Thu,  7 Oct 2021 12:46:46 +0000 (UTC)
Received: from mailbox.box.xen0n.name (unknown [115.28.160.31])
	(using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 74F06E0826
	for <gentoo-dev@lists.gentoo.org>; Thu,  7 Oct 2021 12:46:44 +0000 (UTC)
Received: from [100.100.57.93] (unknown [220.248.53.61])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))
	(No client certificate requested)
	by mailbox.box.xen0n.name (Postfix) with ESMTPSA id 58F2360091
	for <gentoo-dev@lists.gentoo.org>; Thu,  7 Oct 2021 20:46:40 +0800 (CST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=xen0n.name; s=mail;
	t=1633610800; bh=/lBI+Os0TLDKgs1utqk8TJtTruedMNb/w9tiDwKh670=;
	h=Date:Subject:To:References:From:In-Reply-To:From;
	b=f2Wk7UKLAjCH3lGTBgYwanRVwJBGFXi6538MEtfWyud9CZeOwObD5iM3xxUTvbUhh
	 cKwVtMyhi/XJFmE0q2DiK86pcc45SZLh9/imGv5sck8BcCA1W3EJhinoSLnSi21zmU
	 l5qclTWxvp6xGe6Hkp3AdkHfcek4o+1tj+Xqfuh0=
Message-ID: <dd1a91ef-4487-9acc-9667-df391ec6be40@xen0n.name>
Date: Thu, 7 Oct 2021 20:46:40 +0800
Precedence: bulk
List-Post: <mailto:gentoo-dev@lists.gentoo.org>
List-Help: <mailto:gentoo-dev+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-dev+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-dev+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org>
X-BeenThere: gentoo-dev@lists.gentoo.org
Reply-to: gentoo-dev@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:94.0)
 Gecko/20100101 Thunderbird/94.0a1
Subject: Re: [gentoo-dev] [RFC] Plans for a Gentoo/LoongArch port
Content-Language: en-US
To: gentoo-dev@lists.gentoo.org
References: <b008ca13-896a-0a8f-3e9d-1be07cdd65d4@xen0n.name>
From: WANG Xuerui <i.gentoo@xen0n.name>
In-Reply-To: <b008ca13-896a-0a8f-3e9d-1be07cdd65d4@xen0n.name>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Archives-Salt: 8124d4b4-49f4-4e46-a342-79bc8dd58790
X-Archives-Hash: b1e8a2acd43cb0a786cc0636680ed9f2

On 2021/8/12 00:39, WANG Xuerui wrote:
> Hi everyone,
>
> <snip>
>
> ## Gentoo porting plans
>
> I'm planning to take ARCH=loongarch for the port; and support the LP64
> ABI
> first. I'd like to support both LP64 and ILP32 ABIs, but that's not a
> priority.
>
> The ABI flag might be named "ABI_LOONGARCH" but that's IMO a bit long
> (pun
> semi-intended); ARCH=loong and ABI_LOONG might be better, I'm open to
> suggestions.
>
> Because much of the ABI and even some toolchain internals are going
> through
> VERY fierce debate and rework, obviously the port will remain
> experimental
> for a long time. Some minimal support should get in tree though; doing so
> would ease a lot of pain for experimentation. I already hacked my way to
> generate working crossdev toolchains, and is halfway towards a rootfs
> with
> working Python (and Portage). I've already independently ported
> strace, and
> plan to do the same to libffi in the coming days which would give me
> Python.
>
> I'll do all work in my own loongson-overlay first, and upstream these
> when
> appropriate. Eventually I hope to have working crossdev, qemu-user
> emulation
> and proper catalyst support.
>
Some kind of "progress update": I've successfully built stage3 and
minimal installation CD for ARCH=loong; ABI_LOONG is not implemented due
to Loongson retracting 32-bit support themselves, this port is 64-bit
only for now, and may remain so forever (depends on Loongson's
intentions). All modifications are made in loongson-overlay[1]; no
ad-hoc patches to main Portage tree is needed after all. My used
catalyst specs are put at [2]; currently all hard-coded and no automation.

I'm going to send patches for review gradually in the following days, as
the holiday here is over; however I'd like to know whether we need to
wait for the upstream merge of toolchain/kernel support before we can
take patches for ARCH=loong, or if there's more prerequisites.


[1]: https://github.com/xen0n/loongson-overlay

[2]: https://github.com/xen0n/releng/tree/loong