Giter Club home page Giter Club logo

orangeos's Introduction

orangeOS

Git repo on learning to make a toy OS.

Install Bochs on Ubuntu:

Without debugger:

sudo apt-get install vgabios bochs bochs-x bximage	

With debugger:

  1. Download Bochs from http://bochs.sourceforge.net/
  2. In terminal, run below:
tar -vxzf bochs-2.6.9.tar.gz	
cd bochs-2.6.9	
./configure --enable-debugger --enable-disasm	
make	
sudo make install	

Create floppy image in Bochs:

  • In terminal, run: bximage.
  • Follow the instruction and select the option fd, then select a name for the floppy

Run toy OS in each ch*/ folder

For ch1/

  • To compile: nasm boot.asm -o boot.bin
  • Create floppy image a.img by bximage
  • To write into floppy dd if=boot.bin of=a.img bs=512 count=1 conv=notrunc
  • To run in Bochs with debugger: bochs. Then type enter, type c

For ch3/ and ch4/, FreeDos is used as the boot image

  • Create floppy image pm.img by bximage
  • To compile and write into floppy: make all (make clean also available)
  • To start the FreeDos image: bochs.
  • To start the OS image:
    • in Bochs terminal, clean up floppy b by format B: (for the first time only)
    • type B:\[image_name].com

For ch5/ to ch8/, boot.bin is ready

  • Create floppy image a.img by bximage
  • To compile and write into floppy, please review the Makefile, or simply: make image
  • To run in Bochs with debugger: bochs. Then type enter, type c

For ch9/ and on, booting is the same as ch5/ to ch8/

  1. Additionally, create a hard disk image 80m.img by bximage: Type: hd, Kind: flat, Size: 80, Name: 80m.img
  2. And add these 2 lines in .bochsrc file:
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14	
ata0-master: type=disk, path="80m.img", mode=flat	
  1. To partition the HD:
  1. On Mac's virtual machine, use fn + control + (F1 or F2 or F3) to shift among different consoles.

orangeos's People

Contributors

benruishe avatar spider-detective avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.