pxeboot: Allow a different default loader for pxeboot

Sometimes you need / want a different boot loader than loader_lua for
pkeldr. Provide an option to get either the 4th one or the simp one.

MFC After:		3 days
Sponsored by:		Netflix
Reviewed by:		markj
Differential Revision:	https://reviews.freebsd.org/D46213

(cherry picked from commit f4762e9135d181f5d4f2a9d688ff803ee53ad808)
This commit is contained in:
Warner Losh 2024-08-05 15:19:29 -06:00
parent f18b9b2b95
commit c19ac840d3
2 changed files with 10 additions and 1 deletions

View file

@ -21,6 +21,11 @@ SUBDIR.yes+= pxeldr
SUBDIR.${MK_LOADER_ZFS}+= zfsboot gptzfsboot
SUBDIR_DEPEND_pxeldr+= loader_${LOADER_DEFAULT_INTERP}
.if defined(PXEBOOT_DEFAULT_INTERP)
L=${PXEBOOT_DEFAULT_INTERP}
.else
L=${LOADER_DEFAULT_INTERP}
.endif
SUBDIR_DEPEND_pxeldr+= loader_${L}
.include <bsd.subdir.mk>

View file

@ -23,7 +23,11 @@ CFLAGS+=-DALWAYS_SERIAL
CFLAGS+=-I${BOOTSRC}/i386/common
.if defined(PXEBOOT_DEFAULT_INTERP)
L=${PXEBOOT_DEFAULT_INTERP}
.else
L=${LOADER_DEFAULT_INTERP}
.endif
LOADERBIN= ${BOOTOBJ}/i386/loader_${L}/loader_${L}.bin
CLEANFILES+= ${BOOT}.tmp