I'm trying to enable a kernel module I've got from a device vendor to work with DKMS. I can successfully build the module and manually install and enable it. But when using DKMS a get an error that doesn't help me in any way:

$ sudo dkms build -m biokernbase -v

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....
make KERNELRELEASE=3.13.0-123-generic all KVERSION=3.13.0-123-generic DKMS=y
.ko failed for: 3.13.0-123-generic (x86_64)
Consult the make.log in the build directory
/var/lib/dkms/biokernbase/ for more information.


DKMS make.log for biokernbase- for kernel 3.13.0-123-generic (x86_64)
Wed Dec 13 17:22:51 CET 2017
make -C /lib/modules/3.13.0-123-generic/build M=/var/lib/dkms/biokernbase/ modules
make[1]: Entering directory `/usr/src/linux-headers-3.13.0-123-generic'
  CC [M]  /var/lib/dkms/biokernbase/
  CC [M]  /var/lib/dkms/biokernbase/
  CC [M]  /var/lib/dkms/biokernbase/
  CC [M]  /var/lib/dkms/biokernbase/
  CC [M]  /var/lib/dkms/biokernbase/
  CC [M]  /var/lib/dkms/biokernbase/
  LD [M]  /var/lib/dkms/biokernbase/
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /var/lib/dkms/biokernbase/
  LD [M]  /var/lib/dkms/biokernbase/
make[1]: Leaving directory `/usr/src/linux-headers-3.13.0-123-generic'


CLEAN="make clean DKMS=y"
MAKE[0]="make all KVERSION=$kernelver DKMS=y"


DRV_NAME := biokernbase
DRV_PATH := daqnavi
KVERSION := $(shell uname -r)
KDIR     := /lib/modules/$(KVERSION)/build
BASE_DIR := /usr/lib/daqnavi

obj-m := $(DRV_NAME).o
$(DRV_NAME)-objs := main.o event.o usbreader.o memory.o misc.o isa.o

EXTRA_CFLAGS += -I$(BASE_DIR)/include -I$(BASE_DIR)/include/hw -I$(BASE_DIR)/include/linux

    $(MAKE) -C $(KDIR) M=$(PWD) modules

    $(MAKE) -C $(KDIR) M=$(PWD) clean
    rm -f *.o *~ .depend .*.cmd *.ko *.mod.c .tmp_versions modules.order Module.symvers

Update 1: kernel compatibility

I'm currently on Ubuntu 14.04.5 LTS with kernel 3.13.0-123-generic.

The vendor's documentation states compatibility with Ubuntu 12.04/14.04/15.10, kernel version 3.2/3.13/4.2.

When I manually copy the biokernbase.ko built by dkms to /lib/modules/3.13.0-123-generic/kernel/drivers/misc/, the kernel module seems to be loaded successfully:

$ sudo modprobe biokernbase; echo $?

Any ideas or hints are highly appreciated.

  • 1
    What version of Ubuntu are you running? It initially looks like your kernel may be too old for this driver. Did the driver come with any documentation that indicates what kernel versions it's compatible with? What happens if you sudo modprobe biokernbase.ko? – heynnema Dec 13 '17 at 16:52
  • @heynnema sry for the late reply, please see my additions to the question above. – Hurzelchen Dec 15 '17 at 9:48

Remove the manually copied biokernbase.ko from /lib/modules/3.13.0-123-generic/kernel/drivers/misc/.

Edit dkms.conf like this... (keep the original as a .bak file)...

CLEAN="make clean"
MAKE[0]="'make' all KVER=${kernelver}"

Perform a sudo dkms build again and see if this fixes the problem.


I was working with this exact same module (from Advantech). I found that their included dkms.conf has some stray \r carriage returns that caused a check in the dkms script to fail. Try running dos2unix on dkms.conf or otherwise ensure there are no unwanted whitespace characters.

  • 1
    Interesting hint, I will try that when I have the chance. I'm currently running my own integration into the kernel install/uninstall hooks – Hurzelchen Jul 16 '18 at 20:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.