hey guys/gals.
im having difficulties making CDemu's vhba kernel module, here is the build log when i try to install vhba-dkms_20140609-1_all.deb which i made from tarball with command : dpkg-buildpackage -b -uc -tc
Code:
DKMS make.log for vhba-20140609 for kernel 3.14-kali1-amd64 (x86_64)
Thu Jul 24 20:48:56 EEST 2014
make -C /lib/modules/3.14-kali1-amd64/build M=/var/lib/dkms/vhba/20140609/build modules
make[1]: Entering directory `/usr/src/linux-headers-3.14-kali1-amd64'
CC [M] /var/lib/dkms/vhba/20140609/build/vhba.o
/var/lib/dkms/vhba/20140609/build/vhba.c:41:5: error: "LINUX_VERSION_CODE" is not defined [-Werror=undef]
/var/lib/dkms/vhba/20140609/build/vhba.c:41:27: error: "KERNEL_VERSION" is not defined [-Werror=undef]
/var/lib/dkms/vhba/20140609/build/vhba.c:41:41: error: missing binary operator before token "("
/var/lib/dkms/vhba/20140609/build/vhba.c:78:5: error: "LINUX_VERSION_CODE" is not defined [-Werror=undef]
/var/lib/dkms/vhba/20140609/build/vhba.c:78:26: error: "KERNEL_VERSION" is not defined [-Werror=undef]
/var/lib/dkms/vhba/20140609/build/vhba.c:78:40: error: missing binary operator before token "("
/var/lib/dkms/vhba/20140609/build/vhba.c:87:5: error: "LINUX_VERSION_CODE" is not defined [-Werror=undef]
/var/lib/dkms/vhba/20140609/build/vhba.c:87:27: error: "KERNEL_VERSION" is not defined [-Werror=undef]
/var/lib/dkms/vhba/20140609/build/vhba.c:87:41: error: missing binary operator before token "("
/var/lib/dkms/vhba/20140609/build/vhba.c: In function ‘do_request’:
/var/lib/dkms/vhba/20140609/build/vhba.c:551:25: error: ‘struct scatterlist’ has no member named ‘page’
/var/lib/dkms/vhba/20140609/build/vhba.c:551:25: error: ‘KM_USER0’ undeclared (first use in this function)
/var/lib/dkms/vhba/20140609/build/vhba.c:551:25: note: each undeclared identifier is reported only once for each function it appears in
/var/lib/dkms/vhba/20140609/build/vhba.c:551:17: error: too many arguments to function ‘kmap_atomic’
In file included from /var/lib/dkms/vhba/20140609/build/vhba.c:23:0:
/usr/src/linux-headers-3.14-kali1-common/include/linux/highmem.h:66:21: note: declared here
/var/lib/dkms/vhba/20140609/build/vhba.c:554:41: error: macro "kunmap_atomic" passed 2 arguments, but takes just 1
/var/lib/dkms/vhba/20140609/build/vhba.c:554:17: error: ‘kunmap_atomic’ undeclared (first use in this function)
/var/lib/dkms/vhba/20140609/build/vhba.c: In function ‘do_response’:
/var/lib/dkms/vhba/20140609/build/vhba.c:636:25: error: ‘struct scatterlist’ has no member named ‘page’
/var/lib/dkms/vhba/20140609/build/vhba.c:636:25: error: ‘KM_USER0’ undeclared (first use in this function)
/var/lib/dkms/vhba/20140609/build/vhba.c:636:17: error: too many arguments to function ‘kmap_atomic’
In file included from /var/lib/dkms/vhba/20140609/build/vhba.c:23:0:
/usr/src/linux-headers-3.14-kali1-common/include/linux/highmem.h:66:21: note: declared here
/var/lib/dkms/vhba/20140609/build/vhba.c:639:41: error: macro "kunmap_atomic" passed 2 arguments, but takes just 1
/var/lib/dkms/vhba/20140609/build/vhba.c:639:17: error: ‘kunmap_atomic’ undeclared (first use in this function)
cc1: all warnings being treated as errors
make[4]: *** [/var/lib/dkms/vhba/20140609/build/vhba.o] Error 1
make[3]: *** [_module_/var/lib/dkms/vhba/20140609/build] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.14-kali1-amd64'
make: *** [modules] Error 2
makefile looks like this :
Code:
VHBA_VERSION := 20140609
PACKAGE := vhba-module-$(VHBA_VERSION)
DOCS := AUTHORS ChangeLog COPYING INSTALL NEWS README
DIST := vhba.c Makefile
KERNELRELEASE ?= $(shell uname -r)
KDIR ?= /lib/modules/$(KERNELRELEASE)/build
PWD ?= $(shell pwd)
obj-m := vhba.o
ccflags-y := -DVHBA_VERSION=\"$(VHBA_VERSION)\" -Werror
clean-dirs := $(PACKAGE)
clean-files := $(PACKAGE).tar.gz $(PACKAGE).tar.bz2
export VHBA_VERSION
.PHONY: default install dist modules modules_install clean dist-dir dist-gzip dist-bzip2
default: modules
install: modules_install
dist: dist-xz
modules modules_install clean:
$(MAKE) -C $(KDIR) M=$(PWD) $@
dist-dir:
rm -rf $(PACKAGE)
install -m 755 -d $(PACKAGE)
install -m 644 -t $(PACKAGE) $(DIST) $(DOCS)
install -m 755 -d $(PACKAGE)/debian $(PACKAGE)/debian/patches $(PACKAGE)/debian/source
install -m 644 -t $(PACKAGE)/debian $(shell find debian -type f)
install -m 644 -t $(PACKAGE)/debian/patches $(shell find debian/patches -type f)
install -m 644 -t $(PACKAGE)/debian/source $(shell find debian/source -type f)
dist-gzip: dist-dir
tar -c $(PACKAGE) | gzip > $(PACKAGE).tar.gz
rm -rf $(PACKAGE)
dist-bzip2: dist-dir
tar -c $(PACKAGE) | bzip2 > $(PACKAGE).tar.bz2
rm -rf $(PACKAGE)
dist-xz: dist-dir
tar -c $(PACKAGE) | xz > $(PACKAGE).tar.xz
rm -rf $(PACKAGE)
i dont have much experience about makefiles, but ill try to find an solution, maybe ill get lucky :P
edit: ill get this error message when i try to install vhba-xx.xx.xx.deb :
Code:
root@kalibox:/home/ville/Downloads/cdemu# dpkg -i vhba-dkms_20140609-1_all.deb
(Reading database ... 227929 files and directories currently installed.)
Preparing to replace vhba-dkms 20140609-1 (using vhba-dkms_20140609-1_all.deb) ...
------------------------------
Deleting module version: 20140609
completely from the DKMS tree.
------------------------------
Done.
WARNING: Module was not running.
Unpacking replacement vhba-dkms ...
Setting up vhba-dkms (20140609-1) ...
Loading new vhba-20140609 DKMS files...
First Installation: checking all kernels...
Building only for 3.14-kali1-amd64
Building initial module for 3.14-kali1-amd64
Error! Bad return status for module build on kernel: 3.14-kali1-amd64 (x86_64)
Consult /var/lib/dkms/vhba/20140609/build/make.log for more information.
WARNING: Group 'cdrom' already exists.
FATAL: Module vhba not found.
ERROR: Unable to load module.
dpkg: error processing vhba-dkms (--install):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
vhba-dkms
root@kalibox:/home/ville/Downloads/cdemu#