Subject: "adb0 at obio?" not optional, and how to change this
To: None <port-mac68k@netbsd.org>
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
List: port-mac68k
Date: 02/16/2002 20:08:22
Hi,

trying to give espresso's 1.5.3 kernel a spring diet, I hit again what 
I've seen before when trying to build a kernel without adb support:

ld -n -Ttext 0 -e start -S -o netbsd ${SYSTEM_OBJ} vers.o
adb_direct.o: Undefined symbol `_adb_polling' referenced from text segment
adb_direct.o: Undefined symbol `_adb_polling' referenced from text segment
adb_direct.o: Undefined symbol `_adb_polling' referenced from text segment
adb_direct.o: Undefined symbol `_adb_polling' referenced from text segment
adb_direct.o: Undefined symbol `_adb_op_sync' referenced from text segment
adb_direct.o: Undefined symbol `_adb_op_sync' referenced from text segment
adb_direct.o: Undefined symbol `_adb_op_sync' referenced from text segment
adb_direct.o: Undefined symbol `_adb_op_sync' referenced from text segment
adb_direct.o: Undefined symbol `_adb_op_sync' referenced from text segment
adb_direct.o: Undefined symbol `_adb_op_sync' referenced from text segment
adb_direct.o: Undefined symbol `_adb_op_sync' referenced from text segment
adb_direct.o: Undefined symbol `_adb_op_comprout' referenced from text segment
adb_direct.o: Undefined symbol `_adb_op_comprout' referenced from text segment
adb_direct.o: Undefined symbol `_adb_op_comprout' referenced from text segment
adb_direct.o: Undefined symbol `_adb_op_comprout' referenced from text segment
adb_direct.o: Undefined symbol `_adb_polling' referenced from text segment
adb_direct.o: Undefined symbol `_adb_op_comprout' referenced from text segment
adb_direct.o: Undefined symbol `_adb_op_comprout' referenced from text segment
pm_direct.o: Undefined symbol `_adb_polling' referenced from text segment
pm_direct.o: Undefined symbol `_adb_polling' referenced from text segment
pm_direct.o: Undefined symbol `_adb_polling' referenced from text segment
pm_direct.o: Undefined symbol `_adb_polling' referenced from text segment
*** Error code 1

Stop.

This is a headless server, still it has to have adb support. Looking
into the problem deeper, it is unclear to me why adb_direct.c is
unconditionally built even if adb is not configured?

Quoting from a largely undocumented piece of NetBSD,
conf/files.mac68k:


device	adb { }
attach	adb at obio_norm
file	arch/mac68k/dev/adb.c		adb
file	arch/mac68k/dev/adbsysasm.s
file	arch/mac68k/dev/adb_direct.c
file	arch/mac68k/dev/pm_direct.c

device	aed
attach	aed at adb
file	arch/mac68k/dev/aed.c		aed needs-flag


-- I assume that the right-hand argument is what the left-hand items
depend upon. Would it take me further if I made "adbsysasm.s",
"adb_direct.c", "pm_direct.c" dependent on having adb configured? (I
shall try, but y'all know that mac68k is about beauty, not speed ;)

And, if not, what would be the canonical way of factoring adb support
out and making sure that none of this is built and linked in unless I
want it?

     hauke

-- 
Now without signature.