Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
a9c47ed
Makefile: use machine type for uname
Jan 23, 2026
cd9a704
kmodprobe: Handle missing module gracefuly
Jan 23, 2026
82c0246
cargo: use 'fn_params_layout' due to 'fn_args_layout' being deprecated
Jan 25, 2026
278b706
microgen: Add kernel config validation
Jan 23, 2026
16f61a8
microgen: Call kconfig validation during initramfs creation
Jan 23, 2026
9547ac8
microgen: Validate better filesystems and block devices
Jan 23, 2026
fb3978c
microhop: Add cmdline parser
Jan 23, 2026
2ba4ea5
microhop: Support uuid, label and /dev as rootfs
Jan 23, 2026
536e054
microhop: Adjust mounting of the rootfs to support cmdline arg, uuid …
Jan 23, 2026
09362b7
microhop: Add support for mounting rootfs with flags
Jan 23, 2026
5e72bda
microhop: Add overlayfs support
Jan 23, 2026
a3ccd02
flake: Add nix definitions for microgen and microhop packages. Add al…
Jan 24, 2026
39c28d8
flake: Add lockfile for reproducible builds
Jan 24, 2026
3967292
README: Add section about building using Nix
Jan 24, 2026
ae89a26
git: Ignore the result symlink Nix creates
Jan 24, 2026
1b56acc
nix: Add u-boot package
Jan 24, 2026
0be6590
nix: Add kernel package
Jan 24, 2026
0252351
github: Add workflow to build the Nix packages
Jan 24, 2026
c106eae
CHANGELOG: Add list of all releases
Jan 24, 2026
6090c58
nixos: Add configuration file for microhop
Jan 24, 2026
73e791e
nixos: Add nixos rootfs configuration
Jan 24, 2026
9348a30
nixos: Create initramfs for nixos
Jan 24, 2026
cf4f7a1
nixos: Add system configuration
Jan 24, 2026
20351e9
flake: Add nixos QEMU example boot flow
Jan 24, 2026
47ae448
asciinema: Add render of aarch64 boot in QEMU
Jan 24, 2026
79639bc
microgen: Handle case when there are no modules required for initramfs
Jan 24, 2026
d18cad7
README: Add note how to launch the demo nixos QEMU image
Jan 26, 2026
c752124
flake: Add Cachix mobile-nixos-next to provide binary substitutes
Jan 27, 2026
f6efe41
microgen: Allow to pass list of firmware files
Jan 27, 2026
313e476
microgen: kconfig: Remove unused get_value method
Jan 27, 2026
7db844b
microhop: Handle creation of mount points if they exist
Jan 28, 2026
ed0051d
flake: Ensure the overlay image is cleaned up on exit
Jan 28, 2026
48fb552
microgen: Fix the name of commands for listing block devices and file…
Jan 28, 2026
8a7f42e
flake: Fix importing of kernel and u-boot configuration
Jan 28, 2026
70bbe53
microgen: Fix messages in kernel config validation
Jan 28, 2026
62a5764
microgen: Fix messages in kernel config validation
Jan 28, 2026
1f164f5
cargo: Use fork of kmoddep that fixes kernel module crash
Jan 29, 2026
e2b33f1
microgen: Check if len >=2
Jan 30, 2026
a42edb1
flake: Lock hash for kmoddep for microhop
Jan 30, 2026
e68378b
cargo: update lock file
Jan 30, 2026
4f759b9
flake: kmoddep update
Jan 30, 2026
21bdf6f
microgen: Add command to validate microhop.conf
Jan 30, 2026
7e382d8
microhop: Print error to console if loading config fails
Jan 30, 2026
a754603
microhop: Use info as default log level if invalid level is provided …
Jan 30, 2026
99549fb
microhop: Handle the init args with proper error handling
Jan 30, 2026
24c6c2c
flake: Specify env path for microhop
Jan 30, 2026
b73fe84
microgen: Use environment variable to specify path to microhop
Jan 30, 2026
aca9d7c
flake: Add microhop dependency to microgen (it embeds the binary to t…
Jan 30, 2026
883df53
microhop: Make label case non-sensitive
Jan 30, 2026
70aa26f
microhop: List block devices on failure
Jan 30, 2026
338588c
microgen: Validate better filesystems and block devices
Jan 31, 2026
8314e8d
microgen: Check embedded microhop is ELF file
Jan 31, 2026
a50daf7
microhop: Mask arguments passed on cmdline by bootloader
Feb 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
139 changes: 139 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
name: Build Nix Packages

on:
push:
branches: [ main, master ]
tags:
- '[0-9]*.[0-9]*.[0-9]*'
pull_request:
branches: [ main, master ]
workflow_dispatch:

jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- system: aarch64-linux
package: microhop
runs-on: ubuntu-latest
- system: aarch64-linux
package: microgen
runs-on: ubuntu-latest
- system: x86_64-linux
package: microgen
runs-on: ubuntu-latest

runs-on: ${{ matrix.runs-on }}
name: Build ${{ matrix.package }} (${{ matrix.system }})

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Nix
uses: cachix/install-nix-action@v27
with:
extra_nix_config: |
experimental-features = nix-command flakes
extra-platforms = aarch64-linux x86_64-linux

- name: Setup Cachix
uses: cachix/cachix-action@v15
with:
name: microhop
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
skipPush: ${{ github.event_name == 'pull_request' }}
continue-on-error: true

- name: Configure QEMU for cross-compilation
if: runner.os == 'Linux' && matrix.system == 'aarch64-linux'
run: |
sudo apt-get update -q
sudo apt-get install -y qemu-user-static binfmt-support

- name: Build package
run: |
nix build .#packages.${{ matrix.system }}.${{ matrix.package }} -L

- name: Check build output
run: |
ls -lah result/
nix path-info .#packages.${{ matrix.system }}.${{ matrix.package }}

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.package }}-${{ matrix.system }}
path: result/
retention-days: 7

