SPM Linux

1, computers

computers can help people to easily access and improve human knowledge,
and as a result do things to improve the quality of human life
an ideal computer would be as small as possible
it would only contain CPU, RAM, SSD, TPM2, Bluetooth, and a USB4 2.0 port that will connect to a hub
the hub provides:
, power, GPU, WiFi
, a USB dock (to connect peripherals like display, camera ...)
, extra ports: ethernet, audio jack, DP and HDMI
digital circuits
in conventional digital circuits when the inputs change, the outputs can have temporary invalid values,
until they stabilize to the valid values
but for the circuit to do its job, gates with memory (registers),
must operate only when the inputs have correct values
one solution is to synchronize registers with a global clock signal
the period of clock signal is made long enough for the circuit to become stable
disadvantages of synchronous circuits:
, we have to split long operations into several smaller ones,
which can be performed in successive clock cycles (a technique known as pipelining)
otherwise the circuit would be slow and inefficient
, distributing a high'fan'out, timing'sensitive clock signal can be complicated
, electromagnetic interference at the clock frequency and its harmonics
, widely distributed clock signal takes a lot of power, and must run whether the circuit is receiving inputs or not
although "clock gating" can help to reduce some of the problems of synchronous circuits,
i think the real solution is to use asynchronous circuits
the only sane kind of asynchronous circuit which i could imagine is this:
, next to any data wire, there is a control wire which determines if the data is valid or not
, when a register wants to change its outputs, it first invalidates them,
for a duration equal to the delay of one gate
, any gate receiving an invalid input, invalidates its outputs
, this way all data which is going to change in the future, is first invalidated
, registers operate only when all inputs are valid
computer architecture
cpu, memory, peripherals, this seems to be the only practical architecture for the hardware of computers
cpu runs a sequence of simple computations, called instruction codes, one by one
compilers are special programs that generate instruction codes,
from a program written in a structured and human readable language
https://www.bottomupcs.com/
backdoors are always a possibility for closed'source CPU with closed'source boot firmware
specially after the introduction of "trusted execution environment" (TEE) in the boot firmwares
TEE is a full'blown, always'running mini operating system,
with full access to the whole system (including memory and network)
furthermore they have made it practically impossible for users to disable it
this mess of a design cries out for hidden and quite sophisticated backdoors
https://www.fsf.org/blogs/licensing/intel-me-and-why-we-should-get-rid-of-me
https://libreboot.org/faq.html#intel
https://en.wikipedia.org/wiki/Intel_Management_Engine
https://blog.invisiblethings.org/papers/2015/x86_harmful.pdf
in the case of X86 architecture, the default boot firmware of nearly all systems are closed source
flashing a CoreBoot based boot firmware is possible, but there still will be closed source parts (Intel FSP)
in addition, there is no easy way to get rid of the TEE part, ie Intel ME (or AMD PSP),
though there are some hacks to disable (but not completely remove) it:
https://puri.sm/posts/deep-dive-into-intel-me-disablement/
ARM architecture is closed source too, but some vendors (eg Rockchip) use an open source boot firmware (EDK2)
there is even an open source implementation of ARM TrustZone: https://www.trustedfirmware.org/projects/op-tee/
GPU with open source driver: Qualcomm/Adreno
open source CPU: RISC-V, Power ISA
programs usually do not run directly on computer hardware
instead they run on a more sophisticated software machine (a virtual machine) called the kernel
in theory we can live without a kernel (an idea sometimes called a library operating system),
and it can be useful for some use cases (like embedded systems),
but a kernel based operating system makes developing and testing programs, much easier
Linux is a highly developed, constantly evolving, open'source kernel

2, SPM Linux

SPM Linux is a Linux based operating system, built and maintained using SPM (simple package manager)
SPM uses a simple and innovative method that unifies software building and package management
SPM by itself can be used as a standalone build system and package manager on any Posix system
you just need to have either "gnunet" or "curl" on your system
also to bootstrap from source, these extra programs are required:
clang git ssh-keygen
now just run this command to install SPM in user's home directory:
; sh spm/new.sh
note that SPM will try to download binary packages (instead of building from source),
if they are available for your system
if you want to make sure that packages are always built from source, run this instead:
; sh spm/new.sh src
to install SPM Linux on a storage device, first we need to be in a Linux system with these programs installed:
gnunet (or curl) mkfs.vfat (dosfstools) mkfs.btrfs (btrfs-progs) tpm2-tools efivar
to bootstrap from source, these extra programs are required too:
clang git ssh-keygen
now just run this command as root:
; sh spm/new.sh
or to build packages from source (agian as root):
; sh spm/new.sh src
this will install a minimal linux based operating system, running Codev, inside CodevShell
packages will be updated automatically
updating packages is an atomic process
nonetheless, to have a really fail'safe system, redundant systems are necessary
also SPM Linux is easily replicatable using the command "spm new"