• Stars
    star
    365
  • Rank 116,851 (Top 3 %)
  • Language
    C
  • License
    MIT License
  • Created over 2 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

32bit Hobby Operatingsystem with graphics, multitasking and networking on i386 architecture.

RetrOS 32bit

Build

Hobby 32bit operatingsystem project focusing on networking on i386 architecture.
Explore the docs ยป

View Demo ยท Report Bug ยท Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

32bit Hobby Operatingsystem with graphics, multitasking and networking!

Started: 12.05.2022

(back to top)

Login

There are 3 default users: system, admin and guest. The password for admin is 'admin', while guest has no password. Currently there is no difference between admin and guest.

You can create a user with the 'admin' command:

admin create <username> <password>

Built With

This project is built with C & Assembly for the kernel, utilities and build system. C++ for userspace applications and Make for compilation. Docker used for crossplatform compilation.

Docker

(back to top)

Hardware

Tested on: Lenovo x240, Asus Eee PC series, Dell Optiplex 780, Samsung N150 Plus, Samsung NP-NC10, IBM Thinkpad a21p

Getting Started

Prerequisites

Crossplatform: Docker to compile the .iso file and QEMU for emulation.
For native compilation you will need:

  • i386-elf-gcc, i386-elf-ld and i386-elf-g++ for MacOS.
  • build-essential and gcc-multilib for Linux / WSL (ubuntu)
  • Also need: grub2, xorriso and xxd (for using Grub as bootloader)

Installation

To compile the kernel and its needed programs you simply need to run make img and make qemu to open QEMU

Linux

  1. Clone the repo

    git clone https://github.com/joexbayer/RetrOS-32.git
  2. Compile the kernel and create .img file

    make img

    Note: needs sudo to mount the .img file and copy over files!

  3. Launch QEMU

    make qemu
  4. Use GRUB (Optional)

    make grub

MacOS

MacOS can compile the kernel but not the needed tools.
  1. Clone the repo

    git clone https://github.com/joexbayer/RetrOS-32.git
  2. Compile the kernel / OS

    Docker:

    sudo docker-compose up
  3. Launch QEMU

    make qemu
  4. Use GRUB (Optional)

    make grub

Windows

Using Docker (can also compile in WSL)

  1. Clone the repo

    git clone https://github.com/joexbayer/RetrOS-32.git
  2. Compile and Launch QEMU

    ./make.cmd run

(back to top)

Usage

To run RetrOS-32:

  • http://copy.sh/v86/ : Upload .img file as Hard disk image.
  • QEMU: make qemu or qemu-system-i386 <image name>
  • Real hardware: Burn .iso file to USB or CD (Use a GRUB iso)

(back to top)

Project Structure (TBD)

