I search a reason of this problem, and I found something, when dkms launch the drbd module compilation with make command, the Makefile of drbd take the kernel source dir of 2.6.32-16-generic :
DKMS make.log for drbd8-8.3.7 for kernel 2.6.32-21-generic (i686)
lundi 19 avril 2010, 11:04:01 (UTC+0200)
make: entrant dans le répertoire « /var/lib/dkms/drbd8/8.3.7/build/drbd »
Calling toplevel makefile of kernel source tree, which I believe is in
KDIR=/lib/modules/2.6.32-16-generic/build
test -f ../scripts/adjust_drbd_config_h.sh && \
KDIR=/lib/modules/2.6.32-16-generic/build O= /bin/bash ../scripts/adjust_drbd_config_h.sh
but dkms launch this command :
make KERNELRELEASE=2.6.32-21-generic -C drbd KERNELDIR=/lib/modules/2.6.32-21-generic/build
I looked in the Makefile of drbd module.We have this line with research the KDIR :
# for some reason some of the commands below only work correctly in bash,
# and not in e.g. dash. I'm too lazy to fix it to be compatible.
SHELL=/bin/bash
Hi,
I search a reason of this problem, and I found something, when dkms launch the drbd module compilation with make command, the Makefile of drbd take the kernel source dir of 2.6.32-16-generic :
DKMS make.log for drbd8-8.3.7 for kernel 2.6.32-21-generic (i686) dkms/drbd8/ 8.3.7/build/ drbd »
lundi 19 avril 2010, 11:04:01 (UTC+0200)
make: entrant dans le répertoire « /var/lib/
Calling toplevel makefile of kernel source tree, which I believe is in /lib/modules/ 2.6.32- 16-generic/ build
KDIR=
test -f ../scripts/ adjust_ drbd_config_ h.sh && \ /lib/modules/ 2.6.32- 16-generic/ build O= /bin/bash ../scripts/ adjust_ drbd_config_ h.sh
KDIR=
but dkms launch this command : 2.6.32- 21-generic -C drbd KERNELDIR= /lib/modules/ 2.6.32- 21-generic/ build
make KERNELRELEASE=
I looked in the Makefile of drbd module.We have this line with research the KDIR :
# for some reason some of the commands below only work correctly in bash,
# and not in e.g. dash. I'm too lazy to fix it to be compatible.
SHELL=/bin/bash
DRBDSRC := $(shell pwd)
export DRBDSRC
# to be overridden on command line: $(shell uname -r)/source),) $(shell uname -r)/build $(shell uname -r)/source $(shell uname -r)/build),) $(shell uname -r)/build
PREFIX := /
ifneq ($(wildcard ../build-for-uml),)
#### for Philipp's convenience :)
ARCH_UM := "ARCH=um"
KDIR := /usr/src/linux-um
else
ifeq ($(wildcard /lib/modules/
KDIR := /lib/modules/
else
KDIR := /lib/modules/
ifneq ("$(origin KDIR)", "command line")
ifneq ($(wildcard /lib/modules/
O := /lib/modules/
endif
endif
endif
endif