From 501603fb785aba4e0e587878e77209c0265febb0 Mon Sep 17 00:00:00 2001 From: rin Date: Sun, 8 Mar 2020 06:23:18 +0000 Subject: [PATCH] sun2 kernel is restricted to ~2MB due to bootloader. It seems that working kernel should be more smaller. Strip off most kernel options, and provide by kernel modules. Also add GENERIC kernel for NFS root instead of FFS. --- etc/etc.sun2/Makefile.inc | 4 ++-- sys/arch/sun2/conf/GENERIC | 29 +++++++++++++++++------------ sys/arch/sun2/conf/NFS | 10 ++++++++++ 3 files changed, 29 insertions(+), 14 deletions(-) create mode 100644 sys/arch/sun2/conf/NFS diff --git a/etc/etc.sun2/Makefile.inc b/etc/etc.sun2/Makefile.inc index 364b24b63dcb..2f1d07c03e6d 100644 --- a/etc/etc.sun2/Makefile.inc +++ b/etc/etc.sun2/Makefile.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.7 2007/07/24 10:49:28 pavel Exp $ +# $NetBSD: Makefile.inc,v 1.8 2020/03/08 06:23:18 rin Exp $ # # etc.sun2/Makefile.inc -- sun2-specific etc Makefile targets # @@ -6,7 +6,7 @@ # If you change the list of distributed kernels, don't forget # to update the release documentation in distrib/notes/common/contents -KERNEL_SETS= GENERIC FOURMEG DISKLESS +KERNEL_SETS= GENERIC FOURMEG DISKLESS NFS EXTRA_KERNELS= INSTALL diff --git a/sys/arch/sun2/conf/GENERIC b/sys/arch/sun2/conf/GENERIC index 97f4637b94f0..a1f5ea5e5f53 100644 --- a/sys/arch/sun2/conf/GENERIC +++ b/sys/arch/sun2/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.102 2019/04/26 22:46:04 sevan Exp $ +# $NetBSD: GENERIC,v 1.103 2020/03/08 06:23:18 rin Exp $ # # GENERIC machine description file # @@ -23,11 +23,16 @@ include "arch/sun2/conf/std.sun2" +options MODULAR # new style module(7) framework +#options MODULAR_DEFAULT_AUTOLOAD +options INSECURE # allow modload(8) in multiuser mode + #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.102 $" +#ident "GENERIC-$Revision: 1.103 $" -makeoptions COPTS="-Os" # optimize for size +makeoptions COPTS="-Os -fno-inline-small-functions" + # bootloader has size limit (~2MB) # Machines to be supported by this kernel #options FPU_EMULATE @@ -37,12 +42,12 @@ maxusers 4 # Standard system options options KTRACE # system call tracing -options SYSVMSG # System V message queues -options SYSVSEM # System V semaphores -options SYSVSHM # System V shared memory +#options SYSVMSG # System V message queues +#options SYSVSEM # System V semaphores +#options SYSVSHM # System V shared memory #options INSECURE # disable kernel security level #options USERCONF # userconf(4) support -#options PIPE_SOCKETPAIR # smaller, but slower pipe(2) +options PIPE_SOCKETPAIR # smaller, but slower pipe(2) #options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel # Alternate buffer queue strategies for better responsiveness under high @@ -73,15 +78,15 @@ include "conf/compat_netbsd16.config" # Filesystem options file-system FFS # Berkeley Fast Filesystem -file-system NFS # Sun NFS client support -file-system CD9660 # ISO 9660 + Rock Ridge file system +#file-system NFS # Sun NFS client support +#file-system CD9660 # ISO 9660 + Rock Ridge file system #file-system FDESC # /dev/fd/* -file-system KERNFS # /kern -file-system NULLFS # loopback file system +#file-system KERNFS # /kern +#file-system NULLFS # loopback file system #file-system OVERLAY # overlay file system #file-system PROCFS # /proc #file-system UNION # union file system -file-system MFS # memory-based filesystem +#file-system MFS # memory-based filesystem file-system PTYFS # /dev/pts/N support #file-system TMPFS # Efficient memory file-system #file-system UDF # experimental - OSTA UDF CD/DVD file-system diff --git a/sys/arch/sun2/conf/NFS b/sys/arch/sun2/conf/NFS new file mode 100644 index 000000000000..833a9e99e7bb --- /dev/null +++ b/sys/arch/sun2/conf/NFS @@ -0,0 +1,10 @@ +# $NetBSD: NFS,v 1.1 2020/03/08 06:23:18 rin Exp $ +# +# GENERIC machine description file for NFS root instead of FFS + +# Supports Sun2 (2/120, 2/170, 2/50, ...) +# Supports root on: ie0, sd*, ... + +include "arch/sun2/conf/GENERIC" +no file-system FFS +file-system NFS