Giter VIP home page Giter VIP logo

redfox0x20 / redfox32_old Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 1.0 1.95 MB

A self learning exercise in low level system programming (OS and kernel programming) for the x86 architecture.

License: GNU General Public License v3.0

Assembly 28.56% C 70.67% Shell 0.77%
kernel qemu architecture explanations osdev operating-system operating-system-learning kernel-source learning-by-doing learning-exercise

redfox32_old's Introduction

RedFox32

Archived 23/06/2021 - Moved to new repository

This repository has been archived as the project is unsustainable in this format, dependancies are not clear and not proper plan of attack was produced! Additionally my development cycle changed numerous times throughout. This project will be continued in the new repository. This repository will continue to exist until it is no longer of use to me.


I overhaul a lot of the system often as I learn, this is going to happen soon!

I've noticed an increase in interest in the project as I have been more active on it again. Please keep in mind I am rarely updating the documentation at the moment as I build up the project base. I will keep it as up to date as possible if the interest is maintained. Please do not try to contribute towards progress, the purpose is for me to learn at my own pace and write everything I can by hand from documentation or by using existing code as a reference. If you would like to provide links to resources or any queries in general then use something from the Where section to contact me.

What is this, where am I?

RedFox32 is a hobby OS project that I am using to learn the ins and outs of the x86 Architecture in addition to helping developers (like you, perhaps) begin their own adventure into the world of bare-metal programming. Image of the running OS

Why?

Why not? Throughout the development of this project I will be producing somewhat detailed documentation providing those who wish to have their own attempt a better head start than what I could source. Sources such as https://wiki.osdev.org/ are great however, I often found that when it came to code samples their was either existing expectations, a lack of explanations, or no code at all, only a rough explanation of what needs to happen.

This project is being built to run on hardware if you so wish it to!

How?

I spend way too much time doing things like this! The project is made entirely using x86 (intel) Assembly and C. Everything is made from scratch, from the bootloader, to the kernel, to the drivers, I have written it all.

All development is done on Arch Linux - Kernel: 5.7.12-arch1-1 so if you have problems which I don't, I don't know what you're doing wrong because all you have to do is compile and run, there is a grand total of Zero dependencies!

Where...

Where? Where!? What do you mean where! Well I'll tell ya! You can view live development of the RedFox32 project over at https://twitch.tv/RedFox0x20

Get other updates about projects from here:

Documentation

Requirements

If you want to run this on physical hardware, you're in luck! I have designed for physical hardware so everything will be taken into account! Wow! However, there are some requirements, you will have to boot from a Floppy Drive... Yes, a floppy drive!

Can't meet that requirement? Not to worry just run make run and you'll be dropped into a QEMU virtual machine running just fine. How about Virtual Box and other software? Sure why not, give it a go, there will be small things every now and then that I may need to change to properly build for them however they're not the main target.

Building

We target x86 (32 bit) CPUs as such we need to be able to compile 32bit code! To install the required packages you may need to enable multilib packages for your architecture.

Note for Pacman users

You may need to edit /etc/pacman.conf by either adding or uncommenting the following:

[multilib]
Include = /etc/pacman.d/mirrorlist

Requirements

  • qemu-system-i386
  • gcc (with 32bit support, may be a seperate package)
  • nasm
  • dd
  • make That's it, not a lot huh.

Here's a pacman command to install them, sorry debian or other package manager users: sudo pacman -Ss gcc gcc-libs lib32-gcc-libs qemu qemu-arch-extra nasm

Build from source

Building from source is not reccomended as not every commit will be stable or even run in the first place, I try to avoid pushing broken code onto GitHub however sometimes it is necessary. Apologies in advance.

Building the project from source yourself couldn't be any easier! Simple run make all and Build/Floppy.img will be produced! It's that simple! If you run into errors then I probably pushed some bad code, sorry, it happens sometimes.

Prebuilt

Prebuilt images will be available once the project is more stable, currently I am working on the Kernel and things are still being drafted, we'll be there soon!

redfox32_old's People

Contributors

redfox0x20 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

dalalsunil1986

redfox32_old's Issues

[Feature] Binary/Portable Executables

Executables

Is dependant on #9 being complete first. It is also ideal to have #10 complete before this point too.

Executables will provide functionality to be added without being built into the kernel, this is important for things such as separation of user and kernel code.

[Feature] Memory management

Memory management

The ability to dynamically allocate memory is a necessity. This will help reduce the size of both the kernel and future elements such as executables.

Minimum necessary features:

  • Memory Allocation
  • Memory release (free / Deallocation)
  • Allocation management

[BUG] BootloaderStage2/Stage2A.asm - LoadKernel

The LoadKernel method does not work correctly, the method should be able to load multiple Cylinders however it is unable to handle any more than 1, this could be a problem with the loop or just something weird with NASM. The code here was not very good anyway.

To solve this issue the method will be rewritten and should be broken up into a series of smaller helper methods that can be used to reduce the chance of an error. It is also important that this is well documented as it is a core element of the bootloader.

[Change] Bootloader and Filesystem

In the future the bootloader will be replaced by the dedicated BootFox32 project.
In addition to the bootloader, this will also include the change to the dedicated FileFox32 which has yet to be produced.

This update will not take place until FileFox32 is developed and further work has started on the bootloader to ensure a stable and correct system.

[Feature] Floppy Driver

Floppy Driver

A Floppy Driver will be necessary for saving/loading data to/from the floppy boot device once protected mode has been entered.

Once a Floppy Driver is implemented, features such as a File System will be possible to allow for management of files, in particular executable files which will be the first steps to the System becoming a functioning OS.

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.