- Update flake.nix and package.nix to refresh package definitions and
pins
- Refresh devshell.nix to include updated development dependencies
- Adjust debian/control metadata to match packaging and dependency
changes
- Align packaging metadata between Nix and Debian to improve
reproducibility
Signed-off-by: Martin Wimpress <martin@wimpress.org>
- Remove sed expressions that replaced local SHARE_PATH and removed
Homebrew check
- Rely on existing darwin-specific substitutions and Nix-provided qemu
paths
- Simplify shellHook and avoid accidental replacements on non-Darwin
systems
Signed-off-by: Martin Wimpress <martin@wimpress.org>
- Allow arch override via config (arch="${arch:-x86_64}") and set
ARCH_VM accordingly so aarch64 VMs can be selected from configs.
- Re-detect qemu-system-${ARCH_VM} after sourcing the VM config and
fail fast with a clear error if the appropriate QEMU binary is
missing (e.g. qemu-system-aarch64).
- Use virt machine for ARM64 and enable highmem when required
(MACHINE_TYPE="virt,highmem=on,pflash0=rom,pflash1=efivars").
pflash0/pflash1 reference named blockdev nodes instead of -drive if
using OVMF-style pflash on x86.
- Set CPU selection for ARM64 to "max" when available; fall back to
TCG accel when cross-arch emulation is required (ensures guests
boot on non-ARM hosts).
- Omit x86-only machine options (smm, vmport) for aarch64 builds to
avoid passing unsupported flags to QEMU.
- Add AAVMF/ARM64 firmware search paths and keep OVMF logic for
x86_64 (preserve existing secureboot behaviour for x86 guests).
- Use virtio-gpu-pci for ARM64 (no VGA/virtio-vga on ARM) and add a
ramfb device to provide an early UEFI framebuffer on ARM64 UEFI
boot.
- Use virtio-scsi for CD-ROM on ARM64 (virt has no IDE controller) and
set CD-ROM bootindex=1 so ISO boots before disk when provided.
Set disk bootindex=2 when an ISO is present so disk remains second.
- Implement EFI boot configuration for ARM64 using -blockdev with
named nodes (pflash handled via blockdev) rather than the x86
-drive/secure global approach which is SMM/x86-specific.
- Use the ARM-compatible TPM device (tpm-tis-device) for aarch64
instead of the x86 tpm-tis device where appropriate.
- Fix EFI_CODE condition bug by using -z instead of -n when checking
for empty variables (pre-existing bug surfaced while testing ARM64).
IMPACT:
- Enables running aarch64 guests with proper firmware, machine type,
devices and boot order on both native ARM hosts and non-ARM hosts
(via TCG emulation).
- Maintainers should note the different pflash/blockdev handling and
that -global secure pflash settings used for x86 must NOT be used
for ARM64 virt machines.
Signed-off-by: Martin Wimpress <martin@wimpress.org>
Create macOS VMs with OpenCore embedded in the EFI partition of disk.qcow2
instead of using a separate OpenCore.qcow2 file. This simplifies VM management
by reducing from two disk images to one.
Implementation:
- Add create_macos_disk_with_opencore() using mtools/sgdisk for cross-platform
EFI partition creation without mounting or root privileges
- Add download_opencore() to extract OpenCore files from OSX-KVM image
- Use LC_ALL='' with mcopy to prevent FAT directory name mangling
- Adjust disk size threshold for macOS integrated mode (1GB vs 1.5MB)
Backwards compatibility:
- If OpenCore.qcow2 exists, use legacy two-disk boot method
- If mtools/sgdisk unavailable, fall back to legacy method automatically
New dependencies: mtools, gptfdisk (added to devshell.nix and package.nix)
Closes#1720
Nix's qemu_full bundles EDK2 firmware with different filenames than
quickemu expects. Add darwin-specific sed patterns to:
- Set SHARE_PATH to qemu_full's share directory
- Prepend correct firmware paths (edk2-x86_64-code.fd, edk2-i386-vars.fd)
to the ovmfs search array
- Refresh flake.nix inputs and pins to align with current upstream
- Update devshell.nix to use revised development environment packages
- Adjust package.nix to match dependency and tooling changes from the
flake update
- Keep reproducible builds and developer tooling current
Signed-off-by: Martin Wimpress <martin@wimpress.org>