From 3db501c80f6c4b639eb2caa014fd597fc78c8f26 Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Thu, 21 Mar 2024 11:30:27 +0100 Subject: [PATCH] ipxedust: add nap.h to arm64 build to set NAP_NULL to support u-boot - see https://github.com/ipxe/ipxe/discussions/605#discussioncomment-2273515 - "This will cause iPXE to leave the CPU spinning instead of putting it to sleep, and will avoid the problems on U-Boot." - Seems harmless on non U-Boot machines -- the CPU will spin during the key timeout (2s?) but that's about it. Signed-off-by: Ricardo Pardini --- binary/script/build_and_pr.sh | 1 + binary/script/build_ipxe.sh | 1 + binary/script/ipxe-customizations/nap.h | 2 ++ 3 files changed, 4 insertions(+) create mode 100644 binary/script/ipxe-customizations/nap.h diff --git a/binary/script/build_and_pr.sh b/binary/script/build_and_pr.sh index 5eedfdb..334b2ae 100755 --- a/binary/script/build_and_pr.sh +++ b/binary/script/build_and_pr.sh @@ -13,6 +13,7 @@ tracked_files=( "./script/ipxe-customizations/general.efi.h" "./script/ipxe-customizations/general.undionly.h" "./script/ipxe-customizations/common.h" + "./script/ipxe-customizations/nap.h" "./script/embed.ipxe" "./script/ipxe.commit" "./ipxe.efi" diff --git a/binary/script/build_ipxe.sh b/binary/script/build_ipxe.sh index 7e67033..e21e8ef 100755 --- a/binary/script/build_ipxe.sh +++ b/binary/script/build_ipxe.sh @@ -63,6 +63,7 @@ function copy_custom_files() { ;; bin-arm64-efi/snp.efi) cp binary/script/ipxe-customizations/general.efi.h "${ipxe_dir}"/src/config/local/general.h + cp binary/script/ipxe-customizations/nap.h "${ipxe_dir}"/src/config/local/nap.h ;; bin-x86_64-efi/ipxe.iso) cp binary/script/ipxe-customizations/general.efi.h "${ipxe_dir}"/src/config/local/general.h diff --git a/binary/script/ipxe-customizations/nap.h b/binary/script/ipxe-customizations/nap.h new file mode 100644 index 0000000..016aa78 --- /dev/null +++ b/binary/script/ipxe-customizations/nap.h @@ -0,0 +1,2 @@ +#undef NAP_EFIARM +#define NAP_NULL