diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2017-09-01 15:10:48 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2017-10-25 15:00:54 +0000 |
commit | db515d743345d183312cfb1af19153b3b8a78ece (patch) | |
tree | b45a500b73342e80a09370432dcc74100e7652e4 | |
parent | 187de8c7513d2cf1635dbf42b88c0a28e7583636 (diff) | |
download | definitions-db515d743345d183312cfb1af19153b3b8a78ece.tar.gz |
Add 'stage2-sysroot' and 'stage3-sysroot' elements
These each produce a minimal (~300MB) sysroot containing BusyBox, the
GNU C/C++ toolchain, and a couple of other components necessary for
bootstrapping Baserock reference systems from the ground up.
Morph and YBD used tools from the host to bootstrap, which usually
worked fine but was occasionally disasterous (such as when GLIBC
broke ABI between releases). BuildStream is more strict and requires
you to provide binaries to seed its sandbox.
The stage2 sysroot can only be used to build the stage3 sysroot, as
the stage2 components are configured with a non-standard /tools prefix
and the stage3 build instructions have some special casing that is
necessary to work with that.
The stage3 sysroot can be used to build pretty much anything and is
used to seed Baserock reference builds on each platform.
-rw-r--r-- | elements/bootstrap/stage2-sysroot.bst | 25 | ||||
-rw-r--r-- | elements/bootstrap/stage3-sysroot.bst | 15 |
2 files changed, 40 insertions, 0 deletions
diff --git a/elements/bootstrap/stage2-sysroot.bst b/elements/bootstrap/stage2-sysroot.bst new file mode 100644 index 00000000..28eeee9d --- /dev/null +++ b/elements/bootstrap/stage2-sysroot.bst @@ -0,0 +1,25 @@ +kind: compose + +description: | + stage2-sysroot: cross-buildable minimal shell environment + C/C++ toolchain + + This is only useful when bringing up new architectures. For more + information see: http://wiki.baserock.org/guides/how-to-cross-bootstrap/ + + To build in this environment, you will likely need to delete the symlink + from /usr/bin to /tools/bin and replace it with a real directory, containing + symlinks from /usr/bin/sh to /tools/bin/sh and from /usr/bin/bash to + /tools/bin/bash. If you build GCC with the /usr/bin -> /tools/bin symlink + still in place you will end up with a GCC that doesn't work. + +depends: +- filename: gnu-toolchain/stage2.bst + type: build + +config: + # We don't run any integration commands because we might have cross-built the + # sysroot using `bst --target-arch=... build`. If this is the case, probably + # none of the binaries in the artifact will be able to execute. + integrate: false + + exclude: [ debug, doc, locale ] diff --git a/elements/bootstrap/stage3-sysroot.bst b/elements/bootstrap/stage3-sysroot.bst new file mode 100644 index 00000000..cc6d0632 --- /dev/null +++ b/elements/bootstrap/stage3-sysroot.bst @@ -0,0 +1,15 @@ +kind: compose + +description: | + stage3-sysroot: clean minimal shell environment + C/C++ toolchain + + Binaries of this are released to https://ostree.baserock.org/releases/ and + are in turn used to seed subsequent rebuilds of the Baserock reference + systems (via gnu-toolchain/base.bst). + +depends: +- filename: gnu-toolchain.bst + type: build + +config: + exclude: [ debug, doc, locale ] |