From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6949515808B for ; Fri, 18 Feb 2022 08:21:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id ABD0A2BC004; Fri, 18 Feb 2022 08:21:33 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 39DA6E07D8 for ; Fri, 18 Feb 2022 08:21:33 +0000 (UTC) From: Alexey 'Alexxy' Shvetsov To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] Progress of the Gentoo/LoongArch port, and question on upstreaming procedure Date: Fri, 18 Feb 2022 11:21:28 +0300 Message-ID: <4811802.GXAFRqVoOG@t490> Organization: Gentoo In-Reply-To: References: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail 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 Content-Type: multipart/signed; boundary="nextPart1930598.tdWV9SEqCh"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-Archives-Salt: e80bf86f-52ef-4219-bab7-8594d18256c5 X-Archives-Hash: 9a0a7d2349457c8b7a2297495894ee9c --nextPart1930598.tdWV9SEqCh Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8"; protected-headers="v1" From: Alexey 'Alexxy' Shvetsov To: gentoo-dev@lists.gentoo.org Reply-To: alexxy@gentoo.org Subject: Re: [gentoo-dev] Progress of the Gentoo/LoongArch port, and question on upstreaming procedure Date: Fri, 18 Feb 2022 11:21:28 +0300 Message-ID: <4811802.GXAFRqVoOG@t490> Organization: Gentoo In-Reply-To: References: Hi! Its interesting thing. Is there a possibility to get LoongArch hw outside o= f=20 China? =D0=92 =D0=BF=D0=B8=D1=81=D1=8C=D0=BC=D0=B5 =D0=BE=D1=82 =D1=81=D1=83=D0=B1= =D0=B1=D0=BE=D1=82=D0=B0, 1 =D1=8F=D0=BD=D0=B2=D0=B0=D1=80=D1=8F 2022 =D0= =B3. 20:28:16 MSK =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0= =B5=D0=BB=D1=8C WANG Xuerui=20 =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB: > Hi everyone, >=20 > I'm the guy who previously announced the Gentoo/LoongArch port [1]; > since that post, some nice progress has been made, and here's a heads-up > and a procedural question regarding how to continue work upstream. >=20 >=20 > ## Progress of the port >=20 > After some minimal forking and tweaking, it's already possible to build > working stage3 tarballs with catalyst; > with quick-and-dirty catalyst[2] and genkernel[3] patches, even working > installation CDs can be built (confirmed by LiveUSB-making and booting > on real 3A5000 hardware). > The built stages and installation CD images are already available in > several mirrors like [4] or [5]. >=20 > The toolchain development of Loongson has gone more-or-less quiet > lately, and many projects (eselect, icu, systemd, etc.) have already had > releases that contain LoongArch bring-up changes, so it's time to push > more things upstream (in this case, the main gentoo.git repo). >=20 >=20 > ## How to test this? >=20 > The necessary changes are all brewing in the loongson-overlay[6], which > is available via layman (`sudo layman -a loongson`). You'll need this > for the loong profile and toolchain patches. >=20 > The stages can be tested with QEMU linux-user emulation, if you don't > have the LoongArch hardware; > but the LoongArch target is not upstream yet, so you'll have to compile > Loongson's fork ([7]; qemu-devel threads [8] [9]) yourself. The > necessary binfmt-misc declaration is like this (remove all whitespaces >=20 > and newlines before using): > > :loongarch64:M:: > > \x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02\x0= 1: > > \xff\xff\xff\xff\xff\xff\xff\xfc\xff\xff\xff\xff\xff\xff\xff\xff\xfe\x= ff >=20 > > \xff\xff:/usr/local/bin/qemu-loongarch64: > You can use your favorite way to set up this (manually, via rc-scripts, > via systemd-binfmt.service, whatever), replacing the interpreter path to > suit your setup, then just proceed like every chroot. >=20 > Inside the chroot, you need to `git clone` the loongson-overlay, add it > to /etc/portage/repos.conf, and fix the profile symlink; after that you > should be able to emerge packages as usual. Keywords are mostly missing, > so you may use ACCEPT_KEYWORDS=3D~riscv or something similar to get > through, in case everything is masked and not package.accept_keywords-ed. >=20 > Note that their system emulation is currently in a worse state than > linux-user (horribly slow and dependent on prebuilt firmware blob), > according to review comments, so you may as well ignore the installation > CDs for now. >=20 >=20 > ## Problem regarding further upstream work >=20 > As described above, there is already some nice progress, but a > procedural problem still remains: every new architecture needs a backing > project and arch team [10], yet I'm not a Gentoo dev and it's unclear if > any Gentoo dev would be interested in such a niche architecture with > limited hardware availability outside China, so we may get stuck in this > state for an extended period. >=20 > Any suggestion is welcome; and thank you for your attention. >=20 >=20 > Regards, > WANG "xen0n" Xuerui >=20 >=20 > [1]: > https://archives.gentoo.org/gentoo-dev/message/ef0b1812e9b66cdf5978ecc2ad= 4ed > a4e [2]: https://github.com/xen0n/catalyst/tree/3.0.20-for-loong > [3]: https://github.com/xen0n/genkernel/tree/loong > [4]: https://mirrors.tuna.tsinghua.edu.cn/loongson/gentoo/experimental/ > [5]: https://mirrors.bfsu.edu.cn/loongson/gentoo/experimental/ > [6]: https://github.com/xen0n/loongson-overlay > [7]: https://github.com/loongson/qemu/tree/tcg-dev > [8]: > https://patchew.org/QEMU/1638610165-15036-1-git-send-email-gaosong@loongs= on. > cn/ [9]: > https://patchew.org/QEMU/1638619645-11283-1-git-send-email-yangxiaojuan@l= oon > gson.cn/ [10]: > https://projects.gentoo.org/council/meeting-logs/20180114-summary.txt =2D-=20 Best regards, Alexey 'Alexxy' Shvetsov --nextPart1930598.tdWV9SEqCh Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE+WVL/tIVJamPnFyWcubNMgpvc2oFAmIPVwgACgkQcubNMgpv c2o69BAAk0s0+vsCozmBpdklnjbZKcikM1m81482j5GMAWB6hCMeH3WSa3hzWyl0 nFqfwUVhzsqjdpJI7dwfk5z0M66Dk/vkrAYcrTl7SrVbl8c+CIlZyMO6T9UFHfX+ 22BlQM67tub9+cSKat4pPzf2jT/np3X2dEuN4DRSv9y+9mTQHXswqN2bGYeV9cIb wyMPPNJQ01hMvSh5MQbv5DO4l0cJUWyJZ6nhrve+Z78LplzA41ryI4+6U5mkUJa6 dfQz7jcRv0AUzCjcmjguKTr5Pyt44md2IJ1wzYyKLEYKvIUllvUeOcb5lWeAD2wD nDXKghcmW8Ods/gf6LfWM9kBaiG0jwJ/USRRqF06+2i36IeM2w6ovgh5GvWxXeDM x2DSGo5l6ozyFJ8Mp/vnxAU5cdrijkGlZJOwKAEAV2NdJNPsEyFt/KVhdUZIvvJZ Gmarul5QXM+Ns69khShLNFWN67Adxlkyp4TiD+PHmwpnaNT687Ri0mskPgfDiprg aimgvqel0PfE7zvCkFuiuIICDnCyPNJfsuuSmSXOYnxoDoA0t61k1HdubErutfhN 7icdfLpCq3Qqy/tfQ4ukWED2wXxHyoucm6PRLk3IRbhqB06kXKGiY+8jVhX0zzQs BwDPj+QER5we6GrMZINznN5oFN+HgifYw7EUrZxcGOLkUUh5+uA= =3Fyl -----END PGP SIGNATURE----- --nextPart1930598.tdWV9SEqCh--