mirror of
https://github.com/XunilGroup/XunilOS.git
synced 2026-06-02 12:44:24 +02:00
Add a proper VFS in a struct which now lives on the heap with no hacky
static lifetimes, move cursor.bmp to image assets and add wallpapers, and a logo, add Github Action that auto-releases, add build_all script which just builds without running
This commit is contained in:
@@ -1,34 +1,46 @@
|
||||
# XunilOS
|
||||
XunilOS is an OS made from scratch in Rust.
|
||||
|
||||
The repo is based on the limine-rust-template.
|
||||
|
||||
## How to use this?
|
||||
It supports aarch64 inside QEMU, and x86_64 even on bare machines!
|
||||
|
||||
### Dependencies
|
||||
# Features
|
||||
|
||||
Any `make` command depends on GNU make (`gmake`) and is expected to be run using it. This usually means using `make` on most GNU/Linux distros, or `gmake` on other non-GNU systems.
|
||||
## Kernel
|
||||
- x86_64 IDT, GDT, interrupts, kernel heap, PS2 mouse/keyboard, paging, syscalls and usermode.
|
||||
- aarch64 kernel heap, paging, interrupts, Virtio mouse/keyboard, syscalls, usermode
|
||||
- Scheduler which does round-robin switching as well as sleeping and waking processes
|
||||
- ELF64 ET_EXEC and ET_DYN loading, verifying and running support
|
||||
- A readonly VFS which currently includes the ELF files which can be ran
|
||||
- IPC with granular permissions (read, write, manage)
|
||||
- basic (and insecure) SHM support
|
||||
- Limine bootloader
|
||||
- Framebuffer and serial support
|
||||
- Timing support based on IRQ
|
||||
- Per-process address space, kernel & user stack
|
||||
- Copy to and from userspace
|
||||
|
||||
All `make all*` targets depend on Rust.
|
||||
## Apps
|
||||
- doomgeneric: Doom ported to XunilOS. Isn't as easy, as i am using Rust and had to write my own libc stub.
|
||||
- badapple: Grayscale Bad Apple by using numbers to represent shades of gray. Pretty easy, but this is the only place where I also used Python.
|
||||
- shell: simple shell with elf running, echo and file read commands.
|
||||
- helloworld: just prints helloworld to serial
|
||||
|
||||
Additionally, building an ISO with `make all` requires `xorriso`, and building a HDD/USB image with `make all-hdd` requires `sgdisk` (usually from `gdisk` or `gptfdisk` packages) and `mtools`.
|
||||
## Init
|
||||
- Desktop-like experience
|
||||
- Window Management (close and minimize)
|
||||
- Start menu to open applications
|
||||
- BMP background
|
||||
- Mouse support with a BMP image
|
||||
- Dock where you can see currently open applications which can be minimized or unminimized
|
||||
|
||||
### Architectural targets
|
||||
|
||||
The `KARCH` make variable determines the target architecture to build the kernel and image for.
|
||||
|
||||
The default `KARCH` is `x86_64`. Other options include: `aarch64`, `riscv64`, and `loongarch64`.
|
||||
|
||||
Other architectures will need to be enabled in kernel/rust-toolchain.toml
|
||||
|
||||
### Makefile targets
|
||||
|
||||
Running `make all` will compile the kernel (from the `kernel/` directory) and then generate a bootable ISO image.
|
||||
|
||||
Running `make all-hdd` will compile the kernel and then generate a raw image suitable to be flashed onto a USB stick or hard drive/SSD.
|
||||
|
||||
Running `make run` will build the kernel and a bootable ISO (equivalent to make all) and then run it using `qemu` (if installed).
|
||||
|
||||
Running `make run-hdd` will build the kernel and a raw HDD image (equivalent to make all-hdd) and then run it using `qemu` (if installed).
|
||||
|
||||
The `run-uefi` and `run-hdd-uefi` targets are equivalent to their non `-uefi` counterparts except that they boot `qemu` using a UEFI-compatible firmware.
|
||||
## Libxunil (libc stub)
|
||||
- Basic functions of C (printf, strlen, etc)
|
||||
- File I\O, IPC, time
|
||||
- Input reading from Window Management
|
||||
- SHM
|
||||
- User Heap
|
||||
- Window management
|
||||
- IPC support
|
||||
- Syscalls to call back to the kernel
|
||||
- Primitives, Framebuffer and font rendering
|
||||
|
||||
Reference in New Issue
Block a user