xref: /haiku/3rdparty/docker/bootstrap/README.md (revision 13581b3d2a71545960b98fefebc5225b5bf29072)
1# Haiku bootstrap in a container
2
3In Haiku, "bootstrap" is the process of building an Haiku disk image without
4any pre-compiled dependencies. Everything is built from sources instead. This
5is useful in the following cases:
6- Bringing up a new CPU architecture or ABI, for which no packages are yet
7  available,
8- You do not trust our precompiled binaries used for a normal build.
9
10The resulting image is a very minimal one, containing just enough parts of
11Haiku to be able to run haikuporter inside it and generate package files that
12can then be used for a normal build of Haiku.
13
14The Haiku bootstrap process is highly dependant on what tools are installed
15on the host machine. Bootstraped haikuporter builds can pick up on things
16like the locally installed clang vs the gcc toolchain we are providing,
17the shell being used (bash works, mksh is known to cause problems), or even
18the way the host distribution compiled Python. This makes the process
19unreliable when running it outside of a well-knwon environment.
20
21By running bootstrap within a container, we can better isolate the process
22from the end users host and create more-reproduceable bootstrap builds.
23
24> This is designed for GCC bootstraps. In theory if Haiku changed to clang,
25> the need for a crosstools toolchain is removed... however the clang work
26> is too early to know exactly how this process will work.
27
28## Requirements
29
301) docker
312) make
323) An internet connection
33
34## Process
35
361) Build the docker container
37
38```make```
39
402) Check out the required sources
41
42```make prep```
43
44
453) Build the crosstools (gcc only) for your target architecture
46
47```TARGET_ARCH=arm make crosstools```
48
494) Begin the bootstrap (building Haiku + the required bootstrap hpkgs)
50
51```TARGET_ARCH=arm make bootstrap```
52
535) If you need to enter the build environment, ```TARGET_ARCH=arm make enter``` will quickly let you do so.
546) profit!
55