[Dev] Loongson 3A port

Michał Masłowski mtjm at mtjm.eu
Sun Jan 27 10:46:48 GMT 2013


I have installed Parabola mips64el on my Loongson 3A laptop, booting it
currently with the LOonux 3.5.x kernel (should be easy to deblob after
the more important problems are solved).  Many programs, including dbus,
gdb and pythons, crash with an "illegal instruction" signal.

Debugging (via gdbserver and gdb running on the 2F YeeLoong) has shown
that an "illegal" instruction is madd.d with source registers containing
normalized numbers (not e.g. NaNs that required software emulation on
2F).  MIPS64 has different codes for such instructions (Loongson 2F used
SPECIAL2 opcodes for them), I believe this is caused by the instruction
not being supported, not by missing kernel emulation (any Chinese reader
willing to verify it?  this should be documented).  So we need binaries
that do not use Loongson 2F-specific instructions (i.e. built with
-march=mips3 or -march=loongson3a).

What should we do?  Make a separate mips64el port with Loongson 3A
CFLAGS (and adjust several PKGBUILDs that pass Loongson 2F-specific
CFLAGS) or rebuild all packages with -march=mips3 (making them slower on
all supported machines)?

We already need to have some packages specific to 2F or 3A (e.g. pixman,
kernels and hopefully in future also ffmpeg and qemu).  Having
completely separate repos will make it easier.

I see three disadvantages of this solution: more PKGBUILD difficulties
(e.g. packages working on only one target, more opportunities for
forking), bigger disk and network usage on repo (there are nearly ten
gigabytes of x86_64 packages, most will be ported to Loongson 3A, we
have a similar amount of free space), and requiring Loongson 2F machines
for Loongson 2F builds (unless we use e.g. remote distcc hosts with
Loongson 3A, this will be much slower than using a Loongson 3A machine
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <https://lists.parabola.nu/pipermail/dev/attachments/20130127/79a8fc48/attachment.sig>

More information about the Dev mailing list