haiku/3rdparty/docker/bootstrap
Panagiotis Vasilopoulos 39e2ee5186 Replaced and updated Docker images
Change-Id: I981a4a3416b3827a3d834f0103527b0432cbdb87
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3915
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-05-19 05:42:07 +00:00
..
bootstrap.sh docker/bootstrap: Add --debug to get better haikuporter debug output 2018-11-04 08:37:54 -06:00
crosstools.sh docker/bootstrap: Add extra gcc bootstrap requirements 2018-11-02 22:32:12 -05:00
Dockerfile Replaced and updated Docker images 2021-05-19 05:42:07 +00:00
Dockerfile.fedora docker/bootstrap: ensure work volume exec, fix dependencies 2020-05-21 14:03:24 +00:00
haikuports_build.sh bootstrap: Add some tools to test bootstrap steps 2019-02-15 11:27:04 -06:00
haikuports_chroot.sh docker/bootstrap: Fix sysroot stage variable 2019-04-03 20:47:12 -05:00
Makefile docker/bootstrap: ensure work volume exec, fix dependencies 2020-05-21 14:03:24 +00:00
prep.sh 3rdparty/docker/bootstrap: Fix a few potential mis-steps during the bootstrap init 2019-12-09 10:28:45 -06:00
README.md Update readme for docker images 2021-05-16 18:04:16 +02:00

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, 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.

This is designed for GCC bootstraps. In theory if Haiku changed to clang, the need for a crosstools toolchain is removed... however the clang work is too early to know exactly how this process will work.

Requirements

  1. docker
  2. make
  3. An internet connection

Process

  1. Build the docker container

make

  1. Check out the required sources

make prep

  1. Build the crosstools (gcc only) for your target architecture

TARGET_ARCH=arm make crosstools

  1. Begin the bootstrap (building Haiku + the required bootstrap hpkgs)

TARGET_ARCH=arm make bootstrap

  1. If you need to enter the build environment, TARGET_ARCH=arm make enter will quickly let you do so.
  2. profit!