From db515d743345d183312cfb1af19153b3b8a78ece Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Fri, 1 Sep 2017 15:10:48 +0000 Subject: 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. --- elements/bootstrap/stage2-sysroot.bst | 25 +++++++++++++++++++++++++ elements/bootstrap/stage3-sysroot.bst | 15 +++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 elements/bootstrap/stage2-sysroot.bst create mode 100644 elements/bootstrap/stage3-sysroot.bst 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 ] -- cgit v1.2.1