UNIX ==== One system, every machine. Everything that makes a machine a unix node: identity, init, base userland, kernel configuration, terminal, boot and image build. Same tree, same init, same shell, same tools on desktop, laptop and phone. Only the compiler and the kernel configuration differ. Build ----- make BOARD=x86_64-pc base make BOARD=x86_64-pc kernel make BOARD=x86_64-pc rootfs make BOARD=x86_64-pc iso ./verify.sh x86_64-pc Boards are x86_64-pc, x86_64-laptop and aarch64-phone. The board picks config-.mk: arch, compiler and kernel image. Everything else is identical on every board: PREFIX=/usr, BINPREFIX=/usr/bin, DESTDIR= /var/lib/unix/build//root. Stages are independent. INSTALLROOT is where a finished root goes. It defaults to DESTDIR; only the phone sets INSTALLROOT=/unix. Re-provision the phone with: make BOARD=aarch64-phone base install-root That gives all three machines the same /usr/bin name set, so the setup (and scripts that call /usr/bin tools) can be shared. Compare a build against the common set with: make BOARD= bin-list | diff -u etc/bin.manifest - Layout ------ config.mk config-.mk target selection Makefile the stages mk/ generic rules, one file per kind bin// one package, one unix.mk, one source file etc/*.def configuration, installed to /etc sys/ kernel config, patches, boot menu A package is a directory with its source and a unix.mk that says what to build and where to install it. Nothing else. Adding a tool means adding a directory under bin/ and one line to bin/unix.mk. Files ----- bin/tuz/tuz.c terminal, replaces the tty bin/svc/svc.c service manager bin/sbase bin/ubase core and system tools bin/busybox static busybox, fills the rest etc/rc.boot.def one boot script, every machine etc/inittab.def busybox init, tuz on tty1, getty on tty2 etc/key2.map blackberry keymap, alt-0 is zero sys/kernel-.config one kernel configuration per machine sys/isolinux.cfg boot menu Conventions ----------- Documentation lives in the C file, toybox style. No README beside a program, no manpage, no external configuration file. One binary per tool. Everything executable in /usr/bin. Configuration in /etc. State in /var. Nothing in /usr/local, /opt, /srv or /home. Boot chain: kernel and initramfs, busybox init, /etc/rc.boot, tuz on /dev/fb0, getty on tty2 as the way back. On the phone the vendor boot chain stays (extlinux, loop root) until our own kernel and boot files cover it. AUTHOR ====== Written by 'unix' contributors.