Skip to content

Build ​

Firmware is built on the main branch of the separate kurrent-firmware repository: fetch the pinned upstream iPXE baseline, apply patches, embed scripts and produce UEFI artifacts. The artifacts feed the main repository's TFTP root and boot chain.

Prerequisites ​

  • a Linux x86_64 build host with git, make, gcc, openssl, python3 and sbsigntool (sbsign/sbverify);
  • network access to the upstream iPXE repository; the first build caches the sources;
  • for signed builds, a signing key, a signing certificate and the boot CA certificate; the port and controller address have defaults, described below.

Signed Build ​

bash
git clone https://github.com/dutyc/kurrent-firmware
cd kurrent-firmware
SB_KEY=/path/to/artifact-signing.key \
SB_CERT=/path/to/artifact-signing.crt \
BOOT_CA_CERT=<state>/control-plane/state/pki/ca/boot/ca.crt \
./build/build-sb.sh

A signed build requires a signing key, a signing certificate and the boot CA certificate. The port and controller address may be omitted: the port then defaults to 4443, while the address comes from the DHCP next-server; set CONTROLLER_IP only when the address must be fixed inside the image.

build-sb.sh builds on the ordinary build, embeds the static scripts, the boot CA and the boot HTTPS port, and produces a first stage signed with sbsign. Build inputs, the manifest and provisioning steps are in Secure Boot Provisioning.

The ordinary build ./build/build.sh does not sign; its artifacts are for local debugging and research only, and Secure Boot targets refuse to load them.

bash
./build/build.sh
UPSTREAM_COMMIT=<sha> ./build/build.sh   # Pin an upstream baseline; patches must remain compatible
JOBS=8 ./build/build.sh                  # Parallelism

Pipeline ​

  1. fetch upstream iPXE and check out the pinned baseline (currently e6e51ccb);
  2. apply patches/*.patch in filename order; a patch that does not apply fails the build;
  3. install embed/auto.ipxe as the built-in script for direct-uefi;
  4. build the UEFI targets and copy them to dist/;
  5. generate dist/SHA256SUMS.

Patch baselines and the upgrade flow are in the firmware repository's patches/README. Before upgrading upstream, confirm every patch still applies and rerun QEMU and whole-machine verification.

Artifacts and Verification ​

ArtifactFormPurpose
pxe-uefi/ipxe.efiPXE network bootLoaded by the mainboard PXE chain; scripts come from DHCP
pxe-uefi/snponly.efiPXE network bootDefault first stage
pxe-uefi/ipxe-debug.efi, snponly-debug.efiSame, debugNIC initialization and boot diagnosis
direct-uefi/ipxe.efiDirect UEFI boot, embedded scriptUSB/ESP, local disk or GRUB chainload
direct-uefi/ipxe-debug.efiSame, debugTroubleshooting
direct-uefi/snponly.efiDirect UEFI bootLocal media boot

Selection rules:

ScenarioChoice
Mainboard supports UEFI Network Bootpxe-uefi/snponly.efi, the default first stage
No PXE entry; USB/ESP boot requireddirect-uefi/ipxe.efi
NIC initialization failsThe matching -debug artifact

The main repository uses tftp/snponly.efi by default. Different models may need different first-stage artifacts, while the main branch serves only snponly.efi and does not switch per device; machines that need pxe-uefi/ipxe.efi cannot share a PXE segment with the default first stage, so unify the first-stage artifact before deployment.

The table above describes build.sh; at deployment the first stage is replaced by dist/secureboot/snponly-sb.efi from build-sb.sh, with the same form as pxe-uefi/snponly.efi.

bash
cd dist
sha256sum -c SHA256SUMS

Signed artifact hashes come from artifact_sha256 in dist/secureboot/manifest.json, and /boot-assets compares them with the actual image hash. Release assets use flat names (such as pxe-uefi-snponly.efi) while the checksum file keeps the pxe-uefi/ directory layout; place downloads in that layout before verifying, or compare the target file's digest alone.

What's next ​