GithubHelp home page GithubHelp logo

00mjk / moonos Goto Github PK

View Code? Open in Web Editor NEW

This project forked from v01d-null/moonos

1.0 0.0 0.0 54.16 MB

MoonOS (just a kernel atm) is a micro kernel designed for the x86 architecure supporting 64 bit processors only

License: GNU General Public License v3.0

Shell 0.01% Python 0.05% C 99.66% Assembly 0.09% Makefile 0.20% GDB 0.01%

moonos's Introduction

Moon OS

Moon OS is a modular micro-kernel targeting the x86_64 architecture, aiming to be POSIX-like in the future.

Screenshots:

Bootsplash:
Verbose boot:
Kernel panic:

Features

  • 4 level paging (5 level paging is a meme for a hobbyOS)
  • Stacktrace/symbol backtrace
  • ubsan
  • Basic image rendering (Raw pixel data header file generated by https://github.com/V01D-NULL/img2c)
  • Set verbose or quiet boot in the bootloader config file (limine.cfg).
  • Elf loader
  • zoned bitmap and slab allocators.
  • System calls via the syscall instruction (The regular int 0x80 is not supported)
  • Physical kernel heap (small slabs (i.e. max of 512 bytes per cache))

Future features:

  • IPC
  • Threads
  • kasan
  • APIC
  • ACPI
  • SMBIOS
  • Kernel heap
  • Multitasking
  • Many hardware drivers including but not limited to:
    • Network cards
    • Storage drivers
    • GPU's
    • And much more
  • A libc for the userland

This is currently being working on:

  • Scheduler
  • Porting mlibc

Directory walkthrough:

  • libs/ -- Here you will find kernel libs in the form of archives.
  • kernel/ -- Kernel source code, this is most likely all you really care about
  • debug-util/ -- Files needed for debugging Moon.
  • boot/ -- Everything Moon needs in order to boot

Installation

Building: (assuming you are using a debian based distro)

  • Install needed tools:
    • sudo apt update
    • sudo apt install gcc nasm qemu-system-x86 libfuse-dev
  • Build kernel
    • make all -- Build the kernel to an ISO file
    • make run -- Run the kernel in qemu and build it if necessary
    • make kvm -- Run the kernel in qemu with kvm and build it if necessary
    • Command line options for kvm and run:
      • modern=yes -- Emulate modern features

My journey: (Inspiration for newcomers)

I have always wanted to make an OS, so one day I decided to build one. Turns out it is a lot of work and back then it totally overwhelmed me to the point where I took long breaks (for months) because information was so scarce, and what little information there is is outdated.

I have written about 4 "kernels" during my OS development learning experience, and each time I started over because I was far too overwhelmed- none have gotten past a GDT :/ (heck, some where just bootloaders that called a kernel entry and looped)

If you are a beginner looking to understand what this code is doing and how you can write your own kernel with up-to-date information, please do join the OSDEV discord server (linked in the osdev wiki at the bottom) and don't give up when it gets hard at first.

I have started developing kernels about 8 months ago at the time of writing (with multiple month-long of breaks in between), and I still have many things to learn, however my try harder mindset proved useful in helping me get through the struggles and write a kernel for which I did not have to steal or copy code from tutorials or other projects out of a lack of knowledge.

I hope this inspired you to use this mindset when things seem too difficult to manage.

Best of luck ~ V01D (Tim).

Special thanks

  • Thanks go out to websites like lowlevel.eu or the osdev wiki but also some cool and really helpful os developers on github and discord.

Finishing touch (resources I use)

moonos's People

Contributors

v01d-null avatar

Stargazers

 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.