[dev] oasis: small linux system inspired by stali

From: Michael Forney <mforney_AT_mforney.org>
Date: Sun, 12 Feb 2017 13:55:33 -0800

For a while now, I've been working on putting together a linux system
based on suckless core tools, as well as various other projects. There
are still a number of things left to do, but I'm now at a point where
it is quite usable for me, and maybe for others as well.


# stali similarities
- Uses musl libc and suckless core tools.
- Everything is statically linked.
- Everything is built from a single repository.
- Root filesystem is managed with git.
- Package build systems are ignored in favor of uniform custom build scripts.

# stali differences
- Package sources are not checked into the source repository, but
fetched on demand depending on which packages you have selected in
- Though stali has given up on being a general purpose desktop system,
I have not, so oasis includes my wayland display server (velox),
wayland ports of dmenu and st, and a wayland implementation of the
framebuffer backend for the netsurf browser.
- Only x86_64 is supported at the moment.
- Self-bootstrappable. Nearly all packages are buildable with only the
core packages[1] and a toolchain targeting musl (some need special
handling to first build some tool and add to PATH). A new toolchain
can be built with the above and GNU make (using musl-cross-make). A
new kernel can be built with the above and python (after applying a
couple patches[2]).
- Instead of makefiles, oasis uses rc scripts to generate ninja build
files (maybe in the future I will work on a ninja-compatible build
tool in C to avoid the C++ dependency).
- Binaries are not distributed, users are expected to build their own
(though, you can do so on a separate system and pull from it).

# Trying it out
## Real hardware
I wrote up some installation instructions[3] on the github wiki. I've
tested the build and install with the xubuntu 16.10 live
environment[4]. If you try this and run into any problems, please let
me know so that I can fix/clarify things.

## qemu
I built a qemu image[5] containing all the core, extra, and desktop
packages as well as a toolchain. It is probably the best way to play
around with oasis. The installed kernel is pretty minimal, and only
has support for virtio drivers. The root password is `oasis`.

  qemu-system-x86_64 \
    -enable-kvm -cpu host -m 2048 \
    -device virtio-balloon \
    -device virtio-keyboard \
    -device virtio-tablet \
    -device virtio-net,netdev=net \
    -device virtio-scsi \
    -device virtio-serial \
    -device virtio-vga \
    -chardev stdio,id=cons \
    -mon chardev=cons \
    -drive if=none,id=hd,file=oasis-20170211.qcow2 \
    -device scsi-hd,drive=hd \
    -netdev user,id=net

To enable ssh login, `ssh-keygen -A && perpctl A sshd` (you will
probably want to set up a bridge and change `user` to `bridge` in the
netdev option to access from the host system).

To start velox, `swc-launch velox`.

To run without graphics mode, add `mux=on,signal=off` to the chardev
option, and add `-device virtconsole,chardev=cons -display none`.

To reboot/shutdown cleanly, `kill -s INT 1`/`kill -s USR1 1` respectively.

## chroot
I also uploaded a tar archive[6] created with `git archive` on the
root repository. It might be useful for poking around with chroot.
Note that the tar does not contain any empty directories and some
files are missing special permissions. After extracting, run
`./libexec/oasis/applyperms -d . && ./libexec/oasis/applyperms -d etc`
to fix this. Also, be aware that there is no common parent directory,
so make sure to extract somewhere you can easily clean up (such as a
new directory).

I've added various bits of documentation to the github wiki[7] if you
want to read more (or clone

[0] https://github.com/michaelforney/oasis/blob/master/config.def.rc
[1] https://github.com/michaelforney/oasis/blob/master/sets.rc#L1
[2] https://github.com/torvalds/linux/compare/master...michaelforney:oasis
[3] https://github.com/michaelforney/oasis/wiki/Install
[4] http://cdimages.ubuntu.com/xubuntu/releases/16.10/release/xubuntu-16.10-desktop-amd64.iso
[5] https://github.com/michaelforney/oasis/releases/download/20170211/oasis-20170211.qcow2
[6] https://github.com/michaelforney/oasis/releases/download/20170211/oasis-20170211.tar.xz
[7] https://github.com/michaelforney/oasis/wiki
Received on Sun Feb 12 2017 - 22:55:33 CET

This archive was generated by hypermail 2.3.0 : Sun Feb 12 2017 - 23:00:14 CET