svn commit: r344377 - in stable/11/stand: . common efi/boot1 efi/loader i386/gptzfsboot i386/libi386 i386/loader i386/zfsboot i386/zfsloader libsa libsa/zfs ofw/libofw pc98/libpc98 sparc64/loader s...
Kyle Evans
kevans at FreeBSD.org
Wed Feb 20 19:13:15 UTC 2019
Author: kevans
Date: Wed Feb 20 19:13:09 2019
New Revision: 344377
URL: https://svnweb.freebsd.org/changeset/base/344377
Log:
MFC r336084-r336085, r336118: Move zfs impl into libsa
r336084:
Move ZFS files into libsa
Move the libzfs stuff into libsa. There's no need for it to be a
separate library. The separate library adds to the issues of build
ordering that we see from time to time. Move the filesystem support
into libsa, like all the other filesystem support rather than making
zfs the odd-duck out.
Discussed with: allanjude@
r336085:
Stop using ../zfs/libzfs.h but instead use libzfs.h.
While ../zfs/libzfs.h mostly works, there are a few situations where
it does not. Eliminate the problem by using plain libzfs.h, like we do
for ufs support. This fixes the weird cases, and is easier to
understand. It also follows the general style convetion of avoiding
../ in #includes.
r336118:
Remove dirs that git svn should have removed but didn't.
Added:
stable/11/stand/libsa/zfs/
- copied from r336085, head/stand/libsa/zfs/
Deleted:
stable/11/stand/zfs/
stable/11/stand/zfs32/
Modified:
stable/11/stand/Makefile
stable/11/stand/common/zfs_cmd.c
stable/11/stand/defs.mk
stable/11/stand/efi/boot1/Makefile
stable/11/stand/efi/loader/Makefile
stable/11/stand/i386/gptzfsboot/Makefile
stable/11/stand/i386/libi386/Makefile
stable/11/stand/i386/libi386/devicename.c
stable/11/stand/i386/loader/Makefile
stable/11/stand/i386/loader/conf.c
stable/11/stand/i386/loader/main.c
stable/11/stand/i386/zfsboot/Makefile
stable/11/stand/i386/zfsloader/Makefile
stable/11/stand/libsa/Makefile
stable/11/stand/loader.mk
stable/11/stand/ofw/libofw/Makefile
stable/11/stand/ofw/libofw/devicename.c
stable/11/stand/pc98/libpc98/Makefile
stable/11/stand/sparc64/loader/Makefile
stable/11/stand/sparc64/loader/main.c
stable/11/stand/sparc64/zfsloader/Makefile
stable/11/stand/userboot/userboot/Makefile
stable/11/stand/userboot/userboot/conf.c
stable/11/stand/userboot/userboot/devicename.c
stable/11/stand/userboot/userboot/main.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/stand/Makefile
==============================================================================
--- stable/11/stand/Makefile Wed Feb 20 19:05:58 2019 (r344376)
+++ stable/11/stand/Makefile Wed Feb 20 19:13:09 2019 (r344377)
@@ -6,7 +6,7 @@
# others we don't. LIB32LIST is a list of libraries, which if
# included, need to be built 32-bit as well.
.if ${MACHINE_ARCH} == "amd64"
-LIB32LIST=libsa ficl liblua zfs
+LIB32LIST=libsa ficl liblua
.endif
S.yes+= libsa
@@ -17,7 +17,6 @@ S.${MK_LOADER_LUA}+= liblua
S.${MK_LOADER_LUA}+= lua
S.${MK_FDT}+= fdt
S.${MK_LOADER_OFW}+= ofw
-S.${MK_ZFS}+= zfs
S.yes+= defaults
S.yes+= man
Modified: stable/11/stand/common/zfs_cmd.c
==============================================================================
--- stable/11/stand/common/zfs_cmd.c Wed Feb 20 19:05:58 2019 (r344376)
+++ stable/11/stand/common/zfs_cmd.c Wed Feb 20 19:13:09 2019 (r344377)
@@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$");
#include "bootstrap.h"
#ifdef LOADER_ZFS_SUPPORT
-#include "../zfs/libzfs.h"
+#include "libzfs.h"
#endif
COMMAND_SET(lszfs, "lszfs", "list child datasets of a zfs dataset",
Modified: stable/11/stand/defs.mk
==============================================================================
--- stable/11/stand/defs.mk Wed Feb 20 19:05:58 2019 (r344376)
+++ stable/11/stand/defs.mk Wed Feb 20 19:13:09 2019 (r344377)
@@ -28,7 +28,7 @@ LUASRC= ${SRCTOP}/contrib/lua/src
SASRC= ${BOOTSRC}/libsa
SYSDIR= ${SRCTOP}/sys
UBOOTSRC= ${BOOTSRC}/uboot
-ZFSSRC= ${BOOTSRC}/zfs
+ZFSSRC= ${SASRC}/zfs
BOOTOBJ= ${OBJTOP}/stand
Modified: stable/11/stand/efi/boot1/Makefile
==============================================================================
--- stable/11/stand/efi/boot1/Makefile Wed Feb 20 19:05:58 2019 (r344376)
+++ stable/11/stand/efi/boot1/Makefile Wed Feb 20 19:13:09 2019 (r344377)
@@ -30,7 +30,6 @@ CFLAGS.zfs_module.c+= -I${ZFSSRC}
CFLAGS.zfs_module.c+= -I${SYSDIR}/cddl/boot/zfs
CFLAGS.zfs_module.c+= -I${SYSDIR}/crypto/skein
CFLAGS+= -DEFI_ZFS_BOOT
-LIBZFSBOOT= ${BOOTOBJ}/zfs/libzfsboot.a
.endif
.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} > 40201
@@ -72,8 +71,8 @@ LIBEFI= ${BOOTOBJ}/efi/libefi/libefi.a
# __aeabi_* (arm) or __divdi3 (i386).
# as well as required string and memory functions for all platforms.
#
-DPADD+= ${LIBEFI} ${LIBZFSBOOT} ${LIBSA}
-LDADD+= ${LIBEFI} ${LIBZFSBOOT} ${LIBSA}
+DPADD+= ${LIBEFI} ${LIBSA}
+LDADD+= ${LIBEFI} ${LIBSA}
DPADD+= ${LDSCRIPT}
Modified: stable/11/stand/efi/loader/Makefile
==============================================================================
--- stable/11/stand/efi/loader/Makefile Wed Feb 20 19:05:58 2019 (r344376)
+++ stable/11/stand/efi/loader/Makefile Wed Feb 20 19:13:09 2019 (r344377)
@@ -25,7 +25,6 @@ SRCS= autoload.c \
vers.c
.if ${MK_ZFS} != "no"
-LIBZFSBOOT= ${BOOTOBJ}/zfs/libzfsboot.a
CFLAGS+= -I${ZFSSRC}
CFLAGS+= -DEFI_ZFS_BOOT
HAVE_ZFS= yes
@@ -120,8 +119,7 @@ loader.efi: ${PROG}
LIBEFI= ${BOOTOBJ}/efi/libefi/libefi.a
-DPADD= ${LDR_INTERP} ${LIBEFI} ${LIBFDT} ${LIBEFI_FDT} ${LIBZFSBOOT} ${LIBSA} \
- ${LDSCRIPT}
-LDADD= ${LDR_INTERP} ${LIBEFI} ${LIBFDT} ${LIBEFI_FDT} ${LIBZFSBOOT} ${LIBSA}
+DPADD= ${LDR_INTERP} ${LIBEFI} ${LIBFDT} ${LIBEFI_FDT} ${LIBSA} ${LDSCRIPT}
+LDADD= ${LDR_INTERP} ${LIBEFI} ${LIBFDT} ${LIBEFI_FDT} ${LIBSA}
.include <bsd.prog.mk>
Modified: stable/11/stand/i386/gptzfsboot/Makefile
==============================================================================
--- stable/11/stand/i386/gptzfsboot/Makefile Wed Feb 20 19:05:58 2019 (r344376)
+++ stable/11/stand/i386/gptzfsboot/Makefile Wed Feb 20 19:13:09 2019 (r344377)
@@ -43,12 +43,6 @@ CFLAGS.clang+= -Wno-tentative-definition-incomplete-ty
NO_WCAST_ALIGN=
-.if ${MACHINE} == "amd64"
-LIBZFSBOOT=${BOOTOBJ}/zfs32/libzfsboot.a
-.else
-LIBZFSBOOT=${BOOTOBJ}/zfs/libzfsboot.a
-.endif
-
CFLAGS.gcc+= --param max-inline-insns-single=100
LD_FLAGS+=${LD_FLAGS_BIN}
@@ -75,7 +69,7 @@ gptzfsboot.bin: gptzfsboot.out
gptzfsboot.out: ${BTXCRT} zfsboot.o sio.o gpt.o drv.o cons.o \
${OPENCRYPTO_XTS}
- ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBZFSBOOT} ${LIBSA32}
+ ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSA32}
zfsboot.o: ${ZFSSRC}/zfsimpl.c
Modified: stable/11/stand/i386/libi386/Makefile
==============================================================================
--- stable/11/stand/i386/libi386/Makefile Wed Feb 20 19:05:58 2019 (r344376)
+++ stable/11/stand/i386/libi386/Makefile Wed Feb 20 19:13:09 2019 (r344377)
@@ -14,6 +14,7 @@ SRCS= biosacpi.c bioscd.c biosdisk.c biosmem.c biospnp
smbios.c time.c vidconsole.c amd64_tramp.S spinconsole.c
.PATH: ${ZFSSRC}
SRCS+= devicename_stubs.c
+CFLAGS+= -I${ZFSSRC}
BOOT_COMCONSOLE_PORT?= 0x3f8
CFLAGS+= -DCOMPORT=${BOOT_COMCONSOLE_PORT}
Modified: stable/11/stand/i386/libi386/devicename.c
==============================================================================
--- stable/11/stand/i386/libi386/devicename.c Wed Feb 20 19:05:58 2019 (r344376)
+++ stable/11/stand/i386/libi386/devicename.c Wed Feb 20 19:13:09 2019 (r344377)
@@ -32,7 +32,7 @@ __FBSDID("$FreeBSD$");
#include "bootstrap.h"
#include "disk.h"
#include "libi386.h"
-#include "../zfs/libzfs.h"
+#include "libzfs.h"
static int i386_parsedev(struct i386_devdesc **dev, const char *devspec, const char **path);
Modified: stable/11/stand/i386/loader/Makefile
==============================================================================
--- stable/11/stand/i386/loader/Makefile Wed Feb 20 19:05:58 2019 (r344376)
+++ stable/11/stand/i386/loader/Makefile Wed Feb 20 19:13:09 2019 (r344377)
@@ -71,8 +71,8 @@ FILESMODE_${LOADER}= ${BINMODE} -b
# XXX crt0.o needs to be first for pxeboot(8) to work
OBJS= ${BTXCRT}
-DPADD= ${LDR_INTERP32} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBSA32}
-LDADD= ${LDR_INTERP32} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBSA32}
+DPADD= ${LDR_INTERP32} ${LIBFIREWIRE} ${LIBI386} ${LIBSA32}
+LDADD= ${LDR_INTERP32} ${LIBFIREWIRE} ${LIBI386} ${LIBSA32}
.if ${MACHINE_CPUARCH} == "amd64"
CFLAGS+= -DLOADER_PREFER_AMD64
Modified: stable/11/stand/i386/loader/conf.c
==============================================================================
--- stable/11/stand/i386/loader/conf.c Wed Feb 20 19:05:58 2019 (r344376)
+++ stable/11/stand/i386/loader/conf.c Wed Feb 20 19:13:09 2019 (r344377)
@@ -31,7 +31,7 @@ __FBSDID("$FreeBSD$");
#include <bootstrap.h>
#include "libi386/libi386.h"
#if defined(LOADER_ZFS_SUPPORT)
-#include "../zfs/libzfs.h"
+#include "libzfs.h"
#endif
/*
Modified: stable/11/stand/i386/loader/main.c
==============================================================================
--- stable/11/stand/i386/loader/main.c Wed Feb 20 19:05:58 2019 (r344376)
+++ stable/11/stand/i386/loader/main.c Wed Feb 20 19:13:09 2019 (r344377)
@@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$");
#include "btxv86.h"
#ifdef LOADER_ZFS_SUPPORT
-#include "../zfs/libzfs.h"
+#include "libzfs.h"
#endif
CTASSERT(sizeof(struct bootargs) == BOOTARGS_SIZE);
Modified: stable/11/stand/i386/zfsboot/Makefile
==============================================================================
--- stable/11/stand/i386/zfsboot/Makefile Wed Feb 20 19:05:58 2019 (r344376)
+++ stable/11/stand/i386/zfsboot/Makefile Wed Feb 20 19:13:09 2019 (r344377)
@@ -37,11 +37,6 @@ CFLAGS+=-DBOOTPROG=\"zfsboot\" \
-Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings
CFLAGS.gcc+= --param max-inline-insns-single=100
-.if ${MACHINE} == "amd64"
-LIBZFSBOOT=${BOOTOBJ}/zfs32/libzfsboot.a
-.else
-LIBZFSBOOT=${BOOTOBJ}/zfs/libzfsboot.a
-.endif
LD_FLAGS+=${LD_FLAGS_BIN}
@@ -82,7 +77,7 @@ zfsboot.bin: zfsboot.out
${OBJCOPY} -S -O binary zfsboot.out ${.TARGET}
zfsboot.out: ${BTXCRT} zfsboot.o sio.o drv.o cons.o
- ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBZFSBOOT} ${LIBSA32}
+ ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSA32}
SRCS= zfsboot.c
Modified: stable/11/stand/i386/zfsloader/Makefile
==============================================================================
--- stable/11/stand/i386/zfsloader/Makefile Wed Feb 20 19:05:58 2019 (r344376)
+++ stable/11/stand/i386/zfsloader/Makefile Wed Feb 20 19:13:09 2019 (r344377)
@@ -3,5 +3,6 @@
LOADER= zfsloader
NEWVERSWHAT= "ZFS enabled bootstrap loader" x86
HAVE_ZFS= yes
+CFLAGS+= -DBOOTPROG=\"zfsloader\"
.include "${.CURDIR}/../loader/Makefile"
Modified: stable/11/stand/libsa/Makefile
==============================================================================
--- stable/11/stand/libsa/Makefile Wed Feb 20 19:05:58 2019 (r344376)
+++ stable/11/stand/libsa/Makefile Wed Feb 20 19:13:09 2019 (r344377)
@@ -151,4 +151,9 @@ SRCS+= explicit_bzero.c
.include "${SASRC}/geli/Makefile.inc"
.endif
+# Maybe ZFS
+.if ${MK_ZFS} == "yes"
+.include "${SASRC}/zfs/Makefile.inc"
+.endif
+
.include <bsd.lib.mk>
Modified: stable/11/stand/loader.mk
==============================================================================
--- stable/11/stand/loader.mk Wed Feb 20 19:05:58 2019 (r344376)
+++ stable/11/stand/loader.mk Wed Feb 20 19:13:09 2019 (r344377)
@@ -131,13 +131,6 @@ CFLAGS+= -DLOADER_ZFS_SUPPORT
CFLAGS+= -I${ZFSSRC}
CFLAGS+= -I${SYSDIR}/cddl/boot/zfs
SRCS+= zfs_cmd.c
-.if ${MACHINE_CPUARCH} == "amd64" && ${DO32:U0} == 1
-# 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
LIBFICL= ${BOOTOBJ}/ficl/libficl.a
Modified: stable/11/stand/ofw/libofw/Makefile
==============================================================================
--- stable/11/stand/ofw/libofw/Makefile Wed Feb 20 19:05:58 2019 (r344376)
+++ stable/11/stand/ofw/libofw/Makefile Wed Feb 20 19:13:09 2019 (r344377)
@@ -9,6 +9,7 @@ SRCS= devicename.c ofw_console.c ofw_copy.c ofw_disk.c
ofw_time.c openfirm.c
.PATH: ${ZFSSRC}
SRCS+= devicename_stubs.c
+CFLAGS+= -I${ZFSSRC}
# Pick up the bootstrap header for some interface items
CFLAGS+= -I${LDRSRC}
Modified: stable/11/stand/ofw/libofw/devicename.c
==============================================================================
--- stable/11/stand/ofw/libofw/devicename.c Wed Feb 20 19:05:58 2019 (r344376)
+++ stable/11/stand/ofw/libofw/devicename.c Wed Feb 20 19:13:09 2019 (r344377)
@@ -31,7 +31,7 @@ __FBSDID("$FreeBSD$");
#include "bootstrap.h"
#include "libofw.h"
-#include "../zfs/libzfs.h"
+#include "libzfs.h"
static int ofw_parsedev(struct ofw_devdesc **, const char *, const char **);
Modified: stable/11/stand/pc98/libpc98/Makefile
==============================================================================
--- stable/11/stand/pc98/libpc98/Makefile Wed Feb 20 19:05:58 2019 (r344376)
+++ stable/11/stand/pc98/libpc98/Makefile Wed Feb 20 19:13:09 2019 (r344377)
@@ -12,8 +12,9 @@ SRCS= bioscd.c biosdisk.c biosmem.c biospnp.c \
comconsole.c devicename.c elf32_freebsd.c \
i386_copy.c i386_module.c nullconsole.c pc98_sys.c pxe.c pxetramp.s \
time.c vidconsole.c
-.PATH: ${BOOTSRC}/zfs
+.PATH: ${ZFSSRC}
SRCS+= devicename_stubs.c
+CFLAGS+= -I${ZFSSRC}
BOOT_COMCONSOLE_PORT?= 0x238
CFLAGS+= -DCOMPORT=${BOOT_COMCONSOLE_PORT}
Modified: stable/11/stand/sparc64/loader/Makefile
==============================================================================
--- stable/11/stand/sparc64/loader/Makefile Wed Feb 20 19:05:58 2019 (r344376)
+++ stable/11/stand/sparc64/loader/Makefile Wed Feb 20 19:13:09 2019 (r344377)
@@ -44,7 +44,7 @@ LDFLAGS+= -static
LIBOFW= ${BOOTOBJ}/ofw/libofw/libofw.a
CFLAGS+= -I${BOOTSRC}/ofw/libofw/
-DPADD= ${LDR_INTERP} ${LIBZFSBOOT} ${LIBOFW} ${LIBSA}
-LDADD= ${LDR_INTERP} ${LIBZFSBOOT} ${LIBOFW} ${LIBSA}
+DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBSA}
+LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBSA}
.include <bsd.prog.mk>
Modified: stable/11/stand/sparc64/loader/main.c
==============================================================================
--- stable/11/stand/sparc64/loader/main.c Wed Feb 20 19:05:58 2019 (r344376)
+++ stable/11/stand/sparc64/loader/main.c Wed Feb 20 19:13:09 2019 (r344377)
@@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$");
#include <sys/types.h>
#ifdef LOADER_ZFS_SUPPORT
#include <sys/vtoc.h>
-#include "../zfs/libzfs.h"
+#include "libzfs.h"
#endif
#include <vm/vm.h>
Modified: stable/11/stand/sparc64/zfsloader/Makefile
==============================================================================
--- stable/11/stand/sparc64/zfsloader/Makefile Wed Feb 20 19:05:58 2019 (r344376)
+++ stable/11/stand/sparc64/zfsloader/Makefile Wed Feb 20 19:13:09 2019 (r344377)
@@ -3,5 +3,6 @@
PROG= zfsloader
NEWVERSWHAT= "ZFS enabled bootstrap loader" sparc64
HAVE_ZFS= yes
+CFLAGS+= -DBOOTPROG=\"zfsloader\"
.include "${.CURDIR}/../loader/Makefile"
Modified: stable/11/stand/userboot/userboot/Makefile
==============================================================================
--- stable/11/stand/userboot/userboot/Makefile Wed Feb 20 19:05:58 2019 (r344376)
+++ stable/11/stand/userboot/userboot/Makefile Wed Feb 20 19:13:09 2019 (r344377)
@@ -41,14 +41,13 @@ NEWVERSWHAT= "User boot" ${MACHINE_CPUARCH}
.if ${MK_ZFS} != "no"
CFLAGS+= -DUSERBOOT_ZFS_SUPPORT
-LIBZFSBOOT= ${BOOTOBJ}/zfs/libzfsboot.a
HAVE_ZFS=yes
.endif
# Always add MI sources
.include "${BOOTSRC}/loader.mk"
CFLAGS+= -I.
-DPADD+= ${LDR_INTERP} ${LIBZFSBOOT} ${LIBSA}
-LDADD+= ${LDR_INTERP} ${LIBZFSBOOT} ${LIBSA}
+DPADD+= ${LDR_INTERP} ${LIBSA}
+LDADD+= ${LDR_INTERP} ${LIBSA}
.include <bsd.lib.mk>
Modified: stable/11/stand/userboot/userboot/conf.c
==============================================================================
--- stable/11/stand/userboot/userboot/conf.c Wed Feb 20 19:05:58 2019 (r344376)
+++ stable/11/stand/userboot/userboot/conf.c Wed Feb 20 19:13:09 2019 (r344377)
@@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$");
#include "libuserboot.h"
#if defined(USERBOOT_ZFS_SUPPORT)
-#include "../zfs/libzfs.h"
+#include "libzfs.h"
#endif
/*
Modified: stable/11/stand/userboot/userboot/devicename.c
==============================================================================
--- stable/11/stand/userboot/userboot/devicename.c Wed Feb 20 19:05:58 2019 (r344376)
+++ stable/11/stand/userboot/userboot/devicename.c Wed Feb 20 19:13:09 2019 (r344377)
@@ -35,7 +35,7 @@ __FBSDID("$FreeBSD$");
#include "libuserboot.h"
#if defined(USERBOOT_ZFS_SUPPORT)
-#include "../zfs/libzfs.h"
+#include "libzfs.h"
#endif
static int userboot_parsedev(struct disk_devdesc **dev, const char *devspec, const char **path);
Modified: stable/11/stand/userboot/userboot/main.c
==============================================================================
--- stable/11/stand/userboot/userboot/main.c Wed Feb 20 19:05:58 2019 (r344376)
+++ stable/11/stand/userboot/userboot/main.c Wed Feb 20 19:13:09 2019 (r344377)
@@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$");
#include "libuserboot.h"
#if defined(USERBOOT_ZFS_SUPPORT)
-#include "../zfs/libzfs.h"
+#include "libzfs.h"
static void userboot_zfs_probe(void);
static int userboot_zfs_found;
More information about the svn-src-all
mailing list