Thinking About Building a Linux Distro
It was bound to happen eventually. After years of jotting down thoughts on building my own OS I’ve started tinkering with the idea. Not a from scratch OS, a Linux distribution, cobbled together from existing tools along with a bit of custom tooling. The current working title (inspired by Untitled Goose Game) is: Untitled Linux Distribution.
Ultimately I’d like to use Redox OS as my primary OS. It’s mostly written in Rust and permissively licensed (MIT) — two things that I value. Building an entire OS from scratch is a bunch of work though. Until such time as Redox is ready for use as a daily OS I’m exploring the idea of constructing a Linux distribution that can share some of the same ideals:
- Use memory safe tools with a preference for Rust where possible.
- BSD/similarly permissive licensed software in the base where possible.
- Stable base + rolling packages like FreeBSD.
The initial target is my own desktop computing needs (where I previously used FreeBSD and currently use Arch Linux).
This is a pragmatic system. At the very least the Linux kernel is GPL and millions of lines of C. The goal is to get something working and then iterate. The reason for using Linux is that it has the best performance and hardware support for desktop use as far as open source operating systems go.
My currently untested grab bag of components for the base system is:
- Compiler: clang
- Linker: lld
- Kernel: ClangBuiltLinux
- libc: musl (or relibc if it is functional enough)
- init: dinit
- coreutils: Redox coreutils
- Interactive shell: ion
- POSIX shell: ash, mksh, or oksh OpenBSD ksh
- tar, zip, etc: libarchive
- readline: rustyline, libedit, or linenoise
- syslog: sysklogd
- OpenSSL: Mesalink or LibreSSL
- Text editor: Amp
- Package manager: xbps
This isn't everything that the distro will need, just thing things I've researched so far.
I’m currently deep in yak shaving territory writing a ports tree and build tool in Rust that will feed into xbps. More on that in the next post. Development will happen on GitHub, I want contributions to be easy and have a low barrier to entry. Nothing is public yet. I'll open things up when I'm a bit further along.