[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Installation directory for modules



When I run the Makefile below it installs the module in :

/lib/modules/$(KERNELRELEASE)/extra

As far as I can find out, this is the expected behaviour from the kbuild
Makefiles.

However, modprobe looks for modules in

/lib/modules/`uname -r`.

How can I get the modules to install in this directory?

Or is this a bug (i.e. the default behaviour of the kbuild Makefiles should be to install modules in /lib/modules/`uname -r` to be consistent with modprobe)?

John Talbut

Makefile:

ifeq ($(KDIR),)
	KDIR :=/lib/modules/`uname -r`/source
endif
EXTRA_CFLAGS := -DNDIS_MINIPORT_DRIVER -DOS_LINUX -I${obj} -nostdinc
-Wno-multichar -DPIM_DEBUG -fno-builtin -DMODULE -D__KERNEL__ -O2
EXTRA_LDFLAGS := -r -g

all:
	echo "MODLIB = ${MODLIB}"
	make CnxADSL.ko

obj-m := CnxADSL.o
CnxADSL-objs := ARMAbstract.o BufMgmt.o CardAL.o CardALADSLDiag.o
CardALBdDp.o CardALBd.o CardALTigris.o \
		CardALTigrisDiag.o CardALTigrisLC.o CardMgmt.o \
		CardMgmtLink.o CardMgmtVc.o CellDataTest.o CellDataTestMgmt.o
ChipALBusCtlP46.o \
		ChipALCdsl.o ChipALDMAChanP46.o ChipALIoP46.o CardALTigrisDp.o \
		CardALTigrisHal.o ChipALSEmw.o CnxTTY.o FrameAl.o FrameALAAL.o \
		FrameALATM.o FrameALATMOAM.o FrameALATMShaper.o FrameALHec.o KThread.o \
		LnxTools.o SmLnxIf.o SmSysIf.o UtilStr.o UtilTmr.o dpcontroller.o.new


CnxADSL.ko:
	make -C $(KDIR) M=`pwd` modules


install: CnxADSL.ko
	make -C ${KDIR} M=`pwd` modules_install

clean:
	rm -f *.o *~ core .depend dep *.ko CnxADSL.mod.c .*.cmd
	rm -rf .tmp_versions/



Reply to: