Subject: LKM's depending on each other
To: None <tech-kern@netbsd.org>
From: Bill Studenmund <wrstuden@nas.nasa.gov>
List: tech-kern
Date: 01/14/2000 17:00:48
I have two lkm's, one of which needs symbols in the other. I'm wondering
what the right way to set this up is.

They are kdcom.o and dmfs.o, the latter needing the former.

What I've done for now is add a new variable to bsd.kmod.mk:
KMOD_LOADFLAGS . So the mod load target now does:

        /sbin/modload ${KMOD_LOADFLAGS} -o ${KMOD} -e${KMOD}_lkmentry ${PROG}

For the one lkm which needs the other, the make file (in
sys/lkm/vfs/miscfs/dmfs/Makefile) has a line:
KMOD_LOADFLAGS= -A../../../drivers/kdcom/kdc

where sys/lkm/drivers/kdcom/ is where we make the kdcom lkm. kdc is the
output of the kernel after the lkm is linked into it.

Any objections to me adding this to the tree?

What would be the right way to do this in terms of /etc/lkm.conf?

Take care,

Bill