Giter Site home page Giter Site logo

skift-org / skift Goto Github PK

View Code? Open in Web Editor NEW
2.2K 67.0 127.0 171.5 MB

πŸ₯‘ The delightful operating system.

Home Page: https://skiftos.org/

License: MIT License

C 0.20% C++ 93.77% Assembly 0.50% Python 1.22% Shell 0.16% HTML 2.39% CSS 1.68% NASL 0.07%
osdev kernel userspace operating-system skift c-plus-plus hobby-os cpp

skift's Introduction

skiftOS Screenshot

About

Codacy Badge - Website - Discord - Documentation

⚠ Warning
skiftOS is currently in the early stages of development and is not yet ready for daily use. Please do not use it in production environments. Here be dragons! πŸ‰

SkiftOS is a hobbyist operating system built from the ground up with a focus on modularity, simplicity, and modern design principles. Driven by a dissatisfaction with the fragmented user experiences prevalent in contemporary operating systems, SkiftOS strives for deep integration and a cohesive aesthetic. This project is a labor of loveβ€”an artistic pursuit rather than a commercial product.

Key Features

  • Karm: A modern C++ core library providing foundational building blocks.
  • KarmUI: A reactive UI framework for building elegant user interfaces.
  • Hideo: A beautiful desktop environment prioritizing intuitive design.
  • Hjert: A capability-based microkernel ensuring security and system stability.
  • CuteKit: A versatile build system and package manager designed for cross-compilation and complex project management.
  • Veav: A performant browser engine built for speed, accuracy, and simplicity.

Core Philosophy

  • Modularity: Components are designed to be as self-contained as possible, encouraging customization and experimentation.
  • Simplicity: Skift favors clear solutions over complexity, aiming for a system that is understandable and maintainable.
  • Modernity: Skift leverages cutting-edge C++ practices and technologies for efficiency and security.

Target Audience

SkiftOS is intended for developers and those interested in the exploration of niche, hobby operating systems.

Building

Building skiftOS from source is easy.

See doc/building

Contributing

Contributions are welcome!

See doc/contributing

Acknowledgements

I, Sleepy-monax, would like to express my gratitude to the following individuals for their help and support:

  • Cyp, Keyboard Slayer, and D0p1 for being great friends and providing me with support and motivation.
  • Feliwir for his contributions to the skiftOS and BRUTAL projects. I learned a lot from Feliwir's work and am grateful for his help.
  • All the people who have contributed to the project and supported me through Github Sponsors.

License

MIT License

The skift operating system and its core components are licensed under the MIT License.

The full text of the license can be accessed via this link and is also included in the license.md file of this software package.

skift's People

Contributors

forzwastaken avatar imgbot[bot] avatar louciole avatar masterneko avatar raphael3292383 avatar sleepy-monax avatar supercip971 avatar websnke 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  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

skift's Issues

Build fails from Inkscape error 'Unknown option --export-png'

I followed the build instructions (on archlinux), and I get this error when building:

~/Documents/Builds/skift $ make all
[ICON] console.png
Unknown option --export-png
make: *** [Makefile:239: /home/johan/Documents/Builds/skift/build/sysroot/res/icons/console.png] Error 1

The option --export-png isn't recognized on my inkscape installation.

Create 3dfx driver

SkiftOS could use a driver for 3dfx GPUs, their documentation is freely available, and (if you really wanted) you could pick one up on Amazon or eBay. 3dfx is also the family emulated by QEMU.

Incorrect advice on Reddit to resolve issue with __plug_system_get_time

You recently asked on reddit about an optimization problem with this code:

timestamp_t __plug_system_get_time(void)
{
    timestamp_t timestamp = 0;
    __syscall(SYS_SYSTEM_GET_TIME, (int)&timestamp, 0,0,0,0);
    return timestamp; // get 0 here
}

The solution given was to mark timestamp as volatile by doing:

volatile timestamp_t timestamp = 0;

This only masks the real problem that is in __syscall. You have this code:

static inline int __syscall(syscall_t syscall, int p1, int p2, int p3, int p4, int p5)
{
    int __ret;
    __asm__ __volatile__("push %%ebx; movl %2,%%ebx; int $0x80; pop %%ebx"
                         : "=a"(__ret)
                         : "0"(syscall), "r"((int)(p1)), "c"((int)(p2)), "d"((int)(p3)), "S"((int)(p4)), "D"((int)(p5)));
    return __ret;
}

You potentially pass addresses via registers. GCC isn't being told that what those registers point to are having their data read and/or written to. Because of that the compiler is free to assume that what memory those registers point at is not being used, only the address in the register itself is being used. The GCC documentation suggests for a generic case like this that you add a "memory" clobber to ensure that all data is realized into memory (and restored afterwards if need be). The solution is to make this change:

static inline int __syscall(syscall_t syscall, int p1, int p2, int p3, int p4, int p5)
{
    int __ret;
    __asm__ __volatile__("push %%ebx; movl %2,%%ebx; int $0x80; pop %%ebx"
                         : "=a"(__ret)
                         : "0"(syscall), "r"((int)(p1)), "c"((int)(p2)), "d"((int)(p3)), "S"((int)(p4)), "D"((int)(p5))
                         : "memory");
    return __ret;
}

