My first os built from scratch

Overview

Kernel project

My first os built from scratch
Contributors are welcome

LICENSE

TODO

  • GDT
  • IDT
  • PS2 Keyboard
  • PS2 Mouse
  • PIT
  • RTC
  • Initrd
  • Drawing on framebuffer
  • Serial debugging
  • VFS
  • PMM
  • VMM
  • Heap
  • ACPI
  • Shutdown
  • Reboot
  • PCI
  • AHCI
  • Real filesystems (ext2, fat...)
  • Multithreading
  • TSS
  • Userspace
  • System calls
  • POSIX
  • ELF execution
  • Port libc (Newlib)
  • Port apps
  • FUSE
  • Sound
  • Network
  • USB
  • USB Keyboard
  • USB Mouse
  • GUI (Window manager)

Building And Running

Make sure you have following programs installed:

  • GCC
  • G++
  • Make
  • Nasm
  • Qemu x86-64
  • Xorriso
  • Wget
  • Tar
  1. Download the toolchain from releases page

  2. Extract it in /opt directory with:
    cd /opt && sudo tar xpJf <Downloaded toolchain.tar.xz>
    (bin directory should be /opt/x86_64-pc-elf/bin/)

  3. Add this line to your ~/.bashrc:
    export PATH="/opt/x86_64-pc-elf/bin:$PATH"

  4. Run
    source ~/.bashrc

  5. Clone this repo with:
    git clone --single-branch --branch master https://github.com/ilobilo/kernel

  6. Go to kernel directory and run:
    make For UEFI
    make bios For BIOS

This command will download limine installer, compile it, build the kernel, create iso file and run it in qemu.

Discord server

https://discord.gg/fM5GK3RpS7

Resources used:

You might also like...
WebAssembly from Scratch: From FizzBuzz to DooM.

WebAssembly from Scratch: From FizzBuzz to DooM Exploring WebAssembly from scratch from a backend-person-point-of-view. A story in four acts. Welcome

A multimedia framework developed from scratch in C/C++, bundled with test programs and a neat media analyzer.

MiniVideo framework MiniVideo is a multimedia framework developed from scratch in C/C++, bundled with small testing programs and a neat media analyser

A JavaScript interpreter from scratch, supporting ES5 syntax.

es A JavaScript interpreter from scratch, supporting ES5 syntax. Compile and Run Clone and compile: $ git clone [email protected]:zhuzilin/es.git $ cd es

A Modern Operating System Written in C++ From Scratch!

README Features Long Mode (64-bit) OS Higher Half Kernel Stack Based - Page Frame Allocator (PMM) with O(1) time complexity Virtual Memory Manager (VM

First open source android modding library for Geometry Dash Based on Hooking-and-Patching-android-template

Android-ML First open source android modding library for Geometry Dash Based on Hooking-and-Patching-android-template Installation Download this githu

#PICOmputer - World first Raspberry RP2040 PICO - QWERTY & IPS devkit
#PICOmputer - World first Raspberry RP2040 PICO - QWERTY & IPS devkit

PICOmputer #PICOmputer - World first Raspberry RP2040 PICO - QWERTY & IPS devkit https://www.pcbway.com/project/shareproject/_PICOmputer____World_firs

The Express LRS Handset project is first and foremost an experimental test bed for pushing the envelope with what can be done with the ELRS radio link

The Express LRS Handset project is first and foremost an experimental test bed for pushing the envelope with what can be done with the ELRS radio link

This was the first ever Computer Science project that I made back in Class XII (2016). I thought I should upload it on GitHub so that it does not get lost. :)
This was the first ever Computer Science project that I made back in Class XII (2016). I thought I should upload it on GitHub so that it does not get lost. :)

First Ever Project This was the first ever Computer Science project that I made back in Class XII (2016). I thought I should upload it on github so th

First-up chord-send and tap-and-hold chord repeat extensions to QMK.

