Ubuntu中使用dnw动机:
一、 之前没有用ubuntu中的dnw,想试试。
二、 因为换了win10系统,怕搞不定win10中dnw的驱动,想着在ubuntu中不用禁用数字签名啥的比较省心。(事实证明还是禁用数字签名最简单了。)
dnw安装步骤:
1、下载源码,放至windows和linux的共享文件夹,解压后进到/dnw-linux执行make和make install(代码是老师修改好的,直接用没有问题)
root@ubuntu:/mnt/hgfs/share/dnw-linux# make clean //由于之前make过先执行make clean
make -C src/dnw clean
make[1]: Entering directory '/mnt/hgfs/share/dnw-linux/src/dnw'
rm -rf dnw *.o
make[1]: Leaving directory '/mnt/hgfs/share/dnw-linux/src/dnw'
make -C /lib/modules/`uname -r`/build M=`pwd`/src/driver clean
make[1]: Entering directory '/usr/src/linux-headers-4.4.0-93-generic'
CLEAN /mnt/hgfs/share/dnw-linux/src/driver/.tmp_versions
CLEAN /mnt/hgfs/share/dnw-linux/src/driver/Module.symvers
make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-93-generic'
root@ubuntu:/mnt/hgfs/share/dnw-linux# make
make -C /lib/modules/`uname -r`/build M=`pwd`/src/driver modules
make[1]: Entering directory '/usr/src/linux-headers-4.4.0-93-generic'
CC [M] /mnt/hgfs/share/dnw-linux/src/driver/secbulk.o
In file included from /mnt/hgfs/share/dnw-linux/src/driver/secbulk.c:1:0:
/mnt/hgfs/share/dnw-linux/src/driver/secbulk.c: In function ‘secbulk_write’:
include/linux/kernel.h:726:17: warning: comparison of distinct pointer types lacks a cast
(void) (&_min1 == &_min2); \
^
/mnt/hgfs/share/dnw-linux/src/driver/secbulk.c:60:14: note: in expansion of macro ‘min’
to_write = min(len, BULKOUT_BUFFER_SIZE);
^
Building modules, stage 2.
MODPOST 1 modules
CC /mnt/hgfs/share/dnw-linux/src/driver/secbulk.mod.o
LD [M] /mnt/hgfs/share/dnw-linux/src/driver/secbulk.ko
make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-93-generic'
make -C src/dnw
make[1]: Entering directory '/mnt/hgfs/share/dnw-linux/src/dnw'
gcc -g -o dnw dnw.c
make[1]: Leaving directory '/mnt/hgfs/share/dnw-linux/src/dnw'
root@ubuntu:/mnt/hgfs/share/dnw-linux# make install
make -C /lib/modules/`uname -r`/build M=`pwd`/src/driver modules
make[1]: Entering directory '/usr/src/linux-headers-4.4.0-93-generic'
Building modules, stage 2.
MODPOST 1 modules
make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-93-generic'
make -C src/dnw
make[1]: Entering directory '/mnt/hgfs/share/dnw-linux/src/dnw'
make[1]: 'dnw' is up to date.
make[1]: Leaving directory '/mnt/hgfs/share/dnw-linux/src/dnw'
make -C src/dnw install
make[1]: Entering directory '/mnt/hgfs/share/dnw-linux/src/dnw'
cp dnw /usr/bin
make[1]: Leaving directory '/mnt/hgfs/share/dnw-linux/src/dnw'
make -C /lib/modules/`uname -r`/build M=`pwd`/src/driver modules_install
make[1]: Entering directory '/usr/src/linux-headers-4.4.0-93-generic'
INSTALL /mnt/hgfs/share/dnw-linux/src/driver/secbulk.ko
At main.c:222:
- SSL error:02001002:system library:fopen:No such file or directory: bss_file.c:175
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: bss_file.c:178
sign-file: certs/signing_key.pem: No such file or directory
DEPMOD 4.4.0-93-generic
make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-93-generic'
cp dnw.rules /etc/udev/rules.d/
depmod
root@ubuntu:/mnt/hgfs/share/dnw-linux#
2、验证/dev目录下没有secbulk0,反复试了多次还是没有
3、没办法,老老实实在win10中装好了dnw的驱动,并且禁用了数字签名(点击通知,找到并进入“所有设置”,在所有设置中找到并进入“更新和安全”,找到恢复,点击“高级启动”下的“立即重启”,重启电脑,重启后选择“疑难解答”,选择“高级选项”,选择“启动设置”,点击“重启”,按提示输入“7”禁用驱动程序强制签名。),是的这样其实已经可以在win10使用dnw工具了,不死心的我始终坚信自己ubuntu中dnw驱动是装好的,于是又试了一遍,此时在虚拟机中断开于主机的连接,然后在/dev目录下竟然神奇的出现了secbulk0。这样就连接成功啦。
4、dnw工具使用:
其他文档写的很多,不重复了。