Kernel

我無法為 Linux 2.6.38 建構 VirtualBox 驅動程序

  • April 10, 2011

我正在執行 Debian 6,並決定從 Unstable 安裝 2.6.38 核心。我還安裝了標題,以便以後可以:

sudo apt-get install --target-release=unstable linux-image-2.6.38-2-686-bigmem linux-headers-2.6.38-2-686-bigmem

然後我重新安裝**virtualbox-ose-dkms**到可以重建 2.6.38 的 VirtualBox 驅動程序(以便我可以在 2.6.38 下使用 VirtualBox),但我收到此錯誤:

Building initial module for 2.6.38-2-686-bigmem

Error! Bad return status for module build on kernel: 2.6.38-2-686-bigmem (i686)
Consult the make.log in the build directory
/var/lib/dkms/virtualbox-ose/3.2.10/build/ for more information.
dpkg: error processing virtualbox-ose-dkms (--configure):
subprocess installed post-installation script returned error exit status 10
configured to not write apport reports
                                     Errors were encountered while processing:
virtualbox-ose-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)

這是他們要求我查看的文件的內容:

$ cat /var/lib/dkms/virtualbox-ose/3.2.10/build/make.log 
DKMS make.log for virtualbox-ose-3.2.10 for kernel 2.6.38-2-686-bigmem (i686)
Sat Apr  9 14:11:57 SAST 2011
make: Entering directory `/usr/src/linux-headers-2.6.38-2-686-bigmem'
 LD      /var/lib/dkms/virtualbox-ose/3.2.10/build/built-in.o
 LD      /var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/built-in.o
 CC [M]  /var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/linux/SUPDrv-linux.o
In file included from /var/lib/dkms/virtualbox-ose/3.2.10/build/include/VBox/types.h:30,
                from /var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/linux/../SUPDrvInternal.h:35,
                from /var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/linux/SUPDrv-linux.c:33:
/var/lib/dkms/virtualbox-ose/3.2.10/build/include/iprt/types.h:97:31: error: linux/autoconf.h: No such file or directory
/var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/linux/SUPDrv-linux.c: In function ‘VBoxDrvLinuxInit’:
/var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/linux/SUPDrv-linux.c:451: error: ‘nmi_watchdog’ undeclared (first use in this function)
/var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/linux/SUPDrv-linux.c:451: error: (Each undeclared identifier is reported only once
/var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/linux/SUPDrv-linux.c:451: error: for each function it appears in.)
/var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/linux/SUPDrv-linux.c:451: error: ‘NMI_IO_APIC’ undeclared (first use in this function)
/var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/linux/SUPDrv-linux.c:465: error: ‘nmi_active’ undeclared (first use in this function)
make[4]: *** [/var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/linux/SUPDrv-linux.o] Error 1
make[3]: *** [/var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv] Error 2
make[2]: *** [_module_/var/lib/dkms/virtualbox-ose/3.2.10/build] Error 2
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2
make: Leaving directory `/usr/src/linux-headers-2.6.38-2-686-bigmem'

autoconf.h include/linux``include/generatedLinux 2.6.33移至。第三方模組的作者必須調整他們的程式碼;這已經在VirtualBox 的上游完成了。同時,您可以修補模組源或創建符號連結作為解決方法

至於與 NMI 相關的錯誤,NMI 看門狗在 2.6.37 和 2.6.38 之間發生了很大變化。這看起來需要對模組原始碼進行不平凡的移植工作。同時,您可能只是修補了有問題的程式碼NMI 看門狗的目的是調試核心鎖定,所以你可以不用它。

引用自:https://unix.stackexchange.com/questions/10962