Quantum Mechanical Keyboard Firmware This is a keyboard firmware based on the tmk_keyboard firmware with some useful features for Atmel AVR and ARM co

Comments
  • error: invalid combination of opcode and operands

    error: invalid combination of opcode and operands

    ...(sucefully until here) ASM source/system/cpu/syscall/syscall.asm /root/kernel/source/system/cpu/syscall/syscall.asm:12: warning: register size specification ignored [-w+other] /root/kernel/source/system/cpu/syscall/syscall.asm:7: error: invalid combination of opcode and operands /root/kernel/source/system/cpu/syscall/syscall.asm:8: error: invalid combination of opcode and operands /root/kernel/source/system/cpu/syscall/syscall.asm:12: error: invalid combination of opcode and operands make[2]: *** [Makefile:160: /root/kernel/source/system/cpu/syscall/syscall_asm.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [Makefile:139: /root/kernel/source/kernel.elf] Error 2 make: *** [Makefile:10: bios] Error 2

    opened by fgsoftware1 10
  • Fix mentioned list of errors given (Long list, May not even be the end i'm still testing).

    Fix mentioned list of errors given (Long list, May not even be the end i'm still testing).

    New errors found while testing. Here is a summary:

    1. source/lib/elf.hpp can't find supposed file <elf.h> (Makes errors in other files below happen)
    2. Many errors in source/lib/elf.hpp (2 errors)
    3. Many errors in source/system/sched/scheduler/scheduler.hpp (7 errors)
    4. Many errors in source//system/vfs/vfs.cpp (2 errors)

    Error occured when compiling CPP file "vfs.cpp". The message below shows the log AFTER trying to compile "vfs.cpp".

    In file included from kernel/source//system/vfs/vfs.cpp:3:
    In file included from kernel/source/system/sched/scheduler/scheduler.hpp:9:
    kernel/source/lib/elf.hpp:30:21: error: use of undeclared identifier 'Elf64_Ehdr'
        std::shared_ptr<Elf64_Ehdr> header(new Elf64_Ehdr);
                        ^
    kernel/source/lib/elf.hpp:30:44: error: unknown type name 'Elf64_Ehdr'
        std::shared_ptr<Elf64_Ehdr> header(new Elf64_Ehdr);
                                               ^
    In file included from kernel/source//system/vfs/vfs.cpp:3:
    kernel/source/system/sched/scheduler/scheduler.hpp:14:44: error: namespaces can only be defined in global or namespace scope
    namespace kernel::system::sched::scheduler {
                                               ^
    kernel/source/system/sched/scheduler/scheduler.hpp:140:12: error: no type
    named 'thread_t' in namespace 'kernel::system::sched::scheduler'
    scheduler::thread_t *this_thread();
    ~~~~~~~~~~~^
    kernel/source/system/sched/scheduler/scheduler.hpp:140:33: error: empty parentheses interpreted as a function declaration [-Werror,-Wvexing-parse]
    scheduler::thread_t *this_thread();
                                    ^~
    kernel/source/system/sched/scheduler/scheduler.hpp:140:33: note: replace parentheses with an initializer to declare a variable
    scheduler::thread_t *this_thread();
                                    ^~
                                     = nullptr
    kernel/source/system/sched/scheduler/scheduler.hpp:141:32: error: empty parentheses interpreted as a function declaration [-Werror,-Wvexing-parse]
    scheduler::process_t *this_proc();
                                   ^~
    kernel/source/system/sched/scheduler/scheduler.hpp:141:32: note: replace parentheses with an initializer to declare a variable
    scheduler::process_t *this_proc();
                                   ^~
                                    = nullptr
    kernel/source/system/sched/scheduler/scheduler.hpp:144:1: error: function definition is not allowed here
    {
    ^
    kernel/source/system/sched/scheduler/scheduler.hpp:150:1: error: function definition is not allowed here
    {
    ^
    kernel/source/system/sched/scheduler/scheduler.hpp:157:1: error: function definition is not allowed here
    {
    ^
    kernel/source//system/vfs/vfs.cpp:10:31: error: namespaces can only be defined in global or namespace scope
    namespace kernel::system::vfs {
                                  ^
    kernel/source//system/vfs/vfs.cpp:430:2: error: expected '}'
    }
     ^
    kernel/source/lib/elf.hpp:26:1: note: to match this '{'
    {
    ^
    11 errors generated.
    make[2]: *** [kernel/source//system/vfs/vfs.o] Error 1
    make[1]: *** [kernel/source/kernel.elf] Error 2
    make: *** [all] Error 2
    
    opened by ghost 3
  • WmWare

    WmWare

    I "burn" iso image in WmWare Vorkstation 16 and display blue "window" and then WmWare display error about Virtual CPU and restart WmWare.

    opened by Andrej123456789 3
  • error: comparison of integers of different signs: 'int' and 'uint64_t'

    error: comparison of integers of different signs: 'int' and 'uint64_t'

    Whenever I try to compile the os, it keeps on returning this error Screenshot 2022-06-12 at 11 40 14 AM . its for these specific lines of code (located in source/drivers/display/framebuffers/framebuffers.cpp image

    The code I use to run:

    make
    

    How do I fix this? Also what commands do you use to run and in what order? Btw: Im on MacOS

    opened by ghost 1
Releases(1.0)
Owner
kid who loves coding
null
LoRaWAN end node built from scratch using CubeMX for WLE5x in the LoRa-E5

Seeed-LoRa-E5 LoRaWAN end node built from scratch using STM32CubeIDE/CubeMX for the LoRa-E5 WLE5x This assumes a general familiarity with STM32CubeIDE

Dana 26 Dec 16, 2022
A simple Unix like operating system from scratch.

HOS-x86 an x86 operating system written from scratch How to Build? Currently you need NASM, GCC and QEMU to build the image file. Install the packages

Jayachandra Kasarla 15 Feb 7, 2021
This is the source code of SATCH a SAT solver written from scratch in C.

The main purpose of this solver is to provide a simple and clean code base for explaining and experimenting with SAT solvers. It is simpler than the source code of CaDiCaL and of Kissat in particular, while still featuring most important implementation techniques needed to obtain a state-of-the-art SAT solver

Armin Biere 73 Dec 16, 2022
This is an experimental OS-from-scratch project. Just for demonstration, not useful at all.

OS Playground This is an experimental OS-from-scratch project. Just for demonstration, not useful at all. Different from OS in other projects, this OS

null 5 Nov 5, 2022
A unix operating system made from scratch using c++

pranaos A unix operating system made from scratch using c++ Dependencies g++ version should be more than 10.0.0 ninja gcc compiler needed prana os is

Krisna Pranav 16 Nov 9, 2022
Creating sepia, reflection, grayscale, and blur filters from scratch and returns a modified image

image-filter Created sepia, reflection, grayscale, and blur filters from scratch and returning a modified image Directories: images: contains sample i

Martin Guevara 1 Oct 14, 2021
Developing a Drone from scratch in ROS Gazebo

Project Building a drone and developing its control system. Table of Contents Project Table of Contents About The Project Tech Stack File Structure Ge

null 14 Oct 17, 2022
PastaOS is a simple open-source kernel written from scratch for didactic purposes

What is PastaOS? ================ PastaOS is a simple open-source kernel written from scratch for didactic purposes. The main goal of this project i

Andrea Righi 10 Mar 30, 2022
This repository is for my coding practice, making a text editor from scratch in C.

text-editor-practice This repository will contain my coding practice, making a text editor from scratch. I based this practice from this wonderful res

null 2 Dec 13, 2021
My attempt at writing an Operating System from scratch

Operating System Trying to write my own operating system from scratch Current Status: Compiles ✔️ Directory Structure (Will be updated as changes happ

Nofil Qasim 12 Oct 6, 2022