Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
# $NetBSD: GENERIC,v 1.208 2023/02/12 14:50:42 abs Exp $
#
# GENERIC machine description file
# 
# This machine description file is used to generate the default NetBSD
# kernel.  The generic kernel does not include all options, subsystems
# and device drivers, but should be useful for most applications.
#
# The machine description file can be customised for your specific
# machine to reduce the kernel size and improve its performance.
#
# For further information on compiling NetBSD kernels, see the config(8)
# man page.
#
# For further information on hardware support for this architecture, see
# the intro(4) man page.  For further information about kernel options
# for this architecture, see the options(4) man page.  For an explanation
# of each device driver in this file see the section 4 man page for the
# device.

include 	"arch/x68k/conf/std.x68k"

options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary

#ident 		"GENERIC-$Revision: 1.208 $"

makeoptions	COPTS="-O2 -fno-reorder-blocks -fno-unwind-tables -fno-omit-frame-pointer"
	# See share/mk/sys.mk. -fno-omit-frame-pointer is necessary for
	# backtraces in DDB.

maxusers	8

## System kernel configuration.  See options(4) for more detail.


## Options for variants of the m68k MPU
## you must have at least the correct one; REQUIRED
options 	M68030
options 	M68040
options 	M68060
## If you want an optimized kernel for a specific processor, use either:
#makeoptions	CMACHFLAGS="-m68030"
#makeoptions	CMACHFLAGS="-m68040 -Wa,-m68030 -Wa,-m68851"
#makeoptions	CMACHFLAGS="-m68060 -Wa,-m68030 -Wa,-m68851"


#### System options specific to the x68k port

options 	EXTENDED_MEMORY		# support for >16MB memory
options 	FPU_EMULATE		# software fpu emulation for MC68030
options 	FPSP			# floating point emulation for MC68040
options 	M060SP			# int/fp emulation for MC68060
#options 	JUPITER			# support for "Jupiter-X" accelerator
#options 	ZSCONSOLE,ZSCN_SPEED="9600"	# use serial console


#### System options that are the same for all ports

## Root device configuration: change the ?'s if you are going to use a
## nonstandard root partition (other than where the kernel is booted from)
## and/or nonstandard root type (not ffs or nfs).  Normally this can be
## automagically determined at boot time.

config		netbsd	root on ? type ?
#config		netbsd	root on sd0 type ffs

## RTC is offset from GMT; -540 means JST-9
options 	RTC_OFFSET=-540	# hardware clock is this many mins. west of GMT

## System call tracing (see ktrace(1)).
options 	KTRACE

## System V compatible IPC subsystem.  (msgctl(2), semctl(2), and shmctl(2))
options 	SYSVMSG		# System V message queues
options 	SYSVSEM		# System V semaphores
options 	SYSVSHM		# System V shared memory

## Loadable kernel module support
options 	MODULAR		# new style module(7) framework
options 	MODULAR_DEFAULT_AUTOLOAD

options 	USERCONF	# userconf(4) support
#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
# disk I/O load.
#options 	BUFQ_READPRIO
#options 	BUFQ_PRIOCSCAN

## NFS boot options; not supported currently: needs nfsboot program
#options 	NFS_BOOT_BOOTPARAM
#options 	NFS_BOOT_BOOTP
options 	NFS_BOOT_DHCP

#### Debugging options

## The DDB in-kernel debugger runs at panic (unless DDB_ONPANIC=0), or at
## serial console break or keyboard reset, where the PROM would normally
## intercept.  DDB_HISTORY_SIZE adds up/down arrow command history.
options 	DDB			# kernel dynamic debugger
#options 	DDB_HISTORY_SIZE=100	# enable history editing in DDB
#options 	DDB_ONPANIC=1		# see also sysctl(7): `ddb.onpanic'
#options 	PANICBUTTON		# interrupt switch invokes DDB

