A community driven OS by the youth

Related tags

Graphics c asm os osdev
Overview

Welcome

Welcome to the mandelbrot Operating System. This OS is built by a humble group of teenagers over at Discord. We do this solely to have fun and to learn. We are not organized and are here to enjoy ourselves. Sounds appealing? Create a pull request!

image screen

About

This project is made for fun and learning. It's like tracing OS history, but with modern knowledge and without a lot of budget lol

Where are we in the project

In that section, I will compare our OS to other OSes from the past We are not saying that our OS is equal to them, (yet) we are way less talented than those guys were

  • We have a shell, with some commands.
  • We are developing an equivalent to Unix / MS-DOS.
  • We need a filesystem. We are planning to use USTAR.

Build Requirements (Arch/Manjaro package names)

  • build-essential
  • qemu
  • nasm
  • xorriso
  • mtools

Running

You'll need to have a cross-compiler, build one using ./build-cross-compiler.sh. Run make qemu to compile the OS and run it in qemu (needs qemu-system-i386) or just make to compile it. Build-time options are following:

  • To build with azerty keyboard, add AZERTY=1 to the command (make AZERTY=1 qemu for example).
  • To build with clang instead of GCC, add LLVM=1 to the command (make LLVM=1 qemu for example).

Using

Using our OS is really simple, on boot, you'll be greeted with a shell.
A small variety of commands are available:

  • cls : clears the screen
  • hello : prints Hello World!
  • hi : prints hi 20 times
  • echo : repeat any args
  • sysfetch : neofetch but it's in the kernel
  • reboot : reboot the system
  • bsod : kernel panic the system
  • mandelbrot : show mandelbrot background
  • ctheme : change the theme with the following
    • legacy : image legacy
    • dark : image dark
    • light : image light
    • witchcraft : image witchcraft

Using code

This is an open source project. Reuse code. Just follow the license terms and we are good. :)

Comments
  • Kernel panic file

    Kernel panic file

    Hello! First, I just want to say this is really neat. I was looking and I didn't find a kernel panic file or function. I wanted to suggest adding one (I would do it but I'm not sure exactly how to do it).

    opened by DamieFC 17
  • Error when building toolchain

    Error when building toolchain

    An error causing the termination of the building of the toolchain. More specifically, this was using @unsafecast's fork, of build-test branch, PR #37

    To reproduce:

    $ ./scripts/build-tools.sh
    

    image

    opened by Chai112 11
  • CPU 0: Page Fault at ffffffff80208fa6

    CPU 0: Page Fault at ffffffff80208fa6

    [ OKAY ] Framebuffer initialized [ OKAY ] ACPI initialized [ INFO ] Brought up CPU #0 [ OKAY ] SMP initialized

    CPU 0: Page Fault at ffffffff80208fa6

    I have all of the required tools mentioned in the README file, have built the toolchain (I'm on a 64 bit system so I used make toolchain), and have run it through Make.

    What could be causing this? Thanks!

    opened by anukranan 6
  • Toolchain build error

    Toolchain build error

    Running ./scripts/build-tools.sh results in the following error:

    2021-05-12 15:39:11 URL: ftp://gcc.gnu.org/pub/gcc/infrastructure/mpfr-3.1.4.tar.bz2 [1279284] -> "./mpfr-3.1.4.tar.bz2" [1]
    error: Cannot download mpc-1.0.3.tar.gz from ftp://gcc.gnu.org/pub/gcc/infrastructure/
    
    Previous command failed with exit code 1; quitting...
    
    opened by adamtherookie 6
  • git branch s/master/main/

    git branch s/master/main/

    A lot of repositories use main instead of master as the name of the primary branch. The reasoning behind a lot of this is political and uselessly controversial but it may be worth considering following what is current practice and saving a couple characters when typing.

    opened by devenblake 5
  • Added kernel panic files + Makefile fix for GCC 10

    Added kernel panic files + Makefile fix for GCC 10

    I haven't implemented this function on the exception handler because:

    1. The exception handler is too unstable, even turning off optimizations can crash the OS
    2. My function is unstable, it crashed KVM several times
    opened by A52-bit 5
  • LD: Getting multiple definition error

    LD: Getting multiple definition error

    It's pretty self-explanatory, (I think) this could be fixed by changing declarations on headers to "extern".

    LD output:

    ld: src/kernel/text.o:(.bss+0x0): multiple definition of `char_font'; src/misc/printf.o:(.bss+0x0): first defined here
    ld: src/kernel/text.o:(.bss+0x400): multiple definition of `framebuffer'; src/misc/printf.o:(.bss+0x400): first defined here
    ld: src/kernel/text.o:(.bss+0x408): multiple definition of `framebuffer_width'; src/misc/printf.o:(.bss+0x408): first defined here
    ld: src/kernel/text.o:(.bss+0x40c): multiple definition of `framebuffer_height'; src/misc/printf.o:(.bss+0x40c): first defined here
    ld: src/kernel/text.o:(.bss+0x410): multiple definition of `framebuffer_bpp'; src/misc/printf.o:(.bss+0x410): first defined here
    ld: src/kernel/text.o:(.bss+0x414): multiple definition of `RED'; src/misc/printf.o:(.bss+0x414): first defined here
    ld: src/kernel/text.o:(.bss+0x418): multiple definition of `DARK_RED'; src/misc/printf.o:(.bss+0x418): first defined here
    ld: src/kernel/text.o:(.bss+0x41c): multiple definition of `GREEN'; src/misc/printf.o:(.bss+0x41c): first defined here
    ld: src/kernel/text.o:(.bss+0x420): multiple definition of `DARK_GREEN'; src/misc/printf.o:(.bss+0x420): first defined here
    ld: src/kernel/text.o:(.bss+0x424): multiple definition of `YELLOW'; src/misc/printf.o:(.bss+0x424): first defined here
    ld: src/kernel/text.o:(.bss+0x428): multiple definition of `DARK_YELLOW'; src/misc/printf.o:(.bss+0x428): first defined here
    ld: src/kernel/text.o:(.bss+0x42c): multiple definition of `BLUE'; src/misc/printf.o:(.bss+0x42c): first defined here
    ld: src/kernel/text.o:(.bss+0x430): multiple definition of `DARK_BLUE'; src/misc/printf.o:(.bss+0x430): first defined here
    ld: src/kernel/text.o:(.bss+0x434): multiple definition of `MAGENTA'; src/misc/printf.o:(.bss+0x434): first defined here
    ld: src/kernel/text.o:(.bss+0x438): multiple definition of `DARK_MAGENTA'; src/misc/printf.o:(.bss+0x438): first defined here
    ld: src/kernel/text.o:(.bss+0x43c): multiple definition of `CYAN'; src/misc/printf.o:(.bss+0x43c): first defined here
    ld: src/kernel/text.o:(.bss+0x440): multiple definition of `DARK_CYAN'; src/misc/printf.o:(.bss+0x440): first defined here
    ld: src/kernel/text.o:(.bss+0x444): multiple definition of `WHITE'; src/misc/printf.o:(.bss+0x444): first defined here
    ld: src/kernel/text.o:(.bss+0x448): multiple definition of `BLACK'; src/misc/printf.o:(.bss+0x448): first defined here
    ld: src/kernel/text.o:(.bss+0x44c): multiple definition of `GRAY'; src/misc/printf.o:(.bss+0x44c): first defined here
    ld: src/kernel/text.o:(.bss+0x450): multiple definition of `DARK_GRAY'; src/misc/printf.o:(.bss+0x450): first defined here
    ld: src/kernel/text.o:(.bss+0x454): multiple definition of `BG'; src/misc/printf.o:(.bss+0x454): first defined here
    ld: src/kernel/text.o:(.bss+0x458): multiple definition of `FG'; src/misc/printf.o:(.bss+0x458): first defined here
    ld: src/kernel/text.o:(.bss+0x45c): multiple definition of `fg_color'; src/misc/printf.o:(.bss+0x45c): first defined here
    ld: src/kernel/text.o:(.bss+0x460): multiple definition of `bg_color'; src/misc/printf.o:(.bss+0x460): first defined here
    ld: src/kernel/text.o:(.bss+0x464): multiple definition of `x_pos_pixel'; src/misc/printf.o:(.bss+0x464): first defined here
    ld: src/kernel/text.o:(.bss+0x468): multiple definition of `y_pos_pixel'; src/misc/printf.o:(.bss+0x468): first defined here
    ld: src/kernel/text.o:(.bss+0x46c): multiple definition of `border'; src/misc/printf.o:(.bss+0x46c): first defined here
    ld: src/kernel/kernel.o:(.bss+0x0): multiple definition of `char_font'; src/misc/printf.o:(.bss+0x0): first defined here
    ld: src/kernel/kernel.o:(.bss+0x400): multiple definition of `framebuffer'; src/misc/printf.o:(.bss+0x400): first defined here
    ld: src/kernel/kernel.o:(.bss+0x408): multiple definition of `framebuffer_width'; src/misc/printf.o:(.bss+0x408): first defined here
    ld: src/kernel/kernel.o:(.bss+0x40c): multiple definition of `framebuffer_height'; src/misc/printf.o:(.bss+0x40c): first defined here
    ld: src/kernel/kernel.o:(.bss+0x410): multiple definition of `framebuffer_bpp'; src/misc/printf.o:(.bss+0x410): first defined here
    ld: src/kernel/kernel.o:(.bss+0x142c): multiple definition of `RED'; src/misc/printf.o:(.bss+0x414): first defined here
    ld: src/kernel/kernel.o:(.bss+0x1430): multiple definition of `DARK_RED'; src/misc/printf.o:(.bss+0x418): first defined here
    ld: src/kernel/kernel.o:(.bss+0x1434): multiple definition of `GREEN'; src/misc/printf.o:(.bss+0x41c): first defined here
    ld: src/kernel/kernel.o:(.bss+0x1438): multiple definition of `DARK_GREEN'; src/misc/printf.o:(.bss+0x420): first defined here
    ld: src/kernel/kernel.o:(.bss+0x143c): multiple definition of `YELLOW'; src/misc/printf.o:(.bss+0x424): first defined here
    ld: src/kernel/kernel.o:(.bss+0x1440): multiple definition of `DARK_YELLOW'; src/misc/printf.o:(.bss+0x428): first defined here
    ld: src/kernel/kernel.o:(.bss+0x1444): multiple definition of `BLUE'; src/misc/printf.o:(.bss+0x42c): first defined here
    ld: src/kernel/kernel.o:(.bss+0x1448): multiple definition of `DARK_BLUE'; src/misc/printf.o:(.bss+0x430): first defined here
    ld: src/kernel/kernel.o:(.bss+0x144c): multiple definition of `MAGENTA'; src/misc/printf.o:(.bss+0x434): first defined here
    ld: src/kernel/kernel.o:(.bss+0x1450): multiple definition of `DARK_MAGENTA'; src/misc/printf.o:(.bss+0x438): first defined here
    ld: src/kernel/kernel.o:(.bss+0x1454): multiple definition of `CYAN'; src/misc/printf.o:(.bss+0x43c): first defined here
    ld: src/kernel/kernel.o:(.bss+0x1458): multiple definition of `DARK_CYAN'; src/misc/printf.o:(.bss+0x440): first defined here
    ld: src/kernel/kernel.o:(.bss+0x145c): multiple definition of `WHITE'; src/misc/printf.o:(.bss+0x444): first defined here
    ld: src/kernel/kernel.o:(.bss+0x1460): multiple definition of `BLACK'; src/misc/printf.o:(.bss+0x448): first defined here
    ld: src/kernel/kernel.o:(.bss+0x1464): multiple definition of `GRAY'; src/misc/printf.o:(.bss+0x44c): first defined here
    ld: src/kernel/kernel.o:(.bss+0x1468): multiple definition of `DARK_GRAY'; src/misc/printf.o:(.bss+0x450): first defined here
    ld: src/kernel/kernel.o:(.bss+0x146c): multiple definition of `BG'; src/misc/printf.o:(.bss+0x454): first defined here
    ld: src/kernel/kernel.o:(.bss+0x1470): multiple definition of `FG'; src/misc/printf.o:(.bss+0x458): first defined here
    ld: src/kernel/kernel.o:(.bss+0x1474): multiple definition of `fg_color'; src/misc/printf.o:(.bss+0x45c): first defined here
    ld: src/kernel/kernel.o:(.bss+0x1478): multiple definition of `bg_color'; src/misc/printf.o:(.bss+0x460): first defined here
    ld: src/kernel/kernel.o:(.bss+0x147c): multiple definition of `x_pos_pixel'; src/misc/printf.o:(.bss+0x464): first defined here
    ld: src/kernel/kernel.o:(.bss+0x1480): multiple definition of `y_pos_pixel'; src/misc/printf.o:(.bss+0x468): first defined here
    ld: src/kernel/kernel.o:(.bss+0x1484): multiple definition of `border'; src/misc/printf.o:(.bss+0x46c): first defined here
    ld: src/kernel/syscall.o:(.bss+0x0): multiple definition of `idt'; src/kernel/kernel.o:(.bss+0x420): first defined here
    ld: src/kernel/syscall.o:(.bss+0x1000): multiple definition of `idtp'; src/kernel/kernel.o:(.bss+0x1420): first defined here
    ld: src/kernel/irq.o:(.bss+0x0): multiple definition of `idt'; src/kernel/kernel.o:(.bss+0x420): first defined here
    ld: src/kernel/irq.o:(.bss+0x1000): multiple definition of `idtp'; src/kernel/kernel.o:(.bss+0x1420): first defined here
    ld: src/kernel/font.o:(.data+0x0): multiple definition of `char_font'; src/misc/printf.o:(.bss+0x0): first defined here
    ld: src/kernel/isr.o:(.bss+0x0): multiple definition of `idt'; src/kernel/kernel.o:(.bss+0x420): first defined here
    ld: src/kernel/isr.o:(.bss+0x1000): multiple definition of `idtp'; src/kernel/kernel.o:(.bss+0x1420): first defined here
    ld: src/kernel/fb.o:(.bss+0x0): multiple definition of `framebuffer'; src/misc/printf.o:(.bss+0x400): first defined here
    ld: src/kernel/fb.o:(.bss+0x8): multiple definition of `framebuffer_width'; src/misc/printf.o:(.bss+0x408): first defined here
    ld: src/kernel/fb.o:(.bss+0xc): multiple definition of `framebuffer_height'; src/misc/printf.o:(.bss+0x40c): first defined here
    ld: src/kernel/fb.o:(.bss+0x10): multiple definition of `framebuffer_bpp'; src/misc/printf.o:(.bss+0x410): first defined here
    ld: src/arch/x86_64/idt.o:(.bss+0x0): multiple definition of `idt'; src/kernel/kernel.o:(.bss+0x420): first defined here
    ld: src/arch/x86_64/idt.o:(.bss+0x1000): multiple definition of `idtp'; src/kernel/kernel.o:(.bss+0x1420): first defined here
    make: *** [Makefile:65: mandelbrotos.elf] Error 1```
    opened by A52-bit 5
  • device.h

    device.h

    Hi (again 😁)

    In device.h I saw this:

    // TODO: Make this resizable
    #define MAX_DEVICES 256
    

    Couldn't you just change #define to uint64_t (uint64_t max_devices 256) or size_t (size_t max_devices 256) to make it resizable, or am I not understanding this right?

    opened by DamieFC 3
  • src: Changed source code layout to a

    src: Changed source code layout to a "cleaner" one.

    Well, I wanted to help with this project, so I'll start with this. I also don't know if you will actually want to change the code layout or not :).

    Separates kernel code, library code and headers from each other, in order to make code a bit cleaner(in my opinion):

    • Kernel code: src
    • Library code: src/lib
    • Headers: src/include
    opened by segfaultdev 3
  • Simplify strlen(3)

    Simplify strlen(3)

    This implementation of strlen(3) scrubs iteratively through memory so I figure putting that in a for statement is clearer to both humans and the compiler.

    No need to increment s when you already have the index you need to check in memory (or probably a register). And you have to have that index in memory because that's the return value.

    As far as I know this is the idiomatic solution; I've used this when I haven't wanted to include string.h.

    opened by devenblake 2
  • README: Made it clear that you need to clone recursively

    README: Made it clear that you need to clone recursively

    We had two issues in the past with people not realizing they need to clone recursively since submodules, so I though it would be a good idea to do that :^)

    opened by unsafecast 2
  • Partial math library

    Partial math library

    Commits contain what I've written so far of the math library in math.c, a full template for everything in math.h, limits.h, and graphing code for testing in math_test/*. Note that it is unstable and probably broken in a few places, so maybe it should be a new branch until complete.

    opened by raptor8134 2
  • Compilation failure

    Compilation failure

    I cloned the repository and tried to compile and run the operating system, using the instructions written in the README but got an error message while compiling:

    ../../build/kernel//./sys/interrupts.asm.o:sys/interrupts.asm:41:(.stab+0x14): relocation truncated to fit: R_X86_64_32 against `.text'
    ../../build/kernel//./sys/interrupts.asm.o:sys/interrupts.asm:41:(.stab+0x20): relocation truncated to fit: R_X86_64_32 against `.text'
    ../../build/kernel//./sys/interrupts.asm.o:sys/interrupts.asm:41:(.stab+0x2c): relocation truncated to fit: R_X86_64_32 against `.text'
    ../../build/kernel//./sys/interrupts.asm.o:sys/interrupts.asm:44:(.stab+0x38): relocation truncated to fit: R_X86_64_32 against `.text'
    ../../build/kernel//./sys/interrupts.asm.o:sys/interrupts.asm:45:(.stab+0x44): relocation truncated to fit: R_X86_64_32 against `.text'
    ../../build/kernel//./sys/interrupts.asm.o:sys/interrupts.asm:47:(.stab+0x50): relocation truncated to fit: R_X86_64_32 against `.text'
    ../../build/kernel//./sys/interrupts.asm.o:sys/interrupts.asm:47:(.stab+0x5c): relocation truncated to fit: R_X86_64_32 against `.text'
    ../../build/kernel//./sys/interrupts.asm.o:sys/interrupts.asm:47:(.stab+0x68): relocation truncated to fit: R_X86_64_32 against `.text'
    ../../build/kernel//./sys/interrupts.asm.o:sys/interrupts.asm:47:(.stab+0x74): relocation truncated to fit: R_X86_64_32 against `.text'
    ../../build/kernel//./sys/interrupts.asm.o:sys/interrupts.asm:51:(.stab+0x80): relocation truncated to fit: R_X86_64_32 against `.text'
    ../../build/kernel//./sys/interrupts.asm.o:sys/interrupts.asm:54:(.stab+0x8c): additional relocation overflows omitted from the output
    make[1]: *** [Makefile:39: ../../build/kernel/mandelbrotos.elf] Error 1
    make[1]: Leaving directory '/home/user/dev/MandelbrotOS/src/kernel'
    make: *** [Makefile:8: kernel] Error 2
    

    After looking around and git checkouting to older commits I found out that commit #e2d8eedcfb62aee5b12c84466b4f86b40193500e added the -g compilation flag. Removing the flag fixed the problem.

    After playing around with the Makefile for a bit I saw that when ASFLAGS gets the -g flag there's a compilation error but when CFLAGS gets it, there isn't.

    One solution can be to have two different optimization-flag-variables, one for the assembler and one for C compiler, and another solution can be to remove the -g flag completely.

    Considering there are multiple commits following the problematic commit, the problem might be a problem on my side, and could be a local fix in the author's machine. If there is a local fix, it should probably be noted in the README or added as part of the compilation process.

    opened by ZikiFlicky 2
Owner
null
✔️The smallest header-only GUI library(4 KLOC) for all platforms

Welcome to GUI-lite The smallest header-only GUI library (4 KLOC) for all platforms. 中文 Lightweight ✂️ Small: 4,000+ lines of C++ code, zero dependenc

null 6.6k Jan 8, 2023
🗺️ OMAPS.APP — Offline OpenStreetMap maps for iOS and Android. A community-driven fork of MAPS.ME.

OMaps is an open source cross-platform offline maps application, built on top of crowd-sourced OpenStreetMap data. It was publicly released for iOS and Android.

OMaps 4.4k Jan 7, 2023
KeePassXC is a cross-platform community-driven port of the Windows application “Keepass Password Safe”.

KeePassXC KeePassXC is a modern, secure, and open-source password manager that stores and manages your most sensitive information. You can run KeePass

KeePassXC 14.7k Jan 2, 2023
openFrameworks is a community-developed cross platform toolkit for creative coding in C++.

openFrameworks openFrameworks is a C++ toolkit for creative coding. If you are new to OF, welcome! Build status The master branch contains the newest,

openFrameworks 9.2k Jan 3, 2023
Aggregation of CK components and workflows from the community for ML Systems in one repository. They are also uploaded to the cKnowledge platform:

CK repository for AI and ML systems Linux/MacOS: Windows: There are numerous CK components spread across numerous GitHub repositories. Based on the fe

