Giter Club home page Giter Club logo

felix's Introduction

Felix OS

x86 operating system

Description

Felix is an experimental operating system for the Intel IA-32 architecture (x86).

It's written completely from scratch in Rust and doesn't use any external dependencies.

This project is part of the work for my bachelor thesis in computer engineering. You can read it here.

Pictures

Felix running in QEMU:

felix_qemu

felix_qemu

Felix running on real hardware:
felix_real

Features

Bootloader

  • boots (you don't say!)
  • BIOS compatible (also works on UEFI with CSM enabled)
  • Global Descriptor Table loading
  • Unreal Mode switching (to use 32bit addresses in 16bit Real Mode)
  • kernel copying from disk to protected memory
  • 32bit Protected Mode switching
  • kernel jumping

Kernel

  • Interrupt Descriptor Table loading
  • CPU exceptions handler
  • Programmable Interrupt Controller driver
  • keyboard driver
  • ATA disk driver
  • FAT16 filesystem file read
  • timer interrupt driven CPU scheduler
  • prints system call that writes to VGA text buffer
  • task manager
  • round robin CPU scheduler

Shell

Available commands:

  • help shows available commands
  • ls lists root directory entries
  • cat displays content of a file
  • test <a,b,c> runs a dummy task
  • run loads file as task and adds it to the task list
  • ps lists running tasks
  • rt removes specified task

libfelix (standard library)

  • print! macro able to print formatted text to screen

Building

You can download a pre-built image or you can build it by yourself using Docker.

Download pre-built image

build

A build is made for every commit.

To download the latest build click on the badge above, then click on the most recent build and download the artifact.

Build using Docker

First make sure you have Docker installed. Then:

  1. Clone the repo git clone https://github.com/mrgian/felix
  2. Change dir to repo cd felix
  3. Build the image docker build -t felix-image .
  4. Run the container docker run --name felix-container felix-image
  5. Copy build from container to host docker cp felix-container:/root/felix/build .

Build on MacOS/Linux

Make sure you have rustup,mtools,dosfstools and fdisk installed on your system, in any case makefile script will try to install them for you.

git clone https://github.com/mrgian/felix
cd felix
make all

Running

The final disk image is build/disk.img

make run

Or you can run it on a real x86 computer by copying the disk image to a USB drive using this command: sudo dd if=build/disk.img of=/dev/sdX status=progress and then booting from USB.

Progress

  • 22/10/22 - Project start
  • 27/01/23 - Bootloader can print to screen
  • 31/01/23 - Bootloader can read data from disk to memory
  • 01/02/23 - Bootloader can load kernel to memory
  • 27/02/23 - Moved to Rust environment using inline assembly
  • 01/03/23 - Rewritten kernel loading code in Rust
  • 08/03/23 - Implemented println macro
  • 20/03/23 - Switch to 32bit protected mode
  • 29/03/23 - Basic CPU exception handler
  • 30/03/23 - PIC driver
  • 06/04/23 - keyboard driver
  • 07/04/23 - start working on shell
  • 08/04/23 - ATA disk driver
  • 09/04/23 - FAT filesystem file read
  • 26/04/23 - CPU scheduler
  • 13/05/23 - prints system call
  • 13/05/23 - println! macro in standard library
  • 30/06/23 - multitasking finally working

Roadmap

The following features are planned to be added sooner or later:

  • paging
  • memory allocator
  • VESA video driver
  • networking
  • SATA AHCI disk driver
  • graphical user interface

Credits

This project is entirely developed by Gianmatteo Palmieri
Logo design by Veronica Grana

felix's People

Contributors

abs0luty avatar guerinoni avatar malandrakisgeo avatar mrgian avatar simonhammes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

felix's Issues

Constantly rebooting when running on qemu

It is constantly rebooting after this point when i tried to run the built image on qemu.
image
When running with -no-reboot qemu just quickly closes:

PS C:\Users\trist\Downloads\felix-main\felix-main> qemu-system-i386 -drive file=build/disk.img,index=0,media=disk,format=raw,if=ide -no-reboot

(qemu:14460): Gtk-WARNING **: 12:55:30.708: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.
PS C:\Users\trist\Downloads\felix-main\felix-main>

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.