Code Monkey home page Code Monkey logo

ghost's Introduction

ABOUT GHOST

Ghost is a hobby operating system for the Intel x86 platform. The OS is written from scratch in C/C++ and Assembly. The kernel is not based on any existing kernel, but is partially compatible to Unix.

This is the main development repository.

Update 2020/10/08: With the recent backmerge I've fixed a lot of bugs in the kernel and rewrote a lot of the user-space code. Still work-in-progress, working towards a version 1.0.0.

Project website: http://ghostkernel.org/

Documentation

See the documentation folder. It contains information about the technical design as well as building instructions.

A usually up-to-date version of the documentation is provided here: https://ghostkernel.org/documentation/

Features

  • Currently x86-based
  • Micro-kernel
  • Multiboot-compliant
  • Multi-processor (SMP) & multi-tasking support
  • IPC; pipes, messages, shared memory
  • libghostapi, kernel API library
  • Home-made libc
  • ELF binary & shared library support
  • OS specific GCC toolchain
  • C++ support
  • Window server (GUI with home-made toolkit)
  • VESA/VBE video driver
  • PS/2 keyboard & mouse driver
  • Serial COM1 kernel logging
  • VM86 mode for BIOS calls

Screenshot of 0.12.0

Ported software

  • musl (provides libm part of Ghost libc)
  • cairo
  • freetype
  • libpng
  • pixman
  • zlib
  • nasm
  • bash (in progress)

Contact

If you want to get in contact, contribute to the project or have any questions, feel free to contact me at:

-Max Schlüssel

ghost's People

Contributors

maxdev1 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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

ghost's Issues

Build errors

My Distro: Debian 10.
Logs

build-errors.txt
build-error-garbage.txt

I face build failures both on master and legacy branches. Finally I successed to build and open Desktop Environment but just in case I want to write here.

First error was about example-fs-driver.cpp which tells there is no a few implementation. (I don't yet understand underlying concept)

Second there are a lot of Case-sensitive problems, (upper-case filenames) which doesn't seem to have on disk. I mean, in headers I see Logger.hpp but in filesystem there is not logger.hpp So this gives error on linux distrubitions. I guess Mr. Max you are using MacOS which (I am not sure but) mac is not case-sensitive.

I fixed all Uppercase filenames, also try to not build example-fs-driver.cpp. But when I open qemu there is "Boot failed: could not read the boot disk." Even so the operation system has loaded, and then I've gone to application folder to run windowserver.bin but there are problems such as keyboard doesn't work etc.

I am so excited to dive into ghost kernel, but we need stable version =)

Thank you so much Mr. Max for your politeness your sharing and for everything.

Booting Problem on Physical Machine

I'm wanted test your operating system on my physical computer. I'm flashed your demo ISO but when I'm booting the Ghost Kernel is freezed at boot logo & fully not functional.
There is an example photo:
img_20190215_120356_1
Thank you.

When I'm compiling the Kernel, I'm always Getting the Errors

Hello, when I'm compiling your operating system I'm getting this error:
"./applications.sh: 12: ../../ghost.sh: Bad substitution"
I can't install toolchain on my computer. Because giving an "Building Failed" error. I'm using the Ubuntu Server 18.04. I'm tried another on the linux distro (Pardus 17) on VM but same error. My installed compilers gcc, g++, binutils (latest version). Thank you.

Keyboard issue!

The OS successfully boots into the terminal fine, but I can't type anything! I'm using Virtual box with IO/Apic enabled and 256 MB of RAM.

EDIT: Never mind, wasn't giving it enough memory apparently.

hg and git

Yoy should probably add hg to gitignore

Can backspace too far in terminal

Pressing backspace allows me to delete past what I previously input after getting a runtime error in js.bin
I run js.bin, type something that has a syntax error, and press enter.
After the red error text appears, I press backspace and can delete all the text in the terminal

Use Makefiles instead shell scripts

Why do you use shell scripts when you can also use Makefiles? I think that Makefiles make things much easier. You can just make the rules so that it compiles correctly.

