使用 module-assistant 构建 ndiswrapper 内核模块

使用 module-assistant 构建 ndiswrapper 内核模块

我正在尝试安装 ndiswrapper 以使我的无线 Netgear 正常工作。我做了以下操作:

apt-get install ndiswrapper-source

成功完成。

然后:

apt-get install ndiswrapper-dkms

返回的内容为: 设置 dkms (2.2.0.3-1ubuntu3.2)... 设置 ndiswrapper-dkms (1.57-1ubuntu1)... 正在加载新的 ndiswrapper-1.57 DKMS 文件... 首次安装:检查所有内核... 仅为 3.11.0-19-generic 构建 为 3.11.0-19-generic 构建初始模块 错误!内核上模块构建的返回状态错误:3.11.0-19-generic (x86_64) 有关更多信息,请参阅 /var/lib/dkms/ndiswrapper/1.57/build/make.log。

当我查看 /var/lib/dkms/ndiswrapper/1.57/build/make.log 时,我看到:

Cannot find kernel build files in /usr/src/linux-headers-3.11.0-19-generic
Please give the path to kernel build directory with
the KBUILD=<path> argument to make

经过仔细检查,makefile 期望找到:

$(KBUILD)/include/linux/version.h

/usr/src/linux-headers-3.11.0-19-generic/include/generated/uapi/linux/version.h
/usr/src/linux-headers-3.11.0-19-generic/include/config/evm/hmac/version.h
/usr/src/linux-headers-3.11.0-19-generic/include/config/arch/want/compat/ipc/parse/version.h

出了什么问题?看起来是 ndiswrapper 和内核不兼容。但我使用的是两者的最新版本。

更新:我下载了编译好的驱动程序,并且能够安装我的驱动程序:

ndiswrapper -l
bcmwlhigh6 : driver installed
device (0846:9011) present

但是,我仍然没有无线,iwconfig 没有显示任何内容。我注意到:

modprobe ndiswrapper

不返回任何内容。

然后我执行:dmesg|grep ndis

瞧瞧。似乎尽管驱动程序编译并安装成功,但它还是坏了,可能是由于内核不匹配或其他原因...

[  495.031481] ndiswrapper: module verification failed: signature and/or required key missing - tainting kernel
[  495.032287] ndiswrapper version 1.59 loaded (smp=yes, preempt=no)
[  495.295718] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisQueueIoWorkItem'
[  495.295725] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisFreeIoWorkItem'
[  495.295729] ndiswrapper (import:232): unknown symbol:     NDIS.SYS:'NdisMSetMiniportAttributes'
[  495.295734] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisMResetComplete'
[  495.295737] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisMAllocatePort'
[  495.295741] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisAllocateIoWorkItem'
[  495.295744] ndiswrapper (import:232): unknown symbol:    NDIS.SYS:'NdisMSendNetBufferListsComplete'
[  495.295748] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisMDeregisterMiniportDriver'
[  495.295751] ndiswrapper (import:232): unknown symbol:   NDIS.SYS:'NdisAllocateNetBufferListPool'
[  495.295756] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisMNetPnPEvent'
[  495.295761] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisMRegisterMiniportDriver'
[  495.295765] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisMFreePort'
[  495.295768] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisMIndicateReceiveNetBufferLists'
[  495.295772] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisMPauseComplete'
[  495.295776] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisFreeNetBufferListPool'
[  495.295779] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisCancelTimerObject'
[  495.295783] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisOpenConfigurationEx'
[  495.295786] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisSetTimerObject'
[  495.295790] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisFreeTimerObject'
[  495.295794] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisAllocateTimerObject'
[  495.295797] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisMIndicateStatusEx'
[  495.295801] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisFreeNetBufferList'
[  495.295808] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisMGetBusData'
[  495.295812] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisGetSystemUpTimeEx'
[  495.295815] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisAllocateNetBufferAndNetBufferList'
[  495.295819] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisAllocateMdl'
[  495.295822] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisFreeMdl'
[  495.295828] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisMOidRequestComplete'
[  495.295832] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisAllocateMemoryWithTagPriority'
[  495.295839] ndiswrapper (import:232): unknown symbol: WDFLDR.SYS:'WdfVersionBind'
[  495.295841] ndiswrapper (import:232): unknown symbol: WDFLDR.SYS:'WdfVersionBindClass'
[  495.295844] ndiswrapper (import:232): unknown symbol:  WDFLDR.SYS:'WdfVersionUnbindClass'
[  495.295847] ndiswrapper (import:232): unknown symbol: WDFLDR.SYS:'WdfVersionUnbind'
[  495.295849] ndiswrapper (load_sys_files:200): couldn't prepare driver 'bcmwlhigh6'
[  495.296262] ndiswrapper (load_wrap_driver:103): couldn't load driver bcmwlhigh6; check system log for messages from 'loadndisdriver'
[  495.296300] usbcore: registered new interface driver ndiswrapper

答案1

已下载完毕 https://launchpad.net/ubuntu/+source/ndiswrapper/1.59-1/ndiswrapper_1.59.orig.tar.gz

然后 make 并 make install。下载正确的驱动程序 bcmn43xx64 后,如中所述无法使无线网卡 WNDA3100v2 工作我能够连接到 WLAN。

答案2

我估计你正在运行 Ubuntu 12.04.4 Precise。存储库中的 ndiswrapper 版本是 1.57。但是,12.04.4 使用与 Ubuntu 13.10 相同的内核、构建工具等。我估计你最好从 Saucy 下载并安装 ndiswrapper 1.58:http://packages.ubuntu.com/search?keywords=ndiswrapper&searchon=names&suite=saucy§ion=all

为了使用 ndiswrapper-source,必须先将其提取并编译。摘自 README:

less /usr/share/doc/ndiswrapper-source/README.Debian

使用 module-assistant 构建 ndiswrapper 内核模块

请安装模块助手包并发出以下命令:-

$ ma 准备
$ ma ai ndiswrapper

上述命令将为您的内核准备、编译、打包和安装一组 ndiswrapper 模块。

ma 是 module-assistant 的缩写,ai 是 auto-install 的缩写。请参阅 module-assistant 文档以了解更多详细信息。

在 Ubuntu 中,这些命令需要 sudo。

相关内容