Oct 132010

Hi all,

The O32 stage builds for little-endian MIPS systems are now complete, and you will find the stages on my devspace for now at http://dev.gentoo.org/~redhatter/mips/cobalt/stages/.  There you will find stages for:

  • MIPS-I: Suitable for all little-endian MIPS hardware
  • MIPS-III: Best for Loongson-based hardware
  • MIPS-IV: Best for Cobalt Qube2 and RaQ2… Possibly the earlier Qube/RaQ as well.

Note that for the latter two, there are also N32 stages in the pipeline.  N32 overcomes a lot of shortcomings of the O32 ABI and offers better performance overall.  For many years, Gentoo/MIPS has primarily used O32 as the default ABI, with N32 being considered “experimental”.  Zhang Le and others have done a lot of work in the field, and now many applications run fine on N32.  Gentoo will therefore be transitioning over to this newer ABI, leaving O32 available for legacy system support and for experimental targets.

And yes, I’ll have to get to and update the documentation.

Some erratum notes however… These stages all feature a binutils patched for Loongson 2F support.  In the case of the MIPS-I and MIPS-III stages, these were also built with the -Wa,-mfix-loongson2f-nop set in CFLAGS so that these stages will work on Lemote hardware.  (And I needed to do that, otherwise we’d be waiting until Christmas for the Qube2 to finish building.)  So Loongson users should find these stages will work without further patching.  MIPS-IV was not built with the changes to CFLAGS, however these stages will also not run due to incompatibilities with ABI.

Secondly, the issue with /dev still exists… I’m not sure where the bug is, I’m still investigating this.  The following run inside the chroot should correct this issue:

# rm /dev/null
# mknod /dev/null 1 3
# USE=build emerge --oneshot makedev

I’d be naïve to think it probably won’t happen on the big-endian stages… we shall see. Stage 1 for MIPS-I big-endian is already up, with stage 2 well underway. The O2 is just a little quicker than the Qube2 in that regard. ;-) I hope to have big-endian stages up by November.

  2 Responses to “Gentoo/MIPS o32: Little-endian stagebuilds complete, Big-endian underway”

  1. Hi!

    Could you suggest which stage fits jz4740 (Ben Nanonote) better?
    And may be if you familar with Ingenic chips, which cflags best for it?


  2. Well, assuming the device is little-endian, the MIPS-I binaries should always work (given sufficient RAM). You will have to compile your own kernel however… my suggestion would be to have a look at the kernel binary (vmlinux) using the file utility to see what it reports regarding instruction set.

    e.g. on one of the older Fulongs here:
    zhenghe ~ # file /boot/vmlinux.32
    /boot/vmlinux.32: ELF 32-bit LSB executable, MIPS, MIPS-III version 1 (SYSV), statically linked, with unknown capability 0xf41 = 0x756e6700, with unknown capability 0×70100 = 0×3040000, not stripped
    zhenghe ~ # uname -a
    Linux zhenghe 2.6.35-fuloong2e #4 Thu Oct 7 16:13:10 EST 2010 mips64 ICT Loongson-2 V0.2 FPU V0.1 lemote-fuloong-2e-box GNU/Linux