Skip to content

tmella/cs310_eduOS

Repository files navigation

Pedagogical Operating System for Undergraduates

This operating system is a basic 32-bit x86 architecture operating system, which intends to serve as a resource for the accompanying labs with can be found at Labs homepage

Labs

Required resources

Step by step instructions provided bellow in section Build Instructions. The only manual installion required is Qemu

A helper script has been created dependency-installer.sh which will install all the needed resources to compile the project. All the executables will be added to a new directory build-tools/bin, in the aim to not be intrusive on our system. Only works on Mac or Linux based system.

Requires make, a C compiler. Brew for Mac users

chmod +x dependency-installer.sh
./dependency-installer.sh

# Add all execs to PATH
export PATH="$PATH:$(pwd)/build-tools/bin"

The installed resources are: qemu-system-i386, nasm, GNU elf utils

QEMU installation
Given the build time required by Qemu, it is easier to build from source.

Mac installation (requires Brew)

brew install qemu

Linux installation

  • Arch: pacman -S qemu

  • Debian/Ubuntu: apt-get install qemu

  • Fedora: dnf install @virtualization

  • Gentoo: emerge --ask app-emulation/qemu

  • RHEL/CentOS: yum install qemu-kvm

  • SUSE: zypper install qemu

Build instructions

Set up

Start by cloning the OS repository:

git clone https://github.com/tmella/cs310_eduOS.git
cd cs310_eduOS

Running on DCS

DCS systems will already have all the necessary dependencies to run the project. To set up all the required ENV variables, and helper tools (oshelper), go ahead and run the following:

chmod +x config.sh  && source ./config.sh 

Running locally ( Linux and OSX only )

If you are running locally its likely you won't have the required dependencies (unless you are into OS development). The script dependency-installer.sh will take care of downloading, and building the required software, which will be added to build-tools/bin. (This allows for a non-intrusive installation, just delete the directory and consider it gone). Run as follows:

chmod +x dependency-installer.sh && ./dependency-installer.sh

This will install the required compiler, assembler, and GNU tools required.

The emulator however cannot be built from source (unless you have specific a linux system, 35min and patience), therefore it will have to be installed traditionally with a package manager. The guide for which can be found at the OS README

One completed the above. You can set up your environment to run the OS with:

chmod +x config.sh # Make executable
source ./config.sh 

Finally, you can load lab 1 with the oshelper CLI:

oshelper load lab1

The script, in this case, just checkouts the branch for this lab and insures that you have no unsaved changes