See also the toplevel.
What custom laptop would be complete without a custom operating
system? I'm doing the initial groundwork to build out an operating
system, though it's highly dependent on what system board I end up
going with. I'd like to write it in Rust, so I'm working through a few
OS walkthroughs with Rust. Some initial design notes:
- I'm not really aiming for any sort of POSIX compliance.
- It should be a single user system, which has a number of
consequences.
- The init system just needs to bring up a shell. The first pass at
the OS won't have multiple virtual consoles, which will simplify
things.
- I'd like to explore process security mechanisms besides users and
groups.
- What does a single user login look like? How does authentication
work?
- I'd like to explore object capabilities [#] as a security
mechanism. I've done some explorations with object capability file
stores in the past [#], but it's still a topic I'm woefully
undereducated in.
- The filesystem is still an open question.
- The filesystem should be encrypted as a basic security
measure. This requires some crypto support in the kernel, which
adds more complexity.
- Which filesystem to use is another question. FAT doesn't provide
much extra metadata for files but is easy to implement; ext2 and
family aren't too much more complicated, relatively speaking, but
I think they're based on users and groups (e.g. the Unix
permissions model).
- How do processes work in this system? How about scheduling?
There's more questions than this, but it's definitely going to be a
lot of work. I think I've convinced some smart people to help, so
that'll be good. I'll end up doing a lot of reading up on other
efforts, like Fuchsia [#], Redox [#], KeyKOS [#], CapROS [#], etc.
After the kernel comes the question of the userspace. I think the
roadmap for this is going to end up with multiple stages. The
essential software that'll need to be written are an editor (I'd like
an mg-like editor at first, but we'll see), some interpreted language
(maybe a scheme or forth, but maybe porting Python over), a text-only
web browser (or resurrect gopher ;)), a busybox analogue (e.g. all the
necessary system tools), and git (or some other SCM [#]). After that comes
a PDF viewer, a tmux analogue, an assembler, and a mesh network
controller. Finally, a C compiler and/or porting Rust over, maybe
adding a GUI/windowing system, and adding things like CSS support to
the browser.
I had this crazy backburner idea of something like a system that's
part wiki, part activitypub sort of thing that could be used without
needing public infrastructure. That's the think-big, think-far, sort
of project. This presumes, of course, that this goes anywhere.