Can't build zlib-1.2.8

Can't build zlib-1.2.8. Always getting this error:

/ghost/source/patches/ports$ ./port.sh zlib/1.2.8

ghost-port
==========
building package "zlib/1.2.8"
cleaning build directory 'build/zlib/1.2.8'
downloading source from 'https://ghostkernel.org/repository/zlib/zlib-1.2.8.tar.gz'...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2730k 100 2730k 0 0 1263k 0 0:00:02 0:00:02 --:--:-- 1262k
no patch in port
installing port
Using ar
Compiler error reporting is too harsh for ./configure (perhaps remove -Werror).
** ./configure aborting.
Please use ./configure first. Thank you.
make: *** No rule to make target 'install'. Stop.

The Mouse Reacts Late

Hello, the mouse reacts late while I use your operating system. This is one of the things I never liked. Thank you ... Cyber Saturn

ProcFS-like instead of `g_kernquery()`

Hi Max,
instead of implement a custom syscall for obtaining info from the kernel, the kernel could expose a ProcFS-like filesystem where the files herein contains the desired information

Unable to build in the docker toolchain.

I've followed the instructions and when I run ./build.sh the following errors are produced:

# ./build.sh

Ghost Build

ports skipped
libapi clean all \u2714
libc clean all \u2714
applications
  calccalculator  \u274C log:

   TARGET: all
   compiling:
    - src_calculator.cpp.o
   src/calculator.cpp:22:10: fatal error: libwindow/button.hpp: No such file or directory
      22 | #include <libwindow/button.hpp>
         |          ^~~~~~~~~~~~~~~~~~~~~~
   compilation terminated.
   target failed


  corecore  \u274C log:

   TARGET: all
   compiling:
    - src-echo_echo.cpp.o
   Assembler messages:
   Fatal error: can't create obj-echo/src-echo_echo.cpp.o: No such file or directory
   target failed

   TARGET: all
   compiling:
    - src-ls_ls.cpp.o
   Assembler messages:
   Fatal error: can't create obj-ls/src-ls_ls.cpp.o: No such file or directory
   target failed

   TARGET: all
   compiling:
    - src-reverse_reverse.cpp.o
   Assembler messages:
   Fatal error: can't create obj-reverse/src-reverse_reverse.cpp.o: No such file or directory
   target failed

   TARGET: all
   compiling:
    - src-lines_lines.cpp.o
   Assembler messages:
   Fatal error: can't create obj-lines/src-lines_lines.cpp.o: No such file or directory
   target failed

   TARGET: all
   compiling:
    - src-read_read.cpp.o
   Assembler messages:
   Fatal error: can't create obj-read/src-read_read.cpp.o: No such file or directory
   target failed

   TARGET: all
   compiling:
    - src-write_write.cpp.o
   Assembler messages:
   Fatal error: can't create obj-write/src-write_write.cpp.o: No such file or directory
   target failed


  gsh gsh  \u274C log:

   TARGET: all
   compiling:
    - src_gosh.cpp.o
   src/gosh.cpp:24:10: fatal error: libterminal/terminal.hpp: No such file or directory
      24 | #include <libterminal/terminal.hpp>
         |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
   compilation terminated.
   target failed


  js ajs  \u274C log:

   TARGET: all
   compiling:
    - src_console_duk_console.c.o
   Assembler messages:
   Fatal error: can't create obj/src_console_duk_console.c.o: No such file or directory
   target failed


  libflibfont  \u274C log:

   TARGET: all
   compiling:
    - src_font.cpp.o
   Assembler messages:
   Fatal error: can't create obj/src_font.cpp.o: No such file or directory
   target failed


  libilibinput  \u274C log:

   TARGET: all
   compiling:
    - src_keyboard.cpp.o
   src/keyboard.cpp:25:10: fatal error: libproperties/parser.hpp: No such file or directory
      25 | #include <libproperties/parser.hpp>
         |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
   compilation terminated.
   target failed


  libplibproperties  \u274C log:

   TARGET: all
   compiling:
    - src_parser.cpp.o
   Assembler messages:
   Fatal error: can't create obj/src_parser.cpp.o: No such file or directory
   target failed


  libplibps2  \u274C log:

   TARGET: all
   compiling:
    - src_ps2.cpp.o
   Assembler messages:
   Fatal error: can't create obj/src_ps2.cpp.o: No such file or directory
   target failed


  libplibps2driver  \u274C log:

   TARGET: all
   compiling:
    - src_libps2driver.cpp.o
   Assembler messages:
   Fatal error: can't create obj/src_libps2driver.cpp.o: No such file or directory
   target failed


  libtlibterminal  \u274C log:

   TARGET: all
   compiling:
    - src_terminal.cpp.o
   Assembler messages:
   Fatal error: can't create obj/src_terminal.cpp.o: No such file or directory
   target failed


  libvlibvbedriver  \u274C log:

   TARGET: all
   compiling:
    - src_libvbedriver.cpp.o
   Assembler messages:
   Fatal error: can't create obj/src_libvbedriver.cpp.o: No such file or directory
   target failed


  libwlibwindow  \u274C log:

   TARGET: all
   compiling:
    - src_action_component.cpp.o
   In file included from inc/libwindow/bounds_event_component.hpp:27,
                    from inc/libwindow/component.hpp:27,
                    from src/action_component.cpp:21:
   inc/libwindow/interface.hpp:25:10: fatal error: libinput/keyboard/keyboard.hpp: No such file or directory
      25 | #include <libinput/keyboard/keyboard.hpp>
         |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   compilation terminated.
   target failed


  procproc  \u274C log:

   TARGET: all
   compiling:
    - src_list_list.cpp.o
   Assembler messages:
   Fatal error: can't create obj/src_list_list.cpp.o: No such file or directory
   target failed


  ps2dps2driver  \u274C log:

   TARGET: all
   compiling:
    - src_ps2driver.cpp.o
   In file included from src/ps2driver.cpp:21:
   src/ps2driver.hpp:26:10: fatal error: libps2driver/ps2driver.hpp: No such file or directory
      26 | #include <libps2driver/ps2driver.hpp>
         |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   compilation terminated.
   target failed


  termterminal  \u274C log:

   TARGET: all
   compiling:
    - src_screen_gui_screen.cpp.o
   In file included from src/screen/gui_screen.hpp:24,
                    from src/screen/gui_screen.cpp:21:
   src/screen/raster.hpp:25:10: fatal error: libwindow/metrics/rectangle.hpp: No such file or directory
      25 | #include <libwindow/metrics/rectangle.hpp>
         |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   compilation terminated.
   target failed


  testtestprogram  \u274C log:

   TARGET: all
   compiling:
    - src_tester.cpp.o
   src/tester.cpp:30:10: fatal error: libps2driver/ps2driver.hpp: No such file or directory
      30 | #include <libps2driver/ps2driver.hpp>
         |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   compilation terminated.
   target failed


  vbedvbedriver  \u274C log:

   TARGET: all
   compiling:
    - src_vbedriver.cpp.o
   In file included from src/vbedriver.cpp:21:
   src/vbedriver.hpp:24:10: fatal error: libvbedriver/vbedriver.hpp: No such file or directory
      24 | #include <libvbedriver/vbedriver.hpp>
         |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   compilation terminated.
   target failed


  windwindowserver  \u274C log:

   TARGET: all
   compiling:
    - src_components_action_component.cpp.o
   In file included from src/components/component.hpp:24,
                    from src/components/action_component.cpp:22:
   src/components/bounds_event_component.hpp:25:10: fatal error: libwindow/metrics/rectangle.hpp: No such file or directory
      25 | #include <libwindow/metrics/rectangle.hpp>
         |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   compilation terminated.
   target failed


  (0/18 successful)
