Skip to content

Riscv Emulator running Linux on TinkerOS/ZealOS

Notifications You must be signed in to change notification settings

tinkeros/RiscvLinuxTOS

Repository files navigation

RiscvLinuxTOS

Riscv Emulator running Linux on TinkerOS/ZealOS

Files description:

  • *.HC HolyC files, use these to run on TinkerOS.
  • *.ZC Files to run on ZealOS instead.
  • loader_64.bin - RISC-V Linux kernel + root filesystem binary blob (see here for building).
  • riscv_em.dtb - Binary device tree passed to kernel (see this for building).
  • riscv_em.prg - A compiled binary blob composed of a modifed version of riscv_em (see here for changes from original) and a modified uClibc library (see here for changes). This is built using a custom toolchain and built to interface with a custom kernel shim layer that translates Linux ABIs and syscalls to TempleOS ABIs and kernel functions (since TOS has no syscalls). It is sort of like WINE, it is not an emulator, it runs Linux compiled machine code on TOS. For those interested, this blog provides a good overview of the difference between the Linux and TempleOS ABIs. Building this properly is a complex process beyond the scope of this document.

Don't expect to do anything useful with this, I made it for fun, mostly just so I could simply say I booted Linux on TempleOS/TinkerOS/ZealOS.

You do not have a real terminal/tty so don't expect interactive commands to work. Non-interactive text applications and shell commands should work fine provided they do not require keys which are non-printable.

There is no support for graphics, networking, or access to the host TinkerOS/ZealOS filesystem. The only things you can access are things on the pre-built root filesystem.

This is just a demo and unlikely to evolve further functionality.

About

Riscv Emulator running Linux on TinkerOS/ZealOS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages