Skip to content

A toy operating system for exploring and learning about OS development.

License

Notifications You must be signed in to change notification settings

RISHI27-dot/miniatureOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

miniatureOS

A toy operating system for exploring and learning about OS development.

Table of Contents

About The Project

miniatureOS is a toy OS project that has been started get familiar with parctices in OS development

File Structure

├── boot              # Contains files of booting the OS.
├── cpu               # Contains CPU specific code.
├── drivers           # Drivers.
├── kernel            # Contains code for the kernel.
├── libc              # Contains C utility functions.
├── Makefile          
├── README.md
├── .clang-format
├── format.sh         # For code formatting.
└── LICENSE

Prerequisites and Installation.

Set up the path for crosscompiler and binutils.

export PREFIX="/usr/local/i386elfgcc"
export TARGET=i386-elf
export PATH="$PREFIX/bin:$PATH"
  • nasm
sudo apt-get install nasm
  • qemu
sudo apt-get install qemu-kvm qemu virt-manager virt-viewer libvirt-bin
  • binutils
mkdir /tmp/src
cd /tmp/src

curl -O http://ftp.gnu.org/gnu/binutils/binutils-2.24.tar.gz
tar xf binutils-2.24.tar.gz

mkdir binutils-build
cd binutils-build

../binutils-2.24/configure --target=$TARGET --enable-interwork --enable-multilib --disable-nls --disable-werror --prefix=$PREFIX 2>&1 | tee configure.log

make all install 2>&1 | tee make.log
  • gcc(cross-compiler)
cd /tmp/src

curl -O https://ftp.gnu.org/gnu/gcc/gcc-9.4.0/gcc-9.4.0.tar.gz
tar xf gcc-9.4.0.tar.gz

mkdir gcc-build
cd gcc-build

../gcc-9.4.0/configure --target=$TARGET --prefix="$PREFIX" --disable-nls --disable-libssp --enable-languages=c --without-headers

make all-gcc 
make all-target-libgcc 
make install-gcc 
make install-target-libgcc 
  • gdb
cd /tmp/src

curl -O http://ftp.rediris.es/mirror/GNU/gdb/gdb-9.2.tar.gz
tar xf gdb-9.2.tar.gz

mkdir gdb-build
cd gdb-build

export PREFIX="/usr/local/i386elfgcc"
export TARGET=i386-elf

../gdb-9.2/configure --target="$TARGET" --prefix="$PREFIX" --program-prefix=i386-elf-

make
make install

Usage

To build

make

To run

make run

To debug using gdb

make debug

Tracker

  • Bootloader.
  • Printers.
  • Interrupt handling.
  • Shell.
  • Memory Allocation.
  • Memory management.

About

A toy operating system for exploring and learning about OS development.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published