Skip to content

Toolchain Management

ELMOS integrates crosstool-ng for building native cross-compilers on macOS.

Toolchains enable cross-compilation for target architectures without VMs. ELMOS supports pre-configured targets with optimized settings.

Target Architecture Description
aarch64-unknown-linux-gnu ARM64 64-bit ARM
arm-cortex_a15-linux-gnueabihf ARM 32-bit ARM (Cortex-A15)
riscv64-unknown-linux-gnu RISC-V 64-bit RISC-V
Terminal window
./build/elmos toolchains install

Clones and builds crosstool-ng to build/toolchains/crosstool-ng/.

Terminal window
./build/elmos toolchains list

Shows available configurations.

Terminal window
./build/elmos toolchains <target>

Example: ./build/elmos toolchains riscv64-unknown-linux-gnu

Selection requires an initialized, mounted workspace and crosstool-ng. It writes the selected target’s configuration under the workspace toolchains directory. For the supported targets above, it also saves the matching ELMOS architecture. Other sample names are passed to crosstool-ng for validation.

Terminal window
./build/elmos toolchains build

Builds the selected toolchain (~30-60 min). Installs to build/toolchains/install/.

Terminal window
./build/elmos toolchains status

Verifies installation and environment variables.

Terminal window
./build/elmos toolchains env

Displays CROSS_COMPILE, PATH, etc.

Terminal window
./build/elmos toolchains menuconfig

Interactive configuration for advanced users.

Terminal window
./build/elmos toolchains clean

Removes build artifacts.

Kernel, module, and app builds auto-detect installed toolchains based on selected architecture (./build/elmos arch <arch>).

Falls back to Homebrew LLVM if no toolchain installed.

For custom targets, modify configs in assets/toolchains/configs/ and rebuild.

  • Build fails: Ensure all deps installed (./build/elmos doctor)
  • Slow builds: Use more cores with CT_PARALLEL_JOBS env var
  • Conflicts: Clean and rebuild