Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Nov 2017 23:54:58 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r325694 - in head/sys/boot: . arm/uboot efi/boot1 efi/fdt efi/libefi efi/loader efi/loader/arch/arm64 ficl forth geli i386/boot2 i386/gptboot i386/gptzfsboot i386/libfirewire i386/libi3...
Message-ID:  <201711102354.vAANswm3075262@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Fri Nov 10 23:54:58 2017
New Revision: 325694
URL: https://svnweb.freebsd.org/changeset/base/325694

Log:
  Install the 4th files in sys/boot/forth instead of each loader
  
  Also, move generation of loader.help into loader.mk. Set HELP_FILES=
  to disable this (so we only install one help file, for now). At the
  same time remove some duplicate -I lines. Fix several FILES= and
  CLEANFILES= into the += form since we're touching both of those in the
  .mk files. Make sure we only build one loader.help file per platform
  in a unified way (we were building many on some, with the last to
  install winning, though often they were the same text).
  
  Also, we're now installing loader.rc and menu.rc everywhere. arm and
  mips uboot installed these as menu.rc.sample, but there's no need
  since the loader.rc for those platforms doesn't do menu.rc processing
  by default. pcibios.4th is now installed everywhere, but will failsafe
  on non x86 platforms (it isn't loaded by default anywhere).
  
  These changes are too intertwined to do separately since aspects of
  each are required to have a bug-free commit.
  
  Sponsored by: Netflix

Deleted:
  head/sys/boot/forth/Makefile.inc
Modified:
  head/sys/boot/arm/uboot/Makefile
  head/sys/boot/defs.mk
  head/sys/boot/efi/boot1/Makefile
  head/sys/boot/efi/fdt/Makefile
  head/sys/boot/efi/libefi/Makefile
  head/sys/boot/efi/loader/Makefile
  head/sys/boot/efi/loader/arch/arm64/Makefile.inc
  head/sys/boot/ficl/Makefile
  head/sys/boot/forth/Makefile
  head/sys/boot/geli/Makefile
  head/sys/boot/i386/boot2/Makefile
  head/sys/boot/i386/gptboot/Makefile
  head/sys/boot/i386/gptzfsboot/Makefile
  head/sys/boot/i386/libfirewire/Makefile
  head/sys/boot/i386/libi386/Makefile
  head/sys/boot/i386/loader/Makefile
  head/sys/boot/i386/pxeldr/Makefile
  head/sys/boot/i386/zfsboot/Makefile
  head/sys/boot/i386/zfsloader/Makefile
  head/sys/boot/libsa/Makefile
  head/sys/boot/libsa32/Makefile
  head/sys/boot/loader.mk
  head/sys/boot/mips/beri/boot2/Makefile
  head/sys/boot/mips/beri/loader/Makefile
  head/sys/boot/mips/uboot/Makefile
  head/sys/boot/ofw/libofw/Makefile
  head/sys/boot/powerpc/boot1.chrp/Makefile
  head/sys/boot/powerpc/kboot/Makefile
  head/sys/boot/powerpc/ofw/Makefile
  head/sys/boot/powerpc/ps3/Makefile
  head/sys/boot/powerpc/uboot/Makefile
  head/sys/boot/sparc64/boot1/Makefile
  head/sys/boot/sparc64/loader/Makefile
  head/sys/boot/uboot/fdt/Makefile
  head/sys/boot/uboot/lib/Makefile
  head/sys/boot/userboot/test/Makefile
  head/sys/boot/userboot/userboot/Makefile
  head/sys/boot/zfs/Makefile

Modified: head/sys/boot/arm/uboot/Makefile
==============================================================================
--- head/sys/boot/arm/uboot/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/arm/uboot/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -12,7 +12,7 @@ LOADER_BZIP2_SUPPORT?=	no
 
 .include <bsd.init.mk>
 
-FILES=		ubldr ubldr.bin
+FILES+=		ubldr ubldr.bin
 
 NEWVERSWHAT=	"U-Boot loader" ${MACHINE_ARCH}
 INSTALLFLAGS=	-b
@@ -28,12 +28,11 @@ SRCS=		start.S conf.c self_reloc.c vers.c
 CWARNFLAGS.self_reloc.c+=	-Wno-error=maybe-uninitialized
 .endif
 
+HELP_FILES+=	 help.uboot ${BOOTSRC}/fdt/help.fdt
+
 # Always add MI sources
 .include	"${BOOTSRC}/loader.mk"
-CFLAGS+=	-I.
 
-CLEANFILES+=	loader.help
-
 CFLAGS+=	-ffreestanding -msoft-float
 
 LDFLAGS=	-nostdlib -static -T ${.CURDIR}/ldscript.${MACHINE_CPUARCH}
@@ -49,10 +48,6 @@ LDADD=		${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FD
 
 OBJS+=  ${SRCS:N*.h:R:S/$/.o/g}
 
-loader.help: help.common help.uboot ${BOOTSRC}/fdt/help.fdt
-	cat ${.ALLSRC} | \
-	    awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
-
 ldscript.abs:
 	echo "UBLDR_LOADADDR = ${UBLDR_LOADADDR};" >${.TARGET}
 
@@ -71,16 +66,5 @@ ubldr.bin: ubldr.pie
 	${OBJCOPY} -S -O binary ubldr.pie ${.TARGET}
 
 CLEANFILES+=	ldscript.abs ldscript.pie ubldr ubldr.pie ubldr.bin
-
-.if !defined(LOADER_ONLY)
-.PATH: ${BOOTSRC}/forth
-.include	"${BOOTSRC}/forth/Makefile.inc"
-
-# Install loader.rc.
-FILES+=	loader.rc
-# Put sample menu.rc on disk but don't enable it by default.
-FILES+=	menu.rc
-FILESNAME_menu.rc=	menu.rc.sample
-.endif
 
 .include <bsd.prog.mk>

Modified: head/sys/boot/defs.mk
==============================================================================
--- head/sys/boot/defs.mk	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/defs.mk	Fri Nov 10 23:54:58 2017	(r325694)
@@ -122,6 +122,9 @@ LD_FLAGS+=	-m elf_i386_fbsd
 AFLAGS+=	--32
 .endif
 
+# Make sure we use the machine link we're about to create
+CFLAGS+=-I.
+
 _ILINKS=machine
 .if ${MACHINE} != ${MACHINE_CPUARCH} && ${MACHINE} != "arm64"
 _ILINKS+=${MACHINE_CPUARCH}
@@ -160,5 +163,9 @@ ${_ILINKS}:
 	path=`(cd $$path && /bin/pwd)` ; \
 	${ECHO} ${.TARGET:T} "->" $$path ; \
 	ln -fhs $$path ${.TARGET:T}
+
+# For loader implementations, we generate a loader.help file. This can be suppressed by
+# setting HELP_FILES to nothing.
+HELP_FILES=	${LDRSRC}/help.common
 
 .endif # __BOOT_DEFS_MK__

Modified: head/sys/boot/efi/boot1/Makefile
==============================================================================
--- head/sys/boot/efi/boot1/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/efi/boot1/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -41,11 +41,9 @@ LIBZFSBOOT=	${BOOTOBJ}/zfs/libzfsboot.a
 CWARNFLAGS.self_reloc.c+=	-Wno-error=maybe-uninitialized
 .endif
 
-CFLAGS+=	-I.
 CFLAGS+=	-I${EFIINC}
 CFLAGS+=	-I${EFIINCMD}
 CFLAGS+=	-I${SYSDIR}/contrib/dev/acpica/include
-CFLAGS+=	-I${SYSDIR}
 CFLAGS+=	-DEFI_UFS_BOOT
 .ifdef(EFI_DEBUG)
 CFLAGS+=	-DEFI_DEBUG
@@ -126,6 +124,6 @@ boot1.efifat: boot1.efi
 	xz -d -c ${.CURDIR}/fat-${MACHINE}.tmpl.xz > ${.TARGET}
 	${DD} if=${.ALLSRC} of=${.TARGET} seek=${BOOT1_OFFSET} conv=notrunc
 
-CLEANFILES= boot1.efi boot1.efifat
+CLEANFILES+= boot1.efi boot1.efifat
 
 .include <bsd.prog.mk>

Modified: head/sys/boot/efi/fdt/Makefile
==============================================================================
--- head/sys/boot/efi/fdt/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/efi/fdt/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -25,6 +25,6 @@ CFLAGS+=	-I${EFISRC}/include/${MACHINE}
 CFLAGS+=	-I${FDTSRC}
 
 # Pick up the bootstrap header for some interface items
-CFLAGS+=	-I${LDRSRC} -I${SYSDIR} -I.
+CFLAGS+=	-I${LDRSRC}
 
 .include <bsd.lib.mk>

Modified: head/sys/boot/efi/libefi/Makefile
==============================================================================
--- head/sys/boot/efi/libefi/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/efi/libefi/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -34,7 +34,6 @@ CFLAGS+=	-mgeneral-regs-only
 .if ${MACHINE_ARCH} == "amd64"
 CFLAGS+= -fPIC -mno-red-zone
 .endif
-CFLAGS+= -I${SYSDIR}
 CFLAGS+= -I${EFIINC}
 CFLAGS+= -I${EFIINCMD}
 .if ${MK_ZFS} != "no"

Modified: head/sys/boot/efi/loader/Makefile
==============================================================================
--- head/sys/boot/efi/loader/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/efi/loader/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -55,7 +55,6 @@ CFLAGS+=	-I${.CURDIR}/arch/${MACHINE}
 CFLAGS+=	-I${EFISRC}/include
 CFLAGS+=	-I${EFISRC}/include/${MACHINE}
 CFLAGS+=	-I${SYSDIR}/contrib/dev/acpica/include
-CFLAGS+=	-I${SYSDIR}
 CFLAGS+=	-I${BOOTSRC}/i386/libi386
 CFLAGS+=	-DNO_PCI -DEFI
 
@@ -84,6 +83,7 @@ CFLAGS+=	-DEFI_STAGING_SIZE=${EFI_STAGING_SIZE}
 .endif
 
 # Always add MI sources
+HELP_FILES=
 .include	"${BOOTSRC}/loader.mk"
 
 FILES+=	loader.efi

Modified: head/sys/boot/efi/loader/arch/arm64/Makefile.inc
==============================================================================
--- head/sys/boot/efi/loader/arch/arm64/Makefile.inc	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/efi/loader/arch/arm64/Makefile.inc	Fri Nov 10 23:54:58 2017	(r325694)
@@ -10,16 +10,3 @@ CFLAGS+=-I${BOOTSRC}/arm64/libarm64
 SRCS+=	cache.c
 
 CFLAGS+=	-mgeneral-regs-only
-
-CLEANFILES+=	loader.help
-
-loader.help: help.common
-	cat ${.ALLSRC} | \
-	    awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
-
-.if !defined(LOADER_ONLY)
-.PATH: ${BOOTSRC}/forth
-.include	"${BOOTSRC}/forth/Makefile.inc"
-
-FILES+=	loader.rc
-.endif

Modified: head/sys/boot/ficl/Makefile
==============================================================================
--- head/sys/boot/ficl/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/ficl/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -8,7 +8,7 @@ BASE_SRCS=	dict.c ficl.c fileaccess.c float.c loader.c
 		prefix.c search.c stack.c tools.c vm.c words.c
 
 SRCS=		${BASE_SRCS} sysdep.c softcore.c
-CLEANFILES=	softcore.c testmain testmain.o
+CLEANFILES+=	softcore.c testmain testmain.o
 
 .include <bsd.stand.mk>
 .ifmake testmain

Modified: head/sys/boot/forth/Makefile
==============================================================================
--- head/sys/boot/forth/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/forth/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -11,4 +11,33 @@ MAN+=	beastie.4th.8 \
 	menusets.4th.8 \
 	version.4th.8
 
+FILES+=	beastie.4th
+FILES+=	brand.4th
+FILES+=	brand-fbsd.4th
+FILES+=	check-password.4th
+FILES+=	color.4th
+FILES+=	delay.4th
+FILES+=	efi.4th
+FILES+=	frames.4th
+FILES+=	loader.4th
+FILES+=	loader.conf
+FILES+=	logo-beastie.4th
+FILES+=	logo-beastiebw.4th
+FILES+=	logo-fbsdbw.4th
+FILES+=	logo-orb.4th
+FILES+=	logo-orbbw.4th
+FILES+=	menu.4th
+FILES+=	menu-commands.4th
+FILES+=	menusets.4th
+FILES+=	pcibios.4th
+FILES+=	screen.4th
+FILES+=	shortcuts.4th
+FILES+=	support.4th
+FILES+=	version.4th
+FILESDIR_loader.conf=	/boot/defaults
+
+# Everybody has these, but you can override
+.PATH:	${BOOTSRC}/${MACHINE:C/amd64/i386/}/common ${BOOTSRC}/forth
+FILES+= loader.rc menu.rc
+
 .include <bsd.prog.mk>

Modified: head/sys/boot/geli/Makefile
==============================================================================
--- head/sys/boot/geli/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/geli/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -38,7 +38,6 @@ SRCS+=		md5c.c
 
 # AES implementation from sys/crypto
 .PATH: ${SYSDIR}/crypto/rijndael
-CFLAGS+=	-I${SYSDIR}
 CFLAGS+=	-I${LDRSRC}
 # Remove asserts
 CFLAGS+=	-DNDEBUG

Modified: head/sys/boot/i386/boot2/Makefile
==============================================================================
--- head/sys/boot/i386/boot2/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/i386/boot2/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -31,7 +31,7 @@ CFLAGS+=-fomit-frame-pointer \
 	-DSIOFMT=${B2SIOFMT} \
 	-DSIOSPD=${BOOT_COMCONSOLE_SPEED} \
 	-I${LDRSRC} \
-	-I${BTXLIB} -I. \
+	-I${BTXLIB} \
 	-Wall -Waggregate-return -Wbad-function-cast -Wno-cast-align \
 	-Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
 	-Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \
@@ -48,7 +48,7 @@ CFLAGS.clang+=	-Oz ${CLANG_OPT_SMALL}
 
 LD_FLAGS+=${LD_FLAGS_BIN}
 
-CLEANFILES=	boot
+CLEANFILES+=	boot
 
 boot: boot1 boot2
 	cat boot1 boot2 > boot

Modified: head/sys/boot/i386/gptboot/Makefile
==============================================================================
--- head/sys/boot/i386/gptboot/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/i386/gptboot/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -33,9 +33,8 @@ CFLAGS+=-DBOOTPROG=\"gptboot\" \
 	-DSIOSPD=${BOOT_COMCONSOLE_SPEED} \
 	-I${LDRSRC} \
 	-I${BOOTSRC}/i386/common \
-	-I${BTXLIB} -I. \
+	-I${BTXLIB} \
 	-I${BOOTSRC}/i386/boot2 \
-	-I${SYSDIR} \
 	-Wall -Waggregate-return -Wbad-function-cast -Wno-cast-align \
 	-Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
 	-Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \
@@ -45,7 +44,7 @@ CFLAGS.gcc+=	--param max-inline-insns-single=100
 
 LD_FLAGS+=${LD_FLAGS_BIN}
 
-CLEANFILES=	gptboot
+CLEANFILES+=	gptboot
 
 gptboot: gptldr.bin gptboot.bin ${BTXKERN}
 	btxld -v -E ${ORG2} -f bin -b ${BTXKERN} -l gptldr.bin \

Modified: head/sys/boot/i386/gptzfsboot/Makefile
==============================================================================
--- head/sys/boot/i386/gptzfsboot/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/i386/gptzfsboot/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -31,9 +31,8 @@ CFLAGS+=-DBOOTPROG=\"gptzfsboot\" \
 	-I${BOOTSRC}/i386/common \
 	-I${ZFSSRC} \
 	-I${SYSDIR}/cddl/boot/zfs \
-	-I${BOOTSRC}/i386/btx/lib -I. \
+	-I${BOOTSRC}/i386/btx/lib \
 	-I${BOOTSRC}/i386/boot2 \
-	-I${SYSDIR} \
 	-Wall -Waggregate-return -Wbad-function-cast \
 	-Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
 	-Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \
@@ -56,7 +55,7 @@ CFLAGS.gcc+=	--param max-inline-insns-single=100
 
 LD_FLAGS+=${LD_FLAGS_BIN}
 
-CLEANFILES=	gptzfsboot
+CLEANFILES+=	gptzfsboot
 
 gptzfsboot: gptldr.bin gptzfsboot.bin ${BTXKERN}
 	btxld -v -E ${ORG2} -f bin -b ${BTXKERN} -l gptldr.bin \

Modified: head/sys/boot/i386/libfirewire/Makefile
==============================================================================
--- head/sys/boot/i386/libfirewire/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/i386/libfirewire/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -11,7 +11,7 @@ SRCS+=		dcons.c fwcrom.c
 
 CFLAGS+=	-D_BOOT
 
-CFLAGS+=	-I${LDRSRC} -I${SYSDIR} -I.
+CFLAGS+=	-I${LDRSRC}
 CFLAGS+=	-I${BTXLIB}
 CFLAGS+=	-I${BOOTSRC}/i386/libi386
 

Modified: head/sys/boot/i386/libi386/Makefile
==============================================================================
--- head/sys/boot/i386/libi386/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/i386/libi386/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -49,8 +49,7 @@ CFLAGS+= -Dalloca=__builtin_alloca
 CFLAGS+=	-I${BOOTSRC}/ficl -I${BOOTSRC}/ficl/i386 \
 		-I${LDRSRC} -I${BOOTSRC}/i386/common \
 		-I${BTXLIB} \
-		-I${SYSDIR}/contrib/dev/acpica/include \
-		-I${SYSDIR} -I.
+		-I${SYSDIR}/contrib/dev/acpica/include
 
 # Handle FreeBSD specific %b and %D printf format specifiers
 CFLAGS+= ${FORMAT_EXTENSIONS}

Modified: head/sys/boot/i386/loader/Makefile
==============================================================================
--- head/sys/boot/i386/loader/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/i386/loader/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -40,11 +40,16 @@ CFLAGS+=	-DLOADER_FIREWIRE_SUPPORT
 LIBFIREWIRE=	${BOOTOBJ}/i386/libfirewire/libfirewire.a
 .endif
 
+.if exists(${.CURDIR}/help.i386)
+HELP_FILES+=	help.i386
+.else
+HELP_FILES=
+.endif
+
 # Always add MI sources
 .include	"${BOOTSRC}/loader.mk"
-CFLAGS+=	-I.
 
-CLEANFILES=	${LOADER} ${LOADER}.bin loader.help
+CLEANFILES+=	${LOADER} ${LOADER}.bin
 
 CFLAGS+=	-Wall
 LDFLAGS+=	-static -Ttext 0x0
@@ -67,20 +72,9 @@ ${LOADER}: ${LOADER}.bin ${BTXLDR} ${BTXKERN}
 ${LOADER}.bin: ${LOADER}.sym
 	strip -R .comment -R .note -o ${.TARGET} ${.ALLSRC}
 
-loader.help: help.common help.i386
-	cat ${.ALLSRC} | awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
-
-FILES=	${LOADER}
+FILES+=	${LOADER}
 # XXX INSTALLFLAGS_loader= -b
 FILESMODE_${LOADER}= ${BINMODE} -b
-
-.if !defined(LOADER_ONLY)
-.PATH: ${BOOTSRC}/forth
-.include	"${BOOTSRC}/forth/Makefile.inc"
-FILES+=	pcibios.4th
-
-FILES+=	loader.rc menu.rc
-.endif
 
 # XXX crt0.o needs to be first for pxeboot(8) to work
 OBJS=	${BTXCRT}

Modified: head/sys/boot/i386/pxeldr/Makefile
==============================================================================
--- head/sys/boot/i386/pxeldr/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/i386/pxeldr/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -7,7 +7,7 @@ INTERNALPROG=
 FILES=	${BOOT}
 MAN=	${BOOT}.8
 SRCS=	${LDR}.S
-CLEANFILES= ${BOOT}
+CLEANFILES+= ${BOOT}
 
 BOOT=	pxeboot
 LDR=	pxeldr

Modified: head/sys/boot/i386/zfsboot/Makefile
==============================================================================
--- head/sys/boot/i386/zfsboot/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/i386/zfsboot/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -30,7 +30,7 @@ CFLAGS+=-DBOOTPROG=\"zfsboot\" \
 	-I${BOOTSRC}/i386 \
 	-I${ZFSSRC} \
 	-I${SYSDIR}/cddl/boot/zfs \
-	-I${BTXLIB} -I. \
+	-I${BTXLIB} \
 	-I${BOOTSRC}/i386/boot2 \
 	-Wall -Waggregate-return -Wbad-function-cast -Wno-cast-align \
 	-Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
@@ -46,7 +46,7 @@ LIBZFSBOOT=${BOOTOBJ}/zfs/libzfsboot.a
 
 LD_FLAGS+=${LD_FLAGS_BIN}
 
-CLEANFILES=	zfsboot
+CLEANFILES+=	zfsboot
 
 zfsboot: zfsboot1 zfsboot2
 	cat zfsboot1 zfsboot2 > zfsboot

Modified: head/sys/boot/i386/zfsloader/Makefile
==============================================================================
--- head/sys/boot/i386/zfsloader/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/i386/zfsloader/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -2,8 +2,6 @@
 
 LOADER=		zfsloader
 NEWVERSWHAT=	"ZFS enabled bootstrap loader" x86
-LOADER_ONLY=	yes
 HAVE_ZFS=	yes
 
 .include "${.CURDIR}/../loader/Makefile"
-

Modified: head/sys/boot/libsa/Makefile
==============================================================================
--- head/sys/boot/libsa/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/libsa/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -19,7 +19,7 @@ LIB?=		sa
 NO_PIC=
 WARNS?=		0
 
-CFLAGS+= -I${SASRC} -I${SYSDIR}
+CFLAGS+= -I${SASRC}
 
 # standalone components and stuff we have modified locally
 SRCS+=	gzguts.h zutil.h __main.c assert.c bcd.c environment.c getopt.c gets.c \

Modified: head/sys/boot/libsa32/Makefile
==============================================================================
--- head/sys/boot/libsa32/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/libsa32/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -7,7 +7,5 @@ DO32=1
 LIB=sa32
 LIBSA_CPUARCH=${MACHINE_CPUARCH:C/amd64/i386/}
 
-CFLAGS+=	-I.
-
 .PATH:	${SASRC}
 .include "${SASRC}/Makefile"

Modified: head/sys/boot/loader.mk
==============================================================================
--- head/sys/boot/loader.mk	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/loader.mk	Fri Nov 10 23:54:58 2017	(r325694)
@@ -90,3 +90,11 @@ REPRO_FLAG=	-r
 vers.c: ${LDRSRC}/newvers.sh ${VERSION_FILE}
 	sh ${LDRSRC}/newvers.sh ${REPRO_FLAG} ${VERSION_FILE} \
 	    ${NEWVERSWHAT}
+
+.if !empty(HELP_FILES)
+CLEANFILES+=	loader.help
+FILES+=		loader.help
+
+loader.help: ${HELP_FILES}
+	cat ${HELP_FILES} | awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
+.endif

Modified: head/sys/boot/mips/beri/boot2/Makefile
==============================================================================
--- head/sys/boot/mips/beri/boot2/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/mips/beri/boot2/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -51,7 +51,6 @@ CFLAGS=		-ffreestanding			\
 		-I${.CURDIR}			\
 		-I${SASRC}			\
 		-I${LDRSRC}			\
-		-I${SYSDIR}			\
 		-D_KERNEL			\
 		-Wall				\
 		-G0 				\

Modified: head/sys/boot/mips/beri/loader/Makefile
==============================================================================
--- head/sys/boot/mips/beri/loader/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/mips/beri/loader/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -67,6 +67,8 @@ SRCS+=		altera_jtag_uart.c				\
 # Since we don't have a backward compatibility issue, default to this on BERI.
 CFLAGS+=	-DBOOT_PROMPT_123
 
+HELP_FILES+=	help.mips
+
 # Always add MI sources
 .include	"${BOOTSRC}/loader.mk"
 
@@ -77,8 +79,6 @@ CFLAGS+=	-I${BOOTSRC}/mips/beri/common
 # Loader-specific MD headers
 CFLAGS+=	-I${.CURDIR}
 
-CLEANFILES+=	loader.help
-
 # Generate code appropriate for the loader environment
 CFLAGS+=	-G0					\
 		-fno-pic				\
@@ -94,15 +94,6 @@ LDFLAGS=	-nostdlib				\
 
 DPADD=		${LIBFICL} ${LIBSA}
 LDADD=		${LIBFICL} ${LIBSA}
-
-loader.help: help.common help.mips
-	cat ${.ALLSRC} | \
-	    awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
-
-.PATH: ${BOOTSRC}/forth
-.include	"${BOOTSRC}/forth/Makefile.inc"
-
-FILES+= loader.rc menu.rc
 
 .if defined(LOADER_USB_SUPPORT)
 # Do garbage collection

Modified: head/sys/boot/mips/uboot/Makefile
==============================================================================
--- head/sys/boot/mips/uboot/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/mips/uboot/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -12,7 +12,7 @@ LOADER_BZIP2_SUPPORT?=	no
 
 .include <bsd.init.mk>
 
-FILES=		ubldr
+FILES+=		ubldr
 
 NEWVERSWHAT=	"U-Boot loader" ${MACHINE_ARCH}
 INSTALLFLAGS=	-b
@@ -24,12 +24,11 @@ UBLDR_LOADADDR?=	0xffffffff80800000
 # Architecture-specific loader code
 SRCS=		start.S conf.c vers.c
 
+HELP_FILES+=	help.uboot ${BOOTSRC}/fdt/help.fdt
+
 # Always add MI sources
 .include	"${BOOTSRC}/loader.mk"
-CFLAGS+=	-I.
 
-CLEANFILES+=	loader.help
-
 CFLAGS+=	-ffreestanding -msoft-float -g
 
 LDFLAGS=	-nostdlib -static -T ${.CURDIR}/ldscript.${MACHINE_CPUARCH}
@@ -41,10 +40,6 @@ LDADD=		${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FD
 
 OBJS+=  ${SRCS:N*.h:R:S/$/.o/g}
 
-loader.help: help.common help.uboot ${BOOTSRC}/fdt/help.fdt
-	cat ${.ALLSRC} | \
-	    awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
-
 ldscript.abs:
 	echo "UBLDR_LOADADDR = ${UBLDR_LOADADDR};" >${.TARGET}
 
@@ -57,17 +52,6 @@ ubldr: ${OBJS} ldscript.abs ${.CURDIR}/ldscript.${MACH
 	${OBJCOPY} -S -O binary ubldr ubldr.bin
 
 CLEANFILES+=	ldscript.abs ldscript.pie ubldr ubldr.pie ubldr.bin
-
-.if !defined(LOADER_ONLY)
-.PATH: ${BOOTSRC}/forth
-.include	"${BOOTSRC}/forth/Makefile.inc"
-
-# Install loader.rc.
-FILES+=	loader.rc
-# Put sample menu.rc on disk but don't enable it by default.
-FILES+=	menu.rc
-FILESNAME_menu.rc=	menu.rc.sample
-.endif
 
 .include <bsd.stand.mk>
 .include <bsd.prog.mk>

Modified: head/sys/boot/ofw/libofw/Makefile
==============================================================================
--- head/sys/boot/ofw/libofw/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/ofw/libofw/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -12,7 +12,7 @@ SRCS=	devicename.c elf_freebsd.c ofw_console.c ofw_cop
 SRCS+=  devicename_stubs.c
 
 # Pick up the bootstrap header for some interface items
-CFLAGS+=	-I${LDRSRC} -I${SYSDIR} -I.
+CFLAGS+=	-I${LDRSRC}
 
 CFLAGS+=	-ffreestanding
 .if ${MACHINE_CPUARCH} == "powerpc"

Modified: head/sys/boot/powerpc/boot1.chrp/Makefile
==============================================================================
--- head/sys/boot/powerpc/boot1.chrp/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/powerpc/boot1.chrp/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -34,7 +34,7 @@ boot1.hfs: boot1.elf bootinfo.txt
 	${DD} if=${.CURDIR}/bootinfo.txt of=${.TARGET} seek=${BOOTINFO_OFFSET} \
 	    conv=notrunc
 
-CLEANFILES= boot1.hfs
+CLEANFILES+= boot1.hfs
 
 boot1.o: ${SASRC}/ufsread.c
 

Modified: head/sys/boot/powerpc/kboot/Makefile
==============================================================================
--- head/sys/boot/powerpc/kboot/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/powerpc/kboot/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -28,13 +28,10 @@ SRCS+=		ucmpdi2.c
 CFLAGS+=	-mcpu=powerpc64
 
 # Always add MI sources
+HELP_FILES=	# Disable
 .include	"${BOOTSRC}/loader.mk"
 .PATH:		${SYSDIR}/libkern
-CFLAGS+=	-I${SYSDIR}
-CFLAGS+=	-I.
 
-CLEANFILES+=	loader.help
-
 CFLAGS+=	-Wall -ffreestanding -msoft-float -DAIM
 # load address. set in linker script
 RELOC?=		0x0
@@ -48,13 +45,6 @@ CFLAGS+= -Wa,-mppc64bridge
 DPADD=		${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA}
 LDADD=		${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA}
 
-loader.help: help.common ${FDTSRC}/help.fdt
-	cat ${.ALLSRC} | \
-	    awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
-
-.PATH: ${BOOTSRC}/forth
-.include	"${BOOTSRC}/forth/Makefile.inc"
-
-FILES+= loader.rc menu.rc
+HELP_FILES+=	${FDTSRC}/help.fdt
 
 .include <bsd.prog.mk>

Modified: head/sys/boot/powerpc/ofw/Makefile
==============================================================================
--- head/sys/boot/powerpc/ofw/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/powerpc/ofw/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -27,15 +27,13 @@ SRCS+=		ucmpdi2.c
 SRCS+=		ofwfdt.c
 .endif
 
+HELP_FILES+=	${FDTSRC}/help.fdt
+
 # Always add MI sources
 .include	"${BOOTSRC}/loader.mk"
 
 .PATH:		${SYSDIR}/libkern
-CFLAGS+=	-I${SYSDIR}
-CFLAGS+=	-I.
 
-CLEANFILES+=	loader.help
-
 CFLAGS+=	-ffreestanding -msoft-float
 # load address. set in linker script
 RELOC?=		0x1C00000
@@ -53,14 +51,5 @@ CFLAGS+=	-I${BOOTSRC}/ofw/libofw
 
 DPADD=		${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA}
 LDADD=		${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA}
-
-loader.help: help.common ${FDTSRC}/help.fdt
-	cat ${.ALLSRC} | \
-	    awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
-
-.PATH: ${BOOTSRC}/forth
-.include	"${BOOTSRC}/forth/Makefile.inc"
-
-FILES+= loader.rc menu.rc
 
 .include <bsd.prog.mk>

Modified: head/sys/boot/powerpc/ps3/Makefile
==============================================================================
--- head/sys/boot/powerpc/ps3/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/powerpc/ps3/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -26,13 +26,10 @@ SRCS+=		ucmpdi2.c
 CFLAGS+=	-mcpu=powerpc64
 
 # Always add MI sources
+HELP_FILES=	# Disable
 .include	"${BOOTSRC}/loader.mk"
 .PATH:		${SYSDIR}/libkern
-CFLAGS+=	-I${SYSDIR}
-CFLAGS+=	-I.
 
-CLEANFILES+=	loader.help
-
 CFLAGS+=	-Wall -ffreestanding -msoft-float -DAIM
 # load address. set in linker script
 RELOC?=		0x0
@@ -47,14 +44,5 @@ SC_DFLT_FONT=cp437
 
 font.h:
 	uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x16.fnt && file2c 'u_char dflt_font_16[16*256] = {' '};' < ${SC_DFLT_FONT}-8x16 > font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x14.fnt && file2c 'u_char dflt_font_14[14*256] = {' '};' < ${SC_DFLT_FONT}-8x14 >> font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x8.fnt && file2c 'u_char dflt_font_8[8*256] = {' '};' < ${SC_DFLT_FONT}-8x8 >> font.h
-
-loader.help: help.common
-	cat ${.ALLSRC} | \
-	    awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
-
-.PATH: ${BOOTSRC}/forth
-.include	"${BOOTSRC}/forth/Makefile.inc"
-
-FILES+= loader.rc menu.rc
 
 .include <bsd.prog.mk>

Modified: head/sys/boot/powerpc/uboot/Makefile
==============================================================================
--- head/sys/boot/powerpc/uboot/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/powerpc/uboot/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -21,13 +21,10 @@ SRCS=		start.S conf.c vers.c
 SRCS+=		ucmpdi2.c
 
 # Always add MI sources
+HELP_FILES=	# Disable
 .include	"${BOOTSRC}/loader.mk"
 .PATH:		${SYSDIR}/libkern
-CFLAGS+=	-I${SYSDIR}
-CFLAGS+=	-I.
 
-CLEANFILES+=	${PROG}.help
-
 CFLAGS+=	-ffreestanding
 
 LDFLAGS=	-nostdlib -static -T ${.CURDIR}/ldscript.powerpc
@@ -36,12 +33,5 @@ LDFLAGS=	-nostdlib -static -T ${.CURDIR}/ldscript.powe
 
 DPADD=		${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
 LDADD=		${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA}
-
-loader.help: help.common ${BOOTSRC}/fdt/help.fdt
-	cat ${.ALLSRC} | \
-	    awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
-
-.PATH: ${BOOTSRC}/forth
-FILES=	loader.help
 
 .include <bsd.prog.mk>

Modified: head/sys/boot/sparc64/boot1/Makefile
==============================================================================
--- head/sys/boot/sparc64/boot1/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/sparc64/boot1/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -7,7 +7,7 @@ INTERNALPROG=
 MAN=
 FILES?=	boot1
 SRCS=	_start.s boot1.c
-CLEANFILES=${FILES} boot1.aout
+CLEANFILES+=${FILES} boot1.aout
 
 BOOTBLOCKBASE= 0x4000
 

Modified: head/sys/boot/sparc64/loader/Makefile
==============================================================================
--- head/sys/boot/sparc64/loader/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/sparc64/loader/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -29,31 +29,22 @@ SRCS=		locore.S main.c metadata.c vers.c
 CFLAGS+=	-DLOADER_DEBUG
 .endif
 
+.if exists(${.CURDIR}/help.sparc64)
+HELP_FILES+=	help.sparc64
+.else
+HELP_FILES=
+.endif
+
 # Always add MI sources
 .include	"${BOOTSRC}/loader.mk"
-CFLAGS+=	-I.
 
-CLEANFILES+=	loader.help
-
 LDFLAGS+=	-static
 
 # Open Firmware standalone support library
 LIBOFW=		${BOOTOBJ}/ofw/libofw/libofw.a
 CFLAGS+=	-I${BOOTSRC}/ofw/libofw/
 
-# Need sys/ for crypto/intake.h
-CFLAGS+=	-I${SRCTOP}/sys
-
 DPADD=		${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} ${LIBSA}
 LDADD=		${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} ${LIBSA}
-
-loader.help: help.common help.sparc64
-	cat ${.ALLSRC} | \
-	    awk -f ${LDRSRC}/merge_help.awk > ${.TARGET}
-
-.PATH: ${BOOTSRC}/forth
-.include	"${BOOTSRC}/forth/Makefile.inc"
-
-FILES+= loader.rc menu.rc
 
 .include <bsd.prog.mk>

Modified: head/sys/boot/uboot/fdt/Makefile
==============================================================================
--- head/sys/boot/uboot/fdt/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/uboot/fdt/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -19,7 +19,7 @@ CFLAGS+=	-I${UBOOTSRC}/lib
 CFLAGS+=	-I${FDTSRC}
 
 # Pick up the bootstrap header for some interface items
-CFLAGS+=	-I${LDRSRC} -I${SYSDIR} -I.
+CFLAGS+=	-I${LDRSRC}
 
 .include <bsd.stand.mk>
 .include <bsd.lib.mk>

Modified: head/sys/boot/uboot/lib/Makefile
==============================================================================
--- head/sys/boot/uboot/lib/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/uboot/lib/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -20,7 +20,7 @@ SRCS+= disk.c
 .include	"${BOOTSRC}/fdt.mk"
 
 # Pick up the bootstrap header for some interface items
-CFLAGS+=	-I${LDRSRC} -I${SYSDIR} -I.
+CFLAGS+=	-I${LDRSRC}
 
 .ifdef(BOOT_DISK_DEBUG)
 # Make the disk code more talkative

Modified: head/sys/boot/userboot/test/Makefile
==============================================================================
--- head/sys/boot/userboot/test/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/userboot/test/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -10,6 +10,5 @@ PROG=		test
 INTERNALPROG=
 
 CFLAGS+=	-I${BOOTSRC}/userboot
-CFLAGS+=	-I${SYSDIR}
 
 .include <bsd.prog.mk>

Modified: head/sys/boot/userboot/userboot/Makefile
==============================================================================
--- head/sys/boot/userboot/userboot/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/userboot/userboot/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -36,8 +36,7 @@ SRCS+=		vers.c
 
 CFLAGS+=	-Wall
 CFLAGS+=	-I${BOOTSRC}/userboot
-CFLAGS+=	-I${SYSDIR}
-CFLAGS+=	-ffreestanding -I.
+CFLAGS+=	-ffreestanding
 
 CWARNFLAGS.main.c += -Wno-implicit-function-declaration
 
@@ -51,6 +50,7 @@ LIBZFSBOOT=	${BOOTOBJ}/zfs/libzfsboot.a
 .endif
 
 # Always add MI sources 
+HELP_FILES=	# Disable
 .include	"${BOOTSRC}/loader.mk"
 CFLAGS+=	-I.
 DPADD+=		${LIBFICL} ${LIBZFSBOOT} ${LIBSA} 

Modified: head/sys/boot/zfs/Makefile
==============================================================================
--- head/sys/boot/zfs/Makefile	Fri Nov 10 23:54:48 2017	(r325693)
+++ head/sys/boot/zfs/Makefile	Fri Nov 10 23:54:58 2017	(r325694)
@@ -12,7 +12,7 @@ CFLAGS+=	-DSKEIN_LOOP=111
 .PATH:		${SYSDIR}/crypto/skein
 
 CFLAGS+=	-DBOOTPROG=\"zfsloader\"
-CFLAGS+=	-I${LDRSRC} -I${SYSDIR} -I.
+CFLAGS+=	-I${LDRSRC}
 CFLAGS+=	-I${SYSDIR}/cddl/boot/zfs
 CFLAGS+=	-I${SYSDIR}/crypto/skein
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711102354.vAANswm3075262>