Next: , Up: Lanzamiento inicial   [Contents][Index]


20.1 The Full-Source Bootstrap

Guix—al igual que otras distribuciones de GNU/Linux—se lanza inicialmente desde un conjunto de binarios de manera tradicional: un shell Bourne, herramientas de línea de órdenes que proporcionan GNU Coreutils, Awk, Findutils, ‘sed’ y ‘grep’ y Guile, GCC, Binutils y la biblioteca de C de GNU (see Lanzamiento inicial). Habitualmente dichos binarios se “dan por hecho”.

El dar por hecho estos binarios significa que consideramos que son una “semilla” correcta y fiable para la construcción del sistema completo. En esta asunción yace un problema: el tamaño combinado de dichos binarios necesarios para el lanzamiento inicial es de alrededor de 250MB (see Bootstrappable Builds in GNU Mes). Auditar o incluso la inspeccionar de dichos binarios es prácticamente imposible.

For i686-linux and x86_64-linux, Guix now features a full-source bootstrap. This bootstrap is rooted in hex0-seed from the Stage0 package. The hex0 program is minimalist assembler: it reads space-separated hexadecimal digits (nibbles) from a file, possibly including comments, and emits on standard output the bytes corresponding to those hexadecimal numbers. The source code of this initial hex0 program is a file called hex0_x86.hex0 and is written in the hex0 language.

Hex0 is self-hosting, which means that it can build itself:

./hex0-seed hex0_x86.hex0 hex0

Hex0 it is the ASCII-equivalent of the binary program and can be produced by doing something much like:

sed 's/[;#].*$//g' hex0_x86.hex0 | xxd -r -p > hex0
chmod +x hex0

It is because of this ASCII-binary equivalence that we can bless this initial 357-byte binary as source, and hence ‘full-source bootstrap”.

The bootstrap then continues: hex0 builds hex1 and then on to M0, hex2, M1, mescc-tools and finally M2-Planet. Then, using mescc-tools, M2-Planet we build Mes (see GNU Mes Reference Manual in GNU Mes, a Scheme interpreter and C compiler in Scheme). From here on starts the more traditional C-based bootstrap of the GNU System.

Another step that Guix has taken is to replace the shell and all its utilities with implementations in Guile Scheme, the Scheme-only bootstrap. Gash (see Gash in The Gash manual) is a POSIX-compatible shell that replaces Bash, and it comes with Gash Utils which has minimalist replacements for Awk, the GNU Core Utilities, Grep, Gzip, Sed, and Tar.

Building the GNU System from source is currently only possible by adding some historical GNU packages as intermediate steps54. As Gash and Gash Utils mature, and GNU packages become more bootstrappable again (e.g., new releases of GNU Sed will also ship as gzipped tarballs again, as alternative to the hard to bootstrap xz-compression), this set of added packages can hopefully be reduced again.

A continuación se encuentra el grafo de dependencias generado para gcc-core-mesboot0, el compilador del lanzamiento inicial usado para el lanzamiento inicial tradicional del resto del sistema Guix.

Grafo de dependencias de
gcc-core-mesboot0

Work is ongoing to bring these bootstraps to the arm-linux and aarch64-linux architectures and to the Hurd.

If you are interested, join us on ‘#bootstrappable’ on the Libera.Chat IRC network or discuss on bug-mes@gnu.org or gash-devel@nongnu.org.


Footnotes

(54)

Packages such as gcc-2.95.3, binutils-2.14, glibc-2.2.5, gzip-1.2.4, tar-1.22, and some others. For details, see gnu/packages/commencement.scm.


Next: Preparación para usar los binarios del lanzamiento inicial, Up: Lanzamiento inicial   [Contents][Index]