There is a comment thread about this under your original Reddit post that provides more information

Kernel panic on paint fill

Although this probably is a known issue, I submit it here anyway, just in case.
I get this output of the kernel panic when I try to fill something in Paint.

--- !!! ------------------------------------------------------------------------

	KERNEL PANIC
	// Abort, Retry, Fail?

	CPU EXCEPTION: 'Page fault' (INT:14 ERR:0) !
	throw by arch/x86/Interrupts.c interrupts_handler() ln87

	Diagnostic:
	The system was running for 831156 tick.

- - NESTED - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

	NESTED PANIC
	// Abort, Retry, Fail?

	CPU EXCEPTION: 'Page fault' (INT:14 ERR:0) !
	throw by arch/x86/Interrupts.c interrupts_handler() ln87

	Diagnostic:
	The system was running for 831156 tick.

Fails to build disk image on Arch Linux with xorriso and mtools

After running yay -S mtools xorriso, and running ./buildtools.py run I get this:

Skipping ramdisk

Generating bootdisk:
    Copying the kernel
    Copying the ramdisk
    Generating the ISO

ERROR: Failled to generate bootdisk... (check if xorriso or mtools is installed)
Aborted!

Kernel panic cause by context switching and overlaping stack

Panic repport

--- !!! ------------------------------------------------------------------------

        KERNEL PANIC
        // System consumed all the paper for paging!

        CPU EXCEPTION: 'General protection fault' (INT:13 ERR:8668) !
        at sources/kernel/sources/cpu/isr.c isr_handler() ln86

        Diagnostic:
        The system was running for 285 tick.
        Thread ID=9 child of process 'kernel' ID=0.(ESP=0x2A4748 STATE=0)

        Threads:
        Thread ID=0 child of process 'kernel' ID=0.(ESP=0x23EDCC STATE=0)
        Thread ID=1 child of process 'kernel' ID=0.(ESP=0x29CE20 STATE=0)
        Thread ID=2 child of process 'kernel' ID=0.(ESP=0x29DF90 STATE=0)
        Thread ID=3 child of process 'kernel' ID=0.(ESP=0x29F0E0 STATE=0)
        Thread ID=4 child of process 'kernel' ID=0.(ESP=0x2A0240 STATE=0)
        Thread ID=5 child of process 'kernel' ID=0.(ESP=0x2A13A0 STATE=0)
        Thread ID=6 child of process 'kernel' ID=0.(ESP=0x2A2500 STATE=0)
        Thread ID=7 child of process 'kernel' ID=0.(ESP=0x2A3650 STATE=0)
        Thread ID=8 child of process 'kernel' ID=0.(ESP=0x2A47B0 STATE=0) <-- Overlaping stack 
        Thread ID=9 child of process 'kernel' ID=0.(ESP=0x2A4748 STATE=0) <-- 
        Thread ID=10 child of process 'kernel' ID=0.(ESP=0x2A6A70 STATE=0)
        Thread ID=11 child of process 'kernel' ID=0.(ESP=0x2A7FD0 STATE=0)

        GS=10 FS=10 ES=10 DS=10
        EDI=E ESI=B500 EBP=8 USELESS=2A4734
        EAX=2A4748 EBX=3E ECX=2A5980 EDX=20
        INTNO=D ERRCODE=8668 EIP=10569E CS=8 FLAGS=212
        CR0=80000011 CR2=0 CR3=119000 CR4=0

        System halted!

Faulty code

00105680 <irq_common>:
  105680:	60                   	pusha  
  105681:	1e                   	push   ds
  105682:	06                   	push   es
  105683:	0f a0                	push   fs
  105685:	0f a8                	push   gs
  105687:	66 b8 10 00          	mov    ax,0x10
  10568b:	8e d8                	mov    ds,eax
  10568d:	8e c0                	mov    es,eax
  10568f:	8e e0                	mov    fs,eax
  105691:	8e e8                	mov    gs,eax
  105693:	fc                   	cld    
  105694:	89 e0                	mov    eax,esp
  105696:	54                   	push   esp
  105697:	e8 04 f2 ff ff       	call   1048a0 <irq_handler>
  10569c:	89 c4                	mov    esp,eax
  
  ;; HERE is the fault
  10569e:	0f a9                	pop    gs

  1056a0:	0f a1                	pop    fs
  1056a2:	07                   	pop    es
  1056a3:	1f                   	pop    ds
  1056a4:	61                   	popa   
  1056a5:	83 c4 08             	add    esp,0x8
  1056a8:	cf                   	iret   

problems when compiling the kernel

Hello, I had a series of problems compiling skiftOS.

First this is the machine that I use
ubuntu 16.04.5 LTS
in a virtual machine.

Install all the dependencies correctly using the ones you expose in the file: building.md

and use the command "./build-it!.sh" for the toolchain
it worked correctly.

But I made a mistake and use the following two commands
./buildtools.py build-all, ./buildtools.py rebuild-all