NETOS - Project
โ”œโ”€โ”€ Dockerfile 
โ”œโ”€โ”€ LICENSE.txt
โ”œโ”€โ”€ Makefile
โ”œโ”€โ”€ apps (userspace applications)
โ”‚   โ”œโ”€โ”€ Makefile
โ”‚   โ”œโ”€โ”€ <app>
โ”‚   โ”œโ”€โ”€ libcore.a
โ”‚   โ”œโ”€โ”€ libgraphic.a
โ”‚   โ”œโ”€โ”€ libnet.a
โ”‚   โ”œโ”€โ”€ readme.md
โ”‚   โ””โ”€โ”€ utils
โ”‚       โ””โ”€โ”€ *.cpp
โ”œโ”€โ”€ bin 
โ”‚   โ””โ”€โ”€ *.o
โ”œโ”€โ”€ boot (custom bootloader)
โ”‚   โ”œโ”€โ”€ bootloader.s
โ”‚   โ””โ”€โ”€ multiboot.ld
โ”œโ”€โ”€ docker-compose.yml
โ”œโ”€โ”€ docs (documentation)
โ”‚   โ”œโ”€โ”€ *.md
โ”œโ”€โ”€ drivers (kernel drivers)
โ”‚   โ””โ”€โ”€ *.c
โ”œโ”€โ”€ fs (filesystem)
โ”‚   โ”œโ”€โ”€ Makefile
โ”‚   โ”œโ”€โ”€ bin
โ”‚   โ””โ”€โ”€ *.c
โ”œโ”€โ”€ graphics
โ”‚   โ””โ”€โ”€ *.c
โ”œโ”€โ”€ include
โ”‚   โ”œโ”€โ”€ arch
โ”‚   โ”‚   โ””โ”€โ”€ *.h
โ”‚   โ”œโ”€โ”€ fs
โ”‚   โ”‚   โ””โ”€โ”€ *.h
โ”‚   โ”œโ”€โ”€ gfx
โ”‚   โ”‚   โ””โ”€โ”€ *.h
โ”‚   โ”œโ”€โ”€ lib
โ”‚   โ”‚   โ””โ”€โ”€ *.h
โ”‚   โ”œโ”€โ”€ net
โ”‚   โ”‚   โ””โ”€โ”€ *.h
โ”‚   โ””โ”€โ”€ *.h
โ”œโ”€โ”€ kernel (main kernel source files)
โ”‚   โ”œโ”€โ”€ arch
โ”‚   โ”‚   โ””โ”€โ”€ *.c
โ”‚   โ”œโ”€โ”€ kthreads
โ”‚   โ”‚   โ””โ”€โ”€ *.c
โ”‚   โ””โ”€โ”€ *.c
โ”œโ”€โ”€ legacy (old code)
โ”œโ”€โ”€ lib (libraries)
โ”‚   โ””โ”€โ”€ *.c
โ”œโ”€โ”€ net (networking code)
โ”‚   โ””โ”€โ”€ *.c
โ”œโ”€โ”€ readme.md
โ”œโ”€โ”€ rootfs (root filesystem for the OS)
โ”œโ”€โ”€ tests (testing code)
โ”‚   โ”œโ”€โ”€ Makefile
โ”‚   โ”œโ”€โ”€ bin
โ”‚   โ”œโ”€โ”€ *_test.c
โ”‚   โ””โ”€โ”€ readme.md
โ””โ”€โ”€ tools (build tools)
    โ”œโ”€โ”€ scripts
    โ””โ”€โ”€ bin
        โ””โ”€โ”€ *.c

Roadmap

  • Custom Bootloader & GRUB compatible
  • Stage 2 bootloader
  • Wallpapers
  • Mountable image
  • Users
  • Multi-threaded pre-emptive scheduling
  • GDT & TSS kernel / userspace separation
  • Interrupt handling
  • PS/2 Keyboard & Mouse, PIT, VESA (640x480x8), RTC, Serial drivers, E1000
  • PCI.
  • 8Bit RGB to 8Bit VGA
  • Filesystem
  • Textmode VGA only
  • Networkstack
    • Ethernet, IP, ARP, UDP
    • Socket API
    • Interfaces
      • Loopback
    • DHCP
    • DNS
    • TCP
    • Netcat style commands
    • FTP
    • IRC
    • SSH
    • Telnet
    • HTTP
    • HTML
  • ATA IDE Driver
    • Ext2 (like) Filesystem
    • FAT16, support for up to 32mb files.
    • read / write
    • Atapi
  • Memory
    • 32bit Virtual Memory
    • kalloc / kfree (kernel)
    • malloc / free (userspace)
  • Graphics
    • Window Manager
    • GFXLib
    • Double framebuffer rendering
    • Mouse events
    • Dynamic resize
    • Fullscreen
    • Widgets Library
    • Custom HTML to Widgets
  • Terminal, Window Server, Process Informtaion, Finder.
  • Library (printf, memcpy, etc)
  • IPC
  • System calls
  • C Compiler / interpreter to bytecode
  • Custom VM to run bytecode.
  • Editor with Syntax Highlighting
  • Calculator
  • 3D Game
  • Snake game (Textmode only)
  • Userspace threads (shared virtual memory)
  • Remote virtual terminal over TCP
  • Tools
    • Build
    • Sync / Migration Took
    • mkfs
    • Testing
    • Create & Encode icons and wallpapers

See the open issues for a full list of proposed features (and known issues).

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Joe Bayer - [email protected]

Project Link: https://github.com/joexbayer/RetrOS-32

(back to top)

Acknowledgments

Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!

(back to top)