1#	$NetBSD: LINKITSMART7688,v 1.19 2024/01/29 18:27:11 christos Exp $
2#
3# MediaTek MT7688
4#
5
6include 	"arch/evbmips/conf/std.rasoc"
7
8makeoptions	COPY_SYMTAB=1		# size for embedded symbol table
9
10options 	RALINK_CONSOLE_EARLY
11options 	RALINK_CONADDR=RA_UART2_BASE
12
13options 	MT7628
14options 	CONSPEED=57600
15
16maxusers	8
17
18# Size reduction options
19#options 	VNODE_OP_NOINLINE
20#options 	PIPE_SOCKETPAIR	# smaller, but slower pipe(2)
21#options 	SOSEND_NO_LOAN
22
23# Standard system options
24
25options 	INSECURE	# disable kernel security levels - X needs this
26
27options 	RTC_OFFSET=0	# hardware clock is this many mins. west of GMT
28options 	NTP		# NTP phase/frequency locked loop
29
30options 	KTRACE		# system call tracing via ktrace(1)
31
32#options 	SYSVMSG		# System V-like message queues
33#options 	SYSVSEM		# System V-like semaphores
34#options 	SYSVSHM		# System V-like memory sharing
35#options 	SHMMAXPGS=2048	# 2048 pages is the default
36
37#options 	NMBCLUSTERS=1024
38#options 	MCLSHIFT=12 # 4k mbuf clusters (increases pool max's to 4k as well)
39
40#options 	USERCONF	# userconf(4) support
41#options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel
42
43# Diagnostic/debugging support options
44options 	DIAGNOSTIC	# expensive kernel consistency checks
45#options 	LOCKDEBUG
46#options 	KSTACK_CHECK_MAGIC
47#options 	DEBUG		# expensive debugging checks/support
48options 	DDB			# in-kernel debugger
49options 	DDB_ONPANIC=1		# see also sysctl(7): `ddb.onpanic'
50#options 	DDB_HISTORY_SIZE=512	# enable history editing in DDB
51#options 	DDB_COMMANDONENTER="w/b 0x90000128 0 ; bt"	# disable watchdog & drop history on enter
52#options 	KGDB		# remote debugger
53#options 	KGDB_DEVNAME="\"com\"",KGDB_DEVADDR=0x2f8,KGDB_DEVRATE=9600
54#makeoptions 	DEBUG="-g2"	# compile full symbol table
55#makeoptions 	COPTS="-Os"	# Optimise for space.
56
57#makeoptions PROF="-p"		# build profiling in 
58#options 	GPROF
59
60# Compatibility options
61
62include         "conf/compat_netbsd50.config"
63#options 	COMPAT_386BSD_MBRPART # recognize old partition ID
64
65#options 	EXEC_ECOFF	# exec ECOFF binaries
66#options 	COMPAT_ULTRIX	# binary compatibility with Ultrix
67#options 	COMPAT_LINUX	# binary compatibility with Linux
68#options 	COMPAT_OSSAUDIO	# binary compatibility with Linux
69
70# File systems
71file-system	FFS		# UFS
72file-system	EXT2FS		# second extended file system (linux)
73#file-system	LFS		# log-structured file system
74file-system	MFS		# memory file system
75file-system	NFS		# Network File System client
76#file-system	CD9660		# ISO 9660 + Rock Ridge file system
77file-system	MSDOSFS		# MS-DOS file system
78#file-system	FDESC		# /dev/fd
79file-system	KERNFS		# /kern
80#file-system	NULLFS		# loopback file system
81#file-system	PORTAL		# portal filesystem (still experimental)
82file-system	PROCFS		# /proc
83#file-system	UMAPFS		# NULLFS + uid and gid remapping
84#file-system	UNION		# union file system
85file-system	PTYFS		# /dev/pts/N support
86file-system	TMPFS		# Efficient memory file-system
87
88# File system options
89#options 	FFS_EI		# FFS Endian Independent support
90options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
91#options 	QUOTA		# legacy UFS quotas
92#options 	UFS_DIRHASH	# UFS Large Directory Hashing
93#options 	UFS_EXTATTR	# Extended attribute support for UFS1
94#options 	DISKLABEL_EI	# disklabel Endian Independent support
95#options 	NFSSERVER	# Network File System server
96
97# Alternate buffer queue strategies for better responsiveness under high
98# disk I/O load.
99#options 	BUFQ_READPRIO
100options 	BUFQ_PRIOCSCAN
101
102# Networking options
103#options 	GATEWAY		# packet forwarding
104options 	INET		# IP + ICMP + TCP + UDP
105options 	MROUTING	# IP multicast routing
106options 	INET6		# IPV6
107#options 	IPSEC		# IP security
108#options 	IPSEC_DEBUG	# debug for IP security
109#options 	PIM		# Protocol Independent Multicast
110#options 	NETATALK	# AppleTalk networking protocols
111#options 	PPP_BSDCOMP	# BSD-Compress compression support for PPP
112#options 	PPP_DEFLATE	# Deflate compression support for PPP
113#options 	PPP_FILTER	# Active filter support for PPP (requires bpf)
114#options 	TCP_DEBUG	# Record last TCP_NDEBUG packets with SO_DEBUG
115
116#options 	ALTQ		# Manipulate network interfaces' output queues
117#options 	ALTQ_BLUE	# Stochastic Fair Blue
118#options 	ALTQ_CBQ	# Class-Based Queueing
119#options 	ALTQ_CDNR	# Diffserv Traffic Conditioner
120#options 	ALTQ_FIFOQ	# First-In First-Out Queue
121#options 	ALTQ_FLOWVALVE	# RED/flow-valve (red-penalty-box)
122#options 	ALTQ_HFSC	# Hierarchical Fair Service Curve
123#options 	ALTQ_LOCALQ	# Local queueing discipline
124#options 	ALTQ_PRIQ	# Priority Queueing
125#options 	ALTQ_RED	# Random Early Detection
126#options 	ALTQ_RIO	# RED with IN/OUT
127#options 	ALTQ_WFQ	# Weighted Fair Queueing
128
129# JIT compiler for bpfilter
130#options	SLJIT
131#options	BPFJIT
132
133# These options enable verbose messages for several subsystems.
134# Warning, these may compile large string tables into the kernel!
135#options 	EISAVERBOSE	# verbose EISA device autoconfig messages
136#options 	PCIVERBOSE	# verbose PCI device autoconfig messages
137#options 	PCI_CONFIG_DUMP	# verbosely dump PCI config space
138#options 	PCMCIAVERBOSE	# verbose PCMCIA configuration messages
139#options 	SCSIVERBOSE	# human readable SCSI error messages
140options 	USBVERBOSE	# verbose USB device autoconfig messages
141
142# Options for necessary to use MD
143#options 	MEMORY_DISK_HOOKS
144#options 	MEMORY_DISK_IS_ROOT		# force root on memory disk
145#options 	MEMORY_DISK_SERVER=0		# no userspace memory disk support
146#options 	MEMORY_DISK_ROOT_SIZE=8192	# embed the FS into the system for now
147#options 	MEMORY_RBFLAGS=0		# keep the kernel from forcing single user mode
148
149# Options for NFS root boot
150#options 	NFS_BOOT_DHCP,NFS_BOOT_BOOTPARAM,NFS_BOOT_BOOTSTATIC
151options 	NFS_BOOT_BOOTSTATIC
152options 	NFS_BOOTSTATIC_MYIP="\"192.168.0.1\""
153options 	NFS_BOOTSTATIC_GWIP="\"192.168.0.1\""
154options 	NFS_BOOTSTATIC_MASK="\"255.255.255.0\""
155options 	NFS_BOOTSTATIC_SERVADDR="\"192.168.0.5\""
156options 	NFS_BOOTSTATIC_SERVER="\"192.168.0.5:server:/path/to/root\""
157
158# Need more mbufs for IPsec VPN
159#options 	NMBCLUSTERS=4096
160
161# LinkItSmart7688 dev board root on embedded NFS mount disk
162#config		netbsd root on ? type ?
163#config		netbsd root on sd0a type ffs dumps none
164config		netbsd root on reth0 type nfs dumps none
165
166mainbus0	at root
167cpu0		at mainbus?
168
169# UARTs
170com0		at mainbus? addr 0x10000c00
171com1		at mainbus? addr 0x10000d00
172com2		at mainbus? addr 0x10000e00
173
174# Watchdog
175rwdog0 		at mainbus?
176options 	RA_WDOG_DEFAULT_PERIOD=10
177#options 	RA_WDOG_DEFAULT_MODE=WDOG_MODE_DISARMED
178options 	RA_WDOG_DEFAULT_MODE=WDOG_MODE_KTICKLE
179
180# Ethernet MACs
181reth*		at mainbus?
182options 	RALINK_ETH_MACADDR="00:00:aa:bb:cc:dd"	# according to u-boot env
183
184# MII/PHY support
185rgephy*	at mii? phy ?			# Realtek 8169S/8110S/8211 PHYs
186rlphy*	at mii? phy ?			# Realtek 8139/8201L PHYs
187ukphy*	at mii? phy ?			# generic unknown PHYs
188
189# PCI/PCIe support
190rpci0		at mainbus?
191pci*		at rpci?
192
193# GPIO support
194rgpio0		at mainbus?
195gpio*		at rgpio?
196
197# I2C support
198ri2c0		at mainbus?
199iic*		at ri2c?
200
201# NOR Flash
202#options 	NOR_VERBOSE
203#cfi0 		at mainbus0
204#nor0		at cfi0
205#flash0		at nor0 offset 0x00000000 size 0x00030000	# u-boot
206#flash1		at nor0 offset 0x00030000 size 0x00010000	# u-boot env
207#flash2		at nor0 offset 0x00040000 size 0x00010000	# factory
208#flash3		at nor0 offset 0x00050000 size 0x007b0000	# firmware
209
210# USB support on rusb0
211ehci*		at mainbus?
212usb*		at ehci?
213
214# USB support on rusb0
215ohci*		at mainbus?
216usb*		at ohci?
217
218# USB device drivers
219include "dev/usb/usbdevices.config"
220
221midi*		at midibus?
222
223
224# Pseudo-Devices
225
226pseudo-device	crypto			# /dev/crypto device
227pseudo-device	swcrypto		# software crypto implementation
228
229# disk/mass storage pseudo-devices
230#pseudo-device	md			# memory disk device (ramdisk)
231#options 	MEMORY_DISK_HOOKS	# enable root ramdisk
232#options 	MEMORY_DISK_DYNAMIC	# loaded via kernel module(7)
233
234#pseudo-device	vnd			# disk-like interface to files
235#options 	VND_COMPRESSION		# compressed vnd(4)
236
237# network pseudo-devices
238pseudo-device	bpfilter		# Berkeley packet filter
239#pseudo-device	carp			# Common Address Redundancy Protocol
240pseudo-device	loop			# network loopback
241#pseudo-device	mpls			# MPLS pseudo-interface
242pseudo-device	ppp			# Point-to-Point Protocol
243pseudo-device	pppoe			# PPP over Ethernet (RFC 2516)
244#options	PPPOE_SERVER		# Enable PPPoE server via link0
245pseudo-device	sl			# Serial Line IP
246pseudo-device	irframetty		# IrDA frame line discipline
247pseudo-device	tap			# virtual Ethernet
248pseudo-device	tun			# network tunneling over tty
249pseudo-device	gre			# generic L3 over IP tunnel
250pseudo-device	gif			# IPv[46] over IPv[46] tunnel (RFC 1933)
251#pseudo-device	faith			# IPv[46] TCP relay translation i/f
252pseudo-device	stf			# 6to4 IPv6 over IPv4 encapsulation
253pseudo-device	vlan			# IEEE 802.1q encapsulation
254pseudo-device	bridge			# simple inter-network bridging
255pseudo-device	vether			# Virtual Ethernet for bridge
256pseudo-device	agr			# IEEE 802.3ad link aggregation
257pseudo-device	npf			# NPF packet filter
258#pseudo-device	l2tp			# L2TPv3 interface
259# srt is EXPERIMENTAL
260#pseudo-device	srt			# source-address-based routing
261
262# miscellaneous pseudo-devices
263pseudo-device	pty			# pseudo-terminals
264pseudo-device	sequencer		# MIDI sequencer
265pseudo-device	clockctl		# user control of clock subsystem
266pseudo-device	ksyms			# /dev/ksyms
267pseudo-device	lockstat		# lock profiling
268pseudo-device	bcsp			# BlueCore Serial Protocol
269pseudo-device	btuart			# Bluetooth HCI UART (H4)
270#pseudo-device	gpiosim		1	# GPIO simulator
271