2017-08-26 11:29:07 +00:00
|
|
|
|
bootstrappable.org project -*- org -*-
|
|
|
|
|
|
|
|
|
|
* What?
|
|
|
|
|
** Full source bootstrapping for GuixSD
|
2018-04-21 22:45:00 +00:00
|
|
|
|
|
|
|
|
|
A package in GuixSD is can be uniquely identified by the hash of its
|
|
|
|
|
source code, its dependencies and its build recipe.
|
|
|
|
|
|
|
|
|
|
Every package can be built from source, except for the bootstrap
|
|
|
|
|
binaries.
|
|
|
|
|
|
|
|
|
|
*** From the GuixSD manual
|
|
|
|
|
|
|
|
|
|
The distribution is fully “bootstrapped” and “self-contained”: each
|
|
|
|
|
package is built based solely on other packages in the distribution.
|
|
|
|
|
|
|
|
|
|
The root of this dependency graph is a small set of “bootstrap
|
|
|
|
|
binaries”, provided by the ‘(gnu packages bootstrap)’ module. For more
|
|
|
|
|
information on bootstrapping, *note Bootstrapping::.
|
|
|
|
|
|
|
|
|
|
**** GuixSD bootstrap tarballs
|
|
|
|
|
|
|
|
|
|
$ du -schx $(readlink $(guix build bootstrap-tarballs)/*)
|
|
|
|
|
2.1M /gnu/store/9623n4bq6iq5c8cwwdq99qb7d0xj93ym-binutils-static-stripped-tarball-2.28.1/binutils-static-stripped-2.28.1-x86_64-linux.tar.xz
|
|
|
|
|
18M /gnu/store/437xwygmmwwpkddcyy1qvjcv4hak89pb-gcc-stripped-tarball-5.5.0/gcc-stripped-5.5.0-x86_64-linux.tar.xz
|
|
|
|
|
1.8M /gnu/store/55ccx18a0d1x5y6a575jf1yr0ywizvdg-glibc-stripped-tarball-2.26.105-g0890d5379c/glibc-stripped-2.26.105-g0890d5379c-x86_64-linux.tar.xz
|
|
|
|
|
5.7M /gnu/store/bqf0ajclbvnbm0a46819f30804y3ilx0-guile-static-stripped-tarball-2.2.3/guile-static-stripped-2.2.3-x86_64-linux.tar.xz
|
|
|
|
|
5.8M /gnu/store/j8yzjmh9sy4gbdfwjrhw46zca43aah6x-static-binaries-tarball-0/static-binaries-0-x86_64-linux.tar.xz
|
|
|
|
|
33M total
|
|
|
|
|
$ for i in $(readlink $(guix build bootstrap-tarballs)/*);\
|
|
|
|
|
do sudo tar xf $i; done
|
|
|
|
|
$ du -schx *
|
|
|
|
|
130M bin
|
|
|
|
|
13M include
|
|
|
|
|
54M lib
|
|
|
|
|
51M libexec
|
|
|
|
|
5.2M share
|
|
|
|
|
252M total
|
|
|
|
|
|
2017-08-26 11:29:07 +00:00
|
|
|
|
* Why?
|
|
|
|
|
** Reproducibility is essential to Software Freedom
|
2018-04-21 22:45:00 +00:00
|
|
|
|
|
2017-08-26 11:29:07 +00:00
|
|
|
|
Reproducible builds are a set of software development practices that
|
|
|
|
|
create a verifiable path from human readable source code to the binary
|
|
|
|
|
code used by computers.
|
2018-04-21 22:45:00 +00:00
|
|
|
|
|
|
|
|
|
*** What about the bootstrap binaries and the compilers?
|
|
|
|
|
|
2017-08-26 11:29:07 +00:00
|
|
|
|
We have the sources: they always lead to bitwise-same binary, but what
|
2018-04-21 22:45:00 +00:00
|
|
|
|
about the bootstrap binaries and compilers?
|
|
|
|
|
|
2017-08-26 11:29:07 +00:00
|
|
|
|
*** The current way out: Ignore the problem
|
|
|
|
|
|
|
|
|
|
``recipe for yoghurt: add yoghurt to milk''
|
|
|
|
|
|
2018-04-21 22:45:00 +00:00
|
|
|
|
*** New solution: Full source bootstrapping path
|
2017-08-26 11:29:07 +00:00
|
|
|
|
|
2018-04-21 22:45:00 +00:00
|
|
|
|
* How?
|
|
|
|
|
** Software: MesCC-tools, M2-Planet, Mes and MesCC
|
|
|
|
|
** MesCC-tools
|
2017-08-26 11:29:07 +00:00
|
|
|
|
|
2018-04-21 22:45:00 +00:00
|
|
|
|
https://github.com/oriansj/mescc-tools
|
2017-08-26 11:29:07 +00:00
|
|
|
|
|
2018-04-21 22:45:00 +00:00
|
|
|
|
*** hex.0: ~500 byte well-documented, self-hosting hex assembler
|
2017-08-26 11:29:07 +00:00
|
|
|
|
|
2018-04-21 22:45:00 +00:00
|
|
|
|
This 500 byte program is written in ASCII hex. When converted
|
|
|
|
|
byte-for-byte from ASCCI to binary we have the only binary seed that
|
|
|
|
|
our full source bootstrap path needs.
|
2017-08-26 11:29:07 +00:00
|
|
|
|
|
2018-04-21 22:45:00 +00:00
|
|
|
|
We bless this simple and easily verifyable binary and consider it to
|
|
|
|
|
be source.
|
2017-08-26 11:29:07 +00:00
|
|
|
|
|
2018-04-21 22:45:00 +00:00
|
|
|
|
*** hex1: next level hex assembler written in hex.0
|
|
|
|
|
*** M0: a macro assembler written in hex.1
|
|
|
|
|
*** M1: a macro assembler written in M0
|
|
|
|
|
*** hex2: a hex2 linker written in M0
|
|
|
|
|
*** M2-Planet: a self-hosting M2 (C-with-structs) transpiler written in M1
|
|
|
|
|
*** Mes: A Scheme interpreter written in C, with cpp transformed into M2
|
|
|
|
|
*** MesCC: A C compiler written in Scheme
|
|
|
|
|
*** tcc-boot: a patched version of TinyCC
|
2017-08-26 11:29:07 +00:00
|
|
|
|
|
2018-04-21 22:45:00 +00:00
|
|
|
|
** Mes and MesCC
|
2017-08-26 11:29:07 +00:00
|
|
|
|
|
|
|
|
|
https://gitlab.com/janneke/mes
|
|
|
|
|
|
2018-04-21 22:45:00 +00:00
|
|
|
|
*** mes.c: a Scheme interpreter prototyped in C ~3000 Lines
|
|
|
|
|
*** mescc: a C compiler written in Scheme (uses Nyacc C99 parser in Scheme)
|
|
|
|
|
*** mes.M2: this Scheme interpreter in preprocessed M2
|
|
|
|
|
|
|
|
|
|
** TinyCC
|
|
|
|
|
|
|
|
|
|
https://gitlab.com/janneke/tinycc
|
2017-08-26 11:29:07 +00:00
|
|
|
|
|
|
|
|
|
* TODO
|
2018-05-23 20:48:00 +00:00
|
|
|
|
** upstream mes-boot to GuixSD.
|
|
|
|
|
** add full source gcc-4.7 package build.
|
|
|
|
|
** replace GuixSD bootstrap for x86.
|
2018-05-19 18:52:24 +00:00
|
|
|
|
** remove or upstream patches from tcc-boot
|
|
|
|
|
** prepare src/mes.c for M2-Planet transpiler.
|
|
|
|
|
** fix bootstrap-loops: (Nyacc?, mes.M2, psyntax.pp?)
|
2017-08-26 11:29:07 +00:00
|
|
|
|
** make GNU gcc (8.0?) bootstrappable again, remove [need for] tcc stage
|
|
|
|
|
** integrate with GuixSD
|
2018-04-21 22:45:00 +00:00
|
|
|
|
** x86_64, arm, the Hurd
|
|
|
|
|
|
|
|
|
|
* DONE
|
2018-05-23 20:48:00 +00:00
|
|
|
|
** have tcc-boot compile gnutools triplet: binutils-2.14, gcc-2.95.3, glibc-2.2.5.
|
2018-05-19 18:52:24 +00:00
|
|
|
|
** have tcc-boot's mes-tcc compile a fully functional tcc
|
2018-04-21 22:45:00 +00:00
|
|
|
|
** hex.0, hex.1, M0
|
|
|
|
|
** M1, hex2_linker prototyped in C
|
|
|
|
|
** M2-Planet is now self-hosting, written in M2
|
|
|
|
|
** mes+mescc are mutual self-hosting
|
|
|
|
|
** patched tcc compiled with mes+mescc
|
|
|
|
|
** during development we run mescc on Guile (mes is ~30 times slower)
|
|
|
|
|
** tcc compiled with gcc is known to compile gcc
|
|
|
|
|
|
2017-08-26 11:29:07 +00:00
|
|
|
|
* Contact
|
|
|
|
|
** #bootstrappable, #guix on freenode
|
|
|
|
|
** bootstrappable.org
|