aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Percival <cperciva@FreeBSD.org>2023-06-07 22:17:12 +0000
committerColin Percival <cperciva@FreeBSD.org>2023-06-21 19:26:00 +0000
commit1178acf46604c54e2661284af17452c4db6b2f6f (patch)
tree5fa7feef8d85440a141f62664011b7b0482563aa
parent12b3082aa072084d381720cf8af1ed9503d906f2 (diff)
downloadsrc-1178acf46604c54e2661284af17452c4db6b2f6f.tar.gz
src-1178acf46604c54e2661284af17452c4db6b2f6f.zip
EC2: Default to "uefi-preferred" boot mode
In EC2, UEFI boots faster than BIOS, but not all amd64 instance types support UEFI. AMIs need to have their boot mode designated, which created a dilemma: Faster boots, or wider compatibility? The recently added "uefi-preferred" option solves this: AMIs can be marked to use UEFI where it's available, but fall back to BIOS on instance types which do not support UEFI. This uses bsdec2-image-upload 1.4.6, which recently landed in the ports tree. PR: 265697 Reviewed by: delphij, imp MFC after: 1 week Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D40470 (cherry picked from commit bcf9147144f3499976a623f92712ecd0aca71912)
-rw-r--r--release/Makefile.ec25
1 files changed, 4 insertions, 1 deletions
diff --git a/release/Makefile.ec2 b/release/Makefile.ec2
index 3a3f6232333d..035137e61d53 100644
--- a/release/Makefile.ec2
+++ b/release/Makefile.ec2
@@ -25,11 +25,14 @@ SSMOPTS= --ssm-name ${SSMPREFIX}/${TARGET_ARCH:S/aarch64/arm64/}/base/ufs/${REVI
EC2ARCH= --${TARGET_ARCH:S/aarch64/arm64/}
.endif
.if !defined(AMIBOOTMETHOD)
-AMIBOOTMETHOD= UEFI
+AMIBOOTMETHOD= UEFI-PREFERRED
.endif
.if ${AMIBOOTMETHOD} == "UEFI" && ${TARGET_ARCH} == "amd64"
BOOTMODEOPT= --uefi
.endif
+.if ${AMIBOOTMETHOD} == "UEFI-PREFERRED" && ${TARGET_ARCH} == "amd64"
+BOOTMODEOPT= --uefi-preferred
+.endif
CLEANFILES+= ec2ami