1
編譯netcat的爲MIPS我是新本,我有點與它搞亂:問題在Ubuntu
我試圖編譯MIPS netcat的源代碼,以便在我的路由器部署,是什麼我做的是:
下載MIPS工具鏈:MIPS-Linux的GCC
下載netcat的來源,它擴展到一個文件夾
cd path/to/netcatsource
Execute:
CC=path/to/compiler/mips-linux-gcc ./configure --host=mips-linux
make
make命令工作正常,並tryi在編譯netcat的文件顯示納克文件命令:
file netcat
OUTPUT: ELF 32-bit MSB executable, MIPS, MIPS-I version 1 (SYSV), dynamically linked (uses shared libs), not stripped
對我來說,似乎一切都很好,但如果我在我的Ubuntu框中執行./netcat它的工作原理,一旦我把它上傳到路由器它顯示了以下錯誤:
# ./netcat
Segmentation fault
這是從我的路由器在/ proc/cpuinfo中:
# cat /proc/cpuinfo
system type : 963281T_TEF
processor : 0
cpu model : Broadcom4350 V7.5
BogoMIPS : 319.48
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : no
hardware watchpoint : no
ASEs implemented :
shadow register sets : 1
core : 0
VCED exceptions : not available
VCEI exceptions : not available
unaligned exceptions : 1395
誰能幫助我? 問候
你有一個'gdb'你的路由器上?如果是這樣,嘗試調試另一方面,你可以嘗試'strace'系統調用實際發生的事情。 – KiaMorot 2013-03-14 14:44:47
嗨@KiaMorot,我沒有這些工具。我還安裝了busybox-mips以獲得更多工具,但不包括在內。 – Nucklear 2013-03-14 14:48:19
然後很難說出發生了什麼。你可以嘗試一些其他工具鏈:http://ubuntuforums.org/showthread.php?t=637454 – KiaMorot 2013-03-14 14:55:33