Architecture Components
The build system consists of three primary components:Tooling
Makefiles, Go programs, Docker bootstrap environment, and chroot build environment
Package Generation
SRPM creation, dependency resolution, and RPM building
Image Generation
Filesystem composition, package installation, and image formatting
Build Flow Overview
The complete build process follows this high-level flow:Diagram Key
Diagram Key
The flowcharts throughout this documentation use consistent color coding:
- Blue: Input/output files and collections
- Brown: Process steps
- Purple: Decision points
- Green: Success states
- Red: Error states
RPM Package Flow
Azure Linux is an RPM-based distribution. Each package is built from sources, patches, and a spec file, with signatures verifying source integrity:Make-Based System
The build system is based on Make, which tracks file dependencies and modification times to determine what needs rebuilding. This approach:- Rebuilds targets only when dependencies change
- Works hierarchically with file-based dependencies
- Uses advanced patterns for folder dependencies and configuration tracking
- Splits logic across multiple
*.mkfiles under./scripts
Key Advantage: Make’s dependency tracking ensures efficient rebuilds—only changed components are recompiled, saving significant build time in iterative development.
Build Targets
You can control the build process at different stages:| Target | Description |
|---|---|
make toolchain | Build or download the toolchain RPMs |
make input-srpms | Create source RPMs from local specs |
make build-packages | Build all required packages |
make image | Generate final disk images |
make iso | Create bootable ISO installers |
Build Modes
The system supports multiple build modes via Make variables:- Remote Toolchain
- Toolchain Archive
- Full Bootstrap
Clean Build Environment
All packages are built in isolated chroot environments populated with toolchain RPMs. This ensures:- Reproducible builds across different host systems
- No interference from host system tools or libraries
- Consistent build environment matching the target OS
- Safe package building with automatic cleanup on errors
Architecture Deep Dive
For detailed information about each component, see:Initial Preparation
Makefiles, Go tooling, toolchain, and chroot environments
Local Packages
SPEC files, source management, and SRPM creation
Package Building
Dependency graphing, fetching, and parallel building
Image Generation
Image composition, package installation, and format conversion
Build Logs
Understanding and troubleshooting build errors
Next Steps
Initial Preparation Phase
Learn about the toolchain, Go tools, and build environment setup