Quick Workflow

This page will describe the most quick testing/development workflow for people that want an unified list to do things.

You need to fully understand the build system to use this workflow, as it don't give detailed explanation of each command to save time and space

Install Rust Nightly

curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly

Use Case: Configure the host system without the bootstrap.sh script.

Update Rust

rustup update

Use Case: Try to fix Rust problems.

Download a new build system copy

git clone https://gitlab.redox-os.org/redox-os/redox.git --origin upstream --recursive

Use Case: Commonly used when breaking changes on upstream require a new build system copy.

Install the required packages for the build system

curl -sf https://gitlab.redox-os.org/redox-os/redox/raw/master/bootstrap.sh -o bootstrap.sh
bash -e bootstrap.sh -d

Use Case: Install new build tools for recipes or configure the host system without the bootstrap.sh script.

Download and run the "bootstrap.sh" script

curl -sf https://gitlab.redox-os.org/redox-os/redox/raw/master/bootstrap.sh -o bootstrap.sh
bash -e bootstrap.sh

Use Case: Commonly used when breaking changes on upstream require a new build system copy.

Download and build the toolchain and recipes

cd redox
make all

Use Case: Create a new build system copy after a breaking change on upstream.

Update the build system and its submodules

make pull

Use Case: Keep the build system up-to-date.

Update the toolchain and relibc

touch relibc
make prefix

Use Case: Keep the toolchain up-to-date.

Update recipes and the QEMU image

make rebuild

Use Case: Keep the build system up-to-date.

Update everything

curl -sf https://gitlab.redox-os.org/redox-os/redox/raw/master/bootstrap.sh -o bootstrap.sh
bash -e bootstrap.sh -d
rustup update
make pull
touch relibc
make prefix
make rebuild

Use Case: Try to fix any problem caused by outdated programs, toolchain and build system sources.

Wipe the toolchain and build again

rm -rf prefix
make prefix

Use Case: Commonly used to fix problems.

Wipe the toolchain/recipe binaries and build them again

make clean all

Use Case: Commonly used to fix unknown problems or update the build system after breaking changes on upstream.

Wipe all sources/binaries of the build system and download/build them again

make distclean all

Use Case: Commonly used to fix unknown problems or update the build system after breaking changes.

Use the "myfiles" recipe to insert your files on the QEMU image

mkdir cookbook/recipes/other/myfiles/source
nano config/your-arch/your-config.toml
myfiles = {}
make myfiles image

Use Case: Quickly insert files on the QEMU image or keep files between rebuilds.

Comment out a recipe from the build configuration

nano config/your-cpu-arch/your-config.toml
#recipe-name = {}

Use Case: Mostly used if some default recipe is broken.

Create logs

make some-command 2>&1 | tee file-name.log

Use Case: Report errors.

Enable a source-based toolchain

echo "PREFIX_BINARY?=0" >> .config
make prefix

Use Case: Build the latest toolchain sources or fix toolchain errors.

Build the toolchain from source

make prefix PREFIX_BINARY=0

Use Case: Test the toolchain sources.

Download and build some Cookbook configuration for some CPU architecture

make all CONFIG_NAME=your-config ARCH=your-cpu-arch

Use Case: Quickly build Redox variants without manual intervention on configuration files.