path: root/sbin/zfsbootcfg/Makefile
diff options
authorAndriy Gapon <avg@FreeBSD.org>2016-10-29 14:09:32 +0000
committerAndriy Gapon <avg@FreeBSD.org>2016-10-29 14:09:32 +0000
commit97371ba2a9bd423f6a8742e06dc2b7c68b7cf5d2 (patch)
treea542dc12a8746152e8972c9868e11cb4a8eb88a3 /sbin/zfsbootcfg/Makefile
parent6eeff7a7b2f22e5363f5a3a6f595352111eba7eb (diff)
zfsbootcfg: a simple tool to set next boot (one time) options for zfsboot
(gpt)zfsboot will read one-time boot directives from a special ZFS pool area. The area was previously described as "Boot Block Header", but currently it is know as Pad2, marked as reserved and is zeroed out on pool creation. The new code interprets data in this area, if any, using the same format as boot.config. The area is immediately wiped out. Failure to parse the directives results in a reboot right after the cleanup. Otherwise the boot sequence proceeds as usual. zfsbootcfg writes zfsboot arguments specified on its command line to the Pad2 area of a disk identified by vfs.zfs.boot.primary_pool and vfs.zfs.boot.primary_vdev kenv variables that are set by loader during boot. Please see the manual page for more. Thanks to all who reviewed, contributed and made suggestions! There are many potential improvements to the feature, please see the review for details. Reviewed by: wblock (docs) Discussed with: jhb, tsoome MFC after: 3 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D7612
Notes: svn path=/head/; revision=308089
Diffstat (limited to 'sbin/zfsbootcfg/Makefile')
1 files changed, 27 insertions, 0 deletions
diff --git a/sbin/zfsbootcfg/Makefile b/sbin/zfsbootcfg/Makefile
new file mode 100644
index 000000000000..d485d8dad8dc
--- /dev/null
+++ b/sbin/zfsbootcfg/Makefile
@@ -0,0 +1,27 @@
+# @(#)Makefile 8.4 (Berkeley) 6/22/95
+# $FreeBSD$
+PROG= zfsbootcfg
+WARNS?= 1
+MAN= zfsbootcfg.8
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
+CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair
+CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
+CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
+CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head
+.include <bsd.prog.mk>