aboutsummaryrefslogtreecommitdiff
path: root/stand/efi/boot1
diff options
context:
space:
mode:
Diffstat (limited to 'stand/efi/boot1')
-rw-r--r--stand/efi/boot1/Makefile23
-rw-r--r--stand/efi/boot1/Makefile.fat4
-rw-r--r--stand/efi/boot1/fat-amd64.tmpl.xzbin1716 -> 0 bytes
-rw-r--r--stand/efi/boot1/fat-arm.tmpl.xzbin1708 -> 0 bytes
-rw-r--r--stand/efi/boot1/fat-arm64.tmpl.xzbin1720 -> 0 bytes
-rw-r--r--stand/efi/boot1/fat-i386.tmpl.xzbin1724 -> 0 bytes
-rwxr-xr-xstand/efi/boot1/generate-fat.sh79
7 files changed, 0 insertions, 106 deletions
diff --git a/stand/efi/boot1/Makefile b/stand/efi/boot1/Makefile
index 65b7d4f19364..818f76104bdb 100644
--- a/stand/efi/boot1/Makefile
+++ b/stand/efi/boot1/Makefile
@@ -62,9 +62,6 @@ CFLAGS+= -I${LDRSRC}
FILES= ${BOOT1}.efi
FILESMODE_${BOOT1}.efi= ${BINMODE}
-.ifndef(NOFAT)
-FILES+= ${BOOT1}.efifat
-.endif
LDSCRIPT= ${EFISRC}/loader/arch/${MACHINE}/ldscript.${MACHINE}
LDFLAGS+= -Wl,-T${LDSCRIPT},-Bsymbolic,-znotext -shared
@@ -100,24 +97,4 @@ ${BOOT1}.efi: ${PROG}
-j .rela.dyn -j .reloc -j .eh_frame \
--output-target=${EFI_TARGET} ${.ALLSRC} ${.TARGET}
-.ifndef(NOFAT)
-# The following inserts our objects into a template FAT file system
-# created by generate-fat.sh
-
-.include "Makefile.fat"
-
-${BOOT1}.efifat: ${BOOT1}.efi
- @set -- `ls -l ${.ALLSRC}`; \
- x=$$(($$5-${BOOT1_MAXSIZE})); \
- if [ $$x -ge 0 ]; then \
- echo "boot1 $$x bytes too large; regenerate FAT templates?" >&2 ;\
- exit 1; \
- fi
- echo ${.OBJDIR}
- xz -d -c ${BOOTSRC}/efi/boot1/fat-${MACHINE}.tmpl.xz > ${.TARGET}
- ${DD} if=${.ALLSRC} of=${.TARGET} seek=${BOOT1_OFFSET} conv=notrunc
-
-CLEANFILES+= ${BOOT1}.efi ${BOOT1}.efifat
-.endif
-
.include <bsd.prog.mk>
diff --git a/stand/efi/boot1/Makefile.fat b/stand/efi/boot1/Makefile.fat
deleted file mode 100644
index 1d40fa8ab54c..000000000000
--- a/stand/efi/boot1/Makefile.fat
+++ /dev/null
@@ -1,4 +0,0 @@
-# This file autogenerated by generate-fat.sh - DO NOT EDIT
-# $FreeBSD$
-BOOT1_OFFSET=0x2d
-BOOT1_MAXSIZE=393216
diff --git a/stand/efi/boot1/fat-amd64.tmpl.xz b/stand/efi/boot1/fat-amd64.tmpl.xz
deleted file mode 100644
index fe68cd8c2553..000000000000
--- a/stand/efi/boot1/fat-amd64.tmpl.xz
+++ /dev/null
Binary files differ
diff --git a/stand/efi/boot1/fat-arm.tmpl.xz b/stand/efi/boot1/fat-arm.tmpl.xz
deleted file mode 100644
index d8fea4150679..000000000000
--- a/stand/efi/boot1/fat-arm.tmpl.xz
+++ /dev/null
Binary files differ
diff --git a/stand/efi/boot1/fat-arm64.tmpl.xz b/stand/efi/boot1/fat-arm64.tmpl.xz
deleted file mode 100644
index 9e9fea278e41..000000000000
--- a/stand/efi/boot1/fat-arm64.tmpl.xz
+++ /dev/null
Binary files differ
diff --git a/stand/efi/boot1/fat-i386.tmpl.xz b/stand/efi/boot1/fat-i386.tmpl.xz
deleted file mode 100644
index d576a7bcb965..000000000000
--- a/stand/efi/boot1/fat-i386.tmpl.xz
+++ /dev/null
Binary files differ
diff --git a/stand/efi/boot1/generate-fat.sh b/stand/efi/boot1/generate-fat.sh
deleted file mode 100755
index a4389f98074a..000000000000
--- a/stand/efi/boot1/generate-fat.sh
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/bin/sh
-
-# This script generates the dummy FAT filesystem used for the EFI boot
-# blocks. It uses newfs_msdos to generate a template filesystem with the
-# relevant interesting files. These are then found by grep, and the offsets
-# written to a Makefile snippet.
-#
-# Because it requires root, and because it is overkill, we do not
-# do this as part of the normal build. If makefs(8) grows workable FAT
-# support, this should be revisited.
-
-# $FreeBSD$
-
-FAT_SIZE=1600 #Size in 512-byte blocks of the produced image
-
-BOOT1_OFFSET=2d
-BOOT1_SIZE=384k
-
-if [ $(id -u) != 0 ]; then
- echo "${0##*/}: must run as root" >&2
- exit 1
-fi
-
-# Record maximum boot1 size in bytes
-case $BOOT1_SIZE in
-*k)
- BOOT1_MAXSIZE=$(expr ${BOOT1_SIZE%k} '*' 1024)
- ;;
-*)
- BOOT1_MAXSIZE=$BOOT1_SIZE
- ;;
-esac
-
-echo '# This file autogenerated by generate-fat.sh - DO NOT EDIT' > Makefile.fat
-echo "# \$FreeBSD\$" >> Makefile.fat
-echo "BOOT1_OFFSET=0x$BOOT1_OFFSET" >> Makefile.fat
-echo "BOOT1_MAXSIZE=$BOOT1_MAXSIZE" >> Makefile.fat
-
-while read ARCH FILENAME; do
- # Generate 800K FAT image
- OUTPUT_FILE=fat-${ARCH}.tmpl
-
- dd if=/dev/zero of=$OUTPUT_FILE bs=512 count=$FAT_SIZE
- DEVICE=`mdconfig -a -f $OUTPUT_FILE`
- newfs_msdos -F 12 -L EFISYS $DEVICE
- mkdir stub
- mount -t msdosfs /dev/$DEVICE stub
-
- # Create and bless a directory for the boot loader
- mkdir -p stub/efi/boot
-
- # Make a dummy file for boot1
- echo 'Boot1 START' | dd of=stub/efi/boot/$FILENAME cbs=$BOOT1_SIZE count=1 conv=block
- # Provide a fallback startup.nsh
- echo $FILENAME > stub/efi/boot/startup.nsh
-
- umount stub
- mdconfig -d -u $DEVICE
- rmdir stub
-
- # Locate the offset of the fake file
- OFFSET=$(hd $OUTPUT_FILE | grep 'Boot1 START' | cut -f 1 -d ' ')
-
- # Convert to number of blocks
- OFFSET=$(echo 0x$OFFSET | awk '{printf("%x\n",$1/512);}')
-
- # Validate the offset
- if [ $OFFSET != $BOOT1_OFFSET ]; then
- echo "Incorrect offset $OFFSET != $BOOT1_OFFSET" >&2
- exit 1
- fi
-
- xz -f $OUTPUT_FILE
-done <<EOF
- amd64 BOOTx64.efi
- arm64 BOOTaa64.efi
- arm BOOTarm.efi
- i386 BOOTia32.efi
-EOF