Gentoo Archives: gentoo-mips

From: Stuart Longland <stuartl@×××××××××××××××.au>
To: gentoo-mips@l.g.o
Subject: Re: [gentoo-mips] n64 stages for mipsel… any interest?
Date: Sun, 14 May 2017 05:56:54
Message-Id: c722544e-bced-33cb-50a6-cd5957d8e026@longlandclan.id.au
In Reply to: Re: [gentoo-mips] n64 stages for mipsel… any interest? by Joshua Kinard
1 On 14/05/17 14:23, Joshua Kinard wrote:
2 > On 05/13/2017 23:54, Stuart Longland wrote:
3 >> Hi all,
4 >>
5 >> I've decided to dust off the old Lemote Yeeloong that I have kicking
6 >> around for use as a throw-around netbook for on-the-road use.
7 >>
8 >> The aim is to have a machine that can do some basic web browsing (using
9 >> a decent browser, dillo won't cut it), image editing, and maybe some
10 >> amateur radio stuff (yes, done PSK31 with this beast before, operating
11 >> as VK4MM, so it does work).
12 >>
13 >> I've found though that Firefox won't build on n32 (build system
14 >> misbehaves, it does the same on AMD64 x32 too), and while o32 works, its
15 >> performance is a little, lack-lustre.
16 >
17 > I'm actually surprised FF even compiles on mips these days. How long did it
18 > take to do an o32 build? The performance hit might not be a mips-only thing,
19 > though, if one were to take the Internet's criticism of Mozilla with more than
20 > a few grains of salt </smirk>
21
22 Not sure, last time I tried it was on n32… and I recall it failed early.
23 Haven't tried it on o32 since I was last maintaining Gentoo/MIPS.
24
25 I did try building Chromium though… it didn't get anywhere either, *and*
26 I had to force it because it didn't like only having 1GB RAM.
27
28 >> Thus as part of this, I am bootstrapping some n64 stages as an
29 >> experiment. n64 of course isn't as fast as n32, there's a memory
30 >> consumption hit, but at least it doesn't suffer the limitations that o32
31 >> has. I did take OpenBSD for a spin on this machine (they use n64), and
32 >> it seemed snappy enough, so we'll try Linux again.
33 >
34 > I've not tried n64 in a *long* time. I do have multilib stages available for
35 > big-endian that could theoretically be picked apart to act as a seed stage for
36 > pure n64, but my Octane takes ~2+ weeks to build the current batch of stages
37 > that I've tried to run to completion. About to try and kickstart another
38 > attempt, if 4.11 plays nice.
39
40 Yeah, years ago I tried QEMU, at the time best I could do was a P4
41 1.9GHz host… and the end result was slower than the Qube II and had
42 about as much RAM.
43
44 Now, well it probably won't win a match against Ilya's O2k, and the VM
45 really does feel sluggish, but it is at least running. I can throw up
46 to 2GB RAM at the problem.
47
48 Sadly, can't do SMP… it supposedly is supported by QEMU, I suspect
49 there's a kernel issue there. So one emulated mips64r2 CPU, 2GB RAM.
50 It cost me nothing, so I can't complain. :-)
51
52 >> I have cross-compiled a n64 environment from AMD64, and so far, I have
53 >> set up QEMU to run a mips64r2 little-endian VM with 2GB RAM to build the
54 >> stages with. Catalyst is building the first stage1 as I type this.
55 >>
56 >> I suspect this will take a fortnight or so… I have contemplating
57 >> resurrecting the old Qube II for this, but it can't compete on RAM, and
58 >> I haven't yet built the binaries with the NOP fix flag for them to run
59 >> on Loongson.
60 >
61 > gcc-6 build time is brutal. I mean the kind of stuff you terrify small
62 > children with to make them eat their vegetables. Octane takes ~16+ hours with
63 > 2x 600MHz CPUs. Anything slower is going to drastically ramp that time up. I
64 > haven't had time to try gcc-7.1 yet.
65
66 I just tried, and failed, to build gcc-6.3.0 on n64. It gets to stage 3
67 then the build system fails with a bootstrap error. gcc-5.4.0-r3 works
68 though, so that's what I'm using for this (gcc-6.0.0 and later are
69 hard-masked).
70
71 > I wouldn't even bother with the cobalts at this point, at least as far as
72 > self-hosting the build system and all. Those systems nowadays are more targets
73 > for embedded stuff, with a faster host machine running the builds. I'd love to
74 > get mipsel-uclibc-ng or mipsel-musl stages running on one to see how responsive
75 > they are.
76
77 I have contemplated musl… I don't know if it supports n32 or n64 ABI. I
78 read somewhere there is support for n64, but never got a toolchain to build.
79
80 I'm not sure what the status of uClibc is, it doesn't look well
81 maintained these days.
82
83 >> If I get some stages built, is there any interest in the community? I'm
84 >> willing to throw them up somewhere where they can be mirrored (I can
85 >> host here, but my uplink is ~1Mbps) and made accessible to all.
86 >>
87 >> I can also do mips (big-endian) builds if there is sufficient interest,
88 >> I still have an r4k6 Indy and rm5k2 O2 that can test such builds. (Also
89 >> have a IP28 and IP30, but neither are operational AFAIK. They do make
90 >> *great* door-stops however.)
91 >
92 > There is always interest. The last set of stages I actually put on the mirrors
93 > for big-endian is a year old, so I need to start on newer sets and hope there
94 > aren't any build-breakers hiding in the tree. I've tried stage-runs every
95 > three months, and usually get ~90% complete and it's the final stage set that
96 > burns me.
97
98 Well, as I say, once I get them built, I can throw them up here and
99 those who are interested can mirror them. (Maybe if doing it on Gentoo
100 mirrors, we have a 'contrib' section for such builds. That way, it's
101 known that the builds came from "outside".)
102
103 > IP30 definitely works, and is still the most stable of the SGI platforms (I
104 > literally just got a 4.11 kernel cobbled together a few minutes ago, after Ralf
105 > updated lmo git earlier tonight):
106 >
107 > # uname -a
108 > Linux dol-guldur 4.11.0-mipsgit-20170513 #2 SMP Sun May 14 00:06:14 EDT 2017
109 > mips64 R14000 V2.4 FPU V0.0 SGI Octane GNU/Linux
110 >
111 > Still has many of the old bugs, such as the DMA issues w/ >2GB memory and all,
112 > but I've got some understanding of the underlying issue, just no time to put
113 > something together that solves the bug.
114
115 That's good to know. I think mine is a hardware issue. Noticed it had
116 sucked in lots of dust, so attacked it with a vacuum cleaner.
117
118 Big mistake. It never booted after that. (Not that it was working
119 perfectly beforehand.)
120
121 Mine was "special"… 175MHz r10k, and it had a power supply part number
122 that the Linux kernel didn't recognise, so I had to manually patch it to
123 get things working properly. The IP28 I have is better specced.
124
125 > I have two IP27 machines now, an Onyx2 that exposes a really difficult NUMA bug
126 > somewhere in the kernel, and a more recent Origin 200 that as of tonight, seems
127 > to boot fine and isn't hung up (literally) by the NUMA bug like the Onyx2 is.
128 >
129 > I haven't tried IP28 in several versions. I last tried to boot it with an
130 > experimental netboot image in 4.4.x, and was able to poke around the
131 > filesystem, but any significant disk activity knocks it right over. I suspect
132 > work is needed to chase down more speculative execution issues.
133
134 You didn't slaughter the chicken right. :-)
135
136 In my case, the neighbours would object if I started slaughtering their
137 chooks. Those things were always flaky, even under IRIX.
138
139 > IP32 should still work, but I haven't booted that in a while. I am probably
140 > going to reload my IP32 with a uclibc-ng-based userland at some point, as the
141 > gcc-6 build times under a glibc userland would take way too long on that
142 > platform. uclibc-ng code executes much faster. I wish I had my musl chroot
143 > still, as that libc is even quicker than uclibc-ng.
144 >
145 > No idea on IP22. My Indy's RTC is dead, and I haven't dared to attempt
146 > soldering a replacement battery into it yet.
147
148 Likewise, it's a case of dig up what the MAC address should be, and
149 start punching the detail back in again. About the only incentive for
150 messing with it is it has double the RAM of the O2 here.
151
152 musl is definitely worth investigating further. glibc really does get
153 too bloated for systems with <512MB RAM.
154
155 > In any event, I can probably stitch together a semi-usable netboot for you if
156 > you want to try and resurrect the IP30. The last time I tried one, I wasn't
157 > able to get NFS support added into the userland side because uclibc-ng has
158 > issues with libtirpc, which is required for rpcbind and friends.
159
160 Yeah, no rush on IP30. I suspect the only "boot" my IP30 needs is a
161 sturdy steel-capped one.
162 --
163 Stuart Longland (aka Redhatter, VK4MSL)
164
165 I haven't lost my mind...
166 ...it's backed up on a tape somewhere.

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-mips] n64 stages for mipsel… any interest? Stuart Longland <stuartl@×××××××××××××××.au>