summaryrefslogtreecommitdiffstats
path: root/sys/conf
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-08-17 19:02:23 +0000
committerdim <dim@FreeBSD.org>2015-08-17 19:02:23 +0000
commit1b2342b5bac68ed5fb9fa605713427bcfc02f964 (patch)
tree1e4ed07070b081ea94eda0aedb432015098f448c /sys/conf
parentc1addfe0e15d5999b596bb58b758b424143bb484 (diff)
parenta7ecfcac5413dc4d0d69986acfbe52a5e8ecb48f (diff)
downloadFreeBSD-src-1b2342b5bac68ed5fb9fa605713427bcfc02f964.zip
FreeBSD-src-1b2342b5bac68ed5fb9fa605713427bcfc02f964.tar.gz
Merge ^/head r286697 through r286857.
Diffstat (limited to 'sys/conf')
-rw-r--r--sys/conf/Makefile.arm4
-rw-r--r--sys/conf/NOTES7
-rw-r--r--sys/conf/files24
-rw-r--r--sys/conf/files.amd642
-rw-r--r--sys/conf/kern.post.mk28
-rw-r--r--sys/conf/kern.pre.mk29
-rw-r--r--sys/conf/options12
7 files changed, 78 insertions, 28 deletions
diff --git a/sys/conf/Makefile.arm b/sys/conf/Makefile.arm
index 86b11c6..af5f7da 100644
--- a/sys/conf/Makefile.arm
+++ b/sys/conf/Makefile.arm
@@ -66,10 +66,6 @@ SYSTEM_LD_TAIL +=;sed s/" + SIZEOF_HEADERS"// ldscript.$M\
${KERNEL_KO}.bin; \
rm ${FULLKERNEL}.noheader
-.if defined(MFS_IMAGE)
-SYSTEM_LD_TAIL += ;sh ${S}/tools/embed_mfs.sh ${KERNEL_KO}.bin ${MFS_IMAGE};
-.endif
-
FILES_CPU_FUNC = \
$S/$M/$M/cpufunc_asm_arm9.S \
$S/$M/$M/cpufunc_asm_arm10.S \
diff --git a/sys/conf/NOTES b/sys/conf/NOTES
index b0619cb..7bc2048 100644
--- a/sys/conf/NOTES
+++ b/sys/conf/NOTES
@@ -2981,9 +2981,10 @@ options MAXFILES=999
# Random number generator
# Only ONE of the below two may be used; they are mutually exclusive.
-# If neither is present, then the Fortuna algorithm is used.
-options RANDOM_YARROW # Yarrow CSPRNG (old default)
-#options RANDOM_DUMMY # Dummy CSPRNG that always blocks
+# If neither is present, then the Fortuna algorithm is selected.
+#options RANDOM_YARROW # Yarrow CSPRNG (old default)
+#options RANDOM_LOADABLE # Allow the algorithm to be loaded as
+ # a module.
# For developers.
options RANDOM_DEBUG # Extra debugging messages
diff --git a/sys/conf/files b/sys/conf/files
index 531647f..dfe9763 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -83,7 +83,7 @@ cam/ctl/ctl_backend_ramdisk.c optional ctl
cam/ctl/ctl_cmd_table.c optional ctl
cam/ctl/ctl_frontend.c optional ctl
cam/ctl/ctl_frontend_cam_sim.c optional ctl
-cam/ctl/ctl_frontend_internal.c optional ctl
+cam/ctl/ctl_frontend_ioctl.c optional ctl
cam/ctl/ctl_frontend_iscsi.c optional ctl
cam/ctl/ctl_scsi_all.c optional ctl
cam/ctl/ctl_tpc.c optional ctl
@@ -145,6 +145,7 @@ cddl/contrib/opensolaris/uts/common/fs/zfs/blkptr.c optional zfs compile-with
cddl/contrib/opensolaris/uts/common/fs/zfs/bplist.c optional zfs compile-with "${ZFS_C}"
cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c optional zfs compile-with "${ZFS_C}"
cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c optional zfs compile-with "${ZFS_C}"
+cddl/contrib/opensolaris/uts/common/fs/zfs/bqueue.c optional zfs compile-with "${ZFS_C}"
cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c optional zfs compile-with "${ZFS_C}"
cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c optional zfs compile-with "${ZFS_C}"
cddl/contrib/opensolaris/uts/common/fs/zfs/ddt_zap.c optional zfs compile-with "${ZFS_C}"
@@ -174,6 +175,7 @@ cddl/contrib/opensolaris/uts/common/fs/zfs/gzip.c optional zfs compile-with "$
cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c optional zfs compile-with "${ZFS_C}"
cddl/contrib/opensolaris/uts/common/fs/zfs/lzjb.c optional zfs compile-with "${ZFS_C}"
cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c optional zfs compile-with "${ZFS_C}"
+cddl/contrib/opensolaris/uts/common/fs/zfs/multilist.c optional zfs compile-with "${ZFS_C}"
cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c optional zfs compile-with "${ZFS_C}"
cddl/contrib/opensolaris/uts/common/fs/zfs/refcount.c optional zfs compile-with "${ZFS_C}"
cddl/contrib/opensolaris/uts/common/fs/zfs/rrwlock.c optional zfs compile-with "${ZFS_C}"
@@ -548,14 +550,14 @@ crypto/des/des_ecb.c optional crypto | ipsec | netsmb
crypto/des/des_setkey.c optional crypto | ipsec | netsmb
crypto/rc4/rc4.c optional netgraph_mppc_encryption | kgssapi
crypto/rijndael/rijndael-alg-fst.c optional crypto | geom_bde | \
- ipsec | random random_yarrow | random !random_yarrow !random_dummy | wlan_ccmp
-crypto/rijndael/rijndael-api-fst.c optional geom_bde | random random_yarrow | random !random_yarrow !random_dummy
+ ipsec | random !random_loadable | wlan_ccmp
+crypto/rijndael/rijndael-api-fst.c optional geom_bde | random !random_loadable
crypto/rijndael/rijndael-api.c optional crypto | ipsec | wlan_ccmp
crypto/sha1.c optional carp | crypto | ipsec | \
netgraph_mppc_encryption | sctp
-crypto/sha2/sha2.c optional crypto | geom_bde | ipsec | random random_yarrow | random !random_yarrow !random_dummy | \
+crypto/sha2/sha2.c optional crypto | geom_bde | ipsec | random !random_loadable | \
sctp | zfs
-crypto/sha2/sha256c.c optional crypto | geom_bde | ipsec | random random_yarrow | random !random_yarrow !random_dummy | \
+crypto/sha2/sha256c.c optional crypto | geom_bde | ipsec | random !random_loadable | \
sctp | zfs
crypto/siphash/siphash.c optional inet | inet6
crypto/siphash/siphash_test.c optional inet | inet6
@@ -2312,12 +2314,14 @@ rt2860.fw optional rt2860fw | ralfw \
compile-with "${NORMAL_FW}" \
no-obj no-implicit-rule \
clean "rt2860.fw"
-dev/random/randomdev_none.c optional !random
-dev/random/randomdev.c optional random
-dev/random/random_harvestq.c optional random random_yarrow | random !random_dummy
+dev/random/random_infra.c optional random
+dev/random/random_harvestq.c optional random
+dev/random/randomdev.c optional random random_yarrow | \
+ random !random_yarrow !random_loadable
dev/random/yarrow.c optional random random_yarrow
-dev/random/fortuna.c optional random !random_yarrow !random_dummy
-dev/random/hash.c optional random random_yarrow | random !random_dummy
+dev/random/fortuna.c optional random !random_yarrow !random_loadable
+dev/random/hash.c optional random random_yarrow | \
+ random !random_yarrow !random_loadable
dev/rc/rc.c optional rc
dev/re/if_re.c optional re
dev/rl/if_rl.c optional rl pci
diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64
index 2ffe102..8451e00 100644
--- a/sys/conf/files.amd64
+++ b/sys/conf/files.amd64
@@ -40,7 +40,7 @@ ia32_genassym.o standard \
#
ia32_assym.h standard \
dependency "$S/kern/genassym.sh ia32_genassym.o" \
- compile-with "env NM='${NM}' sh $S/kern/genassym.sh ia32_genassym.o > ${.TARGET}" \
+ compile-with "env NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genassym.sh ia32_genassym.o > ${.TARGET}" \
no-obj no-implicit-rule before-depend \
clean "ia32_assym.h"
#
diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk
index 28ea453..137e72c 100644
--- a/sys/conf/kern.post.mk
+++ b/sys/conf/kern.post.mk
@@ -121,7 +121,7 @@ gdbinit:
.endif
.endif
-${FULLKERNEL}: ${SYSTEM_DEP} vers.o ${MFS_IMAGE}
+${FULLKERNEL}: ${SYSTEM_DEP} vers.o
@rm -f ${.TARGET}
@echo linking ${.TARGET}
${SYSTEM_LD}
@@ -133,9 +133,6 @@ ${FULLKERNEL}: ${SYSTEM_DEP} vers.o ${MFS_IMAGE}
${OBJCOPY} --strip-debug ${.TARGET}
.endif
${SYSTEM_LD_TAIL}
-.if defined(MFS_IMAGE)
- sh ${S}/tools/embed_mfs.sh ${FULLKERNEL} ${MFS_IMAGE}
-.endif
.if !exists(${.OBJDIR}/.depend)
${SYSTEM_OBJS}: assym.s vnode_if.h ${BEFORE_DEPEND:M*.h} ${MFILES:T:S/.m$/.h/}
@@ -177,7 +174,7 @@ hack.So: Makefile
./assym.s: assym.s
assym.s: $S/kern/genassym.sh genassym.o
- NM='${NM}' sh $S/kern/genassym.sh genassym.o > ${.TARGET}
+ NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genassym.sh genassym.o > ${.TARGET}
genassym.o: $S/$M/$M/genassym.c
${CC} -c ${CFLAGS:N-fno-common} $S/$M/$M/genassym.c
@@ -301,6 +298,27 @@ vnode_if_newproto.h:
vnode_if_typedef.h:
${AWK} -f $S/tools/vnode_if.awk $S/kern/vnode_if.src -q
+.if ${MFS_IMAGE:Uno} != "no"
+# Generate an object file from the file system image to embed in the kernel
+# via linking. Make sure the contents are in the mfs section and rename the
+# start/end/size variables to __start_mfs, __stop_mfs, and mfs_size,
+# respectively.
+embedfs_${MFS_IMAGE:T:R}.o: ${MFS_IMAGE}
+ ${OBJCOPY} --input-target binary \
+ --output-target ${EMBEDFS_FORMAT.${MACHINE_ARCH}} \
+ --binary-architecture ${EMBEDFS_ARCH.${MACHINE_ARCH}} \
+ ${MFS_IMAGE} ${.TARGET}
+ ${OBJCOPY} \
+ --rename-section .data=mfs,contents,alloc,load,readonly,data \
+ --redefine-sym \
+ _binary_${MFS_IMAGE:C,[^[:alnum:]],_,g}_size=__mfs_root_size \
+ --redefine-sym \
+ _binary_${MFS_IMAGE:C,[^[:alnum:]],_,g}_start=mfs_root \
+ --redefine-sym \
+ _binary_${MFS_IMAGE:C,[^[:alnum:]],_,g}_end=mfs_root_end \
+ ${.TARGET}
+.endif
+
# XXX strictly, everything depends on Makefile because changes to ${PROF}
# only appear there, but we don't handle that.
diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk
index cf1b127..3783881 100644
--- a/sys/conf/kern.pre.mk
+++ b/sys/conf/kern.pre.mk
@@ -191,6 +191,9 @@ SYSTEM_DEP= Makefile ${SYSTEM_OBJS}
SYSTEM_OBJS= locore.o ${MDOBJS} ${OBJS}
SYSTEM_OBJS+= ${SYSTEM_CFILES:.c=.o}
SYSTEM_OBJS+= hack.So
+.if ${MFS_IMAGE:Uno} != "no"
+SYSTEM_OBJS+= embedfs_${MFS_IMAGE:T:R}.o
+.endif
SYSTEM_LD= @${LD} -Bdynamic -T ${LDSCRIPT} ${_LDFLAGS} --no-warn-mismatch \
--warn-common --export-dynamic --dynamic-linker /red/herring \
-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
@@ -222,6 +225,32 @@ MKMODULESENV+= DEBUG_FLAGS="${DEBUG}"
.endif
MKMODULESENV+= _MPATH="${_MPATH}"
+# Architecture and output format arguments for objdump to convert image to
+# object file
+.if ${MFS_IMAGE:Uno} != "no"
+
+.if !defined(EMBEDFS_FORMAT.${MACHINE_ARCH})
+EMBEDFS_FORMAT.${MACHINE_ARCH}!= awk -F'"' '/OUTPUT_FORMAT/ {print $$2}' ${LDSCRIPT}
+.if empty(EMBEDFS_FORMAT.${MACHINE_ARCH})
+.undef EMBEDFS_FORMAT.${MACHINE_ARCH}
+.endif
+.endif
+
+.if !defined(EMBEDFS_ARCH.${MACHINE_ARCH})
+EMBEDFS_ARCH.${MACHINE_ARCH}!= sed -n '/OUTPUT_ARCH/s/.*(\(.*\)).*/\1/p' ${LDSCRIPT}
+.if empty(EMBEDFS_ARCH.${MACHINE_ARCH})
+.undef EMBEDFS_ARCH.${MACHINE_ARCH}
+.endif
+.endif
+
+EMBEDFS_FORMAT.arm?= elf32-littlearm
+EMBEDFS_FORMAT.armv6?= elf32-littlearm
+EMBEDFS_FORMAT.mips?= elf32-tradbigmips
+EMBEDFS_FORMAT.mipsel?= elf32-tradlittlemips
+EMBEDFS_FORMAT.mips64?= elf64-tradbigmips
+EMBEDFS_FORMAT.mips64el?= elf64-tradlittlemips
+.endif
+
# Detect kernel config options that force stack frames to be turned on.
DDB_ENABLED!= grep DDB opt_ddb.h || true ; echo
DTR_ENABLED!= grep KDTRACE_FRAME opt_kdtrace.h || true ; echo
diff --git a/sys/conf/options b/sys/conf/options
index bf6c4a6..30bbc53 100644
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -711,6 +711,7 @@ DEV_PCI opt_pci.h
DEV_PF opt_pf.h
DEV_PFLOG opt_pf.h
DEV_PFSYNC opt_pf.h
+DEV_RANDOM opt_global.h
DEV_SPLASH opt_splash.h
DEV_VLAN opt_vlan.h
@@ -946,13 +947,14 @@ RCTL opt_global.h
# The DEBUG option is in global.h as the random harvesting
# puts probes all over the place, and it makes little sense
# to pollute these headers with an extra include.
-# the DUMMY option is in global.h because it is used to
-# turn off harvesting all over the kernel.
-RANDOM_DEBUG opt_global.h
+RANDOM_DEBUG opt_random.h
# Which CSPRNG hashes we get.
-# These are mutually exclusive. With neither, Fortuna is selected.
-RANDOM_DUMMY opt_global.h
+# If Yarrow is not chosen, Fortuna is selected.
RANDOM_YARROW opt_random.h
+# With this, no entropy processor is loaded, but the entropy
+# harvesting infrastructure is present. This means an entropy
+# processor may be loaded as a module.
+RANDOM_LOADABLE opt_random.h
# Intel em(4) driver
EM_MULTIQUEUE opt_em.h
OpenPOWER on IntegriCloud