cTuning foundation (a founding member of MLCommons and ACM taskforce on reproducibility) 6 Sep 14, 2021
L.A. Noire - V Patch | A community-made patch for the 2011's video game L.A Noire containing a set of fixes like an unlocked framerate or custom aspect ratios.

V-Patch for L.A Noire Complete Edition This project is not affiliated with Take-Two or Rockstar Games A while ago I wanted to replay L.A Noire on my n

null 193 Jan 2, 2023
Vinifera is an open-source community collaboration project extending the Tiberian Sun engine.

Vinifera is an open-source community collaboration project extending the Tiberian Sun engine. Latest Nightly Build: Download Table of Contents Intro C

Vinifera Developers 25 Nov 1, 2022
This repository is to share the EdgeAI Lab with Microcontrollers Series material to the entire community

This repository is to share the EdgeAI Lab with Microcontrollers Series material to the entire community. We will share documents, presentations and source code of two demo applications.

Machine Learning Tokyo 15 Oct 23, 2021
Version control for Hydroxide's C++ port (Redacted Lua internals, as requested by community members.)

Hydroxide++ Penetration testing tool for games developed on the Roblox game engine. (but this time, written in C++) view the original version of Hydro

ARSON 2 Nov 10, 2022
Best Method to get Globally Banned from the cfx.re community

