loader: set options before including bsd.init.mk

bsd.init.mk ends up including defs.mk so the per-arch options must be
set before including defs.mk, or else the global defaults will be
used and the per-arch ones will be ignored.

Although better, note that the usage of MK_FDT before the inclusion of
bsd.init.mk is incorrect but doesn't lead to build errors. This
circular dependency must be broken in order for this to work
correctly.

Reviewed by:	imp
Sponsored by:	Citrix Systems R&D
This commit is contained in:
royger 2017-11-08 14:44:45 +00:00
parent e31f084c58
commit eb917508e9
12 changed files with 105 additions and 104 deletions

View File

@ -1,5 +1,16 @@
# $FreeBSD$
LOADER_UFS_SUPPORT?= yes
LOADER_CD9660_SUPPORT?= no
LOADER_MSDOS_SUPPORT?= no
LOADER_EXT2FS_SUPPORT?= no
LOADER_NET_SUPPORT?= yes
LOADER_NFS_SUPPORT?= yes
LOADER_TFTP_SUPPORT?= no
LOADER_GZIP_SUPPORT?= no
LOADER_BZIP2_SUPPORT?= no
LOADER_FDT_SUPPORT= ${MK_FDT}
.include <bsd.init.mk>
FILES= ubldr ubldr.bin
@ -18,17 +29,6 @@ SRCS= start.S conf.c self_reloc.c vers.c
CWARNFLAGS.self_reloc.c+= -Wno-error=maybe-uninitialized
.endif
LOADER_UFS_SUPPORT?= yes
LOADER_CD9660_SUPPORT?= no
LOADER_MSDOS_SUPPORT?= no
LOADER_EXT2FS_SUPPORT?= no
LOADER_NET_SUPPORT?= yes
LOADER_NFS_SUPPORT?= yes
LOADER_TFTP_SUPPORT?= no
LOADER_GZIP_SUPPORT?= no
LOADER_BZIP2_SUPPORT?= no
LOADER_FDT_SUPPORT= ${MK_FDT}
# Always add MI sources
.include "${BOOTSRC}/loader.mk"
CFLAGS+= -I.

View File

@ -2,6 +2,12 @@
MAN=
LOADER_NET_SUPPORT?= yes
LOADER_MSDOS_SUPPORT?= yes
LOADER_UFS_SUPPORT?= yes
LOADER_CD9660_SUPPORT?= no
LOADER_EXT2FS_SUPPORT?= no
.include <bsd.init.mk>
MK_SSP= no
@ -9,12 +15,6 @@ MK_SSP= no
PROG= loader.sym
INTERNALPROG=
WARNS?= 3
LOADER_NET_SUPPORT?= yes
LOADER_MSDOS_SUPPORT?= yes
LOADER_UFS_SUPPORT?= yes
LOADER_CD9660_SUPPORT?= no
LOADER_EXT2FS_SUPPORT?= no
# architecture-specific loader code
SRCS= autoload.c \

View File

@ -1,5 +1,15 @@
# $FreeBSD$
LOADER_NET_SUPPORT?= yes
LOADER_NFS_SUPPORT?= yes
LOADER_TFTP_SUPPORT?= yes
LOADER_CD9660_SUPPORT?= no
LOADER_EXT2FS_SUPPORT?= no
LOADER_MSDOS_SUPPORT?= no
LOADER_UFS_SUPPORT?= yes
LOADER_GZIP_SUPPORT?= yes
LOADER_BZIP2_SUPPORT?= yes
.include <bsd.init.mk>
MK_SSP= no
@ -10,16 +20,6 @@ MAN=
INTERNALPROG=
NEWVERSWHAT?= "bootstrap loader" x86
VERSION_FILE= ${.CURDIR}/../loader/version
LOADER_NET_SUPPORT?= yes
LOADER_NFS_SUPPORT?= yes
LOADER_TFTP_SUPPORT?= yes
LOADER_CD9660_SUPPORT?= no
LOADER_EXT2FS_SUPPORT?= no
LOADER_MSDOS_SUPPORT?= no
LOADER_UFS_SUPPORT?= yes
LOADER_GZIP_SUPPORT?= yes
LOADER_BZIP2_SUPPORT?= yes
# architecture-specific loader code
SRCS= main.c conf.c vers.c chain.c

View File

@ -1,12 +1,13 @@
# $FreeBSD$
LOADER_ZFS_SUPPORT=yes
.include <bsd.init.mk>
.PATH: ${BOOTSRC}/i386/loader
LOADER= zfsloader
NEWVERSWHAT= "ZFS enabled bootstrap loader" x86
LOADER_ZFS_SUPPORT=yes
LOADER_ONLY= yes
MAN=

View File

