head	1.10;
access;
symbols
	RELENG_8_4:1.10.0.2
	RELENG_9_1_0_RELEASE:1.7.2.2.2.2
	RELENG_9_1:1.7.2.2.0.2
	RELENG_9_1_BP:1.7.2.2
	RELENG_8_3_0_RELEASE:1.3.4.2.4.1
	RELENG_8_3:1.3.4.2.0.4
	RELENG_8_3_BP:1.3.4.2
	RELENG_9_0_0_RELEASE:1.7.2.1.2.1
	RELENG_9_0:1.7.2.1.0.2
	RELENG_9_0_BP:1.7.2.1
	RELENG_9:1.7.0.2
	RELENG_9_BP:1.7
	RELENG_7_4_0_RELEASE:1.3.2.1.4.1
	RELENG_8_2_0_RELEASE:1.3.4.2.2.1
	RELENG_7_4:1.3.2.1.0.4
	RELENG_7_4_BP:1.3.2.1
	RELENG_8_2:1.3.4.2.0.2
	RELENG_8_2_BP:1.3.4.2
	RELENG_8_1_0_RELEASE:1.3.4.1.4.1
	RELENG_8_1:1.3.4.1.0.4
	RELENG_8_1_BP:1.3.4.1
	RELENG_7_3_0_RELEASE:1.3.2.1.2.1
	RELENG_7_3:1.3.2.1.0.2
	RELENG_7_3_BP:1.3.2.1
	RELENG_8_0_0_RELEASE:1.3.4.1.2.1
	RELENG_8_0:1.3.4.1.0.2
	RELENG_8_0_BP:1.3.4.1
	RELENG_8:1.3.0.4
	RELENG_8_BP:1.3
	RELENG_7:1.3.0.2;
locks; strict;
comment	@# @;


1.10
date	2012.11.17.01.51.21;	author svnexp;	state Exp;
branches
	1.10.2.1;
next	1.9;

1.9
date	2012.10.20.16.57.23;	author avg;	state Exp;
branches;
next	1.8;

1.8
date	2012.07.26.10.10.54;	author ache;	state Exp;
branches;
next	1.7;

1.7
date	2011.01.05.22.24.33;	author dim;	state Exp;
branches
	1.7.2.1;
next	1.6;

1.6
date	2011.01.05.22.00.37;	author dim;	state Exp;
branches;
next	1.5;

1.5
date	2010.09.24.19.49.12;	author pjd;	state Exp;
branches;
next	1.4;

1.4
date	2010.08.23.01.50.34;	author imp;	state Exp;
branches;
next	1.3;

1.3
date	2008.12.06.14.45.03;	author ps;	state Exp;
branches
	1.3.2.1
	1.3.4.1;
next	1.2;

1.2
date	2008.11.22.14.24.55;	author dfr;	state Exp;
branches;
next	1.1;

1.1
date	2008.11.17.20.49.29;	author pjd;	state Exp;
branches;
next	;

1.10.2.1
date	2012.11.17.01.51.21;	author svnexp;	state dead;
branches;
next	1.10.2.2;

1.10.2.2
date	2013.03.28.13.04.03;	author svnexp;	state Exp;
branches;
next	;

1.7.2.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.7.2.1.2.1;
next	1.7.2.2;

1.7.2.2
date	2012.08.02.15.13.12;	author ache;	state Exp;
branches
	1.7.2.2.2.1;
next	1.7.2.3;

1.7.2.3
date	2012.11.17.11.36.48;	author svnexp;	state Exp;
branches;
next	1.7.2.4;

1.7.2.4
date	2012.11.18.12.46.23;	author svnexp;	state Exp;
branches;
next	1.7.2.5;

1.7.2.5
date	2013.12.30.21.01.46;	author svnexp;	state Exp;
branches;
next	;

1.7.2.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.7.2.1.2.2;

1.7.2.1.2.2
date	2012.11.17.08.36.47;	author svnexp;	state Exp;
branches;
next	;

1.7.2.2.2.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.7.2.2.2.2;

1.7.2.2.2.2
date	2012.11.17.08.47.37;	author svnexp;	state Exp;
branches;
next	;

1.3.2.1
date	2009.05.23.19.54.18;	author kmacy;	state Exp;
branches
	1.3.2.1.2.1
	1.3.2.1.4.1;
next	1.3.2.2;

1.3.2.2
date	2012.11.17.08.04.56;	author svnexp;	state Exp;
branches;
next	;

1.3.2.1.2.1
date	2010.02.10.00.26.20;	author kensmith;	state Exp;
branches;
next	;

1.3.2.1.4.1
date	2010.12.21.17.10.29;	author kensmith;	state Exp;
branches;
next	1.3.2.1.4.2;

1.3.2.1.4.2
date	2012.11.17.08.17.05;	author svnexp;	state Exp;
branches;
next	;

1.3.4.1
date	2009.08.03.08.13.06;	author kensmith;	state Exp;
branches
	1.3.4.1.2.1
	1.3.4.1.4.1;
next	1.3.4.2;

1.3.4.2
date	2010.10.17.20.10.00;	author pjd;	state Exp;
branches
	1.3.4.2.2.1
	1.3.4.2.4.1;
next	1.3.4.3;

1.3.4.3
date	2012.11.17.10.36.28;	author svnexp;	state Exp;
branches;
next	1.3.4.4;

1.3.4.4
date	2012.11.18.12.44.28;	author svnexp;	state Exp;
branches;
next	;

1.3.4.1.2.1
date	2009.10.25.01.10.29;	author kensmith;	state Exp;
branches;
next	;

1.3.4.1.4.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.3.4.2.2.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.3.4.2.4.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.3.4.2.4.2;

1.3.4.2.4.2
date	2012.11.17.08.25.08;	author svnexp;	state Exp;
branches;
next	;


desc
@@


1.10
log
@Switching exporter and resync
@
text
@# $FreeBSD: head/sys/boot/zfs/Makefile 241785 2012-10-20 16:57:23Z avg $

LIB=		zfsboot
INTERNALLIB=

SRCS+=		zfs.c

CFLAGS+=	-DBOOTPROG=\"zfsloader\"
CFLAGS+=	-I${.CURDIR}/../common -I${.CURDIR}/../.. -I.
CFLAGS+=	-I${.CURDIR}/../../../lib/libstand
CFLAGS+=	-I${.CURDIR}/../../cddl/boot/zfs

CFLAGS+=	-ffreestanding
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
CFLAGS+=	-march=i386
CFLAGS+=	-mpreferred-stack-boundary=2
CFLAGS+=	-mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
.endif
.if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm"
CFLAGS+=	-msoft-float
.endif
.if ${MACHINE_CPUARCH} == "amd64"
CFLAGS+=	-m32
.endif

CFLAGS+=	-Wformat -Wall

.if ${MACHINE_CPUARCH} == "amd64"
CLEANFILES+=    machine
machine:
	ln -sf ${.CURDIR}/../../i386/include machine
.endif

.include <bsd.lib.mk>

.if ${MACHINE_CPUARCH} == "amd64"
.if !exists(machine)
beforedepend ${OBJS}: machine
.endif
.endif
@


1.10.2.1
log
@file Makefile was added on branch RELENG_8_4 on 2013-03-28 13:04:03 +0000
@
text
@d1 40
@


1.10.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 41
# $FreeBSD: releng/8.4/sys/boot/zfs/Makefile 243220 2012-11-18 12:30:04Z avg $

LIB=		zfsboot
INTERNALLIB=

SRCS+=		zfs.c

CFLAGS+=	-DBOOTPROG=\"zfsloader\"
CFLAGS+=	-I${.CURDIR}/../common -I${.CURDIR}/../.. -I.
CFLAGS+=	-I${.CURDIR}/../../../lib/libstand
CFLAGS+=	-I${.CURDIR}/../../cddl/boot/zfs

CFLAGS+=	-ffreestanding
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
CFLAGS+=	-march=i386
CFLAGS+=	-mpreferred-stack-boundary=2
CFLAGS+=	-mno-mmx -mno-3dnow -mno-sse -mno-sse2
.endif
.if ${MACHINE_ARCH} == "i386"
CFLAGS+=	-mno-sse3
.endif
.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "arm"
CFLAGS+=	-msoft-float
.endif
.if ${MACHINE_ARCH} == "amd64"
CFLAGS+=	-m32
.endif

CFLAGS+=	-Wformat -Wall

.if ${MACHINE_ARCH} == "amd64"
CLEANFILES+=    machine
machine:
	ln -sf ${.CURDIR}/../../i386/include machine
.endif

.include <bsd.lib.mk>

.if ${MACHINE_ARCH} == "amd64"
beforedepend ${OBJS}: machine
.endif
@


1.9
log
@SVN rev 241785 on 2012-10-20 16:57:23Z by avg

boot: use -march=i386 for both i386 and amd64 builds

.. so that consistent compilation algorithms are used for both
architectures as in practice the binaries are expected to be
interchangeable (for time being).
Previously i386 used default setting which were equivalent to
-march=i486 -mtune=generic.
The only difference is using smaller but slower "leave" instructions.

Discussed with:	jhb, dim
MFC after:	29 days
@
text
@d1 1
a1 1
# $FreeBSD$
@


1.8
log
@SVN rev 238795 on 2012-07-26 10:10:54Z by ache

Try to avoid all files dependence on the modification time of the large and
often modified directory created symbolic links points to - it cause
unnecessary full rebuilds each time make runs when directory is changed.
So do it only if symbolic link does not exists, which usually means that
objdir is clean anyway.

MFC after:      1 week
@
text
@d15 1
d23 1
a23 1
CFLAGS+=	-m32 -march=i386
@


1.7
log
@SVN rev 217033 on 2011-01-05 22:24:33Z by dim

On i386 and amd64, consistently use the following options whenever we
want to avoid using any "advanced" CPU features:

  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
@
text
@d36 1
d39 1
@


1.7.2.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.7.2.2
log
@SVN rev 238992 on 2012-08-02 15:13:12Z by ache

MFC r238795

Try to avoid all files dependence on the modification time of the large
and often modified directory created symbolic links points to - it cause
unnecessary full rebuilds each time make runs when directory is changed.
So do it only if symbolic link does not exists, which usually means that
objdir is clean anyway.

Approved by:    re (kib)
@
text
@a35 1
.if !exists(machine)
a37 1
.endif
@


1.7.2.3
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/sys/boot/zfs/Makefile 238992 2012-08-02 15:13:12Z ache $
@


1.7.2.4
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 243219
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r243219 | avg | 2012-11-18 12:28:29 +0000 (Sun, 18 Nov 2012) | 2 lines
## SVN ##
## SVN ## MFC r241785: boot: use -march=i386 for both i386 and amd64 builds
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/sys/boot/zfs/Makefile 243219 2012-11-18 12:28:29Z avg $
a14 1
CFLAGS+=	-march=i386
d22 1
a22 1
CFLAGS+=	-m32
@


1.7.2.5
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/260096
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/sys/boot/zfs/Makefile 260096 2013-12-30 20:15:46Z dim $
d16 1
a16 1
CFLAGS.gcc+=	-mpreferred-stack-boundary=2
@


1.7.2.2.2.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.7.2.2.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.1/sys/boot/zfs/Makefile 238992 2012-08-02 15:13:12Z ache $
@


1.7.2.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.7.2.1.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.0/sys/boot/zfs/Makefile 217033 2011-01-05 22:24:33Z dim $
@


1.6
log
@SVN rev 217029 on 2011-01-05 22:00:37Z by dim

In lib/libstand, sys/boot/ficl and sys/boot/zfs, -mno-sse3 should also
be used for amd64, not just for i386.
@
text
@d16 1
a16 1
CFLAGS+=	-mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3
@


1.5
log
@SVN rev 213136 on 2010-09-24 19:49:12Z by pjd

- Split code shared by almost any boot loader into separate files and
  clean up most layering violations:

	sys/boot/i386/common/rbx.h:

		RBX_* defines
		OPT_SET()
		OPT_CHECK()

	sys/boot/common/util.[ch]:

		memcpy()
		memset()
		memcmp()
		bcpy()
		bzero()
		bcmp()
		strcmp()
		strncmp() [new]
		strcpy()
		strcat()
		strchr()
		strlen()
		printf()

	sys/boot/i386/common/cons.[ch]:

		ioctrl
		putc()
		xputc()
		putchar()
		getc()
		xgetc()
		keyhit() [now takes number of seconds as an argument]
		getstr()

	sys/boot/i386/common/drv.[ch]:

		struct dsk
		drvread()
		drvwrite() [new]
		drvsize() [new]

	sys/boot/common/crc32.[ch] [new]

	sys/boot/common/gpt.[ch] [new]

- Teach gptboot and gptzfsboot about new files. I haven't touched the
  rest, but there is still a lot of code duplication to be removed.

- Implement full GPT support. Currently we just read primary header and
  partition table and don't care about checksums, etc. After this change we
  verify checksums of primary header and primary partition table and if
  there is a problem we fall back to backup header and backup partition
  table.

- Clean up most messages to use prefix of boot program, so in case of an
  error we know where the error comes from, eg.:

	gptboot: unable to read primary GPT header

- If we can't boot, print boot prompt only once and not every five
  seconds.

- Honour newly added GPT attributes:

	bootme - this is bootable partition
	bootonce - try to boot from this partition only once
	bootfailed - we failed to boot from this partition

- Change boot order of gptboot to the following:

	1. Try to boot from all the partitions that have both 'bootme'
	   and 'bootonce' attributes one by one.
	2. Try to boot from all the partitions that have only 'bootme'
	   attribute one by one.
	3. If there are no partitions with 'bootme' attribute, boot from
	   the first UFS partition.

- The 'bootonce' functionality is implemented in the following way:

	1. Walk through all the partitions and when 'bootonce'
	   attribute is found without 'bootme' attribute, remove
	   'bootonce' attribute and set 'bootfailed' attribute.
	   'bootonce' attribute alone means that we tried to boot from
	   this partition, but boot failed after leaving gptboot and
	   machine was restarted.
	2. Find partition with both 'bootme' and 'bootonce' attributes.
	3. Remove 'bootme' attribute.
	4. Try to execute /boot/loader or /boot/kernel/kernel from that
	   partition. If succeeded we stop here.
	5. If execution failed, remove 'bootonce' and set 'bootfailed'.
	6. Go to 2.

   If whole boot succeeded there is new /etc/rc.d/gptboot script coming
   that will log all partitions that we failed to boot from (the ones with
   'bootfailed' attribute) and will remove this attribute. It will also
   find partition with 'bootonce' attribute - this is the partition we
   booted from successfully. The script will log success and remove the
   attribute.

   All the GPT updates we do here goes to both primary and backup GPT if
   they are valid. We don't touch headers or partition tables when
   checksum doesn't match.

Reviewed by:	arch (Message-ID: <20100917234542.GE1902@@garage.freebsd.pl>)
Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com
MFC after:	2 weeks
@
text
@d16 1
a16 4
CFLAGS+=	-mno-mmx -mno-3dnow -mno-sse -mno-sse2
.endif
.if ${MACHINE_CPUARCH} == "i386"
CFLAGS+=	-mno-sse3
@


1.4
log
@SVN rev 211680 on 2010-08-23 01:50:34Z by imp

MF tbemd: Minor tweaks, prefer MACHINE_CPUARCH generally to MACHINE_ARCH (which simplifies some powerpc/powerpc64 ifs)
@
text
@d8 1
@


1.3
log
@SVN rev 185711 on 2008-12-06 14:45:03Z by ps

Correct include path for i386 specific includes.  This allows zfs
to boot on systems where the loader is built on amd64 systems.
@
text
@d13 1
a13 1
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
d17 1
a17 1
.if ${MACHINE_ARCH} == "i386"
d20 1
a20 1
.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "arm"
d23 1
a23 1
.if ${MACHINE_ARCH} == "amd64"
d29 1
a29 1
.if ${MACHINE_ARCH} == "amd64"
d37 1
a37 1
.if ${MACHINE_ARCH} == "amd64"
@


1.3.4.1
log
@SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)
@
text
@@


1.3.4.2
log
@SVN rev 213994 on 2010-10-17 20:10:00Z by pjd

MFC r213133,r213135,r213136,r213137,r213245:

r213133:

Add three GPT attributes:

GPT_ENT_ATTR_BOOTME - this is bootable partition

GPT_ENT_ATTR_BOOTONCE - try to boot only once from this partition

GPT_ENT_ATTR_BOOTFAILED - set this flag if we cannot boot from partition
	containing GPT_ENT_ATTR_BOOTONCE flag; note that if we cannot
	boot from partition that contains only GPT_ENT_ATTR_BOOTME flag,
	the GPT_ENT_ATTR_BOOTFAILED flag won't be set

According to wikipedia Microsoft TechNet says that attributes are divided into
two halves: the lower 4 bytes representing partition independent attributes,
and the upper 4 bytes are partition type dependent. Microsoft is already using
bits 60 (read-only), 62 (hidden) and 63 (do not automount) and I'd like to not
collide with those, so we are using bit 59 (bootme), 58 (bootonce) and 57
(bootfailed).

Reviewed by:	arch (Message-ID: <20100917234542.GE1902@@garage.freebsd.pl>)

r213135:

Allow to configure GPT attributes. It shouldn't be allowed to set bootfailed
attribute (it should be allowed only to unset it), but for test purposes it
might be useful, so the current code allows it.

Reviewed by:	arch@@ (Message-ID: <20100917234542.GE1902@@garage.freebsd.pl>)

r213136:

- Split code shared by almost any boot loader into separate files and
  clean up most layering violations:

	sys/boot/i386/common/rbx.h:

		RBX_* defines
		OPT_SET()
		OPT_CHECK()

	sys/boot/common/util.[ch]:

		memcpy()
		memset()
		memcmp()
		bcpy()
		bzero()
		bcmp()
		strcmp()
		strncmp() [new]
		strcpy()
		strcat()
		strchr()
		strlen()
		printf()

	sys/boot/i386/common/cons.[ch]:

		ioctrl
		putc()
		xputc()
		putchar()
		getc()
		xgetc()
		keyhit() [now takes number of seconds as an argument]
		getstr()

	sys/boot/i386/common/drv.[ch]:

		struct dsk
		drvread()
		drvwrite() [new]
		drvsize() [new]

	sys/boot/common/crc32.[ch] [new]

	sys/boot/common/gpt.[ch] [new]

- Teach gptboot and gptzfsboot about new files. I haven't touched the
  rest, but there is still a lot of code duplication to be removed.

- Implement full GPT support. Currently we just read primary header and
  partition table and don't care about checksums, etc. After this change we
  verify checksums of primary header and primary partition table and if
  there is a problem we fall back to backup header and backup partition
  table.

- Clean up most messages to use prefix of boot program, so in case of an
  error we know where the error comes from, eg.:

	gptboot: unable to read primary GPT header

- If we can't boot, print boot prompt only once and not every five
  seconds.

- Honour newly added GPT attributes:

	bootme - this is bootable partition
	bootonce - try to boot from this partition only once
	bootfailed - we failed to boot from this partition

- Change boot order of gptboot to the following:

	1. Try to boot from all the partitions that have both 'bootme'
	   and 'bootonce' attributes one by one.
	2. Try to boot from all the partitions that have only 'bootme'
	   attribute one by one.
	3. If there are no partitions with 'bootme' attribute, boot from
	   the first UFS partition.

- The 'bootonce' functionality is implemented in the following way:

	1. Walk through all the partitions and when 'bootonce'
	   attribute is found without 'bootme' attribute, remove
	   'bootonce' attribute and set 'bootfailed' attribute.
	   'bootonce' attribute alone means that we tried to boot from
	   this partition, but boot failed after leaving gptboot and
	   machine was restarted.
	2. Find partition with both 'bootme' and 'bootonce' attributes.
	3. Remove 'bootme' attribute.
	4. Try to execute /boot/loader or /boot/kernel/kernel from that
	   partition. If succeeded we stop here.
	5. If execution failed, remove 'bootonce' and set 'bootfailed'.
	6. Go to 2.

   If whole boot succeeded there is new /etc/rc.d/gptboot script coming
   that will log all partitions that we failed to boot from (the ones with
   'bootfailed' attribute) and will remove this attribute. It will also
   find partition with 'bootonce' attribute - this is the partition we
   booted from successfully. The script will log success and remove the
   attribute.

   All the GPT updates we do here goes to both primary and backup GPT if
   they are valid. We don't touch headers or partition tables when
   checksum doesn't match.

Reviewed by:	arch (Message-ID: <20100917234542.GE1902@@garage.freebsd.pl>)
Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r213137:

Add gptboot script that is responsible for:
- looking for partition with 'bootonce' attribute alone (without 'bootme'
  attribute), removing it and logging that we successfully booted from this
  partition.
- looking for partitions with 'bootfailed' attribute, removing it and
  logging that we failed to boot from this partition.

Reviewed by:	arch (Message-ID: <20100917234542.GE1902@@garage.freebsd.pl>)
Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r213245:

Document recently added GPT attributes (bootme, bootonce, bootfailed) and
list other schemes attributes.

Reviewed by:	simon, rpaulo
@
text
@a7 1
CFLAGS+=	-DBOOTPROG=\"zfsloader\"
@


1.3.4.3
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/8/sys/boot/zfs/Makefile 213994 2010-10-17 20:10:00Z pjd $
@


1.3.4.4
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 243220
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r243220 | avg | 2012-11-18 12:30:04 +0000 (Sun, 18 Nov 2012) | 2 lines
## SVN ##
## SVN ## MFC r241785: boot: use -march=i386 for both i386 and amd64 builds
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/8/sys/boot/zfs/Makefile 243220 2012-11-18 12:30:04Z avg $
a14 1
CFLAGS+=	-march=i386
d25 1
a25 1
CFLAGS+=	-m32
@


1.3.4.2.4.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.3.4.2.4.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/8.3/sys/boot/zfs/Makefile 213994 2010-10-17 20:10:00Z pjd $
@


1.3.4.2.2.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.3.4.1.4.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.3.4.1.2.1
log
@SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)
@
text
@@


1.3.2.1
log
@SVN rev 192665 on 2009-05-23 19:54:18Z by kmacy

Import ZFS loader support missed in the initial MFC
set LOADER_ZFS_SUPPORT=Y in make.conf to enable
@
text
@@


1.3.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/7/sys/boot/zfs/Makefile 192665 2009-05-23 19:54:18Z kmacy $
@


1.3.2.1.4.1
log
@SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)
@
text
@@


1.3.2.1.4.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/7.4/sys/boot/zfs/Makefile 192665 2009-05-23 19:54:18Z kmacy $
@


1.3.2.1.2.1
log
@SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)
@
text
@@


1.2
log
@SVN rev 185175 on 2008-11-22 14:24:55Z by dfr

Fix amd64 build and re-enable gptzfsboot.
@
text
@d32 1
a32 1
	ln -sf ${.CURDIR}/../../../i386/include machine
@


1.1
log
@SVN rev 185029 on 2008-11-17 20:49:29Z by pjd

Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes.

This bring huge amount of changes, I'll enumerate only user-visible changes:

- Delegated Administration

	Allows regular users to perform ZFS operations, like file system
	creation, snapshot creation, etc.

- L2ARC

	Level 2 cache for ZFS - allows to use additional disks for cache.
	Huge performance improvements mostly for random read of mostly
	static content.

- slog

	Allow to use additional disks for ZFS Intent Log to speed up
	operations like fsync(2).

- vfs.zfs.super_owner

	Allows regular users to perform privileged operations on files stored
	on ZFS file systems owned by him. Very careful with this one.

- chflags(2)

	Not all the flags are supported. This still needs work.

- ZFSBoot

	Support to boot off of ZFS pool. Not finished, AFAIK.

	Submitted by:	dfr

- Snapshot properties

- New failure modes

	Before if write requested failed, system paniced. Now one
	can select from one of three failure modes:
	- panic - panic on write error
	- wait - wait for disk to reappear
	- continue - serve read requests if possible, block write requests

- Refquota, refreservation properties

	Just quota and reservation properties, but don't count space consumed
	by children file systems, clones and snapshots.

- Sparse volumes

	ZVOLs that don't reserve space in the pool.

- External attributes

	Compatible with extattr(2).

- NFSv4-ACLs

	Not sure about the status, might not be complete yet.

	Submitted by:	trasz

- Creation-time properties

- Regression tests for zpool(8) command.

Obtained from:	OpenSolaris
@
text
@d12 14
a25 4
# XXX need arch-specific bootstrap CFLAGS here
# 
CFLAGS+=	-ffreestanding -mpreferred-stack-boundary=2 \
		-mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3
@

