It’s been awhile since my last update in June so I thought I’d give you an overview of some interesting projects I came across in my weekly hunt for MIPS-related developments from the software world.
Linux 3.18.21 LTS brings improvements for MIPS
Let’s start with the Linux 4.3 kernel which received “a hearty update” at the start of September according to Michael Larabel from Phoronix. Prpl Foundation member Cavium contributed important patches for the MIPS64-based Cavium OCTEON III SoCs while our engineering team added support for our very own 64-bit MIPS I6400 CPU, including improvements to the MIPS SIMD Architecture (MSA).
In addition, Softpedia reported the release of the 21st version of the long-term version of the Linux 3.18 kernel. You can find the relevant files and a diff report on the kernel.org website. (While you’re there, make sure you check out the 4.2 release which includes various bug fixes for MIPS Release 6 and improvements for several MIPS-based chips, including R12000 and R3000, Broadcom BCM47xx and BCM63xx, or Qualcomm Atheros AP136.)
Emulating Linux MIPS in Perl
Another interesting project comes via Marc Lehmann, the famous creator of pgcc. In a series of articles published on his personal blog, he writes about a MIPS-like emulator that supports parts of the Linux kernel and an ELF loader; this enables him to run some statically linked programs.
I chose MIPS after surveying quite a few other architectures, and MIPS won because the original MIPS I (or, back then, just MIPS of course) architecture is extremely simple, even compared to it’s successors, but still well supported by GCC. It also doesn’t have a condition code register, which usually simplifies CPU emulation a lot.
The MIPS CPU emulator implements the MIPS I ISA (the original 32-bit MIPS architecture introduced in the 1980s) and works by compiling MIPS instructions into perl expressions, and then compiling them once. You can read more about his software implementation here; the other two articles describe the Linux and ELF parts, respectively.
Other MIPS-related open source projects
If you’ve been following this blog, you might remember this article posted in early September about Chinese chipmaker Loongson. Loongson 2F-based machines have been very popular among GNU/Linux developers thanks to their ability to support free software; for example, FSF president Richard Stallman used a Lemote Yeeloong laptop for several years.
Recently, an update posted on the GNU Operating System website announced the official port of GuixSD (GNU’s advanced system distribution) for MIPS. The developers used a similar Lemote laptop to complete the work which was helped by the fact that the package manager itself had already supported MIPS64 for two years. By removing several platform-specific assumptions, this work paves the way for future ports.
You can also read this interview with Loongson president Weiwu Hu about the company’s future aspirations and strategy for open source.
MIPS developer communities
If you’re a developer writing code for MIPS, check out our Codescape MIPS SDK on our dedicated Community page; we post regular updates so make sure you always use the most recent version available.
If you have any questions or want to join our growing developer community, have a look at our forums. Make sure you also follow the exciting new prpl Foundation focused on open source development at www.prplfoundation.org and prpl.works.Follow @ImaginationTech