## You may also use gdb, on another computer connected to this machine over
## a serial port.  Both KGDB_DEV and KGDB_DEVRATE should be specified;
## KGDB_DEV is a dev_t encoded device number of the serial port to use.
## KGDB is not supported for now.
#options 	KGDB			# support for kernel gdb
#options 	KGDB_DEV=0xc00		# kgdb device number
#options 	KGDB_DEVRATE=9600	# baud rate

## Compile the kernel with debugging symbols (`netbsd.gdb' is the debug file),
## such that gdb(1) can be used on a kernel coredump.

#makeoptions	DEBUG="-g"

## Adds code to the kernel that does internal consistency checks, and will
## cause the kernel to panic if corruption of internal data structures
## is detected.
#options 	DIAGNOSTIC	# extra kernel sanity checking

## Enable (possibly expensive) debugging code that may also display messages
## on the system console
#options 	DEBUG

## These options enable verbose messages for several subsystems.
## Warning, these may compile large string tables into the kernel!
#options 	SCSIVERBOSE	# human readable SCSI error messages
#options 	USBVERBOSE	# verbose USB device autoconfig messages

## `INSECURE' turns off the kernel security level (securelevel = 0 always).
## This allows writing to /dev/mem, loading kernel modules while multi-user,
## and other insecurities good only for development work.  Do not use this
## option on a production machine.
#options 	INSECURE

## `FDSCRIPTS' allows non-readable but executable scripts by providing a
## pre-opened opaque file to the script interpreter.  `SETUIDSCRIPTS',
## which implies FDSCRIPTS, allows scripts to be set-user-id using the same
## opaque file mechanism.  Perl calls this "secure setuid scripts."

#options 	FDSCRIPTS
#options 	SETUIDSCRIPTS

## Options for compatibility with previous releases foreign system binaries.

include 	"conf/compat_netbsd09.config"

options 	COMPAT_AOUT_M68K # compatibility with NetBSD/m68k a.out
#options 	COMPAT_M68K4K	# NetBSD/m68k4k binaries
#options 	COMPAT_SUNOS	# SunOS 4.x binary compatibility; broken
#options 	COMPAT_LINUX	# Linux/m68k binary compatibility
#options 	COMPAT_OSSAUDIO	# Linux/m68k binary compatibility

## File systems.
file-system	FFS		# Berkeley Fast Filesystem
file-system	NFS		# Sun NFS-compatible filesystem client
file-system	KERNFS		# kernel data-structure filesystem
file-system	NULLFS		# NULL layered filesystem
#file-system 	OVERLAY		# overlay file system
file-system	MFS		# memory-based filesystem
#file-system	FDESC		# user file descriptor filesystem
#file-system	UMAPFS		# uid/gid remapping filesystem
#file-system	LFS		# Log-structured filesystem (experimental)
file-system	PROCFS		# /proc
file-system	CD9660		# ISO 9660 + Rock Ridge file system
#file-system	UNION		# union file system (a little buggy)
file-system	MSDOSFS		# MS-DOS FAT filesystem(s).
#file-system 	ADOSFS		# AmigaDOS 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

## File system options.
#options 	FFS_EI		# FFS Endian Independent support
options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
#options 	QUOTA		# legacy UFS quotas
#options 	QUOTA2		# new, in-filesystem UFS quotas
#options 	UFS_DIRHASH	# UFS Large Directory Hashing
#options 	UFS_EXTATTR	# Extended attribute support for UFS1
options 	WAPBL		# File system journaling support
options 	NFSSERVER	# Network File System server

## Network protocol support.  In most environments, INET is required.
options 	INET		# IP (Internet Protocol) v4
options 	INET6		# IPV6
#options 	IPSEC		# IP security
#options 	IPSEC_DEBUG	# debug for IP security
#options 	GATEWAY		# packet forwarding ("router switch")
#options 	MROUTING	# packet forwarding of multicast packets
#options 	PIM		# Protocol Independent Multicast
#options 	NETATALK	# AppleTalk (over Ethernet) protocol
#options 	NTP		# Network Time Protocol in-kernel support
#options 	PPS_SYNC	# Add serial line synchronization for NTP
#options 	PPP_BSDCOMP	# Add BSD compression to ppp device
#options 	PPP_DEFLATE	# Add deflate (libz) compression to ppp device
#options 	PPP_FILTER	# Add active filters for ppp (via bpf)
#options 	TCP_DEBUG	# Record last TCP_NDEBUG packets with SO_DEBUG