@ -29,6 +29,13 @@
#
# $FreeBSD$
LOADER_MSDOS_SUPPORT?= yes
LOADER_UFS_SUPPORT?= yes
LOADER_CD9660_SUPPORT?= no
LOADER_EXT2FS_SUPPORT?= no
LOADER_GZIP_SUPPORT?= yes
LOADER_BZIP2_SUPPORT?= yes
.include <bsd.init.mk>
MK_SSP= no
@ -60,13 +67,6 @@ SRCS+= altera_jtag_uart.c \
# Since we don't have a backward compatibility issue, default to this on BERI.
CFLAGS+= -DBOOT_PROMPT_123
LOADER_MSDOS_SUPPORT?= yes
LOADER_UFS_SUPPORT?= yes
LOADER_CD9660_SUPPORT?= no
LOADER_EXT2FS_SUPPORT?= no
LOADER_GZIP_SUPPORT?= yes
LOADER_BZIP2_SUPPORT?= yes
# Always add MI sources
.include "${BOOTSRC}/loader.mk"

View File

@ -1,5 +1,16 @@
# $FreeBSD$
LOADER_CD9660_SUPPORT?= no
LOADER_EXT2FS_SUPPORT?= no
LOADER_MSDOS_SUPPORT?= yes
LOADER_UFS_SUPPORT?= yes
LOADER_NET_SUPPORT?= yes
LOADER_NFS_SUPPORT?= yes
LOADER_TFTP_SUPPORT?= no
LOADER_GZIP_SUPPORT?= no
LOADER_BZIP2_SUPPORT?= no
LOADER_FDT_SUPPORT= ${MK_FDT}
.include <bsd.init.mk>
FILES= ubldr
@ -14,17 +25,6 @@ UBLDR_LOADADDR?= 0xffffffff80800000
# Architecture-specific loader code
SRCS= start.S conf.c vers.c
LOADER_CD9660_SUPPORT?= no
LOADER_EXT2FS_SUPPORT?= no
LOADER_MSDOS_SUPPORT?= yes
LOADER_UFS_SUPPORT?= yes
LOADER_NET_SUPPORT?= yes
LOADER_NFS_SUPPORT?= yes
LOADER_TFTP_SUPPORT?= no
LOADER_GZIP_SUPPORT?= no
LOADER_BZIP2_SUPPORT?= no
LOADER_FDT_SUPPORT= ${MK_FDT}
# Always add MI sources
.include "${BOOTSRC}/loader.mk"
CFLAGS+= -I.

View File

@ -1,5 +1,16 @@
# $FreeBSD$
LOADER_CD9660_SUPPORT?= yes
LOADER_MSDOS_SUPPORT?= no
LOADER_EXT2FS_SUPPORT?= yes
LOADER_UFS_SUPPORT?= yes
LOADER_NET_SUPPORT?= yes
LOADER_NFS_SUPPORT?= yes
LOADER_TFTP_SUPPORT?= no
LOADER_GZIP_SUPPORT?= yes
LOADER_FDT_SUPPORT= yes
LOADER_BZIP2_SUPPORT?= no
.include <bsd.init.mk>
MK_SSP= no
MAN=
@ -13,17 +24,6 @@ SRCS= conf.c metadata.c vers.c main.c ppc64_elf_freebsd.c
SRCS+= host_syscall.S hostcons.c hostdisk.c kerneltramp.S kbootfdt.c
SRCS+= ucmpdi2.c
LOADER_CD9660_SUPPORT?= yes
LOADER_MSDOS_SUPPORT?= no
LOADER_EXT2FS_SUPPORT?= yes
LOADER_UFS_SUPPORT?= yes
LOADER_NET_SUPPORT?= yes
LOADER_NFS_SUPPORT?= yes
LOADER_TFTP_SUPPORT?= no
LOADER_GZIP_SUPPORT?= yes
LOADER_FDT_SUPPORT= yes
LOADER_BZIP2_SUPPORT?= no
.if ${LOADER_FDT_SUPPORT} == "yes"
CFLAGS+= -I${FDTSRC}
CFLAGS+= -I${SYSDIR}/contrib/libfdt

View File

@ -1,5 +1,16 @@
# $FreeBSD$
LOADER_CD9660_SUPPORT?= yes
LOADER_EXT2FS_SUPPORT?= no
LOADER_MSDOS_SUPPORT?= no
LOADER_UFS_SUPPORT?= yes
LOADER_NET_SUPPORT?= yes
LOADER_NFS_SUPPORT?= yes
LOADER_TFTP_SUPPORT?= no
LOADER_GZIP_SUPPORT?= yes
LOADER_BZIP2_SUPPORT?= no
LOADER_FDT_SUPPORT?= yes
.include <bsd.init.mk>
MK_SSP= no
MAN=
@ -12,17 +23,6 @@ INSTALLFLAGS= -b
SRCS= conf.c metadata.c vers.c start.c
SRCS+= ucmpdi2.c
LOADER_CD9660_SUPPORT?= yes
LOADER_EXT2FS_SUPPORT?= no
LOADER_MSDOS_SUPPORT?= no
LOADER_UFS_SUPPORT?= yes
LOADER_NET_SUPPORT?= yes
LOADER_NFS_SUPPORT?= yes
LOADER_TFTP_SUPPORT?= no
LOADER_GZIP_SUPPORT?= yes
LOADER_BZIP2_SUPPORT?= no
LOADER_FDT_SUPPORT?= yes
.if ${LOADER_FDT_SUPPORT} == "yes"
SRCS+= ofwfdt.c
CFLAGS+= -I${FDTSRC}

View File

@ -1,5 +1,15 @@
# $FreeBSD$
LOADER_UFS_SUPPORT?= yes
LOADER_CD9660_SUPPORT?= yes
LOADER_EXT2FS_SUPPORT?= yes
LOADER_NET_SUPPORT?= yes
LOADER_NFS_SUPPORT?= yes
LOADER_TFTP_SUPPORT?= no
LOADER_GZIP_SUPPORT?= yes
LOADER_FDT_SUPPORT?= no
LOADER_BZIP2_SUPPORT?= no
.include <bsd.init.mk>
MK_SSP= no
MAN=
@ -14,16 +24,6 @@ SRCS+= lv1call.S ps3cons.c font.h ps3mmu.c ps3net.c ps3repo.c \
ps3stor.c ps3disk.c ps3cdrom.c
SRCS+= ucmpdi2.c
LOADER_UFS_SUPPORT?= yes
LOADER_CD9660_SUPPORT?= yes
LOADER_EXT2FS_SUPPORT?= yes
LOADER_NET_SUPPORT?= yes
LOADER_NFS_SUPPORT?= yes
LOADER_TFTP_SUPPORT?= no
LOADER_GZIP_SUPPORT?= yes
LOADER_FDT_SUPPORT?= no
LOADER_BZIP2_SUPPORT?= no
.if ${LOADER_FDT_SUPPORT} == "yes"
CFLAGS+= -I${FDTSRC}
CFLAGS+= -DLOADER_FDT_SUPPORT

View File

@ -1,5 +1,15 @@
# $FreeBSD$
LOADER_UFS_SUPPORT?= yes
LOADER_CD9660_SUPPORT?= no
LOADER_EXT2FS_SUPPORT?= no
LOADER_NET_SUPPORT?= yes
LOADER_NFS_SUPPORT?= yes
LOADER_TFTP_SUPPORT?= no
LOADER_GZIP_SUPPORT?= no
LOADER_BZIP2_SUPPORT?= no
LOADER_FDT_SUPPORT= ${MK_FDT}
.include <bsd.init.mk>
PROG= ubldr
@ -11,16 +21,6 @@ MAN=
SRCS= start.S conf.c vers.c
SRCS+= ucmpdi2.c
LOADER_UFS_SUPPORT?= yes
LOADER_CD9660_SUPPORT?= no
LOADER_EXT2FS_SUPPORT?= no
LOADER_NET_SUPPORT?= yes
LOADER_NFS_SUPPORT?= yes
LOADER_TFTP_SUPPORT?= no
LOADER_GZIP_SUPPORT?= no
LOADER_BZIP2_SUPPORT?= no
LOADER_FDT_SUPPORT= ${MK_FDT}
# Always add MI sources
.include "${BOOTSRC}/loader.mk"
.PATH: ${SYSDIR}/libkern

View File

@ -1,17 +1,5 @@
# $FreeBSD$
.include <bsd.init.mk>
MK_SSP= no
MAN=
PROG?= loader
NEWVERSWHAT?= "bootstrap loader" sparc64
VERSION_FILE= ${.CURDIR}/../loader/version
INSTALLFLAGS= -b
# Architecture-specific loader code
SRCS= locore.S main.c metadata.c vers.c
LOADER_DISK_SUPPORT?= yes
LOADER_UFS_SUPPORT?= yes
LOADER_CD9660_SUPPORT?= yes
@ -25,6 +13,18 @@ LOADER_GZIP_SUPPORT?= yes
LOADER_BZIP2_SUPPORT?= no
LOADER_DEBUG?= no
.include <bsd.init.mk>
MK_SSP= no
MAN=
PROG?= loader
NEWVERSWHAT?= "bootstrap loader" sparc64
VERSION_FILE= ${.CURDIR}/../loader/version
INSTALLFLAGS= -b
# Architecture-specific loader code
SRCS= locore.S main.c metadata.c vers.c
.if ${LOADER_DEBUG} == "yes"
CFLAGS+= -DLOADER_DEBUG
.endif

View File

@ -2,15 +2,15 @@
MAN=
.include <bsd.init.mk>
MK_SSP= no
LOADER_MSDOS_SUPPORT?= yes
LOADER_UFS_SUPPORT?= yes
LOADER_CD9660_SUPPORT?= no
LOADER_EXT2FS_SUPPORT?= no
.include <bsd.init.mk>
MK_SSP= no
SHLIB_NAME= userboot.so
MK_CTF= no
STRIP=