896ddeb466
Rather than copying the needed modules from FFS to the ramdisk, load then directly from FFS instead. This way, we can symlink ramdisk stand into /altroot and let nature take it's course like loading firmware. Set shell exit on error rather than using chained commands. zpool import seems to SIGBUS randomly on amd64 and if we didn't do the former then zpool would hang the init. Now at least we exit to the shell.
36 lines
718 B
Plaintext
36 lines
718 B
Plaintext
# $NetBSD: list.zfsroot,v 1.2 2020/02/23 05:15:54 roy Exp $
|
|
#
|
|
# list file (c.f. parselist.awk) for ZFS on root.
|
|
#
|
|
|
|
SRCDIRS external/cddl/osnet/sbin
|
|
PROG sbin/zfs
|
|
PROG sbin/zpool
|
|
LINK sbin/zfs sbin/mount_zfs
|
|
ARGVLN zfs mount_zfs
|
|
|
|
# We need sysctl to set init.root=/altroot
|
|
PROG sbin/sysctl
|
|
|
|
# We need modload as we cannot build CDDL modules in the kernel
|
|
PROG sbin/modload
|
|
PROG sbin/modunload
|
|
PROG sbin/modstat
|
|
|
|
LIBS -lnvpair
|
|
LIBS -luutil
|
|
LIBS -lzfs
|
|
LIBS -lavl
|
|
LIBS -lm
|
|
LIBS -lpthread
|
|
LIBS -lumem
|
|
#LIBS -lutil # replaced by libhack
|
|
LIBS -lz
|
|
LIBS -lzfs_core
|
|
|
|
COPY ${NETBSDSRCDIR}/distrib/common/zfsroot.rc etc/rc
|
|
|
|
# Make modules and firmware images available
|
|
SYMLINK altroot/stand stand
|
|
SYMLINK altroot/libdata libdata
|