GithubHelp home page GithubHelp logo

jay51 / jsix Goto Github PK

View Code? Open in Web Editor NEW

This project forked from justinian/jsix

0.0 1.0 0.0 10.58 MB

A toy x64 UEFI kernel

License: Other

Makefile 0.03% C 8.53% Python 1.11% Assembly 4.40% C++ 84.49% Shell 1.45%

jsix's Introduction

jsix: A toy OS kernel

jsix is the kernel for the hobby OS that I am currently building. It's far from finished, or even being usable. Instead, it's a sandbox for me to play with kernel-level code and explore architectures.

The design goals of the project are:

  • Modernity - I'm not interested in designing for legacy systems, or running on all hardware out there. My target is only 64 bit architecutres, and modern commodity hardware. Currently that means x64 systems with Nehalem or newer CPUs and UEFI firmware. Eventually I'd like to work on an AArch64 port, partly to force myself to factor out the architecture-dependent pieces of the code base.

  • Modularity - I'd like to pull as much of the system out into separate processes as possible, in the microkernel fashion. A sub-goal of this is to explore where the bottlenecks of such a microkernel are now, and whether eschewing legacy hardware will let me design a system that's less bogged down by the traditional microkernel problems. Given that there are no processes yet, the kernel is monolithic by default.

  • Exploration - I'm really mostly doing this to have fun learning and exploring modern OS development. Modular design may be tossed out (hopefully temporarily) in some places to allow me to play around with the related hardware.

A note on the name: This kernel was originally named Popcorn, but I have since discovered that the Popcorn Linux project is also developing a kernel with that name, started around the same time as this project. So I've renamed this kernel jsix (Always styled jsix or j6, never capitalized) as an homage to L4, xv6, and my wonderful wife.

Building

jsix uses the Ninja build tool, and generates the build files for it with a custom tool called Bonnibel. Bonnibel can be installed with Cargo, or downloaded as a prebuilt binary from its Github repository.

Requrirements:

  • bonnibel
  • ninja
  • clang
  • nasm
  • mtools
  • curl for downloading the toolchain

Setting up the cross toolchain

Running pb sync will download and unpack the toolchain into sysroot.

Compiling the toolchain yourself

If you have clang and curl installed, runing the scripts/build_sysroot.sh script will download and build a LLVM toolchain configured for building jsix host binaries.

Building and running jsix

Once the toolchain has been set up, running Bonnibel's pb init command will set up the build configuration, and pb build will actually run the build. If you have qemu-system-x86_64 installed, the qemu.sh script will to run jsix in QEMU -nographic mode.

I personally run this either from a real debian amd64 testing/buster machine or a windows WSL debian testing/buster installation. The following should be enough to set up such a system to build the kernel:

sudo apt install qemu-system-x86 nasm clang-6.0 mtools curl
sudo update-alternatives /usr/bin/clang clang /usr/bin/clang-6.0 1000
sudo update-alternatives /usr/bin/clang++ clang++ /usr/bin/clang++-6.0 1000
curl -L -o pb https://github.com/justinian/bonnibel/releases/download/2.0.0/pb_linux_amd64 && chmod a+x pb

jsix's People

Contributors

justinian avatar

Watchers

 avatar

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.