Giter Club home page Giter Club logo

kfs's Introduction

Kernel From Scratch

This is a project for the 42 school where we have to build a whole kernel starting from scratch. We have to use a x86 architecture and a bootloader to load the kernel into the machine (or the emulator).

Progress

  • Boot the kernel
  • Print some text to the screen
  • Manage colors
  • Load a GDT
  • Load an IDT and setup PICs
  • Manage keyboard (using interrupts)
  • Add a small shell with a few commands (clear, lsmmap, shutdown, reboot...)
  • Manage exceptions (using interrupts)
  • Enable paging, and manage memory (physical and virtual addresses).
  • Setup Higher half kernel

Dependencies

Tested only under Ubuntu, but it should work on any system that is using apt.

The setup script will install the following dependencies:

  • build-essential (a basic compiler, make and everything needed to build a cross compiler)
  • nasm
  • all the dependencies for compiling gcc

But it will not install qemu, grub or xorriso. You have to install them yourself if you want to run the kernel.

Usage

First, run the setup script:

./setup.sh

Then, you can make the kernel:

make
  • Then, depending on your needs, you can run the kernel:
make run_curses #if you want to run the kernel in curses mode
make run_gtk #if you want to run the kernel in gtk mode (requires gtk3)
make run_debug #if you want to run the kernel in debug mode (then you have to use gdb, using the `debug` target)
make run_monitor #if you want a detached monitor (to another terminal, then you have to connect to it using the `monitor` target, or use the `telnet <ip> 1234` command)

Example pictures

A little walkthrough of the kernel

Useful links

It contains a lot of useful information about the x86 architecture and os development in general.

kfs's People

Contributors

patatedu609 avatar

Stargazers

Raphaël Bourgeat avatar

Watchers

James Cloos avatar  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.