kernel clean all \u2714

Apart from these errors a ghost.iso is still produced, however when ran with qemu-system-i386.exe -serial stdio .\ghost.iso there are more errors:

Ghost Loader Version 1.1.0

    loader  found kernel binary at 0x01f96000, loading...

Ghost Kernel Version 0.14.2

  Copyright (C) 2022, Max Schlüssel <[email protected]>

    kernel  initializing core services
    memory  available: 96 MiB
   ramdisk  module loaded: 30 MB
       cpu  vendor: 'GenuineIntel'
       cpu  available features: PAE MMX SSE SSE2
   tasking  core: 0 idle task: 0
   tasking  core: 0 cleanup task: 1
    kernel  starting on 1 cores
    system  ready
      init  loading system services
    kernel  failed to find /applications/ps2driver.bin with status 1
    kernel  failed to find /applications/vbedriver.bin with status 1
    kernel  failed to find /applications/windowserver.bin with status 1

Stack overflow handling by reserving virtual space

Currently just a single page is allocated in taskingMemoryCreateStacks. This is what causes the window server to die while calling Cairo, as a lot of calls are happening.

This should be improved so that a range of virtual memory is pre-allocated but not filled with physical pages, including a guard page on the very bottom of the stack. The stack structure in the task should memorize the number of already allocated pages or maybe a simple allocate-on-write is sufficient as long as within the stack range and not on the guard page.

