mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-22 10:48:02 +00:00
EC2: Allow AMI boot mode to be specified
The default boot method for amd64 AMIs is BIOS, but at AMI creation time a flag can be set to specify that UEFI should be used instead. This commit adds a variable AMIBOOTMETHOD which, if set to "UEFI", causes the appropriate flag to be set during AMI creation. The only boot method supported by EC2 for arm64 is UEFI. The names of AMIs are also amended to include the boot method; they now look like "FreeBSD 14.0-CURRENT-amd64-20210915 UEFI". MFC after: 1 week Sponsored by: https://www.patreon.com/cperciva
This commit is contained in:
parent
adb56e58e8
commit
0aa2a94ea6
|
@ -24,6 +24,16 @@ SSMOPTS= --ssm-name ${SSMPREFIX}/${TARGET_ARCH:S/aarch64/arm64/}/base/ufs/${REVI
|
|||
.if ${TARGET_ARCH} != "amd64"
|
||||
EC2ARCH= --${TARGET_ARCH:S/aarch64/arm64/}
|
||||
.endif
|
||||
.if !defined(AMIBOOTMETHOD)
|
||||
.if ${TARGET_ARCH} == "amd64"
|
||||
AMIBOOTMETHOD= BIOS
|
||||
.else
|
||||
AMIBOOTMETHOD= UEFI
|
||||
.endif
|
||||
.endif
|
||||
.if ${AMIBOOTMETHOD} == "UEFI" && ${TARGET_ARCH} == "amd64"
|
||||
BOOTMODEOPT= --uefi
|
||||
.endif
|
||||
|
||||
CLEANFILES+= ec2ami
|
||||
|
||||
|
@ -65,9 +75,9 @@ ec2ami: cw-ec2 ${CW_EC2_PORTINSTALL}
|
|||
@false
|
||||
.endif
|
||||
/usr/local/bin/bsdec2-image-upload ${PUBLISH} ${PUBLICSNAP} \
|
||||
${EC2ARCH} ${SSMOPTS} --sriov --ena \
|
||||
${EC2ARCH} ${SSMOPTS} ${BOOTMODEOPT} --sriov --ena \
|
||||
${.OBJDIR}/ec2.raw \
|
||||
"${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX}" \
|
||||
"${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX} ${AMIBOOTMETHOD}" \
|
||||
"${TYPE}/${TARGET} ${GITBRANCH}@${GITREV}" \
|
||||
${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE} \
|
||||
${EC2SNSTOPIC} ${EC2SNSREL} ${EC2SNSVERS}
|
||||
|
|
Loading…
Reference in a new issue