Commit Graph

6 Commits

Author SHA1 Message Date
Warner Losh
c1d8f9bb54 Use defs.mk values for userboot
Sponsored by: Netflix
2017-10-30 23:14:22 +00:00
Warner Losh
eca8b9c449 Define SASRC and use it
Define SASRC to point to the current libstand sources. Include
../Makefile.inc early enough in a few places so we can .include
"${SASRC}/Makefile" and have it work. Create a new pass-up
Makefile.inc in sys/boot/userboot to allow this pattern to work.

Sponsored by: Netflix
2017-10-09 22:12:32 +00:00
Allan Jude
3595d72f86 Disable loop unrolling in skein for sys/boot
When tsoome@ added skein support to the ZFS boot code and zfsloader, it
resulted in an explosion in code size, running close to a number of
limits.

The default for the C version of skein is to unroll all loops for
skein-256 and 512

Disabling the loop unrolling saves 20-28kb from each binary
boot1.efi
gptzfsboot
loader.efi
userboot.so
zfsloader

Reviewed by:	emaste, tsoome
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D7826
2016-10-06 03:32:30 +00:00
Toomas Soome
2c55d0903d Add SHA512, skein, large blocks support for loader zfs.
Updated sha512 from illumos.
Using skein from freebsd crypto tree.
Since loader itself is using 64MB memory for heap, updated zfsboot to
use same, and this also allows to support zfs large blocks.

Note, adding additional features does increate zfsboot code, therefore
this update does increase zfsboot code to 128k, also I have ported gptldr.S
update to zfsldr.S to support 64k+ code.

With this update, boot1.efi has almost reached the current limit of the size
set for it, so one of the future patches for boot1.efi will need to
increase the limit.

Currently known missing zfs features in boot loader are edonr and gzip support.

Reviewed by:	delphij, imp
Approved by:	imp (mentor)
Obtained from:	sha256.c update and skein_zfs.c stub from illumos.
Differential Revision:	https://reviews.freebsd.org/D7418
2016-08-18 00:37:07 +00:00
Bryan Drewery
b1f92fa229 META MODE: Update dependencies with 'the-lot' and add missing directories.
This is not properly respecting WITHOUT or ARCH dependencies in target/.
Doing so requires a massive effort to rework targets/ to do so.  A
better approach will be to either include the SUBDIR Makefiles directly
and map to DIRDEPS or just dynamically lookup the SUBDIR.  These lose
the benefit of having a userland/lib, userland/libexec, etc, though and
results in a massive package.  The current implementation of targets/ is
very unmaintainable.

Currently rescue/rescue and sys/modules are still not connected.

Sponsored by:	EMC / Isilon Storage Division
2015-12-01 05:23:19 +00:00
Peter Grehan
cf087c12c2 ZFS boot support for bhyveload.
Modelled after the i386 zfsloader. However, with no
2nd stage zfsboot to search for a bootable dataset,
attempt a ZFS boot if there is more than one ZFS
dataset found during the disk probe.

sys/boot/userboot/zfs
 - build the ZFS boot library

sys/boot/userboot/userboot/
 conf.c
  - Add the ZFS pool and filesystem tables
 devicename.c
  - correctly format ZFS devices
 main.c
  - increase the size of the libstand malloc pool
  to account for the increased usage from ZFS buffers
  - probe for a ZFS dataset, and if one is
  found, attempt to boot from it.

usr.sbin/bhyveload/bhyveload.c
 - allow multiple invocations of the '-d' option
 to specify multiple disks e.g. a raidz set.
 Up to 32 disks are supported.

Tested with various combinations of GPT, MBR, single
and multiple disks, RAID-Z, mirrors.

Reviewed by:	neel
Discussed with:	avg
Tested by:	Michael Dexter and others
MFC after:	3 weeks
2014-02-22 07:18:06 +00:00