1*624144bdSchristos# $NetBSD: RAMDISK,v 1.61 2021/08/30 18:59:57 christos Exp $ 2a0456abbSfredette 3a0456abbSfredette# RAMDISK: Root/swap on ramdisk 4a0456abbSfredette# This kernel is used to: 5a0456abbSfredette# format the disk (not yet implemented) 6a0456abbSfredette# partition the disk (disklabel) 7a0456abbSfredette# install the miniroot in the swap partition 8a0456abbSfredette 9a0456abbSfredette# GENERIC Sun2 (2/120, 2/170, 2/50, ...) 10a0456abbSfredette# Supports root on: ie0, sd*, ... 11a0456abbSfredette 12a0456abbSfredetteinclude "arch/sun2/conf/std.sun2" 13a0456abbSfredette 14d1b38523Satatat#options INCLUDE_CONFIG_FILE # embed config file in kernel binary 15d1b38523Satatat 16*624144bdSchristosmakeoptions COPTS="-Os -ffunction-sections -fdata-sections" # optimize for size 17*624144bdSchristosmakeoptions EXTRA_LINKFLAGS="--gc-sections" 18*624144bdSchristosmakeoptions KERNLDSCRIPT="${SUN2}/conf/kern.ldscript" 196cc162d5Stsutsui 20a0456abbSfredette# Machines to be supported by this kernel 21a0456abbSfredette#options FPU_EMULATE 22a0456abbSfredette 23a0456abbSfredette# Needs to be set per system. i.e change these as you see fit 24a0456abbSfredettemaxusers 2 25a0456abbSfredette 26a0456abbSfredette# Standard system options 27a0456abbSfredette#options KTRACE # system call tracing 28a0456abbSfredette#options SYSVMSG # System V message queues 29a0456abbSfredette#options SYSVSEM # System V semaphores 30a0456abbSfredette#options SYSVSHM # System V shared memory 31a0456abbSfredette#options INSECURE # disable kernel security level 32764686a7Schristos#options USERCONF # userconf(4) support 339188a0e3Stsutsuioptions PIPE_SOCKETPAIR # smaller, but slower pipe(2) 34f68a9f1fSatatat#options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel 35a0456abbSfredette 36a0456abbSfredette# Which kernel debugger? Uncomment either this: 37a0456abbSfredette#options DDB 38a0456abbSfredette# ... or these for KGDB (gdb remote target) 39a0456abbSfredette#makeoptions DEBUG="-g" # debugging symbols for gdb 40a0456abbSfredette#options KGDB 4199bccc3cSlukem#options KGDB_DEV=0x0C00 # ttya=0C00 ttyb=0C01 42a0456abbSfredette 43a0456abbSfredette# Other debugging options 44a0456abbSfredette#options DDB_HISTORY_SIZE=100 # enable history editing in DDB 45a0456abbSfredette#options DEBUG # kernel debugging code 46a0456abbSfredette#options DIAGNOSTIC # extra kernel sanity checking 47a0456abbSfredette#options PMAP_DEBUG 48a0456abbSfredette#options SCSIDEBUG 49a0456abbSfredette#options SCSIVERBOSE # Verbose SCSI errors 50a0456abbSfredette 5140ac8480Swiz# Compatibility options 5295772a88Smrg#include "conf/compat_netbsd10.config" 53a0456abbSfredette#options COMPAT_SUNOS # can run SunOS 4.1.1 executables 546aa55077Sfredette#options COMPAT_AOUT_M68K # support for NetBSD a.out executables 559188a0e3Stsutsui#options EXEC_AOUT # support for a.out executables 56764686a7Schristos#options COMPAT_BSDPTY # /dev/[pt]ty?? ptys. 57a0456abbSfredette 58a0456abbSfredette# Filesystem options 59a0456abbSfredettefile-system FFS # Berkeley Fast Filesystem 60764686a7Schristos#file-system NFS # Sun NFS client support 61764686a7Schristos#file-system CD9660 # ISO 9660 + Rock Ridge file system 62a0456abbSfredette#file-system FDESC # /dev/fd/* 63a0456abbSfredette#file-system KERNFS # /kern 64a0456abbSfredette#file-system NULLFS # loopback file system 65a0456abbSfredette#file-system OVERLAY # overlay file system 66a0456abbSfredette#file-system PROCFS # /proc 67a0456abbSfredette#file-system UNION # union file system 68a0456abbSfredette#file-system MFS # memory-based filesystem 6993c362d7Schristos#file-system PTYFS # /dev/pts/N support 70a0456abbSfredette 71a0456abbSfredette#options NFSSERVER # nfs server support 72063f96f3Sbouyer#options QUOTA # legacy UFS quotas 73063f96f3Sbouyer#options QUOTA2 # new, in-filesystem UFS quotas 744cbd24b2Swiz#options FFS_EI # FFS Endian Independent support 75764686a7Schristos#options NFS_V2_ONLY # Exclude NFS3 code to save space 76ff9b47d6Stsutsuioptions FFS_NO_SNAPSHOT # No FFS snapshot support 77a0456abbSfredette 78a0456abbSfredette# Networking options 797da71682Sisakioptions INET # IP protocol stack support 80a0456abbSfredette#options INET6 # IPV6 81a0456abbSfredette#options IPSEC # IP security 82a0456abbSfredette#options IPSEC_DEBUG # debug for IP security 83a0456abbSfredette#options GATEWAY # IP packet forwarding 8401b024cdSabs#options TCP_DEBUG # Record last TCP_NDEBUG packets with SO_DEBUG 85a0456abbSfredette 86a0456abbSfredette# Work-around for root on slow servers (insurance...) 87a0456abbSfredette#options NFS_BOOT_RWSIZE=1024 88a0456abbSfredette#options NFS_BOOT_BOOTPARAM 89a0456abbSfredette 90a0456abbSfredette# Enable the hooks used for initializing the root memory-disk. 91a0456abbSfredetteoptions MEMORY_DISK_HOOKS 92a0456abbSfredetteoptions MEMORY_DISK_IS_ROOT # force root on memory disk 93a0456abbSfredetteoptions MEMORY_DISK_SERVER=0 # no userspace memory disk support 941415bf50Sheoptions MEMORY_DISK_ROOT_SIZE=1200 # size of memory disk, in blocks 9592ae85d1Sjymoptions MEMORY_DISK_RBFLAGS=RB_SINGLE # boot in single-user mode 96a0456abbSfredette 97a0456abbSfredetteconfig netbsd root on ? type ffs 98a0456abbSfredette 99a0456abbSfredette#### Main bus. 100a0456abbSfredettemainbus0 at root 101a0456abbSfredette 102a0456abbSfredette#### Bus types. 103a0456abbSfredette 104a0456abbSfredetteobio0 at mainbus? # all Sun-2 105a0456abbSfredetteobmem0 at mainbus? # all Sun-2 106a0456abbSfredettembmem0 at mainbus? # 2/120, 2/170 107a0456abbSfredettembio0 at mainbus? # 2/120, 2/170 1089e33b7b6Sfredettesun68kvme0 at mainbus? # 2/50, 2/130, 2/160 1099e33b7b6Sfredettevme0 at sun68kvme0 # mi VME attachment 110a0456abbSfredette 111a0456abbSfredette#### Standard system devices. 112a0456abbSfredette 113a0456abbSfredette## The AM9513 clock chip. 114a0456abbSfredetteclock0 at obio0 addr 0x002800 # 2/120, 2/170 1159e33b7b6Sfredetteclock0 at obio0 addr 0x7f2800 # 2/50, 2/130, 2/160 116a0456abbSfredette 117a0456abbSfredette## The MM58167 time-of-day chip. 118a0456abbSfredettetod0 at obio0 addr 0x003800 # 2/120, 2/170 1199e33b7b6Sfredettetod0 at vme0 addr 0x200800 # 2/50, 2/130, 2/160 120a0456abbSfredette 121a0456abbSfredette#### Serial port configuration. 122a0456abbSfredette 1239e33b7b6Sfredette## Zilog 8530 serial chips. Each has two channels. 124a0456abbSfredette## zs0 is ttya and ttyb. zs1 is the keyboard and mouse. 125a0456abbSfredette## zs0 is REQUIRED to use KGDB. 126a0456abbSfredettezs0 at obio0 addr 0x002000 # 2/120, 2/170 1279e33b7b6Sfredettezs0 at obio0 addr 0x7f2000 # 2/50 128a0456abbSfredettezs1 at obmem0 addr 0x780000 # 2/120, 2/170 1299e33b7b6Sfredettezs1 at obio0 addr 0x7f1800 # 2/50 1309976af90Sfredette#zs2 at mbmem0 addr 0x080800 # 2/120, 2/170 (first sc SCSI) 1319976af90Sfredette#zs3 at mbmem0 addr 0x081000 # 2/120, 2/170 (first sc SCSI) 1329976af90Sfredette#zs4 at mbmem0 addr 0x084800 # 2/120, 2/170 (second sc SCSI) 1339976af90Sfredette#zs5 at mbmem0 addr 0x085000 # 2/120, 2/170 (second sc SCSI) 1349e33b7b6Sfredettezstty* at zs? channel ? # ttya 1359e33b7b6Sfredettekbd0 at zstty? # keyboard 1369e33b7b6Sfredette#ms0 at zstty? # mouse 137a0456abbSfredette 138a0456abbSfredette#### Disk controllers and disks. 139a0456abbSfredette 140a0456abbSfredette## PAL+logic-based "Sun SCSI 2" Multibus/VME SCSI controller. 141a0456abbSfredette## This driver has several flags which may be enabled using 142a0456abbSfredette## the "flags" directive. Valid flags are: 143a0456abbSfredette## 144a0456abbSfredette## 0x0ff Set (1<<target) to disable parity checking 145a0456abbSfredette## 0x100 Set this bit to disable DMA interrupts (poll) 146a0456abbSfredette## 0x200 Set this bit to disable DMA entirely (use PIO) 147a0456abbSfredette## 148a0456abbSfredette## For example: "flags 0x10f" would disable DMA interrupts, 149a0456abbSfredette## and disable parity for targets 0-3 150a0456abbSfredette 151a0456abbSfredettesc0 at mbmem0 addr 0x80000 ipl 2 flags 0xff 1529e33b7b6Sfredettesc0 at vme0 addr 0x200000 irq 2 vect 0x40 flags 0xff 153a0456abbSfredettesc1 at mbmem0 addr 0x84000 ipl 2 flags 0xff 154a0456abbSfredette 155a0456abbSfredette## NCR5380-based "Sun SCSI 3" VME SCSI controller. 156a0456abbSfredette## This driver has several flags which may be enabled by OR'ing 157a0456abbSfredette## the values and using the "flags" directive. 158a0456abbSfredette## Valid flags are: 159a0456abbSfredette## 160a0456abbSfredette## 0x01 Use DMA (may be polled) 161a0456abbSfredette## 0x02 Use DMA completion interrupts 162a0456abbSfredette## 0x04 Allow disconnect/reselect 163a0456abbSfredette## 164a0456abbSfredette## E.g. the following would enable DMA, interrupts, and reselect: 165a0456abbSfredette## si0 at vme0 addr 0x200000 ipl 3 vect 0x40 flags 0x07 166a0456abbSfredette## 167a0456abbSfredette## By default, DMA is enabled in the driver. 168a0456abbSfredette 1699e33b7b6Sfredettesi0 at vme0 addr 0x200000 irq 2 vect 0x40 170a0456abbSfredette 171a0456abbSfredette## These entries find devices on all SCSI busses and assign 172a0456abbSfredette## unit numbers dynamically. 173a0456abbSfredettescsibus* at sc? 1749e33b7b6Sfredettescsibus* at si? 175a0456abbSfredettesd* at scsibus? target ? lun ? # SCSI disks 176a0456abbSfredettest* at scsibus? target ? lun ? # SCSI tapes 177764686a7Schristos#cd* at scsibus? target ? lun ? # SCSI CD-ROMs 178a0456abbSfredette#ch* at scsibus? target ? lun ? # SCSI changer devices 179a0456abbSfredette#ss* at scsibus? target ? lun ? # SCSI scanners 180a0456abbSfredette#ses* at scsibus? target ? lun ? # SCSI SES/SAF-TE 181a0456abbSfredette#uk* at scsibus? target ? lun ? # unknown SCSI 182a0456abbSfredette 183af0a38f1Sfredette# support old SCSI devices that don't understand the INQUIRY command 184af0a38f1Sfredetteoptions SCSI_OLD_NOINQUIRY 185af0a38f1Sfredette 186a0456abbSfredette## Xylogics 450 or 451 Multibus/VME SMD disk controllers and disks. 187a0456abbSfredette#xyc0 at mbio0 addr 0xee40 ipl 2 1889e33b7b6Sfredettexyc0 at vme0 addr 0xee40 irq 2 vect 0x48 189a0456abbSfredette#xyc1 at mbio0 addr 0xee48 ipl 2 1909e33b7b6Sfredettexyc1 at vme0 addr 0xee48 irq 2 vect 0x49 1919e33b7b6Sfredettexy* at xyc? drive ? 192a0456abbSfredette 193a0456abbSfredette## Memory-disk device. 194afdfce8eShannkenpseudo-device md 195a0456abbSfredette 196a0456abbSfredette#### Network interfaces. 197a0456abbSfredette 198a0456abbSfredette## Intel Ethernet (onboard, or Multibus/VME) 1999e33b7b6Sfredetteie0 at obio0 addr 0x7f0800 ipl 3 # 2/50 200a0456abbSfredetteie0 at mbmem0 addr 0x88000 ipl 3 2019e33b7b6Sfredetteie1 at mbmem0 addr 0x8c000 ipl 3 2029e33b7b6Sfredette## VME: the first [addr,len] pair specifies the device registers; 2039e33b7b6Sfredette## the second pair specifies the on-board memory buffer 2049e33b7b6Sfredetteie1 at vme0 addr 0xe88000,0xe00000 len -1,0x40000 irq 3 vect 0x75 2059e33b7b6Sfredette 2069e33b7b6Sfredette## 3Com Ethernet (Multibus only) 2079e33b7b6Sfredetteec0 at mbmem0 addr 0xe0000 ipl 3 2089e33b7b6Sfredetteec1 at mbmem0 addr 0xe2000 ipl 3 209491ce070Stsutsui# limit NFS R/W size for poor ec(4) interfaces 210491ce070Stsutsuioptions NFS_RSIZE=1024,NFS_WSIZE=1024 211a0456abbSfredette 212a0456abbSfredette## Frame buffers. 213a0456abbSfredette 214a0456abbSfredette## Sun "bwtwo" black and white framebuffer. 2159e33b7b6Sfredette#bwtwo0 at obmem0 addr 0x700000 # 2/120, 2/170 216a0456abbSfredette#bwtwo0 at obio0 addr 0x0 # 2/50 217a0456abbSfredette 2189e33b7b6Sfredette## PROM console driver -- if all else fails 2199e33b7b6Sfredettepcons0 at mainbus0 # PROM console 2209e33b7b6Sfredette 221a0456abbSfredette#### Miscellaneous. 222dc14ae83Schristospseudo-device loop # network loopback 223926f98bcSrpaulo#pseudo-device bpfilter # packet filter 224764686a7Schristos#pseudo-device sl # CSLIP 2256ff13154Scube#pseudo-device ppp # PPP 2266ff13154Scube#pseudo-device tun # network tunneling over tty 2276ff13154Scube#pseudo-device gre # generic L3 over IP tunnel 228f71d13bdSmaxv#pseudo-device npf # NPF packet filter 2296ff13154Scube#pseudo-device gif # IPv[46] over IPv[46] tunnel (RFC1933) 2306ff13154Scube#pseudo-device faith # IPv[46] tcp relay translation i/f 2316ff13154Scube#pseudo-device stf # 6to4 IPv6 over IPv4 encapsulation 232a0456abbSfredette 233dc14ae83Schristospseudo-device pty # pseudo-terminals 2346ff13154Scube#pseudo-device vnd # paging to files 235dc14ae83Schristos#pseudo-device ccd # concatenated disks 2361cc8b68dSchristos#pseudo-device raid # RAIDframe disk driver 237a0456abbSfredette#options RAID_AUTOCONFIG # auto-configuration of RAID components 238835e533bSpooka#pseudo-device fss # file system snapshot device 239