Allocation of pages would then look like this from start to end:
X 0 0 0 0 0 0 0 0 0 1
On page-fault, the stack is to be extended accordingly:
X 0 0 0 0 0 0 0 0 1 1
If the limit is reached, access to the guard-page should terminate the process with a SIGSEGV.
X 1 1 1 1 1 1 1 1 1 1

the CLI stop

I was enjoying the CLI , in short period of time the OS itself stop of working, with not reason. I was running on virtualbox.

toolchain.sh and ghost.sh errors

I tried to build everythin with the build scripts but only get the error
toolchain.sh:
./toolchain.sh: 2: /usr/bin/sh: Syntax error: "(" unexpected

ghost.sh:
./build.sh: 7: ./ghost.sh: [[: not found
./build.sh: 132: ./ghost.sh: Syntax error: "(" unexpected (expecting "}")

Can someone help?

Why is Ram Disk important?

When i tried to boot Ghost OS, i just get error : "No RAM disk".
Even my OS don't must to have RAM disk. Should implement that as warning.

Cairo's Linking

Hi, good morning.
I'm a little programmer and i have a problem...
On Linux Mint 18 Cinnamon (64 bit) i tried to build cairo library, first with your custom compiler, but the compiling fail.
i tried with standard g++/gcc (32 bit) and the compiling finish successfull, but linking with windows server don't work, errors (linking time)
are hundreds, all of missing part of cairo library... O.o
i tried all roads, but nothing...help me, please

err.txt

Build Failure

I did everything as suggested, without skipping anything crucial and got these messages:

  • Many of these: build.sh: 12: ../ghost.sh: Bad substitution
  • Terminal output: // only the important part, everything else is OK
    Building GCC
    Configuration
    Build failed
  • configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.

My operating system:

  • Linux Ubuntu 16.04

Fix booting in Hyper-V

In Hyper-V, for some reason even though the MADT reports the IO/APIC to be present at 0xFEC00000, a GPF occurs when writing to the REGSEL MMIO register. This causes a kernel panic.

Automated builds via Github CI

It could be useful to have automatic builds of the dev branch built by Github actions. I will look into this myself later this week.

tetris application

After I built all. I noticed tetris app in applications is not a real tetris. It does't make much sence to operating system development, but I tried to implement it. It turn out quite playable. I made gui contorls, because keyboard working a little strange and not always in time.
link to repository : https://github.com/JustVic/ghost_tetris

Error when porting cario

When I was running ./port.sh cairo/1.12.18 to port cario, I got this error:

configure: error: pkg-config >=  required but not found (http://pkgconfig.freedesktop.org/)
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target 'install'.  Stop.

Keyboard layout incorrect

I'm using a default US keyboard layout. When typing in the terminal, it appears to be using the UK keyboard layout. Shift+2 prints " and ? and _ are swapped, etc.

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.