Skip to content

0xdeadbeer/basic-kernel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basic Kernel

This is my preset when making a new operating system from scratch.
Before jumping into the code, please read the full documentation page to get a full understanding of this preset project, thank you!

Functionality of the kernel

  • 2x Output functions: sysout_line, sysout
  • Basic scrolling system - when all the lines are filled with information,
    the kernel deletes the first line and moves the rest of lines one line up

Project - Directory Structure

/output_files/ <- location of the compiled files
/includes/colors/ <- files which include variables with color values
/includes/global/ <- global variables like next possible line/column the kernel can use to print something to the screen,..

Project - Important Files

/compiler.py <- compiler program ( so far i don't have experience with making a Makefile )
/kernel.c <- the kernel written in c code
/bootloader.asm <- bootloader
/linker.ld <- linker script
/output_files/system <- once compiled the code with the compiler, this is the operating system file

How to compile the project

It is as simple as just typing:
python3 compiler.py <- supposing you have already installed nasm, gcc, ld, qemu-system-x86_64 and qemu-system-i386

!If you want to compile it and run the kernel at the same time type:
python3 compiler.py compile-run <- supposing you have installed qemu-system-x86_64 and qemu-system-i386

How to run the newly generated output kernel

  1. Move into the /output_files directory with cd ./output_files
  2. Run the qemu-system-i386 program on the outputted file ("system") qemu-system-i386 -kernel system