A toy RISC-V operating system written in Zig and Lua, that runs Lua scripts as userspace programs.
Luxos is licensed under the 0BSD (BSD 0-clause) license, see LICENSE
.
The files in deps
and inspiration
are under their own licenses - see those directories for more information.
The name "Luxos" is just a mutation of "LuaOS".
I'm using this project as an excuse to write startup and peripheral code for the FE310-G002 (the SoC on the HiFive1 Rev B) from scratch, as well as the rest of the operating system.
I am currently working on getting the Lua core running. The short-term goal is to get a Lua state successfully initialised (without any libraries/modules for now) and a REPL available over UART.
The FE310-G002 has only 16 KiB of data RAM which is almost certainly not enough to do much interesting in Lua, so I will probably end up switching to running in QEMU with a RV64GC CPU. Once I get Lua running then we will see how far I can get with it.
Currently targets only the HiFive1 Rev B board.
- Connect board to PC.
- Start J-Link GDB server with
./start-gdb-server.sh
. zig build debug
to build kernel, start ugdb, and connect to the GDB server.- To flash the kernel to the board, use
load
in GDB. Whenever the kernel is rebuilt, you can run!reload
to reload the file from disk, thenload
again to flash the updated kernel.
- Khoros: https://outofhanwell.wordpress.com/2008/08/16/khoros-a-lua-operating-system/
- Source code is included in
inspiration/
, download linked from http://lua-users.org/lists/lua-l/2011-08/msg01189.html (download link is dead now)
- Source code is included in
- https://reddit.com/r/rust/comments/8j7y1f/i_am_lachlansneff_creator_of_nebulet_a_rust/dyyzfir/