Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
MK_ZFS -> {MK_ZFS|MK_LOADER_ZFS}, this is so we can diable userland /…
… kernel

ZFS but keep the boot-loaders when using ZoL port.

MFC after: 1 week
Reviewed by: rgrimes
Differential Revision: https://reviews.freebsd.org/D18739
  • Loading branch information
mattmacy committed Jan 5, 2019
1 parent 87678f9 commit 139c85c
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Expand Up @@ -3,3 +3,4 @@
*.cpp diff=cpp
*.hpp diff=cpp
*.py diff=python
. svn-properties=svn:keywords=tools/build/options/WITHOUT_LOADER_ZFS
2 changes: 2 additions & 0 deletions share/mk/src.opts.mk
Expand Up @@ -191,6 +191,7 @@ __DEFAULT_YES_OPTIONS = \
WIRELESS \
WPA_SUPPLICANT_EAPOL \
ZFS \
LOADER_ZFS \
ZONEINFO

__DEFAULT_NO_OPTIONS = \
Expand Down Expand Up @@ -451,6 +452,7 @@ MK_SOURCELESS_UCODE:= no

.if ${MK_CDDL} == "no"
MK_ZFS:= no
MK_LOADER_ZFS:= no
MK_CTF:= no
.endif

Expand Down
2 changes: 1 addition & 1 deletion stand/efi/boot1/Makefile
Expand Up @@ -25,7 +25,7 @@ CWARNFLAGS.zfs_module.c += -Wno-unused-function

# architecture-specific loader code
SRCS= boot1.c self_reloc.c start.S ufs_module.c
.if ${MK_ZFS} != "no"
.if ${MK_LOADER_ZFS} != "no"
SRCS+= zfs_module.c
CFLAGS.zfs_module.c+= -I${ZFSSRC}
CFLAGS.zfs_module.c+= -I${SYSDIR}/cddl/boot/zfs
Expand Down
2 changes: 1 addition & 1 deletion stand/efi/libefi/Makefile
Expand Up @@ -44,7 +44,7 @@ CFLAGS+= -fPIC -mno-red-zone
.endif
CFLAGS+= -I${EFIINC}
CFLAGS+= -I${EFIINCMD}
.if ${MK_ZFS} != "no"
.if ${MK_LOADER_ZFS} != "no"
CFLAGS+= -I${ZFSSRC}
CFLAGS+= -DEFI_ZFS_BOOT
.endif
Expand Down
2 changes: 1 addition & 1 deletion stand/efi/loader/Makefile
Expand Up @@ -26,7 +26,7 @@ SRCS= autoload.c \
vers.c

CFLAGS+= -I${.CURDIR}/../loader
.if ${MK_ZFS} != "no"
.if ${MK_LOADER_ZFS} != "no"
CFLAGS+= -I${ZFSSRC}
CFLAGS+= -DEFI_ZFS_BOOT
HAVE_ZFS= yes
Expand Down
2 changes: 1 addition & 1 deletion stand/i386/Makefile
Expand Up @@ -20,6 +20,6 @@ SUBDIR.yes+= pxeldr
SUBDIR.yes+= kgzldr
.endif

SUBDIR.${MK_ZFS}+= zfsboot gptzfsboot
SUBDIR.${MK_LOADER_ZFS}+= zfsboot gptzfsboot

.include <bsd.subdir.mk>
4 changes: 2 additions & 2 deletions stand/i386/loader/Makefile
@@ -1,6 +1,6 @@
# $FreeBSD$

HAVE_ZFS= ${MK_ZFS}
HAVE_ZFS= ${MK_LOADER_ZFS}

LOADER_NET_SUPPORT?= yes
LOADER_NFS_SUPPORT?= yes
Expand Down Expand Up @@ -64,7 +64,7 @@ ${LOADER}: ${LOADER}.bin ${BTXLDR} ${BTXKERN}
${LOADER}.bin: ${LOADER}.sym
strip -R .comment -R .note -o ${.TARGET} ${.ALLSRC}

.if ${MK_ZFS} == "yes" && ${LOADER_INTERP} == ${LOADER_DEFAULT_INTERP}
.if ${MK_LOADER_ZFS} == "yes" && ${LOADER_INTERP} == ${LOADER_DEFAULT_INTERP}
LINKS+= ${BINDIR}/${LOADER} ${BINDIR}/zfsloader
.endif
.if ${LOADER_INTERP} == ${LOADER_DEFAULT_INTERP}
Expand Down
2 changes: 1 addition & 1 deletion stand/libsa/Makefile
Expand Up @@ -165,7 +165,7 @@ SRCS+= explicit_bzero.c crc32_libkern.c
.endif

# Maybe ZFS
.if ${MK_ZFS} == "yes"
.if ${MK_LOADER_ZFS} == "yes"
.include "${SASRC}/zfs/Makefile.inc"
.endif

Expand Down
2 changes: 1 addition & 1 deletion stand/sparc64/Makefile
Expand Up @@ -5,6 +5,6 @@ NO_OBJ=t
.include <bsd.init.mk>

SUBDIR.yes= boot1 loader
SUBDIR.${MK_ZFS}+=zfsboot
SUBDIR.${MK_LOADER_ZFS}+=zfsboot

.include <bsd.subdir.mk>
6 changes: 3 additions & 3 deletions stand/sparc64/loader/Makefile
@@ -1,6 +1,6 @@
# $FreeBSD$

HAVE_ZFS= ${MK_ZFS}
HAVE_ZFS= ${MK_LOADER_ZFS}

LOADER_DISK_SUPPORT?= yes
LOADER_UFS_SUPPORT?= yes
Expand All @@ -21,7 +21,7 @@ NEWVERSWHAT?= "bootstrap loader" sparc64
VERSION_FILE= ${.CURDIR}/../loader/version
INSTALLFLAGS= -b

.if ${MK_ZFS} != "no"
.if ${MK_LOADER_ZFS} != "no"
HAVE_ZFS= yes
.endif

Expand All @@ -42,7 +42,7 @@ HELP_FILES= ${.CURDIR}/help.sparc64

LDFLAGS+= -static

.if ${MK_ZFS} == "yes"
.if ${MK_LOADER_ZFS} == "yes"
LINKS= ${BINDIR}/loader ${BINDIR}/zfsloader
.endif

Expand Down
2 changes: 1 addition & 1 deletion stand/userboot/userboot/Makefile
Expand Up @@ -45,7 +45,7 @@ VERSION_FILE= ${.CURDIR}/../userboot/version
LINKS+= ${BINDIR}/${SHLIB_NAME} ${BINDIR}/userboot.so
.endif

.if ${MK_ZFS} != "no"
.if ${MK_LOADER_ZFS} != "no"
CFLAGS+= -DUSERBOOT_ZFS_SUPPORT
HAVE_ZFS=yes
.endif
Expand Down
2 changes: 2 additions & 0 deletions tools/build/options/WITHOUT_LOADER_ZFS
@@ -0,0 +1,2 @@
.\" $FreeBSD$
Set to not build ZFS file system boot loader support.
2 changes: 1 addition & 1 deletion tools/build/options/WITHOUT_ZFS
@@ -1,2 +1,2 @@
.\" $FreeBSD$
Set to not build ZFS file system.
Set to not build ZFS file system kernel module, libraries, and user commands.

0 comments on commit 139c85c

Please sign in to comment.