From ae0a10cad3999b13cbfa47a3d947a5219d2d90f4 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sun, 16 May 2021 17:58:45 +0200 Subject: [PATCH] Update readme for docker images There was some confusion about what they are and how they are used. Hopefully this clarifies things a bit. --- 3rdparty/docker/bootstrap/README.md | 18 ++++++++++++++++-- 3rdparty/docker/cross-compiler/README.md | 16 ++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 3rdparty/docker/cross-compiler/README.md diff --git a/3rdparty/docker/bootstrap/README.md b/3rdparty/docker/bootstrap/README.md index 8c82232496..ce080dea57 100644 --- a/3rdparty/docker/bootstrap/README.md +++ b/3rdparty/docker/bootstrap/README.md @@ -1,8 +1,22 @@ # Haiku bootstrap in a container +In Haiku, "bootstrap" is the process of building an Haiku disk image without +any pre-compiled dependencies. Everything is built from sources instead. This +is useful in the following cases: +- Bringing up a new CPU architecture or ABI, for which no packages are yet + available, +- You do not trust our precompiled binaries used for a normal build. + +The resulting image is a very minimal one, containing just enough parts of +Haiku to be able to run haikuporter inside it and generate package files that +can then be used for a normal build of Haiku. + The Haiku bootstrap process is highly dependant on what tools are installed -on the host machine. Bootstraped haikuporter builds can pick up on things -like the locally installed clang vs the gcc toolchain we are providing. +on the host machine. Bootstraped haikuporter builds can pick up on things +like the locally installed clang vs the gcc toolchain we are providing, +the shell being used (bash works, mksh is known to cause problems), or even +the way the host distribution compiled Python. This makes the process +unreliable when running it outside of a well-knwon environment. By running bootstrap within a container, we can better isolate the process from the end users host and create more-reproduceable bootstrap builds. diff --git a/3rdparty/docker/cross-compiler/README.md b/3rdparty/docker/cross-compiler/README.md new file mode 100644 index 0000000000..cb5629bcfe --- /dev/null +++ b/3rdparty/docker/cross-compiler/README.md @@ -0,0 +1,16 @@ +# A docker image suitable for cross-compiling Haiku applications + +This docker image provides an environment suitable to build Haiku applications +inside a Linux compiler. It can be used by projects willing to integrate an +Haiku build inside their CI system, for example. + +The docker build of this image prepares the environment by: +- Building our toolchain +- Building the haiku hpkg files and downloading dependencies +- Extracting headers and libraries from the hpkg files to generate a sysroot + directory +- Setting up environment variables for the toolchain to be usable + +You can then use the $ARCH-unknown-haiku compiler (for example +arm-unknown-haiku-gcc) to build your application. All the required files are +installed in /tools/cross-tools-$ARCH.