Giter Site home page Giter Site logo

austanss / skylight Goto Github PK

View Code? Open in Web Editor NEW
72.0 1.0 3.0 6.57 MB

A clean, readable, minimalist operating system designed to be used as an educational material for operating system development and design.

License: MIT License

Makefile 1.73% JavaScript 0.38% Assembly 7.15% C 90.57% Shell 0.17%
systems osdev

skylight's Introduction

Skylight

Philosophy

As defined by dictionary.com, a "skylight" is:

an opening in a roof or ceiling, fitted with glass, for admitting daylight.

Skylight is an operating system that is uniquely modeled, and aims to have consistent, clean, thorough, transparent, and easy-to-read code, in order to help other developers understand its operation and general principles of operating systems with a more clear-cut exposition.

Compilation

Skylight relies on Linux software to compile, therefore any build process must take place under native Linux, emulated Linux, or the Windows Subsystem for Linux.

Additionally, the development environment requires these packages:

util-linux 
mtools 
nasm 
clang 
build-essential 
wget

In order to compile, simply enter the root of the repository, and run make image. A FAT32-formatted hard drive image will be generated. The glass.sys and frame.se executables are located in the generated build/ directory to facillitate loading debugger symbols, and each individual .o file can also be found in the same directory. For more information on build dependencies and their specific versions, see BUILD-DEPS.

Execution

In order to test the image, the testing emulator/hardware must be configured to support:

  • x86-64, with PAE-NX
  • UEFI v2.0 (minimum)
  • PCI Express
  • 512MiB RAM (minimum)

To quickly test in a temporary QEMU instance, enter the root of the repository after generating an image, and execute make run.

To test on real hardware, meet the requirements above, and write the image to a drive. Select the Limine/skylight boot option through the UEFI boot menu. The system will not boot on a computer that has Secure Boot enabled.

For more information, reference TESTING.

License

As of 06/18/2022, the license on this repository has been updated to the MIT license. However, any commits prior to commit 47912c3 still fall under the Creative Commons public domain license applied at the time.

For more information on the terms of the MIT license, see the LICENSE file.

Legal

Licenses of certain external source files and binaries included in this repository must be visibly reproduced in the source code or in external documentation. To view these reproduced licenses, see LICENSES.

Acknowledgements

Development Cycle

OS development is... time consuming. I have other things to dedicate my time to, so I can't always work on Skylight. I will try to push at least one commit every week, but I can't guarantee that I will be able to do so. In summer months you can expect a high volume of commits. December is also a rather popular month for me. I have been working on this operating system project since mid-2021, and I don't intend on abandoning it. Just some times, it's a literal pain to work on. Other times, I don't have the time to do it.

Contributing

I largely do not take contributions. I do take suggestions and feedback, but most of the source code should be written by me. If the project plateaus and the work is no longer worth my dedication I may open it up to contributions to keep it alive, but for now, it's principally my effort.

Issues

If an issue is opened on this repository, I cannot promise my full attention to its resolution. I probably will read it and give a response if I am able to articulate one with the given information, but unless a presented issue is well-debugged and well-articulated I cannot swear that the issue will see a proper resolution.

skylight's People

Contributors

austanss 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

Watchers

 avatar

skylight's Issues

About syscalls

Ii'm trying to use skylight as a base for my os,but i was wondering how could i implement a fopen syscall, trying to read a pointer from userspace to kernel space (path string) obviously makes the kernel crash, so how can i read/translate user memory addresses to kernel?
here's my code:

void fopen(vfs_handle_t* out, char* path, vfs_open_flags_t flags) {
    task_context_t* ctx = ((gs_kernel_base_t*)(rdmsr(IA32_GS_BASE)))->ctx;
    uint64_t pid = ((gs_kernel_base_t*)(rdmsr(IA32_GS_BASE)))->pid;
    paging_table_t* kpml4 = paging_get_pml4();
    paging_load_pml4((paging_table_t *)ctx->cr3);

    serial_print_quiet(path);

    paging_load_pml4(kpml4);
}

when trying to print the path in serial the kernel just goes into unknown exception (obviously it can't find the value referred by the pointer).

a question

Hi, I have been trying to create an os as an educational challenge, and I have been really struggling with pmm. I have found your os, and tried to copy and adjust your methods but i have a bug. in the pmm_section_manager_create, in the memset part it does an UB - jumps to a random location in the code segment, usually to the reindex. I fu have an idea why that would be great.

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.