Bootstapping is so complex, here's 181-step document to compile Linux: from "commented opcodes" in hex0 to assembler with labels, from simple C compiler to ~c89 compiler to tinycc ~c99 compiler, from simple shell to scheme interpreter to Fiwix unix-like kernel.
I have been reviewing stage0 and gave a presentation, 'reviewing live-bootstrap' about it at WHY2025, in which I also made some suggestions about improving stage0. I am now working on this.
What I refer to as stage0 is the first 19 steps of the mentioned description, which actually involves the execution of over 700 executables. (See presenration for T-diagran.) I believe that number can reduced by at least a half.
Please share me the youtube video regarding the presentation for bootstrapping as I find the idea of bootstrapping really pleasant and like I am most likely sure that although I am more an arch(cachy) personal user/debian for servers users. I feel like even these are adding reproducibility and I am sure that nixos can be reproducible https://news.ycombinator.com/item?id=38057591
Guix can definitely be bootstrapped but there are comments on this post where someone tries to reproduce nix with tcc etc.
Imagining the ability that nix can be completely bootstrapped makes me feel like it can be really good for these purposes
Like if this is reproducible and bootstrappble, then I am satisfied with the hash because other people can test it out to verify they get the same hash and I can download the iso's and then verify the hash myself to find complete safety.
Although I might still be trusting my linux iso but maybe we will have risc-v hardware where I can plug in an sd card or data or similar and it can give the hash of it for the extremely paranoid (maybe universities or very secure companies perhaps?)
After that (or quite frankly just the hash part for 99% people), I can then flash the iso to any and every hardware with complete verification
Although I feel like this still won't help if the firmware or the hardware itself can't be trusted. I mean even in corebooted chromebooks, the intel TPM only stops the ability of sending the bytecode over wire but it itself really can't be stopped. Maybe we will have risc-v machines but they would rather be really expensive.
I think tho librebooted thinkpads + nixos/guix can be really great for privacy perhaps. But what are your reasons why bootstrappability fascinates you (for me its this stacking aspect and then finally we get some useful os without having to trust anything but source which we can read/heck even audit ourselves or have the shared faith that the source code is audited by security people since its completely readable)
Related: pnut.sh https://github.com/udem-dlteam/pnut just released. It’s a self-compiling C->POSIX shell transpiler that outputs readable shell, aimed at live-bootstrap and reproducible build chains. The shell edition is auditable and can bootstrap a native compiler from just POSIX sh + coreutils. Very much in the spirit of stage0 / compile-from-nothing work.
So technically someone can run a c compiler written in guile in sectorlisp?
I think that the reason stage0 and other projects work this way is that they found lisp and other projects to be very limiting and there were definitely some reasons that they do things the current way that are mentioned in their docs.
The thing about Mes is that it does riscv64 too. I don't know the current state of the support, but there is something there.
There are still many pieces of riscv64 missing in the whole thing (an equivalent to Fiwix being the most challenging right now), and realistically only x86 is currently viable. I think riscv64 is the next in line though.
Stage 3 or 4 support for the other targets is also planed. This will require some small adaptations to the compiler for 32 to 64 word size and Stack-C versions for those targets.
https://github.com/fosslinux/live-bootstrap/blob/master/part...
reply