I delete the build folder, now I do not build it using the command ./buildtools.py build-all again,does nothing.
thanks

Error compiling on Mint Linux

After running toolchain/build-it!.sh and typing make all, im getting:

i686-pc-skift-gcc -std=gnu11 -O2 -Wall -Wextra -Werror -Ilibraries -D__COMMIT__=\"fcffac7\" -ffreestanding -nostdlib -Ikernel/ -c -o kernel/filesystem.kernel.o kernel/filesystem.c
make: i686-pc-skift-gcc: Command not found
Makefile:306: recipe for target 'kernel/filesystem.kernel.o' failed
make: *** [kernel/filesystem.kernel.o] Error 12

Question about global constructors

Hello colleagues, why do you need to call global constructors before starting the kernel? I understand that in a user space program it is called before the main function, to do something,
But what should the core call before starting?

Windows are opening on the top left hand corner

This is kinda unintuitive, we have to move the window around to have access to the menu button.
A better solution would be to place the windows in the middle of the screen, or placing them right after the panel, with a little padding.

user space programs

Hi, do you think it would be useful to invest in writing some programs for the user space? As a code editor for example

Add audio

We need sound! I think audio devices should be stored in /dev/snd so if we were to add pc speaker support then the path to it would be /dev/snd/pcspkr.

Add users

The users should be stored in /System/users.json and should be like this:

[
  { "gid": 0, "uid": 0, "username": "root", "nickname": "Root User", "description": "The superuser", "home": "/home", "shell": "/bin/sh", "password": "SHA512 ENCRYPTED STRING" }
]

userspace: Add a vim like text editor.

I have already started writing the code for the editor, but now I see that the libraries I have used are probably not in the skiftOS libraries.

Is there a library that manipulates the terminal attributes like termios.h?

Here I leave the repo where is the publisher's code: https://github.com/cristian-programmer/skiftTextEditor

guided me from this wiki: https://viewsourcecode.org/snaptoken/kilo/index.html

Then I write the program in the directories of skiftOS

meta: Add documentation.

Currently, anyone who wants to do anything with skiftOS has to look through the source code. Probably header files, and the issue with that is those don't have docs.

Currently, there is no documentation on custom APIs. (most important may very well be widgets) Also, if you want to port a program, even if it would other wise work on skiftOS, you would have to figure out how to add it, based on pre-existing stuff in [insert area where stuff is added (looks like Makefile)].

Opening the demo app is highly increasing CPU usage

This is probably because the app is loading all demos at the same time (IMO, I didn't look at the source code, because I probably won't understand anything).
If that's the case, you would probably want to load only the selected demos.

kernel+libsystem: Add networking support.

Hi! I want make distro from your os but some features is missing. Can you delevop drivers & some libraries like HTML, TCP/UDP? If you are can dev the request it's will be very good. Greets.

Use standard c uint types

You'll have better compatibility if you use uintsz_t based c int types. So you'd end up with uint8_t, uint16_t, uint32_t, etc.

update the file building.md

thinking about problems with the lodepng library when running the make all command, which always fails when requesting the lodepng library, which is not normally found when doing the git clone.

it would be nice to add to the building.md file the commands:

  git submodule init
  git submodule update

with this brings the dependencies of lodepng and the compilation of the kernel will not fail

ISR problems

While looking through the interrupts assembly code, I noticed a few ISRs have errors codes that shouldn't and some have no error handling when they do. I checked my unabridged Pentium 4 book while looking through the handlers and the OSDev wiki backs me up (https://wiki.osdev.org/James_Molloy%27s_Tutorial_Known_Bugs#Problem:_ISR_17_and_30_have_error_codes). ISR 8 should have no error code while ISR 30 should handle errors. I don't know if I missed any others but those are the ones I've found that should be fixed.

Add system defaults configurating file

I believe we need a system defaults kind of config file in /etc/, maybe we call it skift.conf or sys.conf. It should store the hostname, localizations, etc.

Weird behavior on key press and mouse movement at the same time

Since I can't describe every situation, i'm going to sum up what I've seen so far for this bug.

First off. When you're moving around the mouse cursor pretty fast AND pressing certains keys at the same time, the mouse cursor will move significantly faster and / or "teleport" (I'm not sure about what it exactly does, but basically the cursor is not behaving as it should).
Also, when pressing multiple keys at the same time AS LONG AS moving the mouse cursor, it'll behave just like with one key, but worse (like, going to an edge of the screen).

PCI and PCIe

Please add PCI and PCIe device support then we can start having more support for hardware. I can add PCI but not PCIe. More documentation on adding stuff like this is needed for me to add this feature.

pci: may not work

PCI may not work, as I'm using the same method of reading and writing in my kernel and I got this comment when asking for help

paint: Weird mouse behavior.

With the big brush, there's a drawing issue on the canvas. This bug does not seem to be there with the "normal" pencil. See attached GIF.
It only occurs when moving the mouse quickly. When it's being moved kinda slowly, the painting behavior is normaL I (still) apologize for bad GIF quality.

Peek 2020-07-14 00-59

(Yet another @busybox11 issue)

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.