Prologue

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. 😉


Install QEMU

Install From apt-get

It would be easy to download & install QEMU, just one command.

1
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. 😊

Install From Source Code

To install the correct version, we have to install QEMU from source code.

Go to Download QEMU for build instructions, or Full list of releases for all available versions.

Download Source Code

First, we have to download the source code. Change the version depends on your needs.

1
2
wget https://download.qemu.org/qemu-6.2.0.tar.xz
tar xvJf qemu-6.2.0.tar.xz

Build QEMU

The official guide is a little unfriendly, as it missed all dependencies. So before we start building, we have to install some necessary dependencies.

1
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.

1
2
3
cd qemu-6.2.0
./configure
make

./configure may take a little time to finish, and make… almost 10K targets to build, takes quite long. 😨

Install QEMU

At last, one more command to install QEMU to your system path.

1
make install

Tada! You are all set! 🥳 Restart session and you’ll have it in your path.

1
2
3
$ qemu-system-mipsel --version
QEMU emulator version 6.2.0
Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers

Epilogue

Well, this is it. Perhaps not that difficult, right? 😶‍🌫️