aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorRoger Pau Monné <royger@FreeBSD.org>2017-11-08 14:44:45 +0000
committerRoger Pau Monné <royger@FreeBSD.org>2017-11-08 14:44:45 +0000
commit8161a352590f04ded64d00419c02b17baa76246a (patch)
tree6e01bb49234b01e2c53e372d26bade213268b86d /sys
parent7e6155744d78c5f233af37fefc8f1e576a0fe63f (diff)
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
Notes
Notes: svn path=/head/; revision=325556
Diffstat (limited to 'sys')
-rw-r--r--sys/boot/arm/uboot/Makefile22
-rw-r--r--sys/boot/efi/loader/Makefile12
-rw-r--r--sys/boot/i386/loader/Makefile20
-rw-r--r--sys/boot/i386/zfsloader/Makefile3
-rw-r--r--sys/boot/mips/beri/loader/Makefile14
-rw-r--r--sys/boot/mips/uboot/Makefile22
-rw-r--r--sys/boot/powerpc/kboot/Makefile22
-rw-r--r--sys/boot/powerpc/ofw/Makefile22
-rw-r--r--sys/boot/powerpc/ps3/Makefile20
-rw-r--r--sys/boot/powerpc/uboot/Makefile20
-rw-r--r--sys/boot/sparc64/loader/Makefile24
-rw-r--r--sys/boot/userboot/userboot/Makefile8
12 files changed, 105 insertions, 104 deletions
diff --git a/sys/boot/arm/uboot/Makefile b/sys/boot/arm/uboot/Makefile
index a3b228d732fc..0db9f96d32d2 100644
--- a/sys/boot/arm/uboot/Makefile
+++ b/sys/boot/arm/uboot/Makefile
@@ -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.
diff --git a/sys/boot/efi/loader/Makefile b/sys/boot/efi/loader/Makefile
index 0c560d554ecb..82852da1733e 100644
--- a/sys/boot/efi/loader/Makefile
+++ b/sys/boot/efi/loader/Makefile
@@ -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 \
diff --git a/sys/boot/i386/loader/Makefile b/sys/boot/i386/loader/Makefile
index e588d7996ba6..e330b6e7b72d 100644
--- a/sys/boot/i386/loader/Makefile
+++ b/sys/boot/i386/loader/Makefile
@@ -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
diff --git a/sys/boot/i386/zfsloader/Makefile b/sys/boot/i386/zfsloader/Makefile
index 33f1d4a0257e..6e07df776940 100644
--- a/sys/boot/i386/zfsloader/Makefile
+++ b/sys/boot/i386/zfsloader/Makefile
@@ -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=
diff --git a/sys/boot/mips/beri/loader/Makefile b/sys/boot/mips/beri/loader/Makefile
index b8a237c7878d..35a2ab33319c 100644
--- a/sys/boot/mips/beri/loader/Makefile
+++ b/sys/boot/mips/beri/loader/Makefile
@@ -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"
diff --git a/sys/boot/mips/uboot/Makefile b/sys/boot/mips/uboot/Makefile
index 70369eb43da7..01df0b4e9183 100644
--- a/sys/boot/mips/uboot/Makefile
+++ b/sys/boot/mips/uboot/Makefile
@@ -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.
diff --git a/sys/boot/powerpc/kboot/Makefile b/sys/boot/powerpc/kboot/Makefile
index 4055b1a63fdc..925c1d0d0448 100644
--- a/sys/boot/powerpc/kboot/Makefile
+++ b/sys/boot/powerpc/kboot/Makefile
@@ -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
diff --git a/sys/boot/powerpc/ofw/Makefile b/sys/boot/powerpc/ofw/Makefile
index 883c242df33c..f17fd0095c74 100644
--- a/sys/boot/powerpc/ofw/Makefile
+++ b/sys/boot/powerpc/ofw/Makefile
@@ -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}
diff --git a/sys/boot/powerpc/ps3/Makefile b/sys/boot/powerpc/ps3/Makefile
index dd4117f4081a..206ce247e97a 100644
--- a/sys/boot/powerpc/ps3/Makefile
+++ b/sys/boot/powerpc/ps3/Makefile
@@ -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
diff --git a/sys/boot/powerpc/uboot/Makefile b/sys/boot/powerpc/uboot/Makefile
index 41dcb2750aaf..d195c8c25513 100644
--- a/sys/boot/powerpc/uboot/Makefile
+++ b/sys/boot/powerpc/uboot/Makefile
@@ -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
diff --git a/sys/boot/sparc64/loader/Makefile b/sys/boot/sparc64/loader/Makefile
index c5fc902f009b..3f3185cd4ea2 100644
--- a/sys/boot/sparc64/loader/Makefile
+++ b/sys/boot/sparc64/loader/Makefile
@@ -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
diff --git a/sys/boot/userboot/userboot/Makefile b/sys/boot/userboot/userboot/Makefile
index aea362d88b9a..ae0c35db9453 100644
--- a/sys/boot/userboot/userboot/Makefile
+++ b/sys/boot/userboot/userboot/Makefile
@@ -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=