Git Product home page Git Product logo

fros's Introduction

FrOS

Description

This is a simple x86 32 bit operating system written from scratch, based on Carlos Fenollosas OS tutorial. It contains the following components:

  1. Boot loader
  2. Operating system kernel, including
    1. ISRs to handle CPU interrupts
    2. VGA driver
    3. Keyboard driver
    4. Shell
    5. Dynamic memory allocation

Setup

Install Assembler and Emulator

brew install qemu nasm

Install Kernel Compiler

https://github.com/lordmilko/i686-elf-tools#mac-os-x

brew install i386-elf-binutils
brew install i386-elf-gcc
brew install i386-elf-gdb
export PATH="/usr/local/Cellar/x86_64-elf-binutils/<version>/bin/:/usr/local/Cellar/x86_64-elf-gcc/<version>/bin/:/usr/local/Cellar/i386-elf-gdb/<version>/bin:$PATH"

Usage

Boot

make run

Debug

make debug

In GDB shell:

  • Set breakpoint at function (e.g. start_kernel): b start_kernel
  • Start execution: c
  • Jump to next instruction: n
  • Print variable: p <variable_name>

Additional Resources

fros's People

Contributors

acteam-ux avatar alexs-sh avatar frosner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

fros's Issues

X not being printed to the screen.

This is a very late issue but normally it should say XeaBIOS but it said SeaBIOS like normal.

I'm using linux and this guide is known to be very fuzzy for linux but i have no other choice.

void main() { char* video_memory = (char*) 0xb8000 *video_memory = 'X' }

^ this is the contents of my kernel.c file..

How to draw a pixel?

How can I draw a pixel to the screen. I am working on making a gui on top of this os and need a way to draw graphics.

undefined reference to `_GLOBAL_OFFSET_TABLE_': unable to build

Hi,
first i'd like to thank you for this very educational project.
I'm on linux and trying to build, but make fails with the following error:

asm boot/mbr.asm -f bin -o boot/mbr.bin
nasm boot/kernel_entry.asm -f elf -o boot/kernel_entry.o
gcc -g -m32 -ffreestanding -c kernel/mem.c -o kernel/mem.o # -g for debugging
nasm cpu/interrupt.asm -f elf -o cpu/interrupt.o
gcc -g -m32 -ffreestanding -c kernel/util.c -o kernel/util.o # -g for debugging
gcc -g -m32 -ffreestanding -c kernel/kernel.c -o kernel/kernel.o # -g for debugging
gcc -g -m32 -ffreestanding -c drivers/display.c -o drivers/display.o # -g for debugging
gcc -g -m32 -ffreestanding -c drivers/ports.c -o drivers/ports.o # -g for debugging
gcc -g -m32 -ffreestanding -c drivers/keyboard.c -o drivers/keyboard.o # -g for debugging
gcc -g -m32 -ffreestanding -c cpu/isr.c -o cpu/isr.o # -g for debugging
gcc -g -m32 -ffreestanding -c cpu/idt.c -o cpu/idt.o # -g for debugging
gcc -g -m32 -ffreestanding -c cpu/timer.c -o cpu/timer.o # -g for debugging
ld -m elf_i386 -o kernel.bin -Ttext 0x1000 boot/kernel_entry.o kernel/mem.o cpu/interrupt.o kernel/util.o kernel/kernel.o drivers/display.o drivers/ports.o drivers/keyboard.o cpu/isr.o cpu/idt.o cpu/timer.o --oformat binary
ld: kernel/mem.o: in function `memory_copy':
/tmp/FrOS/kernel/mem.c:9: undefined reference to `_GLOBAL_OFFSET_TABLE_'
ld: kernel/mem.o: in function `init_dynamic_mem':
/tmp/FrOS/kernel/mem.c:34: undefined reference to `_GLOBAL_OFFSET_TABLE_'
ld: kernel/mem.o: in function `print_dynamic_node_size':
/tmp/FrOS/kernel/mem.c:41: undefined reference to `_GLOBAL_OFFSET_TABLE_'
ld: kernel/mem.o: in function `print_dynamic_mem_node':
/tmp/FrOS/kernel/mem.c:49: undefined reference to `_GLOBAL_OFFSET_TABLE_'
ld: kernel/mem.o: in function `print_dynamic_mem':
/tmp/FrOS/kernel/mem.c:61: undefined reference to `_GLOBAL_OFFSET_TABLE_'
ld: kernel/mem.o:/tmp/FrOS/kernel/mem.c:71: more undefined references to `_GLOBAL_OFFSET_TABLE_' follow

I looked through the code in mem.c but i'm unable to find anything referencing "GLOBAL_OFFSET_TABLE".
What am i missing? Thank you in advance.

[SCANF]

Any idea how one can implement a scanf function?

USB Keyboard Driver Question

Hello,

I was reading over your "Writing My Own Keyboard Driver" (https://dev.to/frosnerd/writing-my-own-keyboard-driver-16kh) about the keyboard driver in which you mentioned that USB keyboards have a different scan code but you did not give much information on it.

I am working on updating an OS drive that was written to read PS/2 keyboards but now dose not work with modern USB keyboards and mouse interfaces.

I need to learn how to write an updated drive to hand USB keyboards and mouse devices.

Do you have any guidance or suggestions?

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.