release:
name: Create Release
if: startsWith(github.ref, 'refs/tags/') && contains(github.ref, '.')
needs: build
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Extract version from tag
id: version
run: |
VERSION=${GITHUB_REF#refs/tags/}
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "tag=$VERSION" >> $GITHUB_OUTPUT

- name: Extract changelog for version
id: changelog
run: |
VERSION="${{ steps.version.outputs.version }}"

CHANGELOG=$(awk "/## \[$VERSION\]/,/## \[/" CHANGELOG.md | sed '1d;$d' | sed '/^$/d')

if [ -z "$CHANGELOG" ]; then
CHANGELOG=$(awk "/## \[Unreleased\]/,/## \[/" CHANGELOG.md | sed '1d;$d' | sed '/^$/d')
fi

if [ -z "$CHANGELOG" ]; then
CHANGELOG="Release version $VERSION"
fi

echo "$CHANGELOG" > changelog_excerpt.txt

echo "content<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts/

- name: Prepare release assets
run: |
mkdir -p release-assets
cd artifacts
for dir in */; do
artifact_name="${dir%/}"
if [ -d "$dir/bin" ]; then
tar -czf "../release-assets/${artifact_name}.tar.gz" -C "$dir" .
fi
done
cd ..
ls -lah release-assets/

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
name: Release ${{ steps.version.outputs.tag }}
body_path: changelog_excerpt.txt
files: release-assets/*.tar.gz
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target
/tmp
/package
/result
62 changes: 62 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.0] - 2026-01-24
### Added
- Nix flake support for building packages
(support for `aarch64-linux` and `x86_64-linux` platforms)
- GitHub workflow for building Nix packages across multiple platforms
(darwin not supported due to 'nixbld' user cleanup issue)
- Add support for `overlayfs` to support read-only rootfs
- Handle missing kernel modules gracefully in runtime
- Add kernel config validation
- Add arguments to specify and validate the filesystem
and block device for rootfs during creation
- Support block devices using also labels
- Add Nix definitions for u-boot and latest stable kernel
- Add support to run qemu-system-aarch64
- Add example minimal Nixos system to boot

## [0.1.0] - 2024-07-10

### Added
- Add analyser of a current system

## [0.0.9] - 2024-07-04

### Added
- Rework CLI into sub-commands

## [0.0.8] - 2024-07-03

### Added
- Bugfix: Default init should be `/sbin/init`
- Bugfix: dependencies ordering

## [0.0.7] - 2024-05-13

### Added
- Implements native CPIO/zstd generator of the initramfs.zst file
(rather then rely on external tools to shell-out)

## [0.0.6] - 2024-05-07

### Added
- Added ability to mount by disk labels
- Fixed bugs for Debian family

## [0.0.5] - 2024-05-05

### Added
- TBD by @isbm

## [0.0.4] - 2024-05-02

### Added
- Mount disks by UUID
- Initial release of microhop - Minimal initramfs /init binary
- Initial release of microgen - Initramfs generator tool
Loading