[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Tue, 10 Sep 2019 13:27:53 +0200
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@xxxxxxxxxx; spf=Pass smtp.mailfrom=roger.pau@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 10 Sep 2019 11:28:24 +0000
  • Ironport-sdr: /3rBKYw756JVmZWgEzNPk0QLkn1eRRzisWUccutIRBnLAXIRS3YQnDwI2u9IHyaCFCUicMwmuB NQO2A298drC7Nm+Ymq0BCxe/mbb3E0GwZjzHNAR7Id9JkXT8LkClbUL78lon9ZUx+jtxKltA9g R5ye+JDm8t135M1CiWfzaVPw2ZdNYCt6oc3RvqNbBFnFxzAK/lWOdLG32JiwI1VffMkT91x3Ax SUQIP6usxQnxmd8dA7NZkJI3moZidPH2CMaqgifhZvig4Bs04ClZCan+TlDSGcynjAxvSWoOce Hp0=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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@xxxxxxxxxx>
---
Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.