Coder Social home page Coder Social logo

griwes / reaveros-iteration1 Goto Github PK

View Code? Open in Web Editor NEW
33.0 11.0 8.0 2.52 MB

First, abandoned, iteration of my OS project. Current iteration can be found here: https://github.com/griwes/reaveros

License: Other

C++ 88.55% Assembly 9.50% C 0.24% Shell 0.30% Makefile 1.41%

reaveros-iteration1's Introduction

Rose, Reaver Project OS

ReaverOS is part of larger - and yet to become actively developed and gather a team - project, from which it has taken its name - Reaver Project, meant to provide full computer environment. More about it on its website.

ReaverOS is an attempt to build modern operating system, aimed at x86-64 architecture with SMP in mind. It is also aiming to be as legacy free as possible, while implementing modern, µkernel design.

Current features

  • (really basic) scheduler
  • kernel timer API using HPET (or PIT, if HPET is not available) for high precision timer and local APIC timer for preemption timer
  • AP booting

Build instructions

Please do note: the Reaver Archive tools have been abandoned. That basically means that currently there's no way to fully build ReaverOS to boot. The InitRD format will soon be replaced with something else, probably with tar (although there's a slight possibility that I'll go back to the Reaver archive format, although this time with an implementation that actually makes sense). I'm sorry for the inconvenience of not being able to get a full Rose build from this branch. If you want to see if the system builds for you, please use one of the past tags.

To build ReaverOS, you will need following tools installed on your system:

  • POSIX shell (d'oh)
  • make (I am personally using GNU make, since I am on Linux; not sure if I am using some specific GNU things, hopefully not)
  • wget
  • tar
  • git
  • clang++, libc++ for building the kernel, binutils and other tools (I have no plans of supporting GCC at any point in the future)
  • ReaverLib

If any of those required tools doesn't cooperate during build, feel free to contact me (Griwes @ #reaver on Freenode, @Guriwesu on Twitter), but be prepared to get an answer saying "upgrade your tools". I usually Clang's HEAD every month or so, and using every bleeding edge features I feel I need.

To clone and build current revision of Rose, type the following commands in your shell:

git clone git://github.com/griwes/ReaverOS.git
cd ReaverOS
make prepare
make tools
make hdd

It is recommended to use a release, not current HEAD, to build the OS, if you want to just try and see it. To get a list of releases, along with links to download their source code tarballs, visit https://github.com/griwes/ReaverOS/releases (see warning below before choosing release to build). You should still invoke both make prepare and make hdd before using following instructions to run the OS.

To run ReaverOS, you'll need one of the following:

  • Bochs - to invoke Bochs, use plain make after or instead make hdd. make prepare will create 1GiB image and bochsrc file that will be used with Bochs by default; if you wish to provide own image (maybe smaller? who knows), consult the bochs manual.
  • QEMU - to invoke QEMU, type make q, it will start the emulator.
  • VirtualBox - to use VirtualBox, type make vbox. This will create a VirtualBox disk image (vbox.vdi) in builds/ directory; use that image as boot image of virtual machine created by you in VirtualBox.

If you really want to run ReaverOS on real hardware (this is possibly a bad idea; in the current state of the OS, it shouldn't be capable of doing any harm, but it is extremely untested), use builds/a.img as a raw image of an USB stick and boot it.

Debug build

If you encounter any bug and want to report it, please attach entire (or as much as you can grab, in case of VirtualBox or real hardware) output of kernel built using these commands:

make clean                  # clean the non-debug build

followed by one of the following:

make CFL=-DROSEDEBUG        # create a debug build and run it in Bochs, OR:
make q CFL-DROSEDEBUG       # to run it in QEMU, OR:
make vbox CFL=-DROSEDEBUG   # to create a VirtualBox image with the OS, or:
make hdd CFL=-DROSEDEBUG    # to just create builds/a.img to be written on USB stick

reaveros-iteration1's People

Contributors

griwes 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reaveros-iteration1's Issues

./inc.h:28:10: fatal error: 'cstdint' file not found

when make hdd, the compiler throw an error.
And Here is my environment information:

[lucklove@host ReaverOS]$ clang++ --version
clang version 3.6.1 (tags/RELEASE_361/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
[lucklove@host ReaverOS]$ g++ --version
g++ (GCC) 5.1.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[lucklove@host ReaverOS]$ uname -r
4.0.4-2-ARCH

VMM: Sparse pool of paging structures to be fixed

While designing VMM::AllocPagingPages, I completely forgot about the fact that, even if most PMLs take two pages (one for actual PML and one for pointers for accessing its entries), PML1 aka PageTable takes exactly one page. I must fix that and go back to VMM::AllocPagingPages(uint64 iSize).

Fix bug in bootloader scrolling code

The bootloader scrolling code fails; text printed before first scroll is fine, but it doesn't work properly after first scroll.

Example from real hardware

To be fixed after finishing backwards_allocator.

What is raf ?

raf -c init.srv -o ../builds/initrd.img

Because of the lack of this program, the compilation process can not continue

Booter: CountPagingStructures is broken

After moving to Clang, CountPagingStructures ceased to work and now loops indefinitely. It must be fixed ASAP, probably by rewriting its logic in some smart way.

Basic SMP support

Basic SMP support, including:

  • core detection and booting
  • per-core physical memory sub-managers

Basic scheduler

Basic SMP scheduler, featuring:

  • few priorities with different policies
  • multiple threads of same process
  • synchronization of address spaces across cores

Basic I/O

Basic I/O drivers:

  • ATA, SATA
  • ATAPI, SATAPI
  • keyboard
  • mouse

Memory manager

Flexible memory manager:

  • memory-mapped files
  • auto-allocation on #PF
  • SMP ready
  • using recursive PML4 entry trick

./inc.h:28:10: fatal error: 'cstdint' file not found

ubutu64@ubutu64:~/MyCode/reaveros-iteration1$ make hdd
cd loader/hdd;
yasm stage1.asm -o ../../builds/stage1.img
cd loader/hdd/stage2;
yasm stage2.asm -o ../../../builds/stage2.img
cd loader/booter;
make;
mv builds/booter.img ../../builds/
make[1]: Entering directory '/home/ubutu64/MyCode/reaveros-iteration1/loader/booter'
clang++ -m32 -c -Wall -Wextra -pedantic -Werror -nostdlib -fno-exceptions -fno-rtti -fno-stack-protector -std=c++1y -mno-sse -mno-sse2 -mno-sse3 -mno-sse4 -mno-avx -ffreestanding -Os -stdlib=libc++ -fno-builtin -MD -target i686-none-elf -integrated-as -Weffc++ memory/manager.cpp -o memory/manager.o -I. -include inc.h
In file included from :328:
In file included from :1:
./inc.h:28:10: fatal error: 'cstdint' file not found

include

     ^

1 error generated.
Makefile:19: recipe for target 'memory/manager.o' failed
make[1]: *** [memory/manager.o] Error 1
make[1]: Leaving directory '/home/ubutu64/MyCode/reaveros-iteration1/loader/booter'

I do not have to solve this problem through a number of methods...

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.