Tools

Jan 28, 2025    m. Feb 8, 2025    #lab  

Setting up the environment

Before starting to this series of lab assignments, please make sure that you have followed the environment setup described below.

Our labs are designed based on Ubuntu 20.04 LTS. This is done using docker so that everyone has similar setups.
We recommend you to stick to this ubuntu version unless you might face some configuration issues.
You will also be using use QEMU, an x86 emulator for easier executing and debugging process instead of using real raspberry pi board.

This section has the information you’ll need to setup the environment.

Docker

You may install Ubuntu 20.04 on WSL and skip to the next part .

You first need to install docker for your OS:

Spin up Container

Please ensure that your installation location for Docker has atleast 10GB of free space.

Go to your working directory where you’ll be working inside and run:

docker run -it --name os_labs -v $(pwd):/root/workdir:Z ubuntu:20.04

Now you’ll be inside the container, where you’ll see a prompt like this:

root@e8f10931f506:/#

Your working directory will now be available in /root/workdir/.

For resuming the container after you’ve exited:

docker start -i os_labs

Anyone with SELINUX enabled distros like Fedora may face some problems with shared dirs between the host and the containers. Please contact the TAs if you get stuck somewhere.

Getting Repository and Installing Dependencies

Please ensure that whatever directory you decide to keep the lab in, it has atleast 10GB of free space.

# Download the repository
git clone https://github.com/pratyush3757/cs330_os.git --origin skeleton rustos
cd rustos/
git switch lab3

# Install dependencies
./bin/setup.sh
# Update environment
source ~/.bashrc

You’re all set to go back to the lab document if the setup.sh runs correctly and says [!] Setup complete.
Contact a TA if it throws an error.

Reference

This section has the information for the various tools you’ll be using during the labs.

We will be updating this section with more required info as the labs go on.

Makefile

Our Makefile includes a number of targets to test and run our OS in various ways.

make

make debug

make check

make qemu

make objdump

make nm

make clean

make install

make test

QEMU Emulator

QEMU (manual ) is a modern and fast PC emulator. We are providing a pre-built QEMU binary to emulate raspberry pi 3+ board as /bin/qemu-system-aarch64.

QEMU includes a built-in monitor that can inspect and modify the machine state in useful ways. To enter the monitor, press Ctrl-a c in the terminal running QEMU. Press Ctrl-a c again to switch back to the serial console.

For a complete reference to the monitor commands, see the QEMU manual . Here are some particularly useful commands:

xp/Nx paddr

info registers

info mem