stand allow for local.defs.mk

This allows us to change the VERSION_FILE used for loaders
as well as set NEWVERS_DATE and BUILD_UTC to reflect the publish
date of loaders for secure-boot.

Sponsored by:	Juniper Networks, Inc.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D50478
This commit is contained in:
Simon J. Gerraty
2025-05-22 15:47:21 -07:00
parent 4814de3243
commit 2982c70852
4 changed files with 9 additions and 3 deletions
+5 -1
View File
@@ -50,13 +50,17 @@ if [ -n "$SOURCE_DATE_EPOCH" ]; then
exit 1
fi
else
t=`date`
t="${NEWVERS_DATE:-`date`}"
fi
r=`awk -F: ' /^[0-9]\.[0-9]+:/ { print $1; exit }' $1`
bootprog_info="FreeBSD/${3} ${2}, Revision ${r}\\n"
if [ -n "${include_metadata}" ]; then
bootprog_info="$bootprog_info(${t} ${u}@${h})\\n"
if [ -n "$BUILD_UTC" ]; then
# We can use what(1) to extract BUILD_UTC
bootprog_info="$bootprog_info\\0@(#)BUILD_UTC=$BUILD_UTC"
fi
fi
cat > $tempfile <<EOF
+2
View File
@@ -258,4 +258,6 @@ ${_ILINKS}: .NOMETA
${ECHO} ${.TARGET} "->" $$path ; \
ln -fns $$path ${.TARGET}
.endif # !NO_OBJ
.-include "local.defs.mk"
.endif # __BOOT_DEFS_MK__
+1 -1
View File
@@ -87,7 +87,7 @@ CFLAGS+= -DEFI_SECUREBOOT
.endif
NEWVERSWHAT?= "EFI loader" ${MACHINE}
VERSION_FILE= ${.CURDIR}/../loader/version
VERSION_FILE?= ${.CURDIR}/../loader/version
HELP_FILENAME= loader.help.efi
# Always add MI sources
+1 -1
View File
@@ -16,7 +16,7 @@ LOADER?= loader_${LOADER_INTERP}
PROG= ${LOADER}.sym
INTERNALPROG=
NEWVERSWHAT?= "bootstrap loader" x86
VERSION_FILE= ${.CURDIR}/../loader/version
VERSION_FILE?= ${.CURDIR}/../loader/version
#
# There's 640k - 40k maximum space, less however much memory the BIOS uses. A
# non-random survey suggests that 20k-25k is a good value for 'most' machines.