2.6 KiB
Luna
A simple kernel and userspace for the x86_64 platform, currently being rewritten in Rust.
Past features (before rewrite)
- x86_64-compatible kernel.
- Keeps track of which memory is used and which memory is free, and can allocate memory for itself and user programs.
- Can read, write and execute files from a virtual file system supporting an initial ramdisk, device pseudo-filesystems... but no hard disks yet.
- Preemptive multitasking, with a round-robin scheduler that can switch between tasks.
- Can load ELF programs from the file system as userspace tasks.
- System call interface and C Library, aiming to be mostly POSIX-compatible.
- UNIX-like multitasking primitives, which allow user tasks to spawn other tasks.
- Some simple userspace programs, written in C.
- Simple command-line shell, allowing for interactive use of the system.
- Basic multi-user system with a password file and utilities for logging in and switching users.
Setup
Start by installing rustup and install the Rust toolchain by running:
rustup default stable
or rustup default nightly
You also need to add the rust-src
component:
rustup component add rust-src
Luna uses the BOOTBOOT bootloader, so you'll need to build its mkbootimg tool to create disk images with it.
A script is provided to do so: tools/setup-bootloader.sh
. It requires GNU Make and git.
To run Luna, you should install QEMU. You can use another virtual machine, but the run scripts use it by default.
Building
There are a variety of build scripts, but in most cases, you should just use build-iso.sh
or rebuild-iso.sh
.
Or for release builds, build-stable-iso.sh
.
Running
tools/run.sh
, which will invoke build-iso.sh
to build any modified files, or tools/fast-run.sh
that just runs Luna.
Prebuilt images
Prebuilt ISO images are right now only available for the main
branch, which contains the Luna repository before the rewrite.
When this rewrite is stable enough/has progressed enough, it will be merged into main
and prebuilt images will be available.
Is there third-party software I can use on Luna?
No, you're on the wrong branch right now. Switch to main
for a system capable of running some third-party programs.
License
Luna is open-source and free software under the BSD-2 License.