From f374625138f6f6197d9873314fa13e418af1617d Mon Sep 17 00:00:00 2001 From: oxmc7769 Date: Mon, 25 May 2026 05:35:24 -0700 Subject: [PATCH] Improve boot.ipxe --- boot.ipxe | 19 ++++++++++--------- build.sh | 12 +----------- 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/boot.ipxe b/boot.ipxe index 3aeba7e16..d3a56a9bd 100644 --- a/boot.ipxe +++ b/boot.ipxe @@ -1,30 +1,31 @@ #!ipxe -# ─── Network ──────────────────────────────────────────────────────────────── +# ─── 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 +# ─── Mac detection ─────────────────────────────────────────────────────────── +# ${manufacturer} contains "Apple Inc." — the space breaks iseq if used as a +# literal, so store it in a variable first so it expands as one token. +set apple Apple Inc. +iseq ${manufacturer} ${apple} && goto mac -# ─── Non-Mac boot ──────────────────────────────────────────────────────────── +# ─── Non-Mac boot ───────────────────────────────────────────────────────────── chain http://${next-server}/default.ipxe || goto failed goto end -# ─── Mac boot ──────────────────────────────────────────────────────────────── +# ─── Mac boot ───────────────────────────────────────────────────────────────── :mac chain http://${next-server}/mac.ipxe || goto failed goto end -# ─── Error handlers ────────────────────────────────────────────────────────── +# ─── Error handlers ─────────────────────────────────────────────────────────── :dhcp_failed echo DHCP failed - no network sleep 5 reboot :failed -echo Chain failed - dropping to shell +echo Chain failed shell :end diff --git a/build.sh b/build.sh index 4b769ef55..ef390e636 100644 --- a/build.sh +++ b/build.sh @@ -107,15 +107,5 @@ BUILT_BIN="$SRC_DIR/$MAKE_TARGET" cp "$BUILT_BIN" "$OUTPUT_DIR/$OUTPUT_NAME" -# Also write a sidecar with build info -cat > "$OUTPUT_DIR/$OUTPUT_NAME.info" </dev/null || echo unknown) -EOF - echo "" -ok "Built: $OUTPUT_DIR/$OUTPUT_NAME" -ok "Info: $OUTPUT_DIR/$OUTPUT_NAME.info" +ok "Built: $OUTPUT_DIR/$OUTPUT_NAME"