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
- Update Rust
- Download a new build system copy
- Install the required packages for the build system
- Download and run the "podman_bootstrap.sh" script
- Download and build the toolchain and recipes
- Update the build system and its submodules
- Update the toolchain and relibc
- Update recipes and the QEMU image
- Update everything
- Wipe the toolchain and build again
- Wipe all sources/binaries of the build system and download/build them again
- Use the "myfiles" recipe to insert your files on the QEMU image
- Comment out a recipe from the build configuration
- Create logs
- Enable a source-based toolchain
- Build the toolchain from source
- Build some filesystem configuration for some CPU architecture
- Build some filesystem configuration for some CPU architecture (using pre-built packages from the build server)
- Boot Redox on QEMU from a NVMe device
- Boot Redox on QEMU from a NVMe device with more CPU cores
- Boot Redox on QEMU from a NVMe device, more CPU cores and memory
Install Rust Nightly
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly
Use Case: Configure the host system without the podman_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/podman_bootstrap.sh -o podman_bootstrap.sh
bash -e podman_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 "podman_bootstrap.sh" script
curl -sf https://gitlab.redox-os.org/redox-os/redox/raw/master/podman_bootstrap.sh -o podman_bootstrap.sh
bash -e podman_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
Install the topgrade
tool to update your system packages (you can install it with cargo install topgrade
)
topgrade
rustup update
make pull
touch relibc
make prefix 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-cpu-arch/your-config.toml
[packages]
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.
Build some filesystem 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.
Build some filesystem configuration for some CPU architecture (using pre-built packages from the build server)
(Much faster than the option above)
make all REPO_BINARY=1 CONFIG_NAME=your-config ARCH=your-cpu-arch
Use Case: Quickly build Redox variants without system compilation and manual intervention on configuration files.
Boot Redox on QEMU from a NVMe device
make qemu disk=nvme
Boot Redox on QEMU from a NVMe device with more CPU cores
make qemu disk=nvme QEMU_SMP=number
Boot Redox on QEMU from a NVMe device, more CPU cores and memory
make qemu disk=nvme QEMU_SMP=number QEMU_MEM=number-in-mb