#options 	ALTQ		# Manipulate network interfaces' output queues
#options 	ALTQ_BLUE	# Stochastic Fair Blue
#options 	ALTQ_CBQ	# Class-Based Queueing
#options 	ALTQ_CDNR	# Diffserv Traffic Conditioner
#options 	ALTQ_FIFOQ	# First-In First-Out Queue
#options 	ALTQ_FLOWVALVE	# RED/flow-valve (red-penalty-box)
#options 	ALTQ_HFSC	# Hierarchical Fair Service Curve
#options 	ALTQ_LOCALQ	# Local queueing discipline
#options 	ALTQ_PRIQ	# Priority Queueing
#options 	ALTQ_RED	# Random Early Detection
#options 	ALTQ_RIO	# RED with IN/OUT
#options 	ALTQ_WFQ	# Weighted Fair Queueing


#### Device configurations

## Fundamental devices; see also std.x68k
dmac0	at intio0 addr 0xe84000		# DMA controller
xel0	at intio0
opm0	at intio0 addr 0xe90000		# OPM: required for fdc

## Display devices and console
grfbus0	at mainbus0			# bitmapped displays
grf0	at grfbus0 addr 0		# multiplane graphics
grf1	at grfbus0 addr 1		# flexible graphics

kbd0	at mfp0				# standard keyboard
ite0	at grf0 grfaddr 0		# internal terminal emulator
options 	ITE_KERNEL_ATTR=4	# bold for kernel messages
					# see /sys/arch/x68k/dev/itevar.h

## floppy disks
fdc0	at intio0 addr 0xe94000 intr 96 dma 0 dmaintr 100 # floppy controller
fd*	at fdc0 unit ?			# builtin floppy drives

## SCSI devices
scsirom0 at intio0 addr 0xfc0000		# Built-in SCSI BIOS
scsirom1 at intio0 addr 0xea0020		# External SCSI BIOS
spc0	at scsirom0				# genuin SCSI
spc1	at scsirom1				# genuin SCSI
scsibus* at spc?
mha0	at scsirom1				# Mankai MK-HA1 (Mach-2)
scsibus* at mha0

sd*	at scsibus? target ? lun ?	# SCSI disks
cd*	at scsibus? target ? lun ?	# SCSI CD-ROMs
#st*	at scsibus? target ? lun ?	# SCSI tapes
#ss*	at scsibus? target ? lun ?	# SCSI scanners
#ch*	at scsibus? target ? lun ?	# SCSI changer devices
#uk*	at scsibus? target ? lun ?	# SCSI unknown devices

## Ports
zsc0	at intio0 addr 0xe98000 intr 112
zstty0	at zsc0 channel 0		# built-in RS-232C
ms0	at zsc0 channel 1		# standard mouse
#zsc1	at intio0 addr 0xeafc00 intr 113
#zstty2	at zsc1 channel 0
#zstty3	at zsc1 channel 1
#zsc2	at intio0 addr 0xeafc10 intr 114
#zstty4	at zsc2 channel 0
#zstty5	at zsc2 channel 1
par0	at intio0 addr 0xe8c000 	# Builtin printer port

sram0	at intio0 addr 0xed0000		# battery-backuped static RAM
pseudo-device	bell			# OPM bell

powsw0	at mfp0				# Front switch
#powsw1	at mfp0				# External power switch

com0	at intio0 addr 0xefff00 intr 240	# PSX16550, port1
com1	at intio0 addr 0xefff10 intr 241	# PSX16550, port2

## Audio device
vs0 at intio0 addr 0xe92000 dma 3 dmaintr 106
audio*	at vs?

