The efifat files are no longer used: remove the code to build them

Reviewed by:	imp, tsoome, emaste
Differential Revision:	https://reviews.freebsd.org/D20562
This commit is contained in:
Rebecca Cran 2019-09-04 20:55:48 +00:00
parent bf5661f4a1
commit 9a2b7c5fce
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=351831
10 changed files with 3 additions and 109 deletions

View file

@ -37,7 +37,9 @@
# -V OLD_FILES -V OLD_LIBS -V OLD_DIRS check-old | \
# xargs -n1 | sort | uniq -d;
# done
# 20190904: Remove boot1.efifat
OLD_FILES+=boot/boot1.efifat
# 20190903: pc-sysinstall(8) removed
OLD_FILES+=usr/share/examples/pc-sysinstall/README
OLD_FILES+=usr/share/examples/pc-sysinstall/pc-autoinstall.conf

View file

@ -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>

View file

@ -1,4 +0,0 @@
# This file autogenerated by generate-fat.sh - DO NOT EDIT
# $FreeBSD$
BOOT1_OFFSET=0x2d
BOOT1_MAXSIZE=393216

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -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

View file

@ -4,7 +4,6 @@
# we don't want the gptboot.efifat thing created.
MK_LOADER_ZFS=no
EFI_DEBUG=yes
NOFAT=yes
BOOT1?= gptboot
.PATH: ${SRCTOP}/stand/efi/boot1 ${SRCTOP}/stand/libsa

View file

@ -618,7 +618,6 @@ OLD_FILES+=boot/boot0
OLD_FILES+=boot/boot0sio
OLD_FILES+=boot/boot1
OLD_FILES+=boot/boot1.efi
OLD_FILES+=boot/boot1.efifat
OLD_FILES+=boot/boot2
OLD_FILES+=boot/brand.4th
OLD_FILES+=boot/cdboot