Lua-Executor Best Method to get Globally Banned from the cfx.re community Since cheaters have been going crazy selling 'their' hacks, and often gets d

Scopes 6 Dec 5, 2022
Solutions of assignments, problems of DSA bootcamp in C++ by Kunal kushwaha OR Community Classroom

Problem-solution Solutions of assignments, problems of DSA bootcamp in C++ by Kunal kushwaha OR Community Classroom DSA-Bootcamp ?? Assignments ✨ Solu

kapil vaishnav 1 Nov 6, 2021
Arduino core for GD32 devices, community developed, based on original GigaDevice's core

GD32 Arduino Core (New) This is a Arduino core is based off of the original GigaDevice core that was provided by the company in early June 2021 (see h

null 46 Dec 24, 2022
Community-gathered tests for C++ course read in YSDA

YSDA-CPP-collective-tests Коллективно собранные тесты для задач с закрытыми тестами из курса C++. Структура Структура этого репозитория соответствует

Martynov Pavel 5 Nov 1, 2021
Cinder is a community-developed, free and open source library for professional-quality creative coding in C++.

Cinder 0.9.3dev: libcinder.org Cinder is a peer-reviewed, free, open source C++ library for creative coding. Please note that Cinder depends on a few

Cinder 5k Jan 7, 2023
Contains platform and API specific code written by Primal community members.

PrimalPlus Contains platform and API specific code written by Primal community members. How to use The general idea is to simply copy the files from t

Game Engine Series 20 Nov 7, 2022
CMake Community Modules

CMake Community Modules The CMake Community Modules are CMake modules created and maintained by the community. This repository's main product is the C

Edgar 2 Dec 14, 2022
Resources and forum for the Chinese community, maintained and moderated by CoinSummer & PL.

Awesome Filecoin 请注意:本文中的链接并非全部是官方链接,部分链接是第三方链接,有些甚至是收费链接,请大家注意区分。 1. Website 1.1 浏览器 FilFox - 6Block 团队开发的 Filecoin 浏览器 Filscan - IPFS原力团队开发的 Filecoi

Filecoin 413 Jan 4, 2023
A romhack created by the Hylian Modding community as a collective project.

OotCommunityHack2022 A romhack created by the Hylian Modding community as a collective project. The structure of this repository is subject to change.

Hylian Modding 3 Aug 23, 2022
PyWinRT is a community-supported fork of the pywinrt tool from the Microsoft xlang project.

PyWinRT is a community-supported fork of the pywinrt tool from the Microsoft xlang project.

null 19 Dec 1, 2022
Yocto/GL: Tiny C++ Libraries for Data-Driven Physically-based Graphics

Yocto/GL: Tiny C++ Libraries for Data-Oriented Physically-based Graphics Yocto/GL is a collection of small C++17 libraries for building physically-bas

Fabio Pellacini 2.4k Dec 27, 2022