Development

Building OnixOS

Build OnixOS package repositories and profile images with the project build system.

Development pagesOverview
On this page

What the build system owns

onix-build-system coordinates the OnixOS package and profile builds. It reads repository and profile selections from sources/, builds the selected package repositories, invokes each selected profile’s image entry point, collects release artifacts, and handles the configured repository and image destinations.

It does not infer support from a repository target alone. Package architecture support is declared by each PKGBUILD; image support comes from a profile’s profiledef.sh, package list and boot files.

Inputs

The main inputs are sources/build.conf, sources/architectures.conf, the package lists and sources/profiles.list. The package lists select source projects. Each PKGBUILD then declares package names, dependencies and supported architectures. A profile contributes profiledef.sh, packages.<arch>, pacman.conf, airootfs/ files and its image build entry point.

Before a build, confirm which source projects and architecture targets are enabled in those files. The build system fetches the configured sources; an unrelated local checkout is not automatically used as build input.

Build package repositories

Build the configured repository set across enabled repository architectures and synchronize completed repository databases:

python build.py repo

Build and synchronize one repository for one architecture:

python build.py repo --repo=onix-base --arch=x86_64

Build one repository locally without starting its synchronization step:

python build.py repos --arch=x86_64 --repo=onix-base

The repository stage fetches the selected source projects, builds packages in the configured architecture environment, collects package archives and creates the local pacman repository database. The repo command handles the configured repository synchronization; repos is the single-repository build stage. A repository target does not make an x86_64-only package available on ARM.

Build profile images

Build the profiles selected in sources/profiles.list for the image architectures they declare, collect the outputs and synchronize them to the configured image destinations:

python build.py image

Build and synchronize one profile for one architecture:

python build.py image --profile=core --arch=x86_64

A selected profile is resolved from the configured profile source. The build system sets the release version, checks the declared architecture and runs the profile’s image target before collecting artifacts. The profile Makefile owns the image recipe; the build system owns selection, versioning, collection and release layout.

Multi-architecture builds

The current build configuration enables repository and profile-image targets for x86_64, aarch64 and armv7h; the default target is x86_64. This is build-system capability, not a release promise. The six standard profiles currently declare x86_64 in their checked-in manifests, and individual package recipes can impose additional architecture limits.

For a new architecture, the profile needs a matching package list, boot configuration and files in addition to a compatible arch declaration. The selected packages and their dependencies must also build for that target.

Outputs and cleanup

Repository packages and databases are staged under output/repos/<architecture>/<repository>/. Profile artifacts are written under output/<release>/<profile>/<architecture>/; each profile release directory also contains README.txt and RELEASE.txt.

Remove generated workspace output with:

python build.py clean

The optional QEMU command starts an image that has already been built:

python build.py qemu <path-to-image> --arch=x86_64

Synchronization

Repository destinations are configured separately under sources/reposync/; image destinations are under sources/imagesync/. Each directory can contain multiple .conf files. A repository destination does not configure image uploads, or the reverse.

For a source-to-image walkthrough, see Build from a clean checkout. For command behavior, inputs and output paths, see the build reference.