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的驅動,並且禁用了數字簽名(可參考:http://jingyan.baidu.com/article/624e74594dbc8d34e8ba5aa6.html
),是的這樣其實已經可以在win10使用dnw工具了,不死心的我始終堅信自己ubuntu中dnw驅動是裝好的,於是又試了一遍,此時在虛擬機中斷開於主機的連接,然后在/dev目錄下竟然神奇的出現了secbulk0。這樣就連接成功啦~~
4、dnw工具使用:
其他文檔寫的很多,不重復了。