Build Phases
Every build system command/script has phases, this page will document them.
- bootstrap.sh
- podman_bootstrap.sh
- make all (first run)
- make all (second run)
- make rebuild
- make r.recipe
- make qemu
bootstrap.sh
This is the script used to do the initial configuration of the build system, see its phases below:
- Install the Rust toolchain (rustc/cargo) and add
cargo
to the shell PATH. - Install all necessary packages (based on your Unix-like distribution) of the development tools to build all recipes.
- Download the build system sources (if you run without the
-d
option -./bootstrap.sh -d
) - Show a message with the commands to build the Redox system.
podman_bootstrap.sh
This script is the alternative to bootstrap.sh
for non-Debian systems, used to configure the build system for use with Podman., see its phases below:
- Install Podman, make, FUSE and QEMU if it's not installed.
- Download the build system sources (if you run without the
-d
option -./podman_bootstrap.sh -d
) - Show a message with the commands to build the Redox system.
make all
(first run)
This is the command used to build all recipes inside your default TOML configuration (config/$ARCH/desktop.toml
or the one inside your .config
), see its phases below:
- Download the binaries of the Redox toolchain (patched rustc, gcc and llvm) from the CI server.
- Download the sources of the recipes specified on your TOML configuration.
- Build the recipes.
- Package the recipes.
- Create the QEMU image and install the packages.
make all
(second run)
If the build/$ARCH/$CONFIG/repo.tag
file is up to date, it won't do anything. If the repo.tag
file is missing it will works like make rebuild
.
make all
(Podman, first run)
This command on Podman works in a different way, see its phases below:
- Install the Redox container (Ubuntu + Redox toolchain).
- Install the Rust toolchain (rustc/cargo) inside this container.
- Install the Ubuntu packages (inside the container) of the development tools to build all recipes.
- Download the sources of the recipes specified on your TOML configuration.
- Build the recipes.
- Package the recipes.
- Create the QEMU image and install the packages.
make rebuild
This is the command used to check/build the recipes with changes, see its phases below:
- Check which recipes had source changes (if confirmed, download them) or if a new recipe was added to the TOML configuration.
- Build the recipes with changes.
- Package the recipes with changes.
- Create the QEMU image and install the packages.
make r.recipe
This is the command used to build a recipe, see its phases below.
- Search where the recipe is stored.
- See if the
source
folder is present, if not, download the source from the method specified inside therecipe.toml
. - Build the recipe dependencies as static objects (for static linking).
- Start the compilation based on the template of the
recipe.toml
. - If the recipe is using Cargo, it will download the crates, build them and link on the final binary of the program.
- If the recipe is using GNU Autotools, CMake or Meson, they will check the build environment and library headers to link on the final binary of the program.
- Package the recipe.
Typically, make r.recipe
is used with make image
to quickly build a recipe and create an image to test it.
make qemu
This is the command used to run Redox inside a VM, see its phases below:
- It checks the existence of the QEMU image, if not, it will works like
make rebuild
. - A command with custom arguments is passed to QEMU to make Redox run without problems.
- The QEMU window is shown with a menu to choose the resolution.
- The boot process happens (the bootloader does a bootstrap to the kernel and the init start the userspace daemons).
- The Orbital login screen appear.