Giter VIP home page Giter VIP logo

firefly-kernel's Introduction

Firefly-Kernel

Kernel for FireflyOS which can be booted on UEFI and BIOS. (Screenshots)

A note to the reader:

Are you interested in writing a kernel but lack a "study buddy" or don't know where to get started?

This project is for you!

Our goal is to build an operating system where everyone can participate and learn; both newbies and professionals alike.

Join us on Discord if you'd like to talk: https://discord.gg/sfsdhXs8wA (Channel: #cursed-firefly-dev)

Clone the repo

  • git clone https://github.com/FireflyOS/Firefly-Kernel --recursive
  • cd Firefly-Kernel

Ubuntu

sudo apt install meson ninja-build nasm xorriso qemu-system-x86 clang lld ovmf #For UEFI emulation only

Firefly OS uses the meson build system:

# Note: We invoke the meson build commands using regular Makefiles as a QoL improvement
make all run # Alternatively you can use 'make all uefi' for uefi emulation

# "I want to execute the build commands manually!" - Here you go:
make -C limine/
meson build --cross-file meson_config.txt # You *must* use build, other scripts depend on this directory name
cd build
meson compile && ../scripts/geniso.sh && ../scripts/qemu-bios.sh # If meson compile is not supported you can either upgrade meson or use ninja

Note: It is assumed you have meson version 0.60.1 or higher, you may or may not run into problems with older versions.

firefly-kernel's People

Contributors

0-qvxr23 avatar 1vnt avatar flufflesthedog avatar heremanuel avatar melaquin avatar robtech21 avatar v01d-null avatar yuhanun avatar yuhanunc 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

firefly-kernel's Issues

Memory Management

A physical page allocator must be implemented to manage the system's physical memory. This will be done by a buddy allocator.

On top of that, a virtual memory manager must use the physical memory manager to map pages to a given virtual address space.

TODO

Todo list

A name next to a task means it is being worked on by someone, no name means whoever finished the previous task they worked on can move on to any of the open tasks

  • Start using frg::string instead of C style strings.
  • Slab allocator (or any other heap allocator for small allocations, mainly thinking about using that for frigg atm)

General cleanup: (Ideally this should be completed before moving on)

  • Start removing STL components and replace them with their frigg equivalent (Unless an allocator is needed since we have none for small sized allocations yet)

Buddy Allocator Prerequisites

Physical memory will be managed using a buddy allocator. The requirements in order to implement it are:

A struct representing a physical page, with info including its address and block size.

  • struct page

A doubly linked list of pages, one for each 4KB page in memory.

  • Detect available memory.
  • Reserve an amount of pages following the kernel binary to use as a list of pages. This table should be identity-mapped.

Divide remaining memory after above table into blocks of the largest possible size.

  • Link chunks of 2 ^ MAX_ORDER pages together in the list. If there remains memory smaller than that size then it can be given up.
  • Make the MAX_ORDER bucket point to the beginning of this list (i.e. the beginning of the table).

After this is done, a system of searching for blocks, splitting/coalescing them, and allocating/freeing them may be implemented.

Filesystem

An API must be provided to deal with accessing storage devices. Behind a single interface will be multiple implementations for dealing with specific devices. At the moment, only a CD-ROM implementation should be necessary because that's the kernel's boot medium.

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.