Skip to content
This repository has been archived by the owner on Dec 25, 2022. It is now read-only.
/ kernel Public archive

My first kernel written in C++

License

Notifications You must be signed in to change notification settings

ilobilo/kernel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kernel project

Note: This kernel is archived, please see: https://github.com/ilobilo/ilobilix

My first os built from scratch
Contributors are welcome

TODO

System

  • GDT
  • IDT
  • TSS
  • PCI
  • PCIe
  • MSI
  • MSI-X

Memory

  • PMM
  • VMM
  • Heap

ACPI

  • ACPI
  • LAPIC
  • IOAPIC
  • Shutdown
  • Reboot

Device drivers

Audio

  • PC speaker
  • AC97
  • SB16

I/O

  • PS/2 Keyboard
  • PS/2 Mouse
  • COM

VMs

  • VMWare Tools
  • VBox Guest Additions
  • Virtio

Storage

  • FDC
  • IDE
  • SATA
  • NVMe
  • Virtio block

Network

  • RTL8139
  • RTL8169 (Broken)
  • E1000
  • Virtio network

USB

  • UHCI
  • OHCI
  • EHCI
  • XHCI

Timers

  • HPET
  • PIT
  • RTC
  • LAPIC Timer

Tasking

  • SMP
  • Scheduling
  • IPC

Partition tables

  • MBR
  • GPT

Filesystems

  • VFS (Based on Vinix)
  • TMPFS
  • DEVFS
  • Initrd
  • Echfs
  • SFS
  • Ext2
  • Fat32
  • ISO9660
  • NTFS

Userspace

  • System calls
  • ELF
  • Signals
  • Userspace
  • Libc
  • Bash
  • Coreutils

Network stack

  • Ethernet
  • ARP
  • IPv4
  • IPv4 fragmentation support
  • ICMPv4
  • TCP
  • UDP
  • DHCP
  • HTTP
  • Telnet
  • SSL

Building And Running

Make sure you have following programs installed:

  • Clang
  • lld
  • llvm
  • Make
  • Nasm
  • Qemu x86-64
  • Xorriso
  • Wget
  • Tar

If you have Debian based system (Ubuntu, linux mint, Pop_os! etc) you can install them with this command:
sudo apt install clang lld make nasm qemu-system-x86 xorriso wget tar

Follow these steps to build and run the os

  1. Clone this repo with:
    git clone --single-branch --branch=master --depth=1 https://github.com/ilobilo/kernel

  2. Go to the root directory of cloned repo and run:
    make -j$(nproc --all) For UEFI mode
    make bios -j$(nproc --all) For BIOS mode

If you, for some reason, are on Termux, run this command instead and connect to 127.0.0.1:5901 with VNC viewer:
make vnc -j$(nproc --all)

Options

  • USEILAR=1: Use ILAR archive format for initrd instead of USTAR (requires libboost-iostreams-dev)
  • NOUBSAN=1: Turn off UBSAN
  • NOCLEAN=1: Don't clean the source after compiling
  • NORUN=1: Don't run the kernel, just compile
  • DEBUG=1: Turn off kvm and enable qemu logging

Discord server

https://discord.gg/fM5GK3RpS7

Resources used: