MFC r256343,256540-256541,256544,256549,256551,256553,257939,258021,258927,
259144,259148,259470,259472,259474,259476-259478,259480-259481,259570,
259597-259598, and 261960 (24 revisions; summarized below)...
r256343: Add zfsboot module as an option for automatic configuration
r256540: Add zpool_cache_* variables to loader.conf(5)
r256541: Document BSDINSTALL_TMPBOOT in bsdinstall.8
r256544: Fix a typo when setting up loader.conf(5) GELI entries
r256549: Document zfsboot in bsdinstall.8
r256551: Bump .Dd date in bsdinstall.8
r256553: Align ZFSBOOT_BEROOT_NAME with sysutils/beadm + Solaris beadm
r257939: Validate scripted partition entry before acting on disks
r258021: Switch default MBR bootcode from /boot/boot0 to /boot/mbr
r258927: Fix early regression in enabling the Encryption feature
r259144: Fix early regression in entering passphrase for Encryption
r259148: Fix typo that broke booting from Encrypted setup
r259470: Add default /var/mail with atime=on for mail apps
r259472: Accept NULL input as also meaning zero swap
r259474: Bug fixes and debugging improvements
r259476: Improve default ZFS disk layout
r259477: fletcher4 is currently the default
r259478: De-uglify the geli(8)-setup infobox by adding a newline
r259480: Fix ghosted zroot pool issue
r259481: Auto-enable 4k alignment with Encryption
r259570: Fix "[: -eq: argument expected" error
r259597: Fix installation to 3-4+ disks
r259598: Set the cachefile property so bootpools get imported
r261960: Add zfsboot to scripted interface of bsdinstall


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@264437 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r264243:

Loosen the processing of *_IF_aliasN vars to be less strict. Previously,
the first alias had to be _alias0 and processing stopped at the first non-
defined variable (preventing gaps). Allowing gaps gives the administrator
the ability to group aliases in an adhoc manner and also lifts the
requirement to renumber aliases simply to comment-out an existing one.
Aliases are processed in numerical ascending order.

NB: Also Patches mdconfig{,2} rc(8) boot scripts to loosen the numbering
scheme for mdconfig_mdN settings to be less strict in the same manner.

Discussed on:   -rc


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@264439 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r264343:
  Add SRC_UPDATE_SKIP, DOC_UPDATE_SKIP, and PORTS_UPDATE_SKIP
  variables.  These are intended to allow bypassing the
  'svn co /usr/{src,doc,ports}' step in the chroot when the
  tree exists from external means.

  The use case here is that /usr/src, /usr/doc, and /usr/ports
  in the chroot exist as result of zfs dataset clones, so it
  is possible (and happens quite often) that the included
  distributions may not be consistent.  (This is not the case
  for -RELEASE builds, but does happen for snapshot builds.)

Sponsored by:	The FreeBSD Foundation


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@264441 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r263957:
  Increase the number of TX DMA segments from 32 to 35.  It turned
  out 32 is not enough to support a full sized TSO packet.
  While I'm here fix a long standing bug introduced in r169632 in
  bce(4) where it didn't include L2 header length of TSO packet in
  the maximum DMA segment size calculation.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@264443 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r259543:
  Failed m_devget(9) indicates lack of free mbuf cluster.  Update
  if_iqdrops counter for that case since the received frame is ok.
  While here, simplify updating counter logic.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@264445 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r260429:
  m_defrag(9) does not touch original mbuf chain when it can't
  allocate new mbuf.  Free original mbuf chain when driver is not
  able to send the packet.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@264447 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r264448: Fix typo in debug/log statement.

Submitted by:   Rick Miller <vmiller@hostileadmin.com>


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@264450 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC 264242,264244,264259

Fix panic on load new driver while vt(4) is in VGA textmode.
o Mute terminal while vt(4) driver change in progress.
o Reset VDF_TEXTMODE before init new driver.
o Assign default font, if new driver is not in TEXTMODE.
o Do not update screen while driver changing.
o Unmute terminal when done with driver replacement.
o Move init fonts to early point.
o Minor cleanup.
o Do not fill screen, while muted. (kern/subr_terminal.c)

Sponsored by:	The FreeBSD Foundation


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@264456 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r264345:

Amend r263891, by making clang default to DWARF2 debug info format for
all FreeBSD versions, not just 10.x and earlier.  Apparently too many
people seem to have trouble with post-1993 formats.

Also remove the related notes about messing with kernel configuration
files from UPDATING, which are now superfluous.

Requested by:	many


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@264464 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC: r264349

mdoc and spelling cleanup.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@264476 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r263998:

Rename __wchar_t so it no longer conflicts with __wchar_t from clang 3.4
-fms-extensions.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@264495 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r264420:

  Always install pkg.conf. Don't depend on MK_PKGBOOTSTRAP.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@264503 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Don't pass a timeout of 0 ticks to pause() for a delay of less than 1
hz tick.  On 8.x this results in an infinite sleep as pause() does not
support a delay of 0 ticks.  Since all delay values are converted from
nanoseconds to ticks using a floor function, skipping the sleep for a
delay smaller than 1 tick is the more consistent than rounding up to a
single tick.

This is a direct commit to 8 and 9 as 10.x and later use pause_sbt()
instead.

Reviewed by:	avg


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@264505 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r237528:

Create a symlink to sys/elf32.h, sys/elf64.h, and sys/elf_common.h.

When building libelf in the bootstrap stage this would include the tree
versions of, for example, sys/_types.h. This would work as long as the
tree's version of this file was close enough to the system's version of
the file. If, however, there was a change in the tree such that the location
of a typedef was moved this would cause problems. In this case the version
of sys/_types.h in the tree no longer defines __wchar_t and expects it to
to be defined in machine/_types.h, however we pick up machine/_types.h from
the system and find it is not defined there. The solution is to restrict the
parts of sys er include from the tree to those that are needed.

This fixes the recent Tinderbox failure.

MFC r237531:

Add the sys directory we create to the list of items to clean.

MFC r238741:

Don't ever build files depending on the directory where they are placed in.
It is obvious that its modification time will change with each such file
builded.
This bug cause whole libelf to rebuild itself each second make run
(and relink that files on each first make run) in the loop.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@264506 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r264354 but change the lock arg and implementation to fit the current state
of CAM in stable/9

Fix insta-panic on assert of unlocked periph mtx in ciss(4) when
logical volume state changes.

I'm still setting the mergeinfo as done here as the intent of the MFC, if not
the EXACT code is being implemented.

Reviewed by:	mav@
Sponsored by:	Yahoo! Inc


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@264511 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r249803:

	Add support for Intel C600/X79 Series Chipset KT Controller.

PR:		kern/177072


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@264547 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC all recent changes on -HEAD to dd(1).


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@264579 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC: r264315, r264316

Fix Xref order in SEE ALSO.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@264587 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFH (r261511, r261542): add an example to the man page


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@264597 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFH (r262555): install the sntp(1) man page


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@264599 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f