Subject: port-sparc/13140: netbsd-1-5 headless sparc kernel link failure
To: None <>
From: None <>
List: netbsd-bugs
Date: 06/08/2001 11:16:28
>Number:         13140
>Category:       port-sparc
>Synopsis:       link failure when you disable all framebuffers but leave RASTERCONSOLE on
>Confidential:   yes
>Severity:       non-critical
>Priority:       low
>Responsible:    port-sparc-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 08 11:15:00 PDT 2001
>Originator:     glen mccready
>Release:        netbsd-1-5 updated June 7, 14:30 Pacific
	Petting Zoo
System: NetBSD sparcy 1.5.1_BETA2 NetBSD 1.5.1_BETA2 (GENERIC) #9: Sat May 12 13:22:25 CST 2001 toor@proxima:/usr/src/sys/arch/sparc/compile/GENERIC sparc

if you remove all framebuffer drivers but leave `options RASTERCONSOLE'
defined your link fails with:
    ld -Ttext F0004000 -e start -n -X -o netbsd ${SYSTEM_OBJ} vers.o
    kd.o: In function `kd_init':
    kd.o(.text+0x34): undefined reference to `fbrcons_rows'
    kd.o(.text+0x3c): undefined reference to `fbrcons_cols'
    *** Error code 1

use the following kernel config and try to build:
-- cut here --
include "arch/sparc/conf/std.sparc"
maxusers	32
options 	SUN4C		# sun4c - SS1, 1+, 2, ELC, SLC, IPC, IPX, etc.
options 	RASTERCONSOLE		# fast rasterop console
options 	FONT_GALLANT12x22	# the console font
config		netbsd	root on ? type ?
options 	KTRACE
options 	SYSVMSG		# System V message queues
options 	SYSVSEM		# System V semaphores
options 	SYSVSHM		# System V shared memory
options 	LKM
options 	MIIVERBOSE	# verbose PHY autoconfig messages
options 	COMPAT_43	# 4.3BSD system interfaces
options 	COMPAT_10	# NetBSD 1.0 binary compatibility
options 	COMPAT_11	# NetBSD 1.1 binary compatibility
options 	COMPAT_12	# NetBSD 1.2 binary compatibility
options 	COMPAT_13	# NetBSD 1.3 binary compatibility
options 	COMPAT_14	# NetBSD 1.4 binary compatibility
options 	COMPAT_SUNOS	# SunOS 4.x binary compatibility
options 	COMPAT_SVR4	# SunOS 5.x binary compatibility
options 	COMPAT_AOUT	# NetBSD a.out compatibility
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-based filesystem (still experimental)
file-system	PORTAL		# portal filesystem (still experimental)
file-system	PROCFS		# /proc
file-system	CD9660		# ISO 9660 + Rock Ridge file system
file-system	UNION		# union file system
file-system	MSDOSFS		# MS-DOS FAT filesystem(s).
file-system	CODA		# Coda File System; also needs vcoda (below)
options 	NFSSERVER	# Sun NFS-compatible filesystem server
options 	QUOTA		# FFS quotas
options 	SOFTDEP         # FFS soft updates support.
options 	INET		# IP (Internet Protocol) v4
options 	INET6		# IPV6
options 	GATEWAY		# packet forwarding ("router switch")
options 	NS		# Xerox NS networking
options 	ISO,TPIP	# OSI networking
options 	NTP		# Network Time Protocol in-kernel support
options 	PFIL_HOOKS	# Add pfil(9) hooks, intended for custom LKMs.
options 	IPFILTER_LOG	# Add ipmon(8) logging for ipfilter device
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)

mainbus0 at root
cpu0	at mainbus0

sbus0	at mainbus0				# sun4c
xbox*	at sbus? slot ? offset ?
sbus*	at xbox?
auxreg0	at mainbus0				# sun4c
clock0	at mainbus0				# sun4c
memreg0	at mainbus0				# sun4c
timer0	at mainbus0				# sun4c
zs0	at mainbus0					# sun4c
zstty0	at zs0 channel 0				# ttya
zstty1	at zs0 channel 1				# ttyb
zs1	at mainbus0					# sun4c
kbd0	at zs1 channel 0				# keyboard
ms0	at zs1 channel 1				# mouse
bpp*	at sbus? slot? offset ?
magma*	at sbus? slot ? offset ?
mtty*	at magma?
mbpp*	at magma?
dma0	at sbus0 slot ? offset ?			# sun4c/sun4m
esp0	at sbus0 slot ? offset ? flags 0x0000		# sun4c
esp0	at dma0 flags 0x0000				# sun4m
dma*	at sbus? slot ? offset ?			# SBus
esp*	at sbus? slot ? offset ? flags 0x0000		# SBus (older proms)
esp*	at dma? flags 0x0000				# SBus
scsibus* at esp?
sd*	at scsibus? target ? lun ?		# SCSI disks
st*	at scsibus? target ? lun ?		# SCSI tapes
pseudo-device	vnd	4
pseudo-device	ccd	4
le0		at sbus0 slot ? offset ?		# sun4c on-board
le*		at sbus? slot ? offset ?		# SBus
ledma*		at sbus? slot ? offset ?		# SBus
le*		at ledma?				# SBus
lebuffer0	at sbus? slot ? offset ?		# SBus
le0		at lebuffer?				# SBus
lebuffer*	at sbus? slot ? offset ?		# SBus
le*		at lebuffer?				# SBus
pseudo-device	loop
pseudo-device	sl		2
pseudo-device	ppp		2
pseudo-device	tun		4
pseudo-device	bpfilter	8
pseudo-device	ipfilter
pseudo-device	gif		4	# IPv[46] over IPv[46] tunnel (RFC1933)
pseudo-device	vlan
audioamd0	at mainbus0				# sun4c
audio*		at audioamd0
audiocs0	at sbus0 slot ? offset ?		# SUNW,CS4231
audio*		at audiocs0
pseudo-device	pty		64	# pseudo-terminals
pseudo-device	rnd
pseudo-device	vcoda		4	# coda minicache <-> venus comm.
-- cut here --

comment out RASTERCONSOLE and FONT_GALLANT12x22, and then...
  $ config KERNEL-CONF; cd ../compile/KERNEL-CONF; make depend; rm kd.o; make

some sort of sanity check should be done at config(8) time to make sure
you haven't set conflicting options or hung yourself by selecting one
that has a dependancy.  also, i was forced to remove kd.o by hand even
though i changed an option related to it and re-ran "make depend".