Archive for August 11th, 2007

Gentoo/MIPS on QEMU

Saturday, August 11th, 2007

I’m in the process of installing Debian/MIPS on QEMU. Why might you ask? Well… the situation only came up just recently.

It seems there is some interest in running Gentoo on the QEMU virtual machine. The catch: QEMU emulates a MIPS Malta board with a 4Kc processor — which implements the MIPS32 ISA (a superset of MIPS2).

Until recently, this was impossible, as we did not produce stages for anything less than MIPS3 on big-endian MIPS, or MIPS4 on little-endian. MIPS32 is officially defined as the 32-bit subset of MIPS64, thus implements all the 32-bit instructions present in MIPS64, MIPS4, MIPS3 and completely implements MIPS1 and MIPS2.  It doesn’t however, implement any of the 64-bit instructions in these ISAs, which is where users come unstuck.  I produced some MIPS1 stages for little-endian MIPS, so in theory, the port is possible.

There’s also the question of performance — the guide I’m following suggests I can expect the performance of an R4400 200MHz Indy when ran on a 3GHz AMD64 host. Unfortunately for me, my host is a 1.4GHz Pentium 4. So I’m expecting things to be quite slow.

If things test okay, I might look into how one compiles a kernel for QEMU, and see if it’s worthwhile, since QEMU is much easier to get hold of then most supported MIPS platforms. It’s not known if mips-sources will be suitable, theoretically it should be, but this has never been tested. Support will be quite minimal, since most second hand SGI machines I suspect will outperform QEMU many times over. At the moment, my VM is “installing core packages” (yes, debian-installer is quite stingy on information), after which, I should be able to set up Gentoo on a second virtual HDD.

Support will likely take the form of a minimalist HDD image and kernel that can be booted on the VM.