RAMDISK revision 1.60
11.60Schristos# $NetBSD: RAMDISK,v 1.60 2019/04/03 16:30:28 christos Exp $
21.1Sfredette
31.1Sfredette# RAMDISK: Root/swap on ramdisk
41.1Sfredette# This kernel is used to:
51.6Slukem#	format the disk (not yet implemented)
61.6Slukem#	partition the disk (disklabel)
71.6Slukem#	install the miniroot in the swap partition
81.1Sfredette
91.1Sfredette# GENERIC Sun2 (2/120, 2/170, 2/50, ...)
101.1Sfredette# Supports root on: ie0, sd*, ...
111.1Sfredette
121.1Sfredetteinclude "arch/sun2/conf/std.sun2"
131.14Satatat
141.14Satatat#options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
151.1Sfredette
161.36Stsutsuimakeoptions	COPTS="-Os"	# optimize for size
171.36Stsutsui
181.1Sfredette# Machines to be supported by this kernel
191.1Sfredette#options 	FPU_EMULATE
201.1Sfredette
211.1Sfredette# Needs to be set per system.  i.e change these as you see fit
221.1Sfredettemaxusers	2
231.1Sfredette
241.1Sfredette# Standard system options
251.1Sfredette#options 	KTRACE		# system call tracing
261.1Sfredette#options 	SYSVMSG		# System V message queues
271.1Sfredette#options 	SYSVSEM		# System V semaphores
281.1Sfredette#options 	SYSVSHM		# System V shared memory
291.1Sfredette#options 	INSECURE	# disable kernel security level
301.60Schristos#options 	USERCONF	# userconf(4) support
311.39Stsutsuioptions 	PIPE_SOCKETPAIR	# smaller, but slower pipe(2)
321.18Satatat#options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel
331.1Sfredette
341.1Sfredette# Which kernel debugger?  Uncomment either this:
351.1Sfredette#options 	DDB
361.1Sfredette# ... or these for KGDB (gdb remote target)
371.6Slukem#makeoptions	DEBUG="-g"	# debugging symbols for gdb
381.1Sfredette#options 	KGDB
391.5Slukem#options 	KGDB_DEV=0x0C00	# ttya=0C00 ttyb=0C01
401.1Sfredette
411.1Sfredette# Other debugging options
421.1Sfredette#options 	DDB_HISTORY_SIZE=100	# enable history editing in DDB
431.1Sfredette#options 	DEBUG		# kernel debugging code
441.1Sfredette#options 	DIAGNOSTIC	# extra kernel sanity checking
451.1Sfredette#options 	PMAP_DEBUG
461.1Sfredette#options 	SCSIDEBUG
471.1Sfredette#options 	SCSIVERBOSE		# Verbose SCSI errors
481.1Sfredette
491.2Swiz# Compatibility options
501.58Smrg#include 	"conf/compat_netbsd10.config"
511.1Sfredette#options 	COMPAT_SUNOS	# can run SunOS 4.1.1 executables
521.7Sfredette#options 	COMPAT_AOUT_M68K # support for NetBSD a.out executables
531.39Stsutsui#options 	EXEC_AOUT	# support for a.out executables
541.60Schristos#options		COMPAT_BSDPTY	# /dev/[pt]ty?? ptys.
551.1Sfredette
561.1Sfredette# Filesystem options
571.1Sfredettefile-system	FFS		# Berkeley Fast Filesystem
581.60Schristos#file-system	NFS		# Sun NFS client support
591.60Schristos#file-system	CD9660		# ISO 9660 + Rock Ridge file system
601.1Sfredette#file-system	FDESC		# /dev/fd/*
611.1Sfredette#file-system	KERNFS		# /kern
621.1Sfredette#file-system	NULLFS		# loopback file system
631.1Sfredette#file-system	OVERLAY		# overlay file system
641.1Sfredette#file-system	PROCFS		# /proc
651.1Sfredette#file-system	UNION		# union file system
661.1Sfredette#file-system	MFS		# memory-based filesystem
671.26Schristos#file-system	PTYFS		# /dev/pts/N support
681.1Sfredette
691.1Sfredette#options 	NFSSERVER	# nfs server support
701.47Sbouyer#options 	QUOTA		# legacy UFS quotas
711.47Sbouyer#options 	QUOTA2		# new, in-filesystem UFS quotas
721.48Swiz#options 	FFS_EI		# FFS Endian Independent support
731.60Schristos#options 	NFS_V2_ONLY	# Exclude NFS3 code to save space
741.28Stsutsuioptions 	FFS_NO_SNAPSHOT	# No FFS snapshot support
751.1Sfredette
761.1Sfredette# Networking options
771.27Sisakioptions 	INET		# IP protocol stack support
781.1Sfredette#options 	INET6		# IPV6
791.1Sfredette#options 	IPSEC		# IP security
801.1Sfredette#options 	IPSEC_DEBUG	# debug for IP security
811.1Sfredette#options 	GATEWAY		# IP packet forwarding
821.4Sabs#options 	TCP_DEBUG	# Record last TCP_NDEBUG packets with SO_DEBUG
831.1Sfredette
841.1Sfredette# Work-around for root on slow servers (insurance...)
851.1Sfredette#options 	NFS_BOOT_RWSIZE=1024
861.1Sfredette#options 	NFS_BOOT_BOOTPARAM
871.1Sfredette
881.1Sfredette# Enable the hooks used for initializing the root memory-disk.
891.6Slukemoptions 	MEMORY_DISK_HOOKS
901.6Slukemoptions 	MEMORY_DISK_IS_ROOT	# force root on memory disk
911.6Slukemoptions 	MEMORY_DISK_SERVER=0	# no userspace memory disk support
921.41Sheoptions 	MEMORY_DISK_ROOT_SIZE=1200	# size of memory disk, in blocks
931.44Sjymoptions 	MEMORY_DISK_RBFLAGS=RB_SINGLE	# boot in single-user mode
941.1Sfredette
951.1Sfredetteconfig		netbsd root on ? type ffs
961.1Sfredette
971.1Sfredette#### Main bus.
981.1Sfredettemainbus0 at root
991.1Sfredette
1001.1Sfredette#### Bus types.
1011.1Sfredette
1021.1Sfredetteobio0	at mainbus? 		# all Sun-2
1031.1Sfredetteobmem0	at mainbus?		# all Sun-2
1041.1Sfredettembmem0	at mainbus?		# 2/120, 2/170
1051.1Sfredettembio0	at mainbus?		# 2/120, 2/170
1061.3Sfredettesun68kvme0	at mainbus?	# 2/50, 2/130, 2/160
1071.3Sfredettevme0	at sun68kvme0		# mi VME attachment
1081.1Sfredette
1091.1Sfredette#### Standard system devices.
1101.1Sfredette
1111.1Sfredette## The AM9513 clock chip.
1121.6Slukemclock0	at obio0 addr 0x002800	# 2/120, 2/170
1131.6Slukemclock0	at obio0 addr 0x7f2800	# 2/50, 2/130, 2/160
1141.1Sfredette
1151.1Sfredette## The MM58167 time-of-day chip.
1161.6Slukemtod0	at obio0 addr 0x003800	# 2/120, 2/170
1171.3Sfredettetod0	at vme0 addr 0x200800	# 2/50, 2/130, 2/160
1181.1Sfredette
1191.1Sfredette#### Serial port configuration.
1201.1Sfredette
1211.3Sfredette## Zilog 8530 serial chips.  Each has two channels.
1221.1Sfredette## zs0 is ttya and ttyb.  zs1 is the keyboard and mouse.
1231.1Sfredette## zs0 is REQUIRED to use KGDB.
1241.1Sfredettezs0	at obio0 addr 0x002000	# 2/120, 2/170
1251.3Sfredettezs0	at obio0 addr 0x7f2000	# 2/50
1261.1Sfredettezs1	at obmem0 addr 0x780000	# 2/120, 2/170
1271.3Sfredettezs1	at obio0 addr 0x7f1800	# 2/50
1281.9Sfredette#zs2	at mbmem0 addr 0x080800	# 2/120, 2/170 (first sc SCSI)
1291.9Sfredette#zs3	at mbmem0 addr 0x081000	# 2/120, 2/170 (first sc SCSI)
1301.9Sfredette#zs4	at mbmem0 addr 0x084800	# 2/120, 2/170 (second sc SCSI)
1311.9Sfredette#zs5	at mbmem0 addr 0x085000	# 2/120, 2/170 (second sc SCSI)
1321.3Sfredettezstty*	at zs? channel ?	# ttya
1331.3Sfredettekbd0	at zstty?		# keyboard
1341.3Sfredette#ms0	at zstty?		# mouse
1351.1Sfredette
1361.1Sfredette#### Disk controllers and disks.
1371.1Sfredette
1381.1Sfredette## PAL+logic-based "Sun SCSI 2" Multibus/VME SCSI controller.
1391.1Sfredette## This driver has several flags which may be enabled using
1401.1Sfredette## the "flags" directive.  Valid flags are:
1411.1Sfredette##
1421.1Sfredette## 0x0ff		Set (1<<target) to disable parity checking
1431.1Sfredette## 0x100		Set this bit to disable DMA interrupts (poll)
1441.1Sfredette## 0x200		Set this bit to disable DMA entirely (use PIO)
1451.1Sfredette##
1461.1Sfredette## For example: "flags 0x10f" would disable DMA interrupts,
1471.1Sfredette## and disable parity for targets 0-3
1481.1Sfredette
1491.1Sfredettesc0	at mbmem0 addr 0x80000 ipl 2 flags 0xff
1501.6Slukemsc0	at vme0 addr 0x200000 irq 2 vect 0x40 flags 0xff
1511.1Sfredettesc1	at mbmem0 addr 0x84000 ipl 2 flags 0xff
1521.1Sfredette
1531.1Sfredette## NCR5380-based "Sun SCSI 3" VME SCSI controller.
1541.1Sfredette## This driver has several flags which may be enabled by OR'ing
1551.1Sfredette## the values and using the "flags" directive.
1561.1Sfredette## Valid flags are:
1571.1Sfredette##
1581.1Sfredette##	0x01		Use DMA (may be polled)
1591.1Sfredette##	0x02		Use DMA completion interrupts
1601.1Sfredette##	0x04		Allow disconnect/reselect
1611.1Sfredette##
1621.1Sfredette## E.g. the following would enable DMA, interrupts, and reselect:
1631.1Sfredette## si0	at vme0 addr 0x200000 ipl 3 vect 0x40 flags 0x07
1641.1Sfredette##
1651.1Sfredette## By default, DMA is enabled in the driver.
1661.1Sfredette
1671.3Sfredettesi0	at vme0 addr 0x200000 irq 2 vect 0x40
1681.1Sfredette
1691.1Sfredette## These entries find devices on all SCSI busses and assign
1701.1Sfredette## unit numbers dynamically.
1711.1Sfredettescsibus* at sc?
1721.3Sfredettescsibus* at si?
1731.1Sfredettesd*	at scsibus? target ? lun ?		# SCSI disks
1741.1Sfredettest*	at scsibus? target ? lun ?		# SCSI tapes
1751.60Schristos#cd*	at scsibus? target ? lun ?		# SCSI CD-ROMs
1761.1Sfredette#ch*	at scsibus? target ? lun ?		# SCSI changer devices
1771.1Sfredette#ss*	at scsibus? target ? lun ?		# SCSI scanners
1781.1Sfredette#ses*	at scsibus? target ? lun ?		# SCSI SES/SAF-TE
1791.1Sfredette#uk*	at scsibus? target ? lun ?		# unknown SCSI
1801.8Sfredette
1811.8Sfredette# support old SCSI devices that don't understand the INQUIRY command
1821.8Sfredetteoptions 	SCSI_OLD_NOINQUIRY
1831.1Sfredette
1841.1Sfredette## Xylogics 450 or 451 Multibus/VME SMD disk controllers and disks.
1851.6Slukem#xyc0	at mbio0 addr 0xee40 ipl 2
1861.3Sfredettexyc0	at vme0 addr 0xee40 irq 2 vect 0x48
1871.6Slukem#xyc1	at mbio0 addr 0xee48 ipl 2
1881.3Sfredettexyc1	at vme0 addr 0xee48 irq 2 vect 0x49
1891.3Sfredettexy*	at xyc? drive ?
1901.1Sfredette
1911.1Sfredette## Memory-disk device.
1921.46Shannkenpseudo-device	md		
1931.1Sfredette
1941.1Sfredette#### Network interfaces.
1951.1Sfredette
1961.1Sfredette## Intel Ethernet (onboard, or Multibus/VME)
1971.3Sfredetteie0	at obio0 addr 0x7f0800 ipl 3		# 2/50
1981.1Sfredetteie0	at mbmem0 addr 0x88000 ipl 3
1991.3Sfredetteie1	at mbmem0 addr 0x8c000 ipl 3
2001.3Sfredette## VME: the first [addr,len] pair specifies the device registers;
2011.3Sfredette##	the second pair specifies the on-board memory buffer
2021.3Sfredetteie1	at vme0 addr 0xe88000,0xe00000 len -1,0x40000 irq 3 vect 0x75
2031.3Sfredette
2041.3Sfredette## 3Com Ethernet (Multibus only)
2051.3Sfredetteec0	at mbmem0 addr 0xe0000 ipl 3
2061.3Sfredetteec1	at mbmem0 addr 0xe2000 ipl 3
2071.34Stsutsui# limit NFS R/W size for poor ec(4) interfaces
2081.34Stsutsuioptions 	NFS_RSIZE=1024,NFS_WSIZE=1024
2091.1Sfredette
2101.1Sfredette## Frame buffers.
2111.1Sfredette
2121.1Sfredette## Sun "bwtwo" black and white framebuffer.
2131.6Slukem#bwtwo0	at obmem0 addr 0x700000	# 2/120, 2/170
2141.3Sfredette#bwtwo0	at obio0 addr 0x0	# 2/50
2151.3Sfredette
2161.3Sfredette## PROM console driver -- if all else fails
2171.3Sfredettepcons0	at mainbus0			# PROM console
2181.1Sfredette
2191.1Sfredette#### Miscellaneous.
2201.52Schristospseudo-device	loop			# network loopback
2211.30Srpaulo#pseudo-device	bpfilter		# packet filter
2221.60Schristos#pseudo-device	sl			# CSLIP
2231.31Scube#pseudo-device	ppp			# PPP
2241.31Scube#pseudo-device	tun			# network tunneling over tty
2251.31Scube#pseudo-device	gre			# generic L3 over IP tunnel
2261.59Smaxv#pseudo-device	npf			# NPF packet filter
2271.31Scube#pseudo-device	gif			# IPv[46] over IPv[46] tunnel (RFC1933)
2281.31Scube#pseudo-device	faith			# IPv[46] tcp relay translation i/f
2291.31Scube#pseudo-device	stf			# 6to4 IPv6 over IPv4 encapsulation
2301.1Sfredette
2311.52Schristospseudo-device	pty			# pseudo-terminals
2321.31Scube#pseudo-device	vnd			# paging to files
2331.52Schristos#pseudo-device	ccd			# concatenated disks
2341.53Schristos#pseudo-device	raid			# RAIDframe disk driver
2351.1Sfredette#options 	RAID_AUTOCONFIG		# auto-configuration of RAID components
2361.45Spooka#pseudo-device	fss			# file system snapshot device
237