Changeset View
Changeset View
Standalone View
Standalone View
sys/boot/efi/boot1/generate-fat.sh
#!/bin/sh | #!/bin/sh | ||||
# This script generates the dummy FAT filesystem used for the EFI boot | # This script generates the dummy FAT filesystem used for the EFI boot | ||||
# blocks. It uses newfs_msdos to generate a template filesystem with the | # blocks. It uses newfs_msdos to generate a template filesystem with the | ||||
# relevant interesting files. These are then found by grep, and the offsets | # relevant interesting files. These are then found by grep, and the offsets | ||||
# written to a Makefile snippet. | # written to a Makefile snippet. | ||||
# | # | ||||
# Because it requires root, and because it is overkill, we do not | # 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 | # do this as part of the normal build. If makefs(8) grows workable FAT | ||||
# support, this should be revisited. | # support, this should be revisited. | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
FAT_SIZE=1600 #Size in 512-byte blocks of the produced image | FAT_SIZE=1600 #Size in 512-byte blocks of the produced image | ||||
BOOT1_SIZE=128k | BOOT1_SIZE=512k | ||||
emaste: I would like to have room for 2 copies of the boot1.efi at least, to allow users to keep a… | |||||
impUnsubmitted Not Done Inline ActionsSure. I don't care since the installboot(8) script I'm working on will make all this stuff obsolete. imp: Sure. I don't care since the installboot(8) script I'm working on will make all this stuff… | |||||
# | # | ||||
# Known filenames | # Known filenames | ||||
# amd64: BOOTx64.efi | # amd64: BOOTx64.efi | ||||
# arm64: BOOTaa64.efi | # arm64: BOOTaa64.efi | ||||
# arm: BOOTarm.efi | # arm: BOOTarm.efi | ||||
# i386: BOOTia32.efi | # i386: BOOTia32.efi | ||||
# | # | ||||
▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | *) | ||||
;; | ;; | ||||
esac | esac | ||||
echo '# This file autogenerated by generate-fat.sh - DO NOT EDIT' > Makefile.fat | echo '# This file autogenerated by generate-fat.sh - DO NOT EDIT' > Makefile.fat | ||||
echo "# \$FreeBSD\$" >> Makefile.fat | echo "# \$FreeBSD\$" >> Makefile.fat | ||||
echo "BOOT1_OFFSET=0x$BOOT1_OFFSET" >> Makefile.fat | echo "BOOT1_OFFSET=0x$BOOT1_OFFSET" >> Makefile.fat | ||||
echo "BOOT1_MAXSIZE=$BOOT1_MAXSIZE" >> Makefile.fat | echo "BOOT1_MAXSIZE=$BOOT1_MAXSIZE" >> Makefile.fat | ||||
bzip2 $OUTPUT_FILE | xz $OUTPUT_FILE | ||||
echo 'FAT template boot filesystem created by generate-fat.sh' > $OUTPUT_FILE.bz2.uu | |||||
echo 'DO NOT EDIT' >> $OUTPUT_FILE.bz2.uu | |||||
echo "\$FreeBSD\$" >> $OUTPUT_FILE.bz2.uu | |||||
uuencode $OUTPUT_FILE.bz2 $OUTPUT_FILE.bz2 >> $OUTPUT_FILE.bz2.uu | |||||
rm $OUTPUT_FILE.bz2 | |||||
I would like to have room for 2 copies of the boot1.efi at least, to allow users to keep a backup etc.
How about 384k for now?