Installing the Custom MIT 6.828 QEMU Emulator on Ubuntu

Install Dependencies

Run the following command to install all required build tools and libraries:

sudo apt-get install -y build-essential libtool* libglib2.0-dev libpixman-1-dev zlib1g-dev git libfdt-dev gcc-multilib gdb python2.7

Install MIT 6.828 Custom QEMU

QEMU is a full-system emulator that can simulate multiple CPU architectures, similar to tools like Bochs or PearPC. For MIT's 6.828 course, we use a customized QEMU variant optimized for the curriculum.

Clone the Custom Repository

git clone https://github.com/mit-pdos/6.828-qemu.git qemu-6.828

Compile and Install

First, navigate into the cloned directory:

cd qemu-6.828

Configure the build to disable strict error checking (to avoid common compilation issues), target only x86-based system emulatosr, and specify Python 2.7 as the required runtime:

./configure --disable-werror --target-list="i386-softmmu x86_64-softmmu" --python=python2.7

Compile and install QEMU using parallel builds for faster execution:

make -j$(nproc) && sudo make install

Troubleshooting Common Issues

  1. Python 2.7 Missing Error: If you see ERROR: Python not found. Use --python=/path/to/python, ensure Python 2.7 is installed (included in the initial dependency command) and that the --python=python2.7 flag is included in the configure step.
  2. Libtool Build Errors: The libtool* package in the dependency install covers all required libtool components. If you encounter "disabling libtool due to broken toolchain suppport", re-run the initial apt command to ensure full libtool installation.
  3. Format Truncation Warnings: To suppress format-truncation errors during copmilation, use the --disable-werror flag in the configure command (as included above) or manually remove the -Werror flag from the config-host.mak file in the QEMU directory if needed.
  4. Missing Header in QGA: If compilation fails due to a missing sys/sysmacros.h, add #include <sys/sysmacros.h> immediately after #include <sys/types.h> in the qga/commands-posix.c file.

Test the Setup (Optional)

For MIT 6.828 course usage, verify your setup with the course's JOS framework:

git clone https://pdos.csail.mit.edu/6.828/2018/jos.git lab-jos
cd lab-jos
make && make qemu

A successful launch will open the QEMU emulator with the JOS kernel running.

Tags: qemu MIT 6.828 Ubuntu System Emulation kernel development

Posted on Thu, 17 Sep 2026 16:13:46 +0000 by Crusader