

Then the C and C++ compilers for MIPS, and QEMU to make it possible to run MIPS binaries on your x86_64 PC: apt -y install gcc-mipsel-linux-gnu g++-mipsel-linux-gnu qemu qemu-user Of course, there are exceptions to that, then you can just switch to 16.04 or 20.04, that’s the whole beauty of Docker.Īs a first step, you want to obtain an initial cache of repo data, and update any outdated packages: apt -y update & apt -y dist-upgradeįirst some crucial tools: apt -y install wget git sudo unzip mc file Why Ubuntu 18.04? Because it’s kind of middle of the road, usually not too old and not too new. Once done with the Docker setup, create a mips directory, then start your container: docker run -it -rm -mount type=bind,source="$(pwd)"/mips,target=/mips ubuntu:18.04 (You get it? They’re called containers for a reason!) Also, if you screw something up, it’s so much easier to start over. Install Docker, because this whole thing’s gonna get messy, so you wanna contain that trash in your containers.


I’ll use these terms interchangeably from now. To clarify, this guide is about little-endian MIPS32, also known as mipsel. I wanted MIPS cross-compilation because I have a Ubiquiti ER-X, and that happens to be running on MIPS, and I happen to be a friggin’ nerd who wants to run custom stuff on it. Well anyway, the whole world is going apeshit about ARM, but who takes care of poor MIPS? Maybe I was looking in the wrong places, but I couldn’t really find a comprehensive guide about this topic, only sporadic Stack Overflow questions, and generic, or even vague answer. I just realized: the title can be shortened to CCCC lol.
