I am need to edit a Makefile that is used to install the fusion kernel module. The Makefile checks the output of uname -r to determine the module build directory. Here is the original code
Code:
KERNEL_MODLIB = /lib/modules/$(shell uname -r)
KERNEL_SOURCE = $(KERNEL_MODLIB)/build
KERNEL_PATCHLEVEL = $(shell uname -r | cut -d . -f 2)
since I am building this system on a chrooted system, I could not use the output of uname -r, so I did this. The module seemed to build correctly.
Code:
KERNEL_MODLIB = /lib/modules/$(shell ls /lib/modules)
KERNEL_SOURCE = $(KERNEL_MODLIB)/build
KERNEL_PATCHLEVEL = 6
the problem is coming when I run make install. It errors out with the depmod command. by default depmod checks uname -r, but since my chrroted system has a differnt module directroy then uname -r returns it erros out.
question:
How can I specify depmod to use a specific module diretory then the directoy specified by uname -r.
if you care to look, this is the code used in the Makefile
Code:
(if test $(KERNEL_PATCHLEVEL) = 4; then cp $(SUB)/fusion.o $(KERNEL_MODLIB); else cp $(SUB)/fusion.ko $(KERNEL_MODLIB); fi) && depmod -ae