Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Nov 2017 14:44:46 +0000 (UTC)
From:      =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= <royger@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r325556 - in head/sys/boot: arm/uboot efi/loader i386/loader i386/zfsloader mips/beri/loader mips/uboot powerpc/kboot powerpc/ofw powerpc/ps3 powerpc/uboot sparc64/loader userboot/userboot
Message-ID:  <201711081444.vA8Eikkf012975@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: royger
Date: Wed Nov  8 14:44:45 2017
New Revision: 325556
URL: https://svnweb.freebsd.org/changeset/base/325556

Log:
  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

Modified:
  head/sys/boot/arm/uboot/Makefile
  head/sys/boot/efi/loader/Makefile
  head/sys/boot/i386/loader/Makefile
  head/sys/boot/i386/zfsloader/Makefile
  head/sys/boot/mips/beri/loader/Makefile
  head/sys/boot/mips/uboot/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/loader/Makefile
  head/sys/boot/userboot/userboot/Makefile

Modified: head/sys/boot/arm/uboot/Makefile
==============================================================================
--- head/sys/boot/arm/uboot/Makefile	Wed Nov  8 14:21:52 2017	(r325555)
+++ head/sys/boot/arm/uboot/Makefile	Wed Nov  8 14:44:45 2017	(r325556)
@@ -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
@@ -17,17 +28,6 @@ SRCS=		start.S conf.c self_reloc.c vers.c
 .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} > 40201
 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"

Modified: head/sys/boot/efi/loader/Makefile
==============================================================================
--- head/sys/boot/efi/loader/Makefile	Wed Nov  8 14:21:52 2017	(r325555)
+++ head/sys/boot/efi/loader/Makefile	Wed Nov  8 14:44:45 2017	(r325556)
@@ -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 \

Modified: head/sys/boot/i386/loader/Makefile
==============================================================================
--- head/sys/boot/i386/loader/Makefile	Wed Nov  8 14:21:52 2017	(r325555)
+++ head/sys/boot/i386/loader/Makefile	Wed Nov  8 14:44:45 2017	(r325556)
@@ -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

Modified: head/sys/boot/i386/zfsloader/Makefile
==============================================================================
--- head/sys/boot/i386/zfsloader/Makefile	Wed Nov  8 14:21:52 2017	(r325555)
+++ head/sys/boot/i386/zfsloader/Makefile	Wed Nov  8 14:44:45 2017	(r325556)
@@ -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=
 

Modified: head/sys/boot/mips/beri/loader/Makefile
==============================================================================
--- head/sys/boot/mips/beri/loader/Makefile	Wed Nov  8 14:21:52 2017	(r325555)
+++ head/sys/boot/mips/beri/loader/Makefile	Wed Nov  8 14:44:45 2017	(r325556)
@@ -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
@@ -59,13 +66,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"

Modified: head/sys/boot/mips/uboot/Makefile
==============================================================================
--- head/sys/boot/mips/uboot/Makefile	Wed Nov  8 14:21:52 2017	(r325555)
+++ head/sys/boot/mips/uboot/Makefile	Wed Nov  8 14:44:45 2017	(r325556)
@@ -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
@@ -13,17 +24,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"

Modified: head/sys/boot/powerpc/kboot/Makefile
==============================================================================
--- head/sys/boot/powerpc/kboot/Makefile	Wed Nov  8 14:21:52 2017	(r325555)
+++ head/sys/boot/powerpc/kboot/Makefile	Wed Nov  8 14:44:45 2017	(r325556)
@@ -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=
@@ -12,17 +23,6 @@ INSTALLFLAGS=	-b
 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}

Modified: head/sys/boot/powerpc/ofw/Makefile
==============================================================================
--- head/sys/boot/powerpc/ofw/Makefile	Wed Nov  8 14:21:52 2017	(r325555)
+++ head/sys/boot/powerpc/ofw/Makefile	Wed Nov  8 14:44:45 2017	(r325556)
@@ -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=
@@ -11,17 +22,6 @@ INSTALLFLAGS=	-b
 # Architecture-specific loader code
 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

Modified: head/sys/boot/powerpc/ps3/Makefile
==============================================================================
--- head/sys/boot/powerpc/ps3/Makefile	Wed Nov  8 14:21:52 2017	(r325555)
+++ head/sys/boot/powerpc/ps3/Makefile	Wed Nov  8 14:44:45 2017	(r325556)
@@ -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=
@@ -13,16 +23,6 @@ SRCS=		start.S conf.c metadata.c vers.c main.c devicen
 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}

Modified: head/sys/boot/powerpc/uboot/Makefile
==============================================================================
--- head/sys/boot/powerpc/uboot/Makefile	Wed Nov  8 14:21:52 2017	(r325555)
+++ head/sys/boot/powerpc/uboot/Makefile	Wed Nov  8 14:44:45 2017	(r325556)
@@ -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
@@ -10,16 +20,6 @@ MAN=
 # Architecture-specific loader code
 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"

Modified: head/sys/boot/sparc64/loader/Makefile
==============================================================================
--- head/sys/boot/sparc64/loader/Makefile	Wed Nov  8 14:21:52 2017	(r325555)
+++ head/sys/boot/sparc64/loader/Makefile	Wed Nov  8 14:44:45 2017	(r325556)
@@ -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
@@ -24,6 +12,18 @@ LOADER_TFTP_SUPPORT?=	yes
 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

Modified: head/sys/boot/userboot/userboot/Makefile
==============================================================================
--- head/sys/boot/userboot/userboot/Makefile	Wed Nov  8 14:21:52 2017	(r325555)
+++ head/sys/boot/userboot/userboot/Makefile	Wed Nov  8 14:44:45 2017	(r325556)
@@ -2,14 +2,14 @@
 
 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



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