[rb-general] bootstrappable builds: practical source based bootstrapping

Orians, Jeremiah (DTMB) OriansJ at michigan.gov
Tue Jul 25 13:22:27 CEST 2017


> Wouldn't a complete bootstrapping have to include the source to 
> hardware as well? OTOH checking on several unrelated hardware 
> implementations would be probably sufficient.

Yes, that is why stage0 defines a standard hardware target, that functions identically on various hardware platforms and all platforms that implement a vm that matches the spec will produce identical binaries.

> It would be nice if bootstrappable.org verified that each of its 
> outputs was in fact bit-for-bit reproducible, that would increase 
> confidence.

Actually stage0 is bit-for-bit reproducible by default. There is no mechanism for anything except deterministic results. Every commit for every piece is exactly bit for bit reproducible. (Save for vm.c which requires the compiler to produce its deterministic binary)

> I for one am not necessarily flush with the skills to help, but I 
> would love to see it all happen.  The GCC builds I've done to date 
> make me quite alarmed.  A clearing, more minimal bootstrappable 
> sequence would make me very happy and I'd love to hear about milestones.
Stage0 needs more people to do a git clone, make and make test on weird hardware/software combinations to find any edge cases we missed in ensuring the platform independent example of the vm spec does not produce any deviant results from the expected deterministic values.

Documentation writers, Forth and Lisp programmers and testers would not be refused as we want to make the bootstrap process from Zero become as painless as possible.

> I'm working with Jeremiah Orians [cc] who has created stage0, a source 
> based toolchain that builds from a self-hosting hex assembler in ~280 
> bytes via a labeled hex linker up to a simplifield M1 assembler.
Actually it also has a primitive forth (it's getting better) and a primitive lisp (also being enhanced).
But yes, right now we are targeting bootstrapping Mes using M1 assembly to start closing the circle sooner.

> FWIIW we at Aetey are doing in production a similar style self-hosting 
> bootstrapping, with less than 2MB of binaries at the start (verifiable 
> via any external ANSI C compiler for ia32). For verification of the 
> sanity of the underlying kernel we identically build on three 
> different implementations of the Linux kernel ABI, instead of having 
> to bootstrap the kernel services as well.
The stage0 vm built with full debugging options comes in at around 100KB and with -Os is only 42KB.
The hex monitor is 280bytes and written in commented hex and the hex0 assembler is only 260 bytes (either one can bootstrap
everything)
(The hex monitor is if you don't have a trusted text editor or any at all.)

The design of the stage0 vm is to allow porting to arbitrary platforms and hardware, with only a handful of hard requirements (must support 8bit bytes and able to read/write to/from media)

Jeremiah Orians
Cell phone: (517) 896-2948



More information about the rb-general mailing list