spkr*	at audio?				# PC speaker (synthesized)

## Network interfaces
ne*	at intio0 addr 0xece300 intr 249	# Nereid Ethernet
ne*	at intio0 addr 0xeceb00 intr 248	# Nereid Ethernet
neptune0 at intio0 addr 0xece000 intr 249	# Neptune-X
neptune1 at intio0 addr 0xece400 intr 249	# Neptune-X at alt. addr.
ne*	at neptune? addr 0x300			# NE2000 or clone

## Bank memory disk
bmd*	at intio0 addr 0xece3f0		# Nereid
bmd*	at intio0 addr 0xecebf0		# Nereid

## MII/PHY support for USB ethernet
#acphy*	at mii? phy ?
#rgephy*	at mii? phy ?
#rlphy*	at mii? phy ?
#ukphy*	at mii? phy ?

## USB Controller and Devices; Experimental

# Nereid USB controllers
#slhci0	at intio0 addr 0xece380 intr 251
#slhci1	at intio0 addr 0xeceb80 intr 250
#options 	SLHCI_DEBUG

# USB bus support
#usb*	at slhci?

# USB Hubs
#uhub*	at usb?
#uhub*	at uhub? port ?

# USB HID device
#uhidev*	at uhub? port ? configuration ? interface ?

# USB Mice; not supported wscons yet
#ums*	at uhidev? reportid ?
#wsmouse* at ums? mux 0

# USB Keyboards; not supported wscons yet
#ukbd*	at uhidev? reportid ?
#wskbd*	at ukbd? console ? mux 1

# USB serial adapter
#ucycom*	at uhidev? reportid ?

# USB Generic HID devices
#uhid*	at uhidev? reportid ?

# USB Printer
#ulpt*	at uhub? port ? configuration ? interface ?

# USB Modem
#umodem*	at uhub? port ? configuration ?
#ucom*	at umodem?

# Option N.V. Wireless WAN modems
#uhso*	at uhub? port ? configuration ?

# USB Mass Storage
#umass*	at uhub? port ? configuration ? interface ?
#atapibus* at umass?
#scsibus* at umass?

# USB audio
#uaudio*	at uhub? port ? configuration ?

# USB MIDI
#umidi* at uhub? port ? configuration ?

# USB IrDA
# USB-IrDA bridge spec
#uirda* at uhub? port ? configuration ? interface ?
#irframe* at uirda?

# SigmaTel STIr4200 USB/IrDA Bridge
#ustir* at uhub? port ?
#irframe* at ustir?

# USB Ethernet adapters
#aue*	at uhub? port ?		# ADMtek AN986 Pegasus based adapters
#axe*	at uhub? port ?		# ASIX AX88172 based adapters
#cue*	at uhub? port ?		# CATC USB-EL1201A based adapters
#kue*	at uhub? port ?		# Kawasaki LSI KL5KUSB101B based adapters
#mue*	at uhub? port ?		# Microchip LAN75xx/LAN78xx based adapters
#udav*	at uhub? port ?		# Davicom DM9601 based adapters
#ure*	at uhub? port ?		# Realtek RTL8152/RTL8153 based adapters
#url*	at uhub? port ?		# Realtek RTL8150L based adapters

# Prolific PL2301/PL2302 host-to-host adapter
#upl*	at uhub? port ?

# Serial adapters
#uftdi*	at uhub? port ?		# FTDI FT8U100AX serial adapter
#ucom*	at uftdi? portno ?

#umct*	at uhub? port ?		# MCT USB-RS232 serial adapter
#ucom*	at umct? portno ?

#uplcom*	at uhub? port ?		# I/O DATA USB-RSAQ2 serial adapter
#ucom*	at uplcom? portno ?

#uvscom*	at uhub? port ?		# SUNTAC Slipper U VS-10U serial adapter
#ucom*	at uvscom? portno ?

# USB Handspring Visor
#uvisor*	at uhub? port ?
#ucom*	at uvisor?

