For some reason, the emulator for MIPS in BUAA OS course changed from GXemul to QEMU since 2024 Summer Semester. If we do not want to use the Jump Server for local development, we have to configure it in our WSL or virtual machine. However, it requires some efforts to install this emulator.
Here are some related articles if you want to use local WSL for development. 😉
It would be easy to download & install QEMU, just one command.
sudo apt install qemu-system
However, it may not get the right version, as it will get us 4.x while we have version 6.2.0 in the Jump Server.
But both should work fine. 😊
To install the correct version, we have to install QEMU from source code.
First, we have to download the source code. Change the version depends on your needs.
The official guide is a little unfriendly, as it missed all dependencies. So before we start building, we have to install some necessary dependencies.
sudo apt install libpixman-1-dev libcairo2-dev libpango1.0-dev libjpeg8-dev libgif-dev ninja-build
Then, we can continue the process, and do as the instruction said.
./configure may take a little time to finish, and
make… almost 10K targets to build, takes quite long. 😨
At last, one more command to install QEMU to your system path.
Tada! You are all set! 🥳 Restart session and you’ll have it in your path.
$ qemu-system-mipsel --version
Well, this is it. Perhaps not that difficult, right? 😶🌫️