Subject: Clocks in SUN4 kernels
To: NetBSD port-sparc mailing list <port-sparc@netbsd.org>
From: Julian Coleman <jdc@coris.demon.co.uk>
List: port-sparc
Date: 02/12/2002 19:02:57
Building a new kernel for a 4/300, I updated my 1.5.x config and tried a
compile :

	ld -n -T /usr/src/sys/arch/sparc/conf/kern.ldscript -Ttext F0004000 -e start -X -S -o netbsd ${SYSTEM_OBJ} vers.o
	clock.o: In function `oclockattach':
	clock.o(.text+0x1fc): undefined reference to `intersil7170_attach'
	*** Error code 1

My config file looks like :

	## Mostek clock found on 4/300, sun4c, and sun4m systems.
	## The Mostek clock NVRAM is the "eeprom" on sun4/300 systems.
	#clock0	at mainbus0				# sun4c
	#clock0	at obio0				# sun4m
	clock0	at obio0 addr 0xf2000000		# sun4/300
	
	## Intersil clock found on 4/100 and 4/200 systems.
	#oclock0	at obio0 addr 0xf3000000		# sun4/200
	#oclock0	at obio0 addr 0x03000000		# sun4/100

Looking at clock.c, the code in oclockattach() is always compiled if SUN4 is
defined [*].  Should there be some extra glue that says only pull in oclock*
if we've defined that in the kernel config?  Presumably that would be wrapping
all the references to oclock* with #if INTERSIL7170 > 0, cf. the references
to clock*?

J

[*]  Looking at the 1.5.x code, it has always been pulled in for SUN4, I just
hadn't noticed because there was no intersil7170_attach().

-- 
                    My other computer also runs NetBSD
                          http://www.netbsd.org/