1 |
Hi! |
2 |
|
3 |
Its interesting thing. Is there a possibility to get LoongArch hw outside of |
4 |
China? |
5 |
|
6 |
В письме от суббота, 1 января 2022 г. 20:28:16 MSK пользователь WANG Xuerui |
7 |
написал: |
8 |
> Hi everyone, |
9 |
> |
10 |
> I'm the guy who previously announced the Gentoo/LoongArch port [1]; |
11 |
> since that post, some nice progress has been made, and here's a heads-up |
12 |
> and a procedural question regarding how to continue work upstream. |
13 |
> |
14 |
> |
15 |
> ## Progress of the port |
16 |
> |
17 |
> After some minimal forking and tweaking, it's already possible to build |
18 |
> working stage3 tarballs with catalyst; |
19 |
> with quick-and-dirty catalyst[2] and genkernel[3] patches, even working |
20 |
> installation CDs can be built (confirmed by LiveUSB-making and booting |
21 |
> on real 3A5000 hardware). |
22 |
> The built stages and installation CD images are already available in |
23 |
> several mirrors like [4] or [5]. |
24 |
> |
25 |
> The toolchain development of Loongson has gone more-or-less quiet |
26 |
> lately, and many projects (eselect, icu, systemd, etc.) have already had |
27 |
> releases that contain LoongArch bring-up changes, so it's time to push |
28 |
> more things upstream (in this case, the main gentoo.git repo). |
29 |
> |
30 |
> |
31 |
> ## How to test this? |
32 |
> |
33 |
> The necessary changes are all brewing in the loongson-overlay[6], which |
34 |
> is available via layman (`sudo layman -a loongson`). You'll need this |
35 |
> for the loong profile and toolchain patches. |
36 |
> |
37 |
> The stages can be tested with QEMU linux-user emulation, if you don't |
38 |
> have the LoongArch hardware; |
39 |
> but the LoongArch target is not upstream yet, so you'll have to compile |
40 |
> Loongson's fork ([7]; qemu-devel threads [8] [9]) yourself. The |
41 |
> necessary binfmt-misc declaration is like this (remove all whitespaces |
42 |
> |
43 |
> and newlines before using): |
44 |
> > :loongarch64:M:: |
45 |
> > \x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02\x01: |
46 |
> > \xff\xff\xff\xff\xff\xff\xff\xfc\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff |
47 |
> |
48 |
> > \xff\xff:/usr/local/bin/qemu-loongarch64: |
49 |
> You can use your favorite way to set up this (manually, via rc-scripts, |
50 |
> via systemd-binfmt.service, whatever), replacing the interpreter path to |
51 |
> suit your setup, then just proceed like every chroot. |
52 |
> |
53 |
> Inside the chroot, you need to `git clone` the loongson-overlay, add it |
54 |
> to /etc/portage/repos.conf, and fix the profile symlink; after that you |
55 |
> should be able to emerge packages as usual. Keywords are mostly missing, |
56 |
> so you may use ACCEPT_KEYWORDS=~riscv or something similar to get |
57 |
> through, in case everything is masked and not package.accept_keywords-ed. |
58 |
> |
59 |
> Note that their system emulation is currently in a worse state than |
60 |
> linux-user (horribly slow and dependent on prebuilt firmware blob), |
61 |
> according to review comments, so you may as well ignore the installation |
62 |
> CDs for now. |
63 |
> |
64 |
> |
65 |
> ## Problem regarding further upstream work |
66 |
> |
67 |
> As described above, there is already some nice progress, but a |
68 |
> procedural problem still remains: every new architecture needs a backing |
69 |
> project and arch team [10], yet I'm not a Gentoo dev and it's unclear if |
70 |
> any Gentoo dev would be interested in such a niche architecture with |
71 |
> limited hardware availability outside China, so we may get stuck in this |
72 |
> state for an extended period. |
73 |
> |
74 |
> Any suggestion is welcome; and thank you for your attention. |
75 |
> |
76 |
> |
77 |
> Regards, |
78 |
> WANG "xen0n" Xuerui |
79 |
> |
80 |
> |
81 |
> [1]: |
82 |
> https://archives.gentoo.org/gentoo-dev/message/ef0b1812e9b66cdf5978ecc2ad4ed |
83 |
> a4e [2]: https://github.com/xen0n/catalyst/tree/3.0.20-for-loong |
84 |
> [3]: https://github.com/xen0n/genkernel/tree/loong |
85 |
> [4]: https://mirrors.tuna.tsinghua.edu.cn/loongson/gentoo/experimental/ |
86 |
> [5]: https://mirrors.bfsu.edu.cn/loongson/gentoo/experimental/ |
87 |
> [6]: https://github.com/xen0n/loongson-overlay |
88 |
> [7]: https://github.com/loongson/qemu/tree/tcg-dev |
89 |
> [8]: |
90 |
> https://patchew.org/QEMU/1638610165-15036-1-git-send-email-gaosong@loongson. |
91 |
> cn/ [9]: |
92 |
> https://patchew.org/QEMU/1638619645-11283-1-git-send-email-yangxiaojuan@loon |
93 |
> gson.cn/ [10]: |
94 |
> https://projects.gentoo.org/council/meeting-logs/20180114-summary.txt |
95 |
|
96 |
|
97 |
-- |
98 |
Best regards, |
99 |
Alexey 'Alexxy' Shvetsov |