Git Product home page Git Product logo

misaka's Introduction

Misaka (ToaruOS 2.0)

Misaka is the "next-generation" (x86-64, SMP) kernel for ToaruOS.

This repository contains most of the same content as the upstream repository, including the userspace applications, libraries, and toolchain scripts. The bootloaders are not included - grub should work.

Note that Misaka is still considered a work in progress. While most of the OS is functioning, third-party ports are not ready, SMP support is still very unstable, and network support is unimplemented.

screenshot

Completed Work

  • The Toaru kernel has been ported to x86-64.
  • Considerable changes have been made to make the kernel more portable to other architectures.
  • Userspace fixes have been implemented to run on the new kernel.
  • Some drivers have been ported (AC'97, serial, vmware mouse)
  • SMP is functioning but highly unstable, the GUI can be run successfully and multiple graphical demos can run in parallel before eventual crashes.

Roadmap

  • Kernel locking needs to be audited and SMP stability needs to be fixed. This will likely be a time-consuming process as these faults are difficult to debug.
  • Some subsystems are being rewritten from scratch, such as the network stack.
  • Third-party ports have not been made/tested yet; current plan is to have everything from the 1.10.x package series available again for x86-64.
  • aarch64 and riscv64 ports are on the long-term roadmap.
  • All of this will eventually be merged upstream.

Building

git clone https://github.com/toaruos/misaka
cd misaka
git submodule update --init kuroko
docker pull toaruos/build-tools:1.99.x
docker run -v `pwd`:/root/misaka -w /root/misaka -e LANG=C.UTF-8 -t toaruos/build-tools:1.99.x util/build-in-docker.sh

Running

qemu-system-x86_64 -kernel misaka-kernel -initrd ramdisk.tar -append "root=/dev/ram0 start=live-session migrate" -enable-kvm -m 1G

Add -smp 2 if you want to test with multiple cores. Up to 32 cores are "supported" at the moment.

misaka's People

Contributors

klange 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

misaka's Issues

Misaka / ToaruOS 2.0 Roadmap

  • Kernel Elf loader
    • Support Elf64 binaries in basic parsing.
    • Support necessary relocations for object files used as modules.
    • Support static binary loading for userspace.
  • Memory Allocation Support
    • Basic PML4 page allocator
    • Set up kernel heap with klmalloc
    • Next: Add a more capable mmap interface
  • Task Switching
    • Port process model
    • Interrupt infrastructure with legacy PIC, etc.
    • Next: APIC, LAPIC...
  • Virtual File System
    • Port existing VFS infrastructure
    • Port tmpfs, tarfs modules
    • Port drivers for storage devices
    • Next: Re-write PATA drivers, rewrite ext2 driver, SATA drivers
  • Syscall functionality
    • Port existing syscalls
    • Port TTY layer, PacketFS
    • Next: Implement support for new syscall interfaces
  • Userspace
    • Port ld.so dynamic linker to support Elf64.
    • Verify functionality of libc in x86-64.
    • Verify functionality of existing applications, resolve word size issues.
  • Remaining driver ports:
    • Network Stack
      • Main network stack (or dump this because it's terrible and just write a new one?)
      • e1000
      • rtl8139
      • pcnet
    • Audio
      • Core mixer
      • ac97
      • pcspk (this should be portable right now? don't forget to adjust timings)
      • Next: Intel HDA
    • Storage
      • ATA/ATAPI driver
      • Ext2 filesystem driver (this is really broken, rewrite it?)
      • ISO9660
    • VirtualBox guest driver

SMP TODOs

  • Resolve remaining race conditions.
    • It seems like some are trashing stacks.
    • We're probably not cleaning up processes sanely between cores: This seems like the area most in need to exploration.
    • The VFS needs a thorough audit!
  • Stop spinning idle cores
    • APs should arch_pause(); like the BSP instead of repeatedly checking the
    • We should wake up cores when things enter the ready queue. This needs an IPI that jumps straight to scheduling just like the pre-empt signal, but only if we weren't already running something?
    • We should pre-empt cores with the LAPIC timer. Maybe we can even one-shot it so the cores aren't waking up when truly idle?

Ports Checklist

  • binutils
    • Had to disable readline - investigate this. I think the last thing it wanted was newer signals API. Would be nice to implement ptrace and port gdb, which was what needed readline.
  • doom-generic
  • gcc
    • Might just need to dump gmp/mpc/mpfr in the source tree and see what happens.
  • SDL 1.2
  • Bochs
  • Quake (sdlquake)
  • muPDF
    • This was skipped in NIH because it had several deps and it was pain to rebuild them, but it should be explored again.
  • Python
    • Try to port latest release (3.10?) and fix build issues; see if we can upstream any necessary patches.
  • freetype, cairo, other small libs
    • All of these should just build; build the extension plugins as well for the compositor.
  • mbedTLS or whatever
  • curl or wget
    • Or both... when the socket API is completed, having one of these common tools available 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.