Build system for creating Fedora-based images for Mecha Comet devices using mkosi.
mkosi.conf– Base mkosi configuration.mkosi.conf.d/– Package groups and additional configuration.mkosi.profiles/– Build profiles such ascomet,release, andqemu.mkosi.skeleton/– Files copied into the image before the package manager runs. Note: with incremental builds, skeleton changes need a full rebuild (-ff).mkosi.extra.comet/– Comet-only files copied in after the OS is installed (USB gadget service, dnsmasq config). Applied on every build.mkosi.version– Image version.build.sh– Rootless, containerized build wrapper (see below).
Install the required tools:
sudo apt update
sudo apt install -y mkosi qemu-system-x86 ovmf debootstrapShow the current mkosi configuration:
mkosi summaryThe root account is disabled.
A regular user named mecha is created during the build.
To set a password for development:
echo "MECHA_USER_PASSWORD=YOUR_PASSWORD" > mkosi.env
chmod 600 mkosi.envmechanix-lockscreen's PIN if left unset, the lockscreen falls back to tap-to-unlock. To provision a PIN on built images, add it to mkosi.env:
echo "MECHANIX_LOCKSCREEN_PIN=YOUR_4_DIGIT_PIN" >> mkosi.envDo not commit mkosi.env.
A profile is always required.
sudo mkosi --profile=comet -f buildBuild a release image:
sudo mkosi --profile=comet,release -f build./build.sh builds inside a podman container and stamps the image version + commit SHA:
./build.sh # incremental comet build (mkosi -f)
./build.sh --force # full rebuild (mkosi -ff)
./build.sh --profile=qemu # other profiles
./build.sh --version=20260813-1200 # override the IMAGE_VERSION stampIncremental builds cache the package-install step. After editing mkosi.skeleton/, rebuild with --force (-ff).
Open a shell inside the built image:
sudo mkosi shellBuild and boot the QEMU image:
./run-qemu.shForce a rebuild before booting:
./run-qemu.sh --buildIf you only want to boot a prebuilt image from GitHub Actions, download the mechanix-os-qemu-raw and run-qemu artifacts, extract them into the same directory, and run:
chmod +x run-qemu.sh
./run-qemu.shThe comet image exposes a USB ethernet gadget (usb0 = 172.16.42.1/24) on
the USB-C/PD port. Use ssh mecha@172.16.42.1 to connect to the device. Only enabled for the comet profile.