diff --git a/boot.ipxe b/boot.ipxe new file mode 100644 index 000000000..3aeba7e16 --- /dev/null +++ b/boot.ipxe @@ -0,0 +1,30 @@ +#!ipxe + +# ─── Network ──────────────────────────────────────────────────────────────── +dhcp || goto dhcp_failed + +# ─── Mac detection via SMBIOS manufacturer string ─────────────────────────── +# ${manufacturer} reads SMBIOS Type-1 "Manufacturer" field. +# All Intel Macs report "Apple Inc." here. +iseq ${manufacturer} Apple Inc. && goto mac + +# ─── Non-Mac boot ──────────────────────────────────────────────────────────── +chain http://${next-server}/default.ipxe || goto failed +goto end + +# ─── Mac boot ──────────────────────────────────────────────────────────────── +:mac +chain http://${next-server}/mac.ipxe || goto failed +goto end + +# ─── Error handlers ────────────────────────────────────────────────────────── +:dhcp_failed +echo DHCP failed - no network +sleep 5 +reboot + +:failed +echo Chain failed - dropping to shell +shell + +:end diff --git a/build-mac.sh b/build-mac.sh new file mode 100644 index 000000000..99e52efbd --- /dev/null +++ b/build-mac.sh @@ -0,0 +1,79 @@ +#!/usr/bin/env bash +# ============================================================================= +# Mac-specific iPXE build shortcut +# +# Builds both the native tg3 EFI binary and an SNP fallback, with the +# boot.ipxe script embedded in each. Outputs to ./build/. +# +# Usage: +# ./build-mac.sh [--embed