Setup the development environment
The first step is to setup a good and viable development environment. Using Vagrant and Virtualbox, you'll be able to compile and test your OS from all the OSs (Linux, Windows or Mac).
Install Vagrant
Vagrant is free and open-source software for creating and configuring virtual development environments. It can be considered a wrapper around VirtualBox.
Vagrant will help us create a clean virtual development environment on whatever system you are using. The first step is to download and install Vagrant for your system at http://www.vagrantup.com/.
Install Virtualbox
Oracle VM VirtualBox is a virtualization software package for x86 and AMD64/Intel64-based computers.
Vagrant needs Virtualbox to work, Download and install for your system at https://www.virtualbox.org/wiki/Downloads.
Start and test your development environment
Go to the "src" subdirectory of this repo, inside your shell:
cd srcOnce Vagrant and Virtualbox are installed, you need to download the ubuntu lucid32 image for Vagrant:
vagrant box add mrgcastle/ubuntu-lucid32Once the lucid32 image is ready, we need to define our development environment using a Vagrantfile, create a file named Vagrantfile. This file defines what prerequisites our environment needs: nasm, make, build-essential, grub and qemu.
Start your box using:
vagrant init mrgcastle/ubuntu-lucid32and
vagrant upYou can now access your box by using ssh to connect to the virtual box using:
vagrant sshThe directory containing the Vagrantfile will be mounted by default in the /vagrant directory of the guest VM (in this case, Ubuntu Lucid32):
cd /vagrantBuild and test our operating system
The file Makefile defines some basics rules for building the kernel, the user libc and some userland programs.
To build our operating system, you need the package for Nasm. Install it with:
sudo dpkg -i packages/nasm_2.10.09-1_i386.debBuild:
make allTo test our operating system, you need other extra packages. Install them with:
sudo cp packages/sources.list /etc/apt/sources.listsudo apt-get updatesudo apt-get install qemu grub -yTest our operating system with qemu:
make runThe documentation for qemu is available at QEMU Emulator Documentation.
You can exit the emulator using: Ctrl-a.
To halt your box, you can type:
exitTo close the ssh connection, and:
vagrant haltTo shut down the virtual machine.
Last updated