The branch stable/15 has been updated by lwhsu:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=72617603a28fb19d45b1aac380f998c4551d5f72

commit 72617603a28fb19d45b1aac380f998c4551d5f72
Author:     Li-Wen Hsu <[email protected]>
AuthorDate: 2025-11-07 05:10:44 +0000
Commit:     Li-Wen Hsu <[email protected]>
CommitDate: 2025-11-07 05:12:38 +0000

    release: Comply with Azure Marketplace requirements for aarch64
    
    Azure requires the first 1 MB (2,048 sectors) of the OS disk to remain
    empty for VM images:
    
      
https://learn.microsoft.com/partner-center/marketplace-offers/azure-vm-certification-faq#vm-images-must-have-1-mb-of-free-space
    
    Also append the BOOTPARTSOFFSET suffix for aarch64 images, which only
    has an ESP partition for booting.
    
    Co-authored-by: Brad Davis <[email protected]>
    Approved by:    cperciva
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D53628
    
    (cherry picked from commit 36095c942031f7f1613eec554f1c7615cbd891fd)
---
 release/tools/vmimage.subr | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr
index 8531e9b8f2d6..92f00f9cf7c3 100644
--- a/release/tools/vmimage.subr
+++ b/release/tools/vmimage.subr
@@ -449,7 +449,11 @@ vm_create_disk() {
                # Create an ESP
                espfilename=$(mktemp /tmp/efiboot.XXXXXX)
                make_esp_file ${espfilename} ${fat32min} 
${BOOTFILES}/efi/loader_lua/loader_lua.efi
-               BOOTPARTS="${BOOTPARTS} -p efi/efiboot0:=${espfilename}"
+               espsuffix=""
+               if [ -z "${BOOTPARTS}" ]; then
+                       espsuffix="${BOOTPARTSOFFSET}"
+               fi
+               BOOTPARTS="${BOOTPARTS} -p 
efi/efiboot0:=${espfilename}${espsuffix}"
 
                # Add this to fstab
                mkdir -p ${DESTDIR}/boot/efi

Reply via email to