[Xen-devel] [PATCH] freebsd-build: fix building efifat after r351831

Roger Pau Monne posted 1 patch 1 week ago
Failed in applying to current master (apply log)
ts-freebsd-build | 12 ++++++++++++
1 file changed, 12 insertions(+)

[Xen-devel] [PATCH] freebsd-build: fix building efifat after r351831

Posted by Roger Pau Monne 1 week ago
FreeBSD revisions after r351831 no longer automatically build an
efifat partition image, and makefs should be used instead if such file
is required.

Do this and add logic to build the efifat partition ourselves if it's
not present in the output of the build.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Ian Jackson <Ian.Jackson@citrix.com>
---
 ts-freebsd-build | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/ts-freebsd-build b/ts-freebsd-build
index bdf666eb..a34d3ae7 100755
--- a/ts-freebsd-build
+++ b/ts-freebsd-build
@@ -189,6 +189,18 @@ gzip $output.tmp/boot/kernel/kernel
 
 makefs -B little $output.part $output.tmp
 
+# NB: since r351831 efifat files are no longer automatically generated.
+if [ ! -f $target/boot/boot1.efifat ]; then
+    # Create an EFI partition using the FAT filesystem
+    mkdir -p $output.efi/EFI/BOOT
+    cp $target/boot/loader.efi $output.efi/EFI/BOOT/bootx64.efi
+    size=`stat -f%z $output.efi/EFI/BOOT/bootx64.efi`
+    size=`expr $size + $size / 2`
+    makefs -t msdos -o fat_type=32 -o sectors_per_cluster=1 \
+        -o volume_label=EFISYS -s $size $target/boot/boot1.efifat $output.efi
+    rm -rf $output.efi
+fi
+
 mkimg -s gpt -b $target/boot/pmbr -p efi:=$target/boot/boot1.efifat \
     -p freebsd-boot:=$target/boot/gptboot -p freebsd-ufs:=$output.part \
     -p freebsd-swap::1M -o $output
-- 
2.22.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH] freebsd-build: fix building efifat after r351831

Posted by Ian Jackson 1 week ago
Roger Pau Monne writes ("[PATCH] freebsd-build: fix building efifat after r351831"):
> FreeBSD revisions after r351831 no longer automatically build an
> efifat partition image, and makefs should be used instead if such file
> is required.
> 
> Do this and add logic to build the efifat partition ourselves if it's
> not present in the output of the build.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

And pushed to pretest, thanks.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel