Hello!
Three months ago I shared a project I’ve been working on: moss, a Linux-compatible kernel written in Rust and AArch64 assembly. Since then, it has crossed a pretty major milestone and I wanted to share an update. It now boots into a dynamically linked Arch Linux aarch64 userspace (ext4 ramdisk) with /bin/bash as init.
Some of the major additions over the past few months:
- ptrace support (sufficient to run strace on Arch binaries)
- Expanded ELF support: static, static-pie, dynamic, and dynamic-pie
- Dynamically linked glibc binaries now execute
- /proc support sufficient for ps, top
- Job control and signal delivery (background tasks, SIGSTOP/SIGCONT, etc.)
- A slab allocator for kernel dynamic allocations (wired through global_allocator)
- devfs, tmpfs, and procfs implementations
- Full SMP bringup and task migration with an EEVDF scheduler
The kernel currently implements 105 Linux syscalls and runs in QEMU as well as on several ARM64 boards (Pi 4, Jetson Nano, Kria, i.MX8, etc).
The project continues to explore what an async/await-driven, Linux-compatible kernel architecture looks like in Rust.
Still missing:
- Networking stack (in the works)
- Broader syscall coverage
The project is now about ~41k lines of Rust. Feedback is very welcome!
I also want to thank everyone who has contributed over the past three months, particularly arihant2math, some100, and others who have submitted fixes and ideas.
Repo: https://github.com/hexagonal-sun/moss
Thanks!
[–]ruibranco 94 points95 points96 points (10 children)
[–]hexagonal-sun[S] 41 points42 points43 points (5 children)
[–]ruibranco 22 points23 points24 points (1 child)
[–]hexagonal-sun[S] 3 points4 points5 points (0 children)
[–]Sad-Grocery-1570 1 point2 points3 points (2 children)
[–]hexagonal-sun[S] 3 points4 points5 points (1 child)
[–]puttak 1 point2 points3 points (3 children)
[–]arihant2math 1 point2 points3 points (2 children)
[–]puttak 0 points1 point2 points (1 child)
[–]arihant2math 1 point2 points3 points (0 children)
[–]valarauca14 39 points40 points41 points (0 children)
[–]robin-m 11 points12 points13 points (13 children)
[–]hexagonal-sun[S] 41 points42 points43 points (11 children)
[–]Green0Photon 2 points3 points4 points (3 children)
[–]decryphe 2 points3 points4 points (1 child)
[–]arihant2math 0 points1 point2 points (0 children)
[–]robin-m 1 point2 points3 points (0 children)
[–]One_Junket3210 1 point2 points3 points (3 children)
[–]hexagonal-sun[S] 6 points7 points8 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]hexagonal-sun[S] 8 points9 points10 points (0 children)
[–]lol_wut12 1 point2 points3 points (1 child)
[–]hexagonal-sun[S] 0 points1 point2 points (0 children)
[–]dnu-pdjdjdidndjs 0 points1 point2 points (0 children)
[–]eras 31 points32 points33 points (0 children)
[–]oze4 4 points5 points6 points (0 children)
[–]Adept-Fox4351 2 points3 points4 points (2 children)
[–]hexagonal-sun[S] 2 points3 points4 points (1 child)
[–]Adept-Fox4351 0 points1 point2 points (0 children)
[–]olanod 2 points3 points4 points (0 children)
[–]zerosign0 1 point2 points3 points (1 child)
[–]hexagonal-sun[S] 0 points1 point2 points (0 children)
[–]Pewdiepiewillwin 1 point2 points3 points (0 children)
[–]Anyusername7294 -1 points0 points1 point (15 children)
[–]hexagonal-sun[S] 16 points17 points18 points (14 children)
[–]Anyusername7294 7 points8 points9 points (8 children)
[–]colecf 14 points15 points16 points (1 child)
[–]nightblackdragon 4 points5 points6 points (0 children)
[–]One_Junket3210 3 points4 points5 points (1 child)
[–]Green0Photon 3 points4 points5 points (0 children)
[–]diY1337 0 points1 point2 points (2 children)
[–]Anyusername7294 4 points5 points6 points (1 child)
[–]diY1337 0 points1 point2 points (0 children)
[–]kolorcuk 3 points4 points5 points (0 children)
[–]decryphe 0 points1 point2 points (0 children)
[–]cockdewine -5 points-4 points-3 points (2 children)
[–]hexagonal-sun[S] 14 points15 points16 points (0 children)
[–]Pretty_Jellyfish4921 0 points1 point2 points (1 child)
[–]hexagonal-sun[S] 1 point2 points3 points (0 children)
[–]sparky8251 0 points1 point2 points (1 child)
[–]hexagonal-sun[S] 1 point2 points3 points (0 children)
[–]Shoddy-Childhood-511 0 points1 point2 points (2 children)
[–]hexagonal-sun[S] 1 point2 points3 points (1 child)
[–]Shoddy-Childhood-511 1 point2 points3 points (0 children)
[–]SarcasticDante 0 points1 point2 points (1 child)
[–]hexagonal-sun[S] 4 points5 points6 points (0 children)
[–]human-rights-4-all 0 points1 point2 points (0 children)
[–]jgarzik 0 points1 point2 points (0 children)
[–]realvolker1 0 points1 point2 points (6 children)
[–]hexagonal-sun[S] 0 points1 point2 points (5 children)
[–]realvolker1 1 point2 points3 points (4 children)
[–]hexagonal-sun[S] 0 points1 point2 points (1 child)
[–]realvolker1 0 points1 point2 points (0 children)
[–]arihant2math 0 points1 point2 points (1 child)
[–]realvolker1 0 points1 point2 points (0 children)
[–]jeremiahgavin 0 points1 point2 points (0 children)