Page MenuHomeFreeBSD

D20562.diff
No OneTemporary

D20562.diff

Index: ObsoleteFiles.inc
===================================================================
--- ObsoleteFiles.inc
+++ ObsoleteFiles.inc
@@ -38,6 +38,9 @@
# xargs -n1 | sort | uniq -d;
# done
+# 20190825: Remove old boot1 efi files
+OLD_FILES+=boot/boot1.efifat
+
# 20190817: pft_ping.py and sniffer.py moved to /usr/tests/sys/netpfil/common
OLD_FILES+=usr/tests/sys/netpfil/pf/sniffer.py
OLD_FILES+=usr/tests/sys/netpfil/pf/pft_ping.py
Index: stand/efi/boot1/Makefile
===================================================================
--- stand/efi/boot1/Makefile
+++ stand/efi/boot1/Makefile
@@ -62,9 +62,6 @@
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 @@
-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>
Index: stand/efi/boot1/Makefile.fat
===================================================================
--- 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
Index: stand/efi/boot1/generate-fat.sh
===================================================================
--- 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
Index: stand/efi/gptboot/Makefile
===================================================================
--- stand/efi/gptboot/Makefile
+++ stand/efi/gptboot/Makefile
@@ -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
Index: tools/build/mk/OptionalObsoleteFiles.inc
===================================================================
--- tools/build/mk/OptionalObsoleteFiles.inc
+++ tools/build/mk/OptionalObsoleteFiles.inc
@@ -618,7 +618,6 @@
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

File Metadata

Mime Type
text/plain
Expires
Sun, Feb 2, 8:37 AM (20 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16398393
Default Alt Text
D20562.diff (4 KB)

Event Timeline