Pintos is a minimal operating system for x86 hardware used primarily for instructional purposes (eg.). QEMU is an open-source hardware emulator typically used for operating system development. Debian is a linux operating system, regular style.
Step #1 – Debian: Drop windows and install debian (or go dual-boot).
Step #2 – QEMU:
sudo apt-get install qemu
To test everything is working as it should at this point, you can download a small linux kernel image here (Sec: disk images). Then:
bzip2 -d linux-0.2.img.bz2 qemu linux-0.2.img
You are now running a minimal linux system on emulated x86 hardware, which is in turn running on a full-featured linux system (debian) on real (probably also x86) hardware. Press ctrl-alt to get out of the minimal linux system if you get stuck with it stealing all your keystrokes.
Step #3 – Pintos:
- 3.A – Download pintos.
- 3.B – Fix pintos to default to QEMU (rather than bochs) by applying the following diff:
Index: threads/Make.vars ======================================= @@ -4,4 +4,5 @@ -SIMULATOR = --bochs +#SIMULATOR = --bochs +SIMULATOR = --qemu Index: utils/pintos ======================================= @@ -85,7 +85,7 @@ - $sim = "bochs" if !defined $sim; + $sim = "qemu" if !defined $sim; @@ -107,8 +107,8 @@ - --bochs (default) Use Bochs as simulator - --qemu Use QEMU as simulator + --qemu (default) Use QEMU as simulator + --bochs Use Bochs as simulator
- 3.C – Compile pintos:
cd threads/ make
- 3.D – Run a test app with pintos:
cd threads/build/ ../../utils/pintos run alarm-multiple
- 3.E – You may wish to throw pintos in your default path (some of the scripts provided require it’s there). There are many ways to do this, this is my favorite:
sudo ln -s `pwd`/utils/pintos /usr/local/bin/
And that’s it! In step 3.D you finished up by running a little test app that created 5 threads that slept for varying predefined periods of time with some messaging to the console, thus testing pintos’ scheduling/threading abilities. You’re now ready to augment and enhance pintos… coffee anyone?
running that little test app gives an error: Cannot find OS disk.
Please help
@Siddharth – QEMU’s got to be able to find the disk image. you can either throw the disk image in your PATH, or easier – just run that command (qemu linux-0.2.img) in the directory where your linux-0.2.img is hanging out.
Nopes I am not talking about linux-0.2 I am talking about pintos.
I did all the configuration and when I am trying to run pintos run alarm-multiple I am getting : Cannot find OS disk.
Thanks in advance
ya I got that .. I had to set the argument –os-disk to os.dsk file