Subject: Why doesn't this work?
To: None <port-sparc@netbsd.oerg>
From: Neil J. McRae <neil@domino.org>
List: port-sparc
Date: 11/02/1995 00:07:14
Here is my latest kernel config:


# 	$NetBSD: GENERIC,v 1.19 1995/10/08 11:45:39 pk Exp $
# DOUBLESIX from Generic. 
# doublesix is a 32M SPARC IPX used as an Internet Server. neil@domino.org

machine		sparc
maxusers	64
options		"SUN4C"
#options	MMU_3L
#options	DDB,DEBUG,DIAGNOSTIC

# obsolete timezone spec
options		TIMEZONE=0, DST=0

# Standard system options
options		SWAPPAGER, VNODEPAGER, DEVPAGER	# paging
#options	DEBUG, DIAGNOSTIC	# extra kernel debugging
options		KTRACE			# system call tracing support
#options	KGDB			# support for kernel gdb
#options	KGDBDEV=0xc01, KGDBRATE=38400	# device & baud rate
options		RASTERCONSOLE		# fast rasterop console
options		SYSVMSG,SYSVSEM,SYSVSHM
options		"COMPAT_09", "COMPAT_10"

# Filesystem options
options		FFS
options		NFSSERVER	# Sun NFS-compatible filesystem
options		NFSCLIENT	# Sun NFS-compatible filesystem
options		KERNFS		# kernel data-structure filesystem
options		FIFO		# POSIX fifo support (in all filesystems)
options		QUOTA		# fast filesystem with user and group quotas
options		MFS		# memory-based filesystem
options		LOFS		# Loop-back filesystem
options		FDESC		# user file descriptor filesystem
options		UMAPFS		# uid/gid remapping filesystem
options		LFS		# Log-based filesystem (still experimental)
options		PORTAL		# portal filesystem (still experimental)
options		PROCFS		# /proc
options		CD9660		# ISO 9660 + Rock Ridge file system
options		UNION		# union file system

# Networking options
options		INET
options		TCP_COMPAT_42	# compatibility with 4.2BSD TCP/IP
#options	GATEWAY		# IP packet forwarding
#options	ISO		# OSI networking
#options	TPIP
#options	EON
options		COMPAT_43

options		LKM

# Options for SPARCstation hardware
options		COMPAT_SUNOS		# compatibility with SunOS binaries
options		COMPAT_SVR4		# compatibility with SVR4 binaries

config		netbsd	swap generic

mainbus0 at root
cpu0	at mainbus0

sbus0	at mainbus0
obio0	at mainbus0

audio0	at mainbus0
auxreg0	at mainbus0
clock0	at mainbus0
clock0	at obio0 addr 0xf2000000
oclock0	at obio0 addr 0xf3000000
memreg0	at mainbus0
memreg0	at obio0 addr 0xf4000000
timer0	at mainbus0
timer0	at obio0 addr 0xef000000
eeprom0	at obio0 addr 0xf2000000

zs0	at mainbus0
zs0	at obio0 addr 0xf1000000 level 12 flags 0x103
zs1	at mainbus0
zs1	at obio0 addr 0xf0000000 level 12 flags 0x103
zs2	at obio0 addr 0xe0000000 level 12 flags 0x103

# FSBE/S or sun4m
espdma0	at sbus0 slot ? offset ?
espdma*	at sbus0 slot ? offset ?
esp0	at espdma? slot ? offset ?
esp*	at espdma? slot ? offset ?

# old sun4c SCSI
dma0	at sbus0 slot ? offset ?
dma*	at sbus0 slot ? offset ?
dma0	at obio0 addr 0xfa001000 level 4
esp0	at sbus0 slot ? offset ?
esp*	at sbus0 slot ? offset ?
esp0	at obio0 addr 0xfa000000 level 4

# old sun4c
le0	at sbus? slot ? offset ?
le*	at sbus? slot ? offset ?
le0	at obio0 addr 0xf9000000 level 6

cgsix0 at sbus? slot ? offset ?
cgsix* at sbus? slot ? offset ?

scsibus* at esp?

sd*	at scsibus? target ? lun ?
st*	at scsibus? target ? lun ?
cd*	at scsibus? target ? lun ?

fdc0	at mainbus0
fd*	at fdc0

pseudo-device	loop
pseudo-device	pty	128
pseudo-device	sl	2
pseudo-device	kbd
pseudo-device	ppp	2
pseudo-device	tun	4
pseudo-device	vnd	3
pseudo-device	bpfilter 16
---------------

This kernel compiles almost cleanly:

* I had to compile obio.c with -DSUN4 [which I pr'ed]

* I had to comment out lines from ioconf.c [This is what broke it I guess]

/sys/arch/sparc/compile/DOUBLESIX:neil@doublesix>diff ioconf.c.orig ioconf.c  
15c15
< extern struct cfdriver oclockcd;
---
> /* extern struct cfdriver oclockcd; */
65c65
<       {&oclockcd,      0, NORM, loc+ 16,      0, pv+ 8, 0},
---
> /*    {&oclockcd,      0, NORM, loc+ 16,      0, pv+ 8, 0}, */


However if I didn't do that I got this link error:

loading netbsd
ioconf.o: Undefined symbol `_oclockcd' referenced from data segment
*** Error code 1

Can someone tell me what I've not understood? The kernel doesn't configure 
things like esp and a pile of other things and then panics with boot device 
not known.

Thanks,
Neil.

--  neil@domino.org                     Domino: In the glow of the night.  --
--  Free your computer and your <a href="http://www.NetBSD.ORG/">mind</a>  --
----------  The NetBSD Project: The best things in life are FREE!  ----------