summaryrefslogtreecommitdiffstats
path: root/sys/boot
diff options
context:
space:
mode:
authorbr <br@FreeBSD.org>2015-03-02 18:08:39 +0000
committerbr <br@FreeBSD.org>2015-03-02 18:08:39 +0000
commit2f529cb85895ef8cba5b807745f9f20819542240 (patch)
treec4e60ae3fa65f7d540074f29d68ad218b0fad4e2 /sys/boot
parent9ffc8ca9a2640c7ab60180395209ce0a54fe0ff4 (diff)
downloadFreeBSD-src-2f529cb85895ef8cba5b807745f9f20819542240.zip
FreeBSD-src-2f529cb85895ef8cba5b807745f9f20819542240.tar.gz
o Add more room for EFI boot blocks
o Specify the filename as argument Differential Revision: https://reviews.freebsd.org/D1999 Reviewed by: emaste@
Diffstat (limited to 'sys/boot')
-rwxr-xr-xsys/boot/amd64/boot1.efi/generate-fat.sh16
1 files changed, 14 insertions, 2 deletions
diff --git a/sys/boot/amd64/boot1.efi/generate-fat.sh b/sys/boot/amd64/boot1.efi/generate-fat.sh
index 04d0ed2..2688da3 100755
--- a/sys/boot/amd64/boot1.efi/generate-fat.sh
+++ b/sys/boot/amd64/boot1.efi/generate-fat.sh
@@ -13,7 +13,19 @@
FAT_SIZE=1600 #Size in 512-byte blocks of the produced image
-BOOT1_SIZE=64k
+BOOT1_SIZE=128k
+
+#
+# Known filenames
+# amd64: BOOTx64.efi
+# arm64: BOOTaa64.efi
+#
+if [ -z "$1" ]; then
+ echo "Usage: $0 filename"
+ exit 1
+fi
+
+FILENAME=$1
# Generate 800K FAT image
OUTPUT_FILE=fat.tmpl
@@ -28,7 +40,7 @@ mount -t msdosfs /dev/$DEVICE stub
mkdir -p stub/efi/boot
# Make a dummy file for boot1
-echo 'Boot1 START' | dd of=stub/efi/boot/BOOTx64.efi cbs=$BOOT1_SIZE count=1 conv=block
+echo 'Boot1 START' | dd of=stub/efi/boot/$FILENAME cbs=$BOOT1_SIZE count=1 conv=block
umount stub
mdconfig -d -u $DEVICE
OpenPOWER on IntegriCloud