Welcome to the Linux Foundation Forum!

debian way to compile virtualbox-ose kernel module

I compiled a kernel myself with `make-kpkg`. But now I want to use virtualbox-ose and don't know how to compile the source and install it in the debian way - making a package.

I compiled the kernel my self with realtime patch because for programming.

kernel version is: 2.6.31.6-rt19

Comments

  • I run the following command `dkms build -m vboxdrv -v 3.1.2 --kernelsourcedir /usr/src/linux-2.6.31.6-rt19` and I got some errors.

    here's my /var/lib/dkms/vboxdrv/3.1.2/build/make.log

    DKMS make.log for vboxdrv-3.1.2 for kernel 2.6.31.6-rt19 (x86_64)
    Sat Jan 2 18:42:46 CET 2010
    make: Entering directory `/usr/src/linux-2.6.31.6-rt19'

    WARNING: Symbol version dump /usr/src/linux-2.6.31.6-rt19/Module.symvers
    is missing; modules will have no dependencies and modversions.

    LD /var/lib/dkms/vboxdrv/3.1.2/build/built-in.o
    CC [M] /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.o
    In file included from /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:37:
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/../SUPDrvInternal.h:84:30: error: linux/version.h: No such file or directory
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/../SUPDrvInternal.h:87:12: warning: "LINUX_VERSION_CODE" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/../SUPDrvInternal.h:87:33: warning: "KERNEL_VERSION" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/../SUPDrvInternal.h:87:47: error: missing binary operator before token "("
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/../SUPDrvInternal.h:91:8: warning: "LINUX_VERSION_CODE" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/../SUPDrvInternal.h:91:29: warning: "KERNEL_VERSION" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/../SUPDrvInternal.h:91:43: error: missing binary operator before token "("
    In file included from include/linux/gfp.h:4,
    from include/linux/slab.h:12,
    from /var/lib/dkms/vboxdrv/3.1.2/build/linux/../SUPDrvInternal.h:103,
    from /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:37:
    include/linux/mmzone.h:18:26: error: linux/bounds.h: No such file or directory
    include/linux/mmzone.h:251:5: warning: "MAX_NR_ZONES" is not defined
    include/linux/mmzone.h:253:7: warning: "MAX_NR_ZONES" is not defined
    include/linux/mmzone.h:255:7: warning: "MAX_NR_ZONES" is not defined
    In file included from include/linux/gfp.h:4,
    from include/linux/slab.h:12,
    from /var/lib/dkms/vboxdrv/3.1.2/build/linux/../SUPDrvInternal.h:103,
    from /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:37:
    include/linux/mmzone.h:288: error: 'MAX_NR_ZONES' undeclared here (not in a function)
    In file included from /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:37:
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/../SUPDrvInternal.h:104:8: warning: "LINUX_VERSION_CODE" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/../SUPDrvInternal.h:104:30: warning: "KERNEL_VERSION" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/../SUPDrvInternal.h:104:44: error: missing binary operator before token "("
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/../SUPDrvInternal.h:107:34: error: asm/semaphore.h: No such file or directory
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/../SUPDrvInternal.h:191:7: warning: "LINUX_VERSION_CODE" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/../SUPDrvInternal.h:191:28: warning: "KERNEL_VERSION" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/../SUPDrvInternal.h:191:42: error: missing binary operator before token "("
    In file included from /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:38:
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:45:5: warning: "LINUX_VERSION_CODE" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:45:26: warning: "KERNEL_VERSION" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:45:40: error: missing binary operator before token "("
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:48:5: warning: "LINUX_VERSION_CODE" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:48:27: warning: "KERNEL_VERSION" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:48:41: error: missing binary operator before token "("
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:68:5: warning: "LINUX_VERSION_CODE" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:68:27: warning: "KERNEL_VERSION" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:68:41: error: missing binary operator before token "("
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:74:5: warning: "LINUX_VERSION_CODE" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:74:27: warning: "KERNEL_VERSION" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:74:41: error: missing binary operator before token "("
    In file included from /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:80,
    from /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:38:
    include/linux/mm.h:444:63: warning: "NR_PAGEFLAGS" is not defined
    include/linux/mm.h:492:62: warning: "NR_PAGEFLAGS" is not defined
    In file included from /usr/src/linux-2.6.31.6-rt19/arch/x86/include/asm/unistd.h:5,
    from include/linux/unistd.h:7,
    from /usr/src/linux-2.6.31.6-rt19/arch/x86/include/asm/seccomp_64.h:4,
    from /usr/src/linux-2.6.31.6-rt19/arch/x86/include/asm/seccomp.h:4,
    from include/linux/seccomp.h:8,
    from include/linux/sched.h:78,
    from include/linux/smp_lock.h:5,
    from include/linux/hardirq.h:6,
    from include/linux/pagemap.h:15,
    from /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:81,
    from /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:38:
    /usr/src/linux-2.6.31.6-rt19/arch/x86/include/asm/unistd_64.h:693:29: error: asm/asm-offsets.h: No such file or directory
    In file included from /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:38:
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:85:5: warning: "LINUX_VERSION_CODE" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:85:27: warning: "KERNEL_VERSION" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:85:41: error: missing binary operator before token "("
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:88:5: warning: "LINUX_VERSION_CODE" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:88:27: warning: "KERNEL_VERSION" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:88:41: error: missing binary operator before token "("
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:93:5: warning: "LINUX_VERSION_CODE" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:93:27: warning: "KERNEL_VERSION" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:93:41: error: missing binary operator before token "("
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:116:5: warning: "LINUX_VERSION_CODE" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:116:26: warning: "KERNEL_VERSION" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:116:40: error: missing binary operator before token "("
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:129:5: warning: "LINUX_VERSION_CODE" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:129:26: warning: "KERNEL_VERSION" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:129:40: error: missing binary operator before token "("
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:170:5: warning: "LINUX_VERSION_CODE" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:170:26: warning: "KERNEL_VERSION" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:170:40: error: missing binary operator before token "("
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:224:6: warning: "LINUX_VERSION_CODE" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:224:27: warning: "KERNEL_VERSION" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:224:41: error: missing binary operator before token "("
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:231:6: warning: "LINUX_VERSION_CODE" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:231:27: warning: "KERNEL_VERSION" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:231:41: error: missing binary operator before token "("
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:269:5: warning: "LINUX_VERSION_CODE" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:269:27: warning: "KERNEL_VERSION" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/r0drv/linux/the-linux-kernel.h:269:41: error: missing binary operator before token "("
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:52:5: warning: "LINUX_VERSION_CODE" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:52:27: warning: "KERNEL_VERSION" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:52:41: error: missing binary operator before token "("
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:100:7: warning: "LINUX_VERSION_CODE" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:100:28: warning: "KERNEL_VERSION" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:100:42: error: missing binary operator before token "("
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:105:6: warning: "LINUX_VERSION_CODE" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:105:27: warning: "KERNEL_VERSION" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:105:41: error: missing binary operator before token "("
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:213:6: warning: "LINUX_VERSION_CODE" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:213:28: warning: "KERNEL_VERSION" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:213:42: error: missing binary operator before token "("
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:364:5: warning: "LINUX_VERSION_CODE" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:364:27: warning: "KERNEL_VERSION" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:364:41: error: missing binary operator before token "("
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c: In function 'vboxdrvLinuxUid':
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:367: error: 'struct task_struct' has no member named 'uid'
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:373:5: warning: "LINUX_VERSION_CODE" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:373:27: warning: "KERNEL_VERSION" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:373:41: error: missing binary operator before token "("
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c: In function 'vboxdrvLinuxGid':
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:376: error: 'struct task_struct' has no member named 'gid'
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:382:5: warning: "LINUX_VERSION_CODE" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:382:27: warning: "KERNEL_VERSION" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:382:41: error: missing binary operator before token "("
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c: In function 'vboxdrvLinuxEuid':
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:385: error: 'struct task_struct' has no member named 'euid'
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:412:7: warning: "LINUX_VERSION_CODE" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:412:29: warning: "KERNEL_VERSION" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:412:43: error: missing binary operator before token "("
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:490:6: warning: "LINUX_VERSION_CODE" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:490:28: warning: "KERNEL_VERSION" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:490:42: error: missing binary operator before token "("
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:510:6: warning: "LINUX_VERSION_CODE" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:510:28: warning: "KERNEL_VERSION" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:510:42: error: missing binary operator before token "("
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:529:6: warning: "LINUX_VERSION_CODE" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:529:28: warning: "KERNEL_VERSION" is not defined
    /var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.c:529:42: error: missing binary operator before token "("
    make[1]: *** [/var/lib/dkms/vboxdrv/3.1.2/build/linux/SUPDrv-linux.o] Error 1
    make: *** [_module_/var/lib/dkms/vboxdrv/3.1.2/build] Error 2
    make: Leaving directory `/usr/src/linux-2.6.31.6-rt19'
  • I did `make-kpkg kernel-image kernel-source kernel-headers --revision=custom.1.0 --initrd` and then I installed the header files. This seemed to fix the issue, the vboxdrv compiled successfully but output something I have to do, don't know anymore what. But my question is has someone experiences with using a realtime kernel and virtualbox (non-ose - I changed because I need usb support)
  • mfillpot
    mfillpot Posts: 2,177
    I am sorry that I did not respond before I don't use a debian based dristro and don't know the dpkg syntax. As for using virtualbox with the kernel, it should automatically apply all necessary files and modules to interact with your kernel, so if the kernel is stable and works with your installed components then vbox should be able to interact with the same components.

Categories

Upcoming Training