# Kyocera AIR-EDGE PHONE
#ukyopon* at uhub? port ?
#ucom*	at ukyopon? portno ?

# USB scanners that use SCSI emulation, e.g., HP5300
#usscanner* at uhub? port ?
#scsibus* at usscanner? channel ?

# D-Link DSB-R100 USB radio
#udsbr*	at uhub? port ?
#radio*	at udsbr?

# USB Generic driver
#ugen*	at uhub? port ?


#### Pseudo devices

#
# accept filters
#pseudo-device   accf_data		# "dataready" accept filter
#pseudo-device   accf_http		# "httpready" accept filter

## A disk-like interface to files.  Can be used to create floppy, CD,
## miniroot images, etc.

pseudo-device	vnd	
#options 	VND_COMPRESSION		# compressed vnd(4)

## Concatenated and striped disks; with this, you can create a software-based
## disk array similar to a "RAID 0" setup.  See ccd(4).

#pseudo-device	ccd

## Cryptographic disk devices.  See cgd(4).

#pseudo-device	cgd

## RAIDframe disk driver: software RAID driver.  See raid(4).

pseudo-device	raid	
options 	RAID_AUTOCONFIG		# auto-configuration of RAID components
# Options to enable various other RAIDframe RAID types.
# options 	RF_INCLUDE_EVENODD=1
# options 	RF_INCLUDE_RAID5_RS=1
# options 	RF_INCLUDE_PARITYLOGGING=1
# options 	RF_INCLUDE_CHAINDECLUSTER=1
# options 	RF_INCLUDE_INTERDECLUSTER=1
# options 	RF_INCLUDE_PARITY_DECLUSTERING=1
# options 	RF_INCLUDE_PARITY_DECLUSTERING_DS=1


## Memory disk device, used on boot floppies with compressed
## kernel-plus-root-disk images.

#pseudo-device	md	

## Loopback network interface; required
pseudo-device	loop

## SLIP and CSLIP interfaces, for IP over a serial line.
pseudo-device	sl		

## PPP, the successor to SLIP.  See pppd(8).
pseudo-device	ppp		

## PPP over Ethernet (RFC 2516)
pseudo-device	pppoe

## Network "tunnel" device, allowing protocol stacks to run in the userland.
## This is used by the third-party user-mode "ppp" program, and others.
#pseudo-device	tun		
#pseudo-device	tap			# virtual Ethernet

## Generic L3 over IP tunnel
#pseudo-device	gre			# generic L3 over IP tunnel

## Berkeley Packet Filter, required to run RARPD.  A generic C-language
## interface that allows selective examining of incoming packets.
pseudo-device	bpfilter

#pseudo-device	carp			# Common Address Redundancy Protocol

#pseudo-device	npf			# NPF packet filter

## for IPv6
pseudo-device	gif			# IPv[46] over IPv[46] tunnel (RFC1933)
#pseudo-device	faith			# IPv[46] tcp relay translation i/f
pseudo-device	stf			# 6to4 IPv6 over IPv4 encapsulation

## IEEE 802.1Q Virtual LAN encapsulation, see vlan(4).
pseudo-device	vlan

## Simple inter-network traffic bridging
pseudo-device	bridge
#pseudo-device	vether			# Virtual Ethernet for bridge
pseudo-device	agr			# IEEE 802.3ad link aggregation

#### Other device configuration

## Pseudo ttys, required for network logins and programs like screen.

pseudo-device	pty			# pseudo-terminals

## Random device, used to implement /dev/random (a source of random noise),
## and generate randomness for some kernel formulae.


pseudo-device	clockctl		# user control of clock subsystem
pseudo-device	drvctl			# user control of drive subsystem
pseudo-device	ksyms			# /dev/ksyms
#pseudo-device	fss			# file system snapshot device
pseudo-device 	swwdog			# software watchdog timer -- swwdog(4)

# Veriexec
# include "dev/veriexec.config"

# Pull in optional local configuration - always at end
cinclude	"arch/x68k/conf/GENERIC.local"