Skip to content

Mostly trustworthy paths to self hosted linux userspace.

Notifications You must be signed in to change notification settings

andrewchambers/trusting-trust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

trusting-trust

An auditable and documented path to a self hosted linux userspace.

Dependencies

Importantly you do NOT require an existing compiler.

Building

First get the source:

From git:

$ git clone https://github.com/andrewchambers/trusting-trust
$ cd trusting-trust
git submodule update --init --recursive

From a release:

To be done...

If you have redo installed:

$ cd trusting-trust
$ redo -j $(nproc)

If you don't have redo installed:

$ ./do

Because the whole process is a redo build system, you can also build individual targets (found by reading each stages .do file).

Stages

Stage0

This stage builds https://github.com/oriansj/stage0-posix starting from a tiny hand written auditable elf file.

This stage contains a macro assembler, a small Cish compiler implemented in assembly, and other tools used by the mes C compiler in the next stage.

Mes

This stage builds https://www.gnu.org/software/mes using the tools in stage0. This stage contains a scheme interpreter and also a more sophisticated C compiler implemented in scheme.

Tiny C compiler

This stage builds a lightly patched version of https://bellard.org/tcc version 0.9.26 using the mes c compiler and libc. It then uses this tcc to build a simple version of mes libc for its own use.

tcc is able to produce elf files, and can be used as a preprocessor and assembler for cproc.

cproc

To be done:

This stage builds lightly patched https://sr.ht/~mcf/cproc/ and https://c9x.me/compile/. The stage then uses this compiler to build a lightly patched version musl-libc dubbed 'diet-musl'.

cproc can then build itself linking against the libc it just built.

It is important to note that cproc is capable of building a patched gcc 4.7 and binutils which may appear in future stages.

Links

About

Mostly trustworthy paths to self hosted linux userspace.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published