2015-05-03 98 views
2

我在Debian 7.0和內核3.2上使用了MOXA設備。我能夠爲這個內核成功編譯Moxa RealTTY驅動程序,但是在我升級到Debian 8.0內核3.16後,我無法編譯它。 我問MOXA最新的驅動程序,但迄今沒有答案。最新的驅動程序已從此鏈接下載http://mtsc.moxa.com:8888/Software/DN/NPort/Driver/RealTTY/,但此鏈接不再有效。Linux內核上的Moxa RealTTY模塊編譯錯誤3.16

當我運行./mxinst它崩潰的這個錯誤: ================================= ============================================== 版權所有(C )2002-2014 Moxa Inc. 保留所有權利。

MOXA NPort Server Real TTY Driver V1.18.33 Installation. 
System Information: Kernel 3.16.0-4-amd64; Machine x86_64. 
=============================================================================== 


Tar files, please wait ... OK! 
Building driver... 

If you want to use secure communication with target, 
you might choose [y] to enable the SSL function. 
Note: This function support RealCOM with secure mode only. 
Do you want to enable secure function? [y/N]. 
n 
make -C /lib/modules/3.16.0-4-amd64/build SUBDIRS=/opt/moxa.git/npreal2 modules 
make[1]: Entering directory '/usr/src/linux-headers-3.16.0-4-amd64' 
Makefile:10: *** mixed implicit and normal rules: deprecated syntax 
make[1]: Entering directory `/usr/src/linux-headers-3.16.0-4-amd64' 
    CC [M] /opt/moxa.git/npreal2/npreal2.o 
/opt/moxa.git/npreal2/npreal2.c: In function ‘npreal_wait_command_completed’: 
/opt/moxa.git/npreal2/npreal2.c:4744:13: error: implicit declaration of function ‘interruptible_sleep_on_timeout’ [-Werror=implicit-function-declaration] 
      interruptible_sleep_on_timeout(&nd->cmd_rsp_wait,timeout); 
      ^
cc1: some warnings being treated as errors 
/usr/src/linux-headers-3.16.0-4-common/scripts/Makefile.build:268: recipe for target '/opt/moxa.git/npreal2/npreal2.o' failed 
make[4]: *** [/opt/moxa.git/npreal2/npreal2.o] Error 1 
/usr/src/linux-headers-3.16.0-4-common/Makefile:1350: recipe for target '_module_/opt/moxa.git/npreal2' failed 
make[3]: *** [_module_/opt/moxa.git/npreal2] Error 2 
Makefile:181: recipe for target 'sub-make' failed 
make[2]: *** [sub-make] Error 2 
Makefile:8: recipe for target 'all' failed 
make[1]: *** [all] Error 2 
make[1]: Leaving directory '/usr/src/linux-headers-3.16.0-4-amd64' 
Makefile:67: recipe for target 'module' failed 
make: *** [module] Error 2 
Check Driver... 
FAILED !!! 

Install Not Completed ! 

我已經上傳最新的驅動程序到GitHub(https://github.com/rchovan/npreal2)。有人可以幫我解決這個模塊在Linux內核3.16和最新版本上編譯它嗎?

謝謝

+0

你做了什麼來解決缺少的功能問題:'interruptible_sleep_on_timeout()' – user3629249

+0

嗨,我還沒有解決它。我不熟悉C語言和Linux內核模塊的開發。我的經歷以源代碼編譯結束。 – Coudy

+0

你好。新版本的驅動程序可用。請聯繫[email protected]並要求提供新的linux驅動程序(測試版驅動程序,但到目前爲止,它幾乎在所有的Linux系統上都有效)。然後我會爲您提供所需的驅動程序。 –

回答

1

功能interruptible_sleep_on_timeout已經在內核版本3.15被刪除。

失蹤功能的解決方法可以在許多補丁可以找到,比如這個lm-sensors patch

-   timeout = interruptible_sleep_on_timeout(&w1_control_wait, timeout); 
+   prepare_to_wait(&w1_control_wait, &wait, TASK_INTERRUPTIBLE); 
+   timeout = schedule_timeout(timeout); 
+   finish_wait(&w1_control_wait, &wait); 

我根據這個方案,修補艾驅動程序,並就您的GitHub庫拉請求。請測試它。

+0

嗨,補丁是確定的。模塊已編譯並且功能齊全。謝謝 – Coudy