From owner-svn-src-head@freebsd.org Fri Nov 10 23:54:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23236E54151; Fri, 10 Nov 2017 23:54:35 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6AD0868D80; Fri, 10 Nov 2017 23:54:33 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAANsWgQ075029; Fri, 10 Nov 2017 23:54:32 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAANsVDi075020; Fri, 10 Nov 2017 23:54:31 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201711102354.vAANsVDi075020@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 10 Nov 2017 23:54:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325690 - in head/sys/boot: . i386/loader i386/zfsloader sparc64 sparc64/loader sparc64/zfsloader X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/boot: . i386/loader i386/zfsloader sparc64 sparc64/loader sparc64/zfsloader X-SVN-Commit-Revision: 325690 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Nov 2017 23:54:38 -0000 Author: imp Date: Fri Nov 10 23:54:31 2017 New Revision: 325690 URL: https://svnweb.freebsd.org/changeset/base/325690 Log: Remove LOADER_ZFS_SUPPORT as a Makefile variable LOADER_ZFS_SUPPORT is entirely used to select whether or not to support ZFS in the loader. But it's not a user-servicable part (MK_ZFS is what's used for that) Change it to the more conventional HAVE_ZFS and move the ZFS support code into loader.mk. In addition, only build ZFS libraries and boot loaders when ZFS is enabled. Sponsored by: Netflix Modified: head/sys/boot/Makefile.amd64 head/sys/boot/Makefile.i386 head/sys/boot/Makefile.sparc64 head/sys/boot/i386/loader/Makefile head/sys/boot/i386/zfsloader/Makefile head/sys/boot/loader.mk head/sys/boot/sparc64/Makefile head/sys/boot/sparc64/loader/Makefile head/sys/boot/sparc64/zfsloader/Makefile Modified: head/sys/boot/Makefile.amd64 ============================================================================== --- head/sys/boot/Makefile.amd64 Fri Nov 10 23:54:24 2017 (r325689) +++ head/sys/boot/Makefile.amd64 Fri Nov 10 23:54:31 2017 (r325690) @@ -1,7 +1,9 @@ # $FreeBSD$ SUBDIR+= libsa32 +.if ${MK_ZFS} != "no" SUBDIR+= zfs zfs32 +.endif .if ${MK_FORTH} != "no" SUBDIR+= ficl32 .endif Modified: head/sys/boot/Makefile.i386 ============================================================================== --- head/sys/boot/Makefile.i386 Fri Nov 10 23:54:24 2017 (r325689) +++ head/sys/boot/Makefile.i386 Fri Nov 10 23:54:31 2017 (r325690) @@ -3,6 +3,8 @@ .if ${LOADER_GELI_SUPPORT:Uyes} == "yes" SUBDIR+= geli .endif +.if ${MK_ZFS} != "no" SUBDIR+= zfs +.endif SUBDIR+= efi Modified: head/sys/boot/Makefile.sparc64 ============================================================================== --- head/sys/boot/Makefile.sparc64 Fri Nov 10 23:54:24 2017 (r325689) +++ head/sys/boot/Makefile.sparc64 Fri Nov 10 23:54:31 2017 (r325690) @@ -1,4 +1,6 @@ # $FreeBSD$ SUBDIR+= ofw +.if ${MK_ZFS} != "no" SUBDIR+= zfs +.endif Modified: head/sys/boot/i386/loader/Makefile ============================================================================== --- head/sys/boot/i386/loader/Makefile Fri Nov 10 23:54:24 2017 (r325689) +++ head/sys/boot/i386/loader/Makefile Fri Nov 10 23:54:31 2017 (r325690) @@ -21,6 +21,8 @@ INTERNALPROG= NEWVERSWHAT?= "bootstrap loader" x86 VERSION_FILE= ${.CURDIR}/../loader/version +.PATH: ${BOOTSRC}/i386/loader + # architecture-specific loader code SRCS= main.c conf.c vers.c chain.c @@ -28,16 +30,6 @@ SRCS= main.c conf.c vers.c chain.c .if defined(LOADER_FIREWIRE_SUPPORT) CFLAGS+= -DLOADER_FIREWIRE_SUPPORT LIBFIREWIRE= ${BOOTOBJ}/i386/libfirewire/libfirewire.a -.endif - -# Set by zfsloader Makefile -.if defined(LOADER_ZFS_SUPPORT) -CFLAGS+= -DLOADER_ZFS_SUPPORT -.if ${MACHINE} == "amd64" -LIBZFSBOOT= ${BOOTOBJ}/zfs32/libzfsboot.a -.else -LIBZFSBOOT= ${BOOTOBJ}/zfs/libzfsboot.a -.endif .endif # Include bcache code. Modified: head/sys/boot/i386/zfsloader/Makefile ============================================================================== --- head/sys/boot/i386/zfsloader/Makefile Fri Nov 10 23:54:24 2017 (r325689) +++ head/sys/boot/i386/zfsloader/Makefile Fri Nov 10 23:54:31 2017 (r325690) @@ -1,15 +1,10 @@ # $FreeBSD$ -LOADER_ZFS_SUPPORT=yes - -.include - -.PATH: ${BOOTSRC}/i386/loader - LOADER= zfsloader NEWVERSWHAT= "ZFS enabled bootstrap loader" x86 LOADER_ONLY= yes -MAN= +HAVE_ZFS= yes +.include .include "${BOOTSRC}/i386/loader/Makefile" Modified: head/sys/boot/loader.mk ============================================================================== --- head/sys/boot/loader.mk Fri Nov 10 23:54:24 2017 (r325689) +++ head/sys/boot/loader.mk Fri Nov 10 23:54:31 2017 (r325690) @@ -69,6 +69,19 @@ CFLAGS+= -DBOOT_PROMPT_123 SRCS+= install.c .endif +.if defined(HAVE_ZFS) +CFLAGS+= -DLOADER_ZFS_SUPPORT +CFLAGS+= -I${ZFSSRC} +CFLAGS+= -I${SYSDIR}/cddl/boot/zfs +.if ${MACHINE} == "amd64" +# Have to override to use 32-bit version of zfs library... +# kinda lame to select that there XXX +LIBZFSBOOT= ${BOOTOBJ}/zfs32/libzfsboot.a +.else +LIBZFSBOOT= ${BOOTOBJ}/zfs/libzfsboot.a +.endif +.endif + CLEANFILES+= vers.c VERSION_FILE?= ${.CURDIR}/version .if ${MK_REPRODUCIBLE_BUILD} != no Modified: head/sys/boot/sparc64/Makefile ============================================================================== --- head/sys/boot/sparc64/Makefile Fri Nov 10 23:54:24 2017 (r325689) +++ head/sys/boot/sparc64/Makefile Fri Nov 10 23:54:31 2017 (r325690) @@ -1,5 +1,10 @@ # $FreeBSD$ -SUBDIR= boot1 loader zfsboot zfsloader +.include + +SUBDIR= boot1 loader +.if ${MK_ZFS} != "no" +SUBDIR+=zfsboot zfsloader +.endif .include Modified: head/sys/boot/sparc64/loader/Makefile ============================================================================== --- head/sys/boot/sparc64/loader/Makefile Fri Nov 10 23:54:24 2017 (r325689) +++ head/sys/boot/sparc64/loader/Makefile Fri Nov 10 23:54:31 2017 (r325690) @@ -5,7 +5,6 @@ LOADER_UFS_SUPPORT?= yes LOADER_CD9660_SUPPORT?= yes LOADER_EXT2FS_SUPPORT?= no LOADER_MSDOS_SUPPORT?= no -LOADER_ZFS_SUPPORT?= no LOADER_NET_SUPPORT?= yes LOADER_NFS_SUPPORT?= yes LOADER_TFTP_SUPPORT?= yes @@ -27,12 +26,6 @@ SRCS= locore.S main.c metadata.c vers.c .if ${LOADER_DEBUG} == "yes" CFLAGS+= -DLOADER_DEBUG -.endif -.if ${LOADER_ZFS_SUPPORT} == "yes" -CFLAGS+= -DLOADER_ZFS_SUPPORT -CFLAGS+= -I${ZFSSRC} -CFLAGS+= -I${SYSDIR}/cddl/boot/zfs -LIBZFSBOOT= ${BOOTOBJ}/zfs/libzfsboot.a .endif # Always add MI sources Modified: head/sys/boot/sparc64/zfsloader/Makefile ============================================================================== --- head/sys/boot/sparc64/zfsloader/Makefile Fri Nov 10 23:54:24 2017 (r325689) +++ head/sys/boot/sparc64/zfsloader/Makefile Fri Nov 10 23:54:31 2017 (r325690) @@ -4,6 +4,6 @@ PROG= zfsloader NEWVERSWHAT= "ZFS enabled bootstrap loader" sparc64 -LOADER_ZFS_SUPPORT=yes +HAVE_ZFS= yes .include "${.CURDIR}/../loader/Makefile"