當前位置:首頁 » 編程軟體 » 海思tcpdump交叉編譯

海思tcpdump交叉編譯

發布時間: 2022-12-07 17:16:49

㈠ 電腦里常用的的英語有那些(漢語意思)

硬體類(Hardware)
軟體類(Software)
網路類(Network)

CPU(Center Processor Unit)中央處理單元
mainboard主板
RAM(random access
memory)隨機存儲器(內存)
ROM(Read Only Memory)只讀存儲器
Floppy Disk軟盤
Hard Disk硬碟
CD-ROM光碟驅動器(光碟機)
monitor監視器
keyboard鍵盤
mouse滑鼠
chip晶元
CD-R光碟刻錄機
HUB集線器
Modem= MOlator-DEMolator,數據機
P-P(Plug and Play)即插即用
UPS(Uninterruptable Power Supply)不間斷電源
BIOS(Basic-input-Output
System)基本輸入輸出系統
CMOS(Complementary Metal-Oxide-Semiconctor)互補金屬氧化物半導體
setup安裝
uninstall卸載
wizzard向導
OS(Operation Systrem)操作系統
OA(Office AutoMation)辦公自動化
exit退出
edit編輯
復制
cut剪切
paste粘貼
delete刪除
select選擇
find查找
select all全選
replace替換
undo撤消
redo重做
program程序
license許可(證)
back前一步
next下一步
finish結束
folder文件夾
Destination Folder目的文件夾
user用戶
click點擊
double click雙擊
right click右擊
settings設置
update更新
release發布
data數據
data base資料庫
DBMS(Data Base Manege
System)資料庫管理系統
view視圖
insert插入
object對象
configuration配置
command命令
document文檔
POST(power-on-self-test)電源自檢程序
cursor游標
attribute屬性
icon圖標
service pack服務補丁
option pack功能補丁
Demo演示
short cut快捷方式
exception異常
debug調試
previous前一個
column行
row列
restart重新啟動
text文本
font字體
size大小
scale比例
interface界面
function函數
access訪問
manual指南
active激活
computer language計算機語言
menu菜單
GUI(graphical user
interfaces )圖形用戶界面
template模版
page setup頁面設置
password口令
code密碼
print preview列印預覽
zoom in放大
zoom out縮小
pan漫遊
cruise漫遊
full screen全屏
tool bar工具條
status bar狀態條
ruler標尺
table表
paragraph段落
symbol符號
style風格
execute執行
graphics圖形
image圖像
Unix用於伺服器的一種操作系統
Mac OS蘋果公司開發的操作系統
OO(Object-Oriented)面向對象
virus病毒
file文件
open打開
colse關閉
new新建
save保存
exit退出
clear清除
default默認
LAN區域網
WAN廣域網
Client/Server客戶機/伺服器
ATM( Asynchronous
Transfer Mode)非同步傳輸模式
Windows NT微軟公司的網路操作系統
Internet互聯網
WWW(World Wide Web)萬維網
protocol協議
HTTP超文本傳輸協議
ftp文件傳輸協議
Browser瀏覽器
homepage主頁
Webpage網頁
website網站
URL在Internet的WWW服務程序上
用於指定信息位置的表示方法
Online在線
Email電子郵件
ICQ網上尋呼
Firewall防火牆
Gateway網關
HTML超文本標識語言
hypertext超文本
hyperlink超級鏈接
IP(Address)互聯網協議(地址)
SearchEngine搜索引擎
TCP/IP用於網路的一組通訊協議
Telnet遠程登錄
IE(Internet Explorer)探索者(微軟公司的網路瀏覽器)
Navigator引航者(網景公司的瀏覽器)
multimedia多媒體
ISO國際標准化組織
ANSI美國國家標准協會
able 能
activefile 活動文件
addwatch 添加監視點
allfiles 所有文件
allrightsreserved 所有的權力保留
altdirlst 切換目錄格式
並能夠解決更大范圍內的磁碟問題
andotherinFORMation 以及其它的信息
archivefileattribute 歸檔文件屬性
assignto 指定到
autoanswer 自動應答
autodetect 自動檢測
autoindent 自動縮進
autosave 自動存儲
availableonvolume 該盤剩餘空間
badcommand 命令錯
badcommandorfilename 命令或文件名錯
batchparameters 批處理參數
binaryfile 二進制文件
binaryfiles 二進制文件
borlandinternational borland國際公司
bottommargin 頁下空白
bydate 按日期
byextension 按擴展名
byname 按名稱
bytesfree 位元組空閑
callstack 調用棧
casesensitive 區分大小寫
要求出現確認提示,在你想覆蓋一個
centralpointsoftwareinc central point 軟體股份公司
changedirectory 更換目錄
changedrive 改變驅動器
changename 更改名稱
characterset 字元集
checkingfor 正在檢查
檢查磁碟並顯示一個狀態報告
chgdrivepath 改變盤/路徑
china 中國

chooseoneofthefollowing 從下列中選一項
clearall 全部清除
clearallbreakpoints 清除所有斷點
clearsanattribute 清除屬性
clearscommandhistory 清除命令歷史
clearscreen 清除屏幕
closeall 關閉所有文件
codegeneration 代碼生成
colorpalette 彩色調色板
commandline 命令行
commandprompt 命令提示符
compressedfile 壓縮文件
配置硬碟,以為 MS-DOS 所用
conventionalmemory 常規內存
***ceptemptyones 拷貝目錄和子目錄,空的除外
拷貝設置了歸檔屬性的文件
把文件拷貝或搬移至另一地方
把一個軟盤的內容拷貝到另一個軟盤上
diskette 復制磁碟
C拷貝M移動 O比 F搜索R改名 D刪除 V版本 E瀏覽A屬性 W寫字 P列印 L列表
rightc 版權(c
創建DOS分區或邏輯DOS驅動器
createextendeddospartition 創建擴展DOS分區
在擴展DOS分區中創建邏輯DOS驅動器
createprimarydospartition 創建DOS主分區
createsadirectory 創建一個目錄
創建,改變或刪除磁碟的卷標
currentfile 當前文件
currentfixeddiskdrive 當前硬碟驅動器
currentsettings 當前設置
currenttime 當前時間
cursorposition 游標位置

defrag 整理碎片
dele 刪去
刪除分區或邏輯DOS驅動器
刪除一個目錄和所有的子目錄及其中的所有文件
deltree 刪除樹
devicedriver 設備驅動程序
dialogbox 對話欄
directionkeys 方向鍵
directly 直接地
directorylistargument 目錄顯示變數
directoryof 目錄清單
directorystructure 目錄結構
diskaccess 磁碟存取
disk 磁碟拷貝
磁碟服務功能: C拷貝 O比較 F搜索R改卷名V校驗 瀏覽E編緝M圖 L找文件 N格式化
diskspace 磁碟空間
displayfile 顯示文件
displayoptions 顯示選項
displaypartitioninFORMation 顯示分區信息
顯示指定目錄和所有目錄下的文件
顯示指定屬性的文件
顯示或改變文件屬性
displaysorsetsthedate 顯示或設備日期
以單色而非彩色顯示安裝屏信息
顯示系統中已用和未用的內存數量
顯示磁碟上所有文件的完整路徑和名稱
顯示或改變當前目錄
doctor 醫生
doesn 不
doesntchangetheattribute 不要改變屬性
dosshell DOS 外殼
doubleclick 雙擊
你想顯示邏輯驅動器信息嗎(y/n)?
driveletter 驅動器名
editmenu 編輯選單
emsmemory ems內存
endoffile 文件尾
endofline 行尾
enterchoice 輸入選擇
entiredisk 轉換磁碟
environmentvariable 環境變數
esc esc
everyfileandsubdirectory 所有的文件和子目錄
existingdestinationfile 已存在的目錄文件時
expandedmemory 擴充內存
expandtabs 擴充標簽
explicitly 明確地
extendedmemory 擴展內存
fastest 最快的
fatfilesystem fat 文件系統
fdiskoptions fdisk選項
fileattributes 文件屬性
fileFORMat 文件格式
filefunctions 文件功能
fileselection 文件選擇
fileselectionargument 文件選擇變元
filesin 文件在
filesinsubdir 子目錄中文件
fileslisted 列出文件
filespec 文件說明
filespecification 文件標識
filesselected 選中文件
findfile 文件查尋
fixeddisk 硬碟
fixeddisksetupprogram 硬碟安裝程序
fixeserrorsonthedisk 解決磁碟錯誤
floppydisk 軟盤
FORMatdiskette 格式化磁碟
FORMatsadiskforusewithmsdos 格式化用於MS-DOS的磁碟
FORMfeed 進紙
freememory 閑置內存
fullscreen 全屏幕
functionprocere 函數過程
graphical 圖解的
graphicslibrary 圖形庫
groupdirectoriesfirst 先顯示目錄組
hangup 掛斷
harddisk 硬碟
hardwaredetection 硬體檢測
ha**een 已經
helpfile 幫助文件
helpindex 幫助索引
helpinFORMation 幫助信息
helppath 幫助路徑
helpscreen 幫助屏
helptext 幫助說明
helptopics 幫助主題
helpwindow 幫助窗口
hiddenfile 隱含文件
hiddenfileattribute 隱含文件屬性
hiddenfiles 隱含文件
howto 操作方式
ignorecase 忽略大小寫
在常規和上位內存
incorrectdos 不正確的DOS
incorrectdosversion DOS 版本不正確
indicatesabinaryfile 表示是一個二進制文件
indicatesanasciitextfile 表示是一個ascii文本文件
insertmode 插入方式
請用scandisk,不要用chkdsk
inuse 在使用
invaliddirectory 無效的目錄
is 是
kbytes 千位元組
keyboardtype 鍵盤類型
labeldisk 標注磁碟
laptop 膝上
largestexecutableprogram 最大可執行程序
largestmemoryblockavailable 最大內存塊可用
lefthanded 左手習慣
leftmargin 左邊界
linenumber 行號
linenumbers 行號
linespacing 行間距
listbyfilesinsortedorder 按指定順序顯示文件
listfile 列表文件
listof 清單
locatefile 文件定位
lookat 查看
lookup 查找
macroname 宏名字
makedirectory 創建目錄
memoryinfo 內存信息
memorymodel 內存模式
menubar 菜單條
menucommand 菜單命令
menus 菜單
messagewindow 信息窗口
microsoft 微軟
microsoftantivirus 微軟反病毒軟體
microsoftcorporation 微軟公司
mini 小的
modemsetup 數據機安裝
molename 模塊名
monitormode 監控狀態
monochromemonitor 單色監視器
moveto 移至
multi 多
newdata 新建數據
newer 更新的
newfile 新文件
newname 新名稱
newwindow 新建窗口
norton norton
nostack 棧未定義
noteusedeltreecautiously 注意:小心使用deltree
onlinehelp 聯機求助
optionally 可選擇地
or 或
pageframe 頁面
pagelength 頁長
在顯示每屏信息後暫停一下
pctools pc工具
postscript 附言
prefixmeaningnot 前綴意即"不
prefixtoreverseorder 反向顯示的前綴
presetche** 用前綴和放在短橫線-後的開關(例如/-w)預置開關
pressakeytoresume 按一鍵繼續
pressanykeyforfilefunctions 敲任意鍵執行文件功能
pressentertokeepthesamedate 敲回車以保持相同的日期
pressentertokeepthesametime 敲回車以保持相同的時間
pressesctocontinue 敲esc繼續
pressesctoexit 敲鍵退出
pressesctoexitfdisk 敲esc退出fdisk
敲esc返回fdisk選項

㈡ cygwin 中如何安裝arm-linux-gcc交叉編譯

交叉編譯工具鏈作為嵌入式Linux開發的基礎,直接影響到嵌入式開發的項目進度和完成質量。由於目前大多數開發人員使用Windows作為嵌入式開發的宿主機,在Windows中通過安裝VMware等虛擬機軟體來進行嵌入式Linux開發,這樣對宿主機的性能要求極高。Cygwin直接作為Windows下的軟體完全能滿足嵌入式Linux的開發工作,對硬體的要求低及方便快捷的特點成為嵌入式開發的最佳選擇。

目前網路上Cygwin下直接可用的交叉編譯器寥寥無幾且版本都比較低,不能滿足開源軟體對編譯器版本依賴性的要求(如低版本工具鏈編譯U-Boot出現軟浮點問題等);Crosstool等交叉工具鏈製作工具也是更新跟不上自由軟體版本的進度;同時系統介紹Cygwin下製作交叉編譯器方面的資料很少。針對上述情況,基於最新版gcc等自由軟體構建Cygwin下的交叉編譯器顯得尤為迫切和重要。
構建前准備工作
首先Cygwin下必須保證基本工具比如make}gcc等來構建bootstrap-gcc編譯器,這可以在安裝Cygwin時選擇安裝。參照gcc等安裝說明文檔來在Cygwin下查看是否已經安裝,如輸入gcc --v等。
源碼下載
gcc-4.5.0的編譯需mpc的支持,而mpc又依賴gmp和mpfr庫。從各個項目官方網站上下載的最新的源碼:
binutils-2.20. l .tar.bz2
gmp-S.O. l .tar.bz2
mpc-0.8.2.tar.gz
mpfr-3.O.O.tar.bz2
gcc-4.S.O.tar.bz2
linux-2.6.34.tar.bz2
glibc-2.11.2.tar.bz2
glibc-ports-2. l l .tar.bz2
gdb-7. l.tar.bz2

設置環境變數
HOST:工具鏈要運行的目標機器;BUILD:用來建立工具鏈的機器;TARGET工具鏈編譯產生的二進制代碼可以運行的機器。
BUILD=i686-pc-cygwin
HOST=i686-pc-cygwin TARGET=arm-linux
SYSROOT指定根目錄,$PREFIX指定安裝目錄。目標系統的頭文件、庫文件、運行時對象都將被限定在其中,這在交叉編譯中有時很重要,可以防止使用宿主機的頭文件和庫文件。本文首選$SYSROOT為安裝目錄,$PREFIX主要作為glibc庫安裝目錄。
SYSROOT=/cross-root
PREFIX=/cross-root/arm-linux
由於GCC-4.5.0需要mpfr,gmp,mpc的支持,而這三個庫又不需要交叉編譯,僅僅是在編譯交叉編譯鏈時使用,所以放在一個臨時的目錄。
TEMP_PREFIX=/build-temp
控制某些程序的本地化的環境變數:
LC ALL=POSIX
設置環境變數:
PATH=$SYSROOT/bin:兒in:/usr/bin
設置編譯時的線程數f31減少編譯時間:
PROCS=2
定義各個軟體版本:
BINUTILS V=2.20.1
GCC V=4.5.0
GMP V=5.0.1
MPFR V=3.0.0
MPC V二0.8.2
LINUX V二2.6.34
GLIBC V=2.11.2
GLIBC-PORTS V=2.11
GDB V=7.1
構建過程詳解
鑒於手工編譯費時費力,統一把構建過程寫到Makefile腳本文件中,把其同源碼包放在同一目錄下,執行make或順次執行每個命令即可進行無人值守的編譯安裝交叉工具
鏈。以下主要以Makefile執行過程為主線進行講解。
執行「make」命令實現全速運行
可在Cygwin的Shell環境下執行「make>make.log 2>&1」命令把編譯過程及出現的錯誤都輸出到make.log中,便於查找:
all:prerequest install-deps install-cross-stage-one install-
cross-stage-two
預處理操作
"make prerequest',命令實現單步執行的第一步,實現輸出變數、建立目錄及解壓源碼包等操作。0'set十h」關閉bash的Hash功能,使要運行程序的時候,shell將總是搜索PATH里的目錄[4]。這樣新工具一旦編譯好,shell就可以在$(SYSROOT)/bin目錄里找到: prerequest:
set +h&&mkdir -p $(SYSROOT)/bin&&
mkdir -p $(PREFIX)/include&&
mkdir -p $(TEMP一REFIX)&&
export PATH LCes ALL&&
tar -xvf gmp-$(GMP_V).tar.bz2&&
tar -xvf mpfr-$(MPFR_V).tar.bz2&&
tar -xvf mpc-$(MPC_V).tar.gz&&
tar -xvf binutils-$(BINUTILS_V).tar.bz2&&
tar -xvf gcc-$(GCC_V).tar.bz2&&
tar -xvf linux-$(LINUX_V).tar.bz2&&
tar -xvf glibc-$(GLIBC_V).tar.bz2&&
tar -xvf glibc-ports-$(GLIBC-PORTS_V).tar.bz2&&
my glibc-ports-$(GLIBC-PORTS_V)
glibc-$(GLIBC_V)/ports&&
tar -xvf gdb-$(GDB V).tar.bz2
非交叉編譯安裝gcc支持包mpc
00make install-deps」命令實現單步執行的第二步,實現mpc本地編譯,mpc依賴於gmp和mpfr
install-deps:gmp mpfr mpc
gmp:gmp-$(GMP_V)
mkdir -p build/gmp&&cd build/gmp&&
../../gmp-*/configure
--disable-shared --prefix=$(TEMP_PREFIX)&&
$(MAKE)一$(PROCS)&&$(MAKE) install
mpfr:mpfr-$(MPFR_V)
mkdir -p b-uild/mpfr&&cd build/mpfr&&
../..//mpfr-*/configure
LDF'LAGS="-Wl,-search_paths_first」--disable-shared
--with-gmp=$(TEMP_PREFIX)
--prefix=$(TEMP_PREFIX)&&
$(MAKE)一$(PROCS) all&&$(MAKE) install
mpc: mpc-$(MPC_V) gmp mpfr
mkdir -p build/mpc&&cd build/mpc&&
../../mpc-*/configure
--with-mpfr=$(TEMP PREFIX)
--with-gmp=$(TEMP_PREFIX)
--prefix=$(TEMP_PREFIX)&&
$(MAKE)一$(PROCS)&&$(MAKE) install
交叉編譯第一階段
"make install-cross-stage-one',命令實現單步執行的第三步,編譯安裝binutils,bootstrap-gcc和獲取Linux內核頭文件:
install-cross-stage-one:cross-binutils cross-gcc get-kernel-headers
編譯安裝binutils
cross-binutils: binutils-$(BINUTILS_ V)
mkdir -p build/binutils&&cd build/binutils&&
../..//binutils-*/configure --prefix=$(SYSROOT)
--target=$(TARGET)--disable-nls&&
$(MAKE)j$(PROCS)&&$(MAKE) install
編譯安裝bootstrap-gcc。使用一disable-shared參數的意思是不編譯和安裝libgcc_ eh.a文件。glibc軟體包依賴這個庫,因為它使用其內部的一lgcc_eh來創建系統[6]。這種依賴
性,可通過建立一個指向libgcc.a符號鏈接得到滿足,因為該文件最終將含有通常在libgcc- eh.a中的對象(也可通過補丁文件實現)。
cross-gcc:gcc-$(GCC_V)
mkdir -p build/gcc&&cd build/gcc&&
二//gcc-*/configure
--target=$(TARGET)--prefix=$(SYSROOT)
--disable-nls --disable-shared --disable-multilib
--disable-decimal-float--disable-threads
--disable-libmudflap --disable-libssp
--disable-libgomp --enable-languages=c
--with-gmp=$(TEMP_PREFIX)
--with-mpfr=$(TEMP_PREFIX)
--with-mpc=$(TEMP_PREFIX)&&
$(MAKE) -j$(PROCS)&&$(MAICE) install&&
In -vs libgcc.a'arm-linux-gcc -print-libgcc-file-name I
sed's/libgcc/& eh/'}
獲取Linux內核頭文件:
get-kernel-headersainux-$(LINUX_V)
cd linux-$(LINUX_V)&&
$(MAICE) mrproper&&$(MAKE) headers check&&
$(MAKE) ARCH=arm&&
INSTALLes HDR_ PATH=dest headers_ install&&
find dest/include
(-name .install一。-name ..installNaNd)-delete&&
cp -rv desdinclude/* $(PREFIX)/include
交叉編譯第二階段
編譯安裝glibc、重新編譯安裝binutils、完整編譯安裝gcc和編譯安裝gdb o "make install-cross-stage-two',命令實現單步執行的第四步: install-cross-stage-two:cross-glibc cross-rebinutils cross-g++ cross-gdb
編譯安裝glibca glib。的安裝路徑特意選為$(PREFIX),與gcc更好找到動態鏈接庫也有關系,選在$(SYSROOT)提示找不到crti.o; glibc已經不再支持i386; glibc對ARM等的處理器的支持主要通過glibc-ports包來實現;正確認識大小寫敏感(Case Sensitive)和大小寫不敏感(CaseInsensitive)系統,大小寫敏感問題主要影響到glibc,是交叉編譯glibc成功的關鍵:Cygwin幫助手冊中可知Cygwin是默認大小寫不敏感的n},但是UNIX系統是大小寫敏感的,這也是Cygwin和UNIX類系統的一個區別。通過作者自行參考製作的glibc-2.11.2-cygwin.patch補T使glibc變為Case-Insensitive,此補丁主要是對大小寫敏感問題改名來實現。
交叉編譯過程中安裝的鏈接器,在安裝完Glibc以前都無法使用。也就是說這個配置的forced unwind支持測試會失敗,因為它依賴運行中的鏈接器。設置libc_ cvforced unwind=yes這個選項是為了通知configure支持force-unwind,而不需要進行測試。libc cv_c_cleanup=yes類似的,在configure腳本中使用libc_cv_c cleanup=yes,以便配置成跳過測試而支持C語言清理處理。
cross-glibc:glibc-$(GLIBC_V)
cd glibc-$(GLIBC_V)&&
patch -Np 1 –i...//glibc-2.11.2-cygwin.patch&&
cd..&&mkdir -p build/glibc&&
cd build/glibc&&
echo"libc cv_forcedes unwind=yes">config.cache&&
echo "libc cv_c_cleanup=yes">>config.cache&&
echo "libc cv_arm_tls=yes">>config.cache&&
../../glibc-*/configure --host=$(TARGET)
--build=$(../OneScheme/glibc-2.11.2/scripts/config.guess)
--prefix=$(PREFIX)--disable-profile
--enable-add-ons --enable-kernel=2.6.22.5
--with-headers=$(PREFIX)/include
--cache-file=config.cache&&
$(MAKE)&&$(MAKE) install
重新編譯安裝binutils。編譯之前要調整工具鏈,使其
指向新生成的動態連接器。
調整工具鏈:
SPECS=
'dirname $(arm-linux-gcc -print-libgcc-file-name)'/specs
arm-linux-gcc -mpspecs
sed -e 's@/lib(64)\?/ld@$(PREFTX)&@g' -e ,}/}}*cPP}$/{n;s,$,-isystem $(PREFIX)/include,}"
>$SPECS
echo "New specs file is: $SPECS"
unset SPECS
測試調整後工具鏈:
echo 'main(川』>mmy.c
arm-linux-gcc
-B/cross-root/arm-linux/lib mmy.c
readelf -1 a.out I grep』:/cross-roobarm-linux'
調整正確的輸出結果:
[Requesting program interpreter: /tools/lib/ld-linux.so.2j
一切正確後刪除測試程序:
rm -v mmy.c a.out
重新編譯binutils。指定--host,--build及--target,否則配置不成功,其config.guess識別能力不如gcc做的好。
cross-rebinutils: binutils-$(BINUTILS_V)
mkdir -p build/rebinutils&&
cd build/rebinutils&&CC="$(TARGET)-gcc
-B/cross-roodarm-linux/lib/"&&AR=$(TARGET)-ar&&
RANLIB=$(TARGET)-ranlib&&../..//binutils-*/configure
--host=$(HOST)--build=$(BUILD)--target=$(TARGET)
--prefix=$(SYSROOT)--disable-nls
--with-lib-path=$(PREFIX)/lib&&
$(MAKE)--$(PROCS)&&$(MAKE) install
高於4.3版的gcc把這個編譯當作一個重置的編譯器,並且禁止在被一prefix指定的位置搜索startfiles。因為這次不是重置的編譯器,並且$(SYSROOT)目錄中的startfiles對於創
建一個鏈接到$$(SYSROOT)目錄庫的工作編譯器很重要,所以我們使用下面的補丁,它可以部分還原gcc的老功能tai . patch -Npl –i../gcc-4.5.0-startfiles_fix-l.patch
在正常條件下,運行gcc的fixincludes腳本,是為了修復可能損壞的頭文件。它會把宿主系統中已修復的頭文件安裝到gcc專屬頭文件目錄里,通過執行下面的命令,可以抑
制fixincludes腳本的運行[9](此時目錄為/gcc-4.5.0)。
cp -v gcc/Makefile.in{,.orig}
sed 's@\./fixinc\.sh@-c true@'
gcc/Makefile.in.orig > gcc/Makefile.in
下面更改gcc的默認動態鏈接器的位置,使用已安裝在/cross-root/ann-linux目錄下的鏈接器,這樣確保在gcc真實的編譯過程中使用新的動態鏈接器。即在編譯過程中創建的所有
二進制文件,都會鏈接到新的glibc文件
for file in
$(find gcc/config -name linux64.h-o -name linux.h –o -name sysv4.h)
do cp -uv $file{,.orig}
sed -a 's@/lib(64)?(32)?/Id@/cross-root/arm-linux&@g』-e's@/usr@/cross-rootlarm-linux@g' $file.orig>$file echo『
#undef STANDARD INCLUDE DIR
#define STANDARD_ INCLUDE DIR "/cross-root/arm-linux/include"
#define STANDARD STARTFILE PREFIX 1 "/cross-root/arm-linux/lib"
#define STANDARD_ STARTFILE_ PREFIX_ 2」」』>>$file
touch $file.orig done
完整編譯安裝gcc。最好通過指定--libexecdir更改libexecdir到atm-linux目錄下。--with-local-prefix選項指定gcc本地包含文件的安裝路徑此處設為$$(PREFIX),安裝後就會在內核頭文件的路徑下。路徑前指定$(Pwd)則以當前路徑為基點,不指定則默認以/home路徑為基點,這點要注意。
cross-g++:gcc-$(GCC-)
mkdir -p build/g十+&&cd build/g++&&
CC="$(TARGET)-gcc AR=$(TARGET)-ar&&
-B/cross-roodarm-linux/lib/"&&
RANLIB=$(TARGET)-ranlib&&
..//gcc-*/configure
--host=$(HOST)--build=$(BUILD)--target=$(TARGET)
--prefix=$(SYSROOT)--with-local-prefix=$(PREFIX)
--enable-clocale=gnu --enable-shared
--enable-threads=posix --enable -cxa_atexit
--enable-languages=c,c++--enable-c99
--enable-long-long --disable-libstdcxx-pch
--disable-libunwind-exceptions
--with-gmp=$(TEMP_PREFIX)
--with-mpfr=$(TEMP_PREFIX)
--with-mpc=$(TEMP_PREFIX)&&
$(MAKE) LD_IBRARY_ATH=
$(pwd)/$(../../gcc-4.5.0/config.guess)/libgcc&&
$(MAKE) install
編譯安裝gdb,至此完成整個工具鏈的製作。
cross-gdb: gdb-$(GDB V)
mkdir -p build/gdb&&cd build/gdb&&
../../gdb-*/configure --prefix=$(SYSROOT)
--target=$(TARGET)--disable-werror&&
$(MAKE)-j$(PROCS)&&$(MAKE) install
「make clean」命令清除編譯生成的文件和創建解壓的文件夾
.PHONY:clean
dean:
rm -fr $(TEMP_PREFIX) build
binutils-$(BINUTIL,S_V) gcc-$(GCC_V)
glibc-$(NEWL.IB_V) gdb-$(GDB_V)
gmp-$(GMP_V) mpc-$(MPC_V) mpfr-$(MPFR_V)
工具鏈測試
命令行中輸入以下內容:
echo 'main(){}』>mmy.c
arm-linux-gcc -o mmy.exe mmy.c
file mmy.exe
運行正常的結果:
mmy.exe: ELF 32-bit LSB executable, ARM, version 1,for GNU/Linux 2.6.22, dynamically linked (uses shared libs),not stripped.

㈢ gcc交叉編譯怎麼找頭文件及lib庫的

是在specs裡面讀取的路徑信息。
命令行中鍵入 gcc -v
Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs
Configured with: /usr/build/package/orig/test.respin/gcc-3.4.4-3/configure --ver
bose --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --libe
xecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-langu
ages=c,ada,c++,d,f77,pascal,java,objc --enable-nls --without-included-gettext --
enable-version-specific-runtime-libs --without-x --enable-libgcj --disable-java-
awt --with-system-zlib --enable-interpreter --disable-libgcj-debug --enable-thre
ads=posix --enable-java-gc=boehm --disable-win32-registry --enable-sjlj-exceptio
ns --enable-hash-synchronization --enable-libstdcxx-debug
Thread model: posix
gcc version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)

注意「--prefix=/usr」 以及「--libdir=/usr/lib 」
表示gcc ld as 等可執行文件安裝在/usr/bin,而libc.a 等文件是在/usr/lib中。
解壓縮交叉編譯器時,也是要解壓縮在在--prefix 指定的目錄下。
比如 下載了arm-linux 的交叉編譯器cross-3.3.2.tar.bz2,解壓縮之後,運行 arm-linux-gcc -v
得到 --prefix=/usr/local/arm。那麼就要把 bin lib 等所有的文件和文件夾到/usr/local/arm目錄下。
否則到時候運行arm-linux-gcc hello.c會提示找不到stdio.h 或者 lib.so.6 等

HOWTO Use the GCC specs file

About Specs file
The "gcc" program invoked by users is a convenient front-end driver executable which will invoke other programs in the background such as cc1, as or ld to do its work according to the command line parameter given. A specs file is plain text used to control the default behavior for the "gcc" front-end. The specs file is usually built-in but for flexibility purposes, it can be overridden with an external version.
Basic Specs file modifications
CC will proce a specs file via the following command.
gcc -mpspecs > specs
You may use a text editor of your choice to inspect it. It may be confusing at first, but there are many places of interest. To use the specs file, invoke gcc with -specs= or place it at "/mingw/lib/gcc/mingw32//specs" to make GCC use it by default, where refers to the GCC version installed.
Adding include directories to the search path
& #160;he *cpp: section should be modified. It contains the following by default:
*cpp:
%{posix:-D_POSIX_SOURCE} %{mthreads:-D_MT}
If "z:\libx\include" needs to be added to the GCC includes search path, it should be changed to the following
*cpp:
%{posix:-D_POSIX_SOURCE} %{mthreads:-D_MT} -I/z/libx/include
Adding lib directories to the search path
& #160;he *link_libgcc: section should be modified. It contains the following by default:
*link_libgcc:
%D
& #160;f "z:\libx\lib" needs to be added to the GCC library search path, it should be changed to the following
*link_libgcc:
%D -L/z/libx/lib

㈣ 如何將tcpmp移植到arm嵌入式系統

1.在http://www.tcpmp.org下載libpcap-0.9.8.tar.gz和tcpmp-3.9.8.tar.gz兩個文件。

2.將這兩個文件放在/home下解壓。

3.編譯,安裝libpcap-0.9.8:

(1)進入libpcap目錄,打開configure。將下面兩端代碼注釋掉

#if test
-z "$with_pcap" && test
"$cross_compiling" = yes; then
# { {
echo "$as_me:$LINENO:
error: pcap type not determined when
cross-compiling; use --with-pcap=..."
>&5
#echo "$as_me:
error: pcap type not determined when
cross-compiling; use --with-pcap=..."
>&2;}
# { (exit 1);
exit 1; }; }
#fi
.......
# if test $ac_cv_linux_vers =
unknown ; then
# {
{ echo
"$as_me:$LINENO:
error: cannot determine linux version when
cross-compiling" >&5
#echo "$as_me:
error: cannot determine linux version when
cross-compiling"
>&2;}
# { (exit 1);
exit 1; }; }
# fi

運行./configure
--host=arm-linux(如果不注釋掉上面兩段代碼,可能會出現determine linux version when
cross-compiling或pcap type not determined when
cross-compiling導致無法configure)。運行開始的時候可能會出現個warning說不能用--host,configure的時候會自動識別交叉編譯,但事實上不是這樣,還是需要./configure
--host=arm-linux才會識別用什麼交叉編譯。

(2)配置之後,會生成Makefile。打開Makefile發現CC=arm-linux-gcc,說明交叉編譯配置成功。但還需要把prefix項為prefix=/usr/local/arm/3.4.1/arm-linux。然後make,make
install。發現/usr/local/arm/3.4.1/arm-linux/include有了3個pcap文件,libpcap編譯安裝成功。
3.編譯,安裝tcpmp-3.9.8

(1)進入tcpmp目錄,打開configure,將下面一段代碼注釋掉

# if test
$ac_cv_linux_vers = unknown ; then
# {
{ echo
"$as_me:$LINENO:
error: cannot determine linux version when
cross-compiling" >&5
#echo "$as_me:
error: cannot determine linux version when
cross-compiling"
>&2;}
# { (exit 1);
exit 1; }; }
# fi

運行./configure
--host=arm-linux

(2)打開生成的Makefile,將INCLS項改為INCLS=-I.-I./../libpcap-0.9.8
-I$(srcdir)/missing -I/usr/local/include,

DEFS項改為DEFS=-DHAVE_CONFIG_H -I./../libpcap-0.9.8
-I/usr/local/include
-I$(srcdir)missing -D_U="__attribute__((unused))"。

LDFLAGS=-L/usr/local/lib。然後make,make
install。在/usr/local/sbin下有個tcpmp的二進制文件,這個就是交叉編譯成功的tcpmp

(3)將這個二進制文件放到tftpboot文件夾,用過tftp將這個文件下載到arm板上,chmod
777 tcpmp將其變為可執行文件。

(4)運行tcpmp,成功!

㈤ 如何交叉編譯mkfs.jffs2等工具鏈mtd-utils

首先說明一下:
在YAFFS2源文件的utils目錄下,執行make就可以生成 mkyaffs2image工具,執行
.(要製作yaffs2的目錄) (目標鏡像)/mkyaffs2image

acl_2.2.47.orig.tar.gz
lzo-2.03.tar.gz
mtd-utils_20080508.orig.tar.gz
zlib-1.2.3.tar.gz
mkfs.jffs2.for.arm-linux-gcc.3.4.1平台.tar.bz2
mkfs.jffs2.for.arm-linux-gcc.4.3.2平台.tar.bz2
mkfs.jffs2.for.pc平台.tar.bz2

如果只需要mkfs.jffs2工具,那麼ubuntu 8.10下直接安裝jffnms軟體包即可,
luther@gliethttp:~$ sudo apt-get install jffnms
如果需要將jffs2移植到arm開發板上,那麼就需要下載源碼進行交叉編譯了,這就是本文的內容.
1.下載工具軟體源碼包
luther@gliethttp:~$ wget http://ftp.de.debian.org/debian/pool/main/m/mtd-utils/mtd-utils_20080508.orig.tar.gz
luther@gliethttp:~$ wget http://www.zlib.net/zlib-1.2.3.tar.gz
luther@gliethttp:~$ wget http://www.oberhumer.com/opensource/lzo/download/lzo-2.03.tar.gz
luther@gliethttp:~$ mkdir libs 用來存放下面生成的lib庫.
2.編譯zlib庫
luther@gliethttp:~/zlib-1.2.3$ ./configure --prefix=~/libs --shared
對於交叉編譯輸入如下指令
luther@gliethttp:~/zlib-1.2.3$ CC=arm-linux-gcc ./configure --prefix=~/libs --shared
luther@gliethttp:~/zlib-1.2.3$ make -j4
luther@gliethttp:~/zlib-1.2.3$ make install
luther@gliethttp:~$ tree ~/libs
/home/ubuntu/libs
|-- include
| |-- zconf.h
| `-- zlib.h
|-- lib
| |-- libz.so -> libz.so.1.2.3
| |-- libz.so.1 -> libz.so.1.2.3
| `-- libz.so.1.2.3
`-- share
`-- man
`-- man3
`-- zlib.3
5 directories, 6 files
這就表示完成了.
3.編譯lzo庫
luther@gliethttp:~/lzo-2.03$ ./configure --prefix=/home/ubuntu/libs --enable-shared
對於交叉編譯輸入如下指令
luther@gliethttp:~/lzo-2.03$ CC=arm-linux-gcc ./configure --host=arm-linux --prefix=/home/ubuntu/libs --enable-shared --disable-static
這個還必須要絕對路徑才行.
luther@gliethttp:~/lzo-2.03$ make
luther@gliethttp:~/lzo-2.03$ make install
luther@gliethttp:~$ tree ~/libs
.
|-- include
| |-- lzo
| | |-- lzo1.h
| | |-- lzo1a.h
| | |-- lzo1b.h
| | |-- lzo1c.h
| | |-- lzo1f.h
| | |-- lzo1x.h
| | |-- lzo1y.h
| | |-- lzo1z.h
| | |-- lzo2a.h
| | |-- lzo_asm.h
| | |-- lzoconf.h
| | |-- lzodefs.h
| | `-- lzoutil.h
| |-- zconf.h
| `-- zlib.h
|-- lib
| |-- liblzo2.a
| |-- liblzo2.la
| |-- liblzo2.so -> liblzo2.so.2.0.0
| |-- liblzo2.so.2 -> liblzo2.so.2.0.0
| |-- liblzo2.so.2.0.0
| `-- libz.a
`-- share
`-- man
`-- man3
`-- zlib.3
6 directories, 22 files
手工將靜態庫刪掉就行了,
如果是arm平台還需要strip優化.
4.編譯mtd-utils-20080508前的准備工作.
編譯之前的代碼工作
luther@gliethttp:~$ wget http://ftp.de.debian.org/debian/pool/main/a/acl/acl_2.2.47.orig.tar.gz
luther@gliethttp:~$ mkdir libs/include/sys -p
luther@gliethttp:~$ cp acl-2.2.47/include/acl.h libs/include/sys
luther@gliethttp:~/mtd-utils-20080508$ export LD_LIBRARY_PATH=~/libs/lib:$LD_LIBRARY_PATH
如果還找不到-llzo2,那麼把他拷到/usr/lib下,對於交叉編譯器,就是拷貝到
比如
luther@gliethttp:~/libs/lib$ sudo cp -a * /vobs/tools/arm-tools/arm-linux-gcc-3.4.1/arm-linux/lib/
luther@gliethttp:~/mtd-utils-20080508$ vim Makefile
修改安裝路徑
DESTDIR=.
SBINDIR=gliethttp/sbin
MANDIR=gliethttp/share/man
INCLUDEDIR=gliethttp/include
修改CFLAGS變數
CFLAGS := -I./include -I/home/ubuntu/libs/include $(OPTFLAGS)
如果是arm-linux-gcc定義為
CFLAGS := -I./include -I/home/ubuntu/libs/include -DAI_ADDRCONFIG=0x0020 $(OPTFLAGS)
來自/usr/include/netdb.h
luther@gliethttp:~/mtd-utils-20080508$ vim ubi-utils/Makefile
DESTDIR := ~/mtd-utils-20080508
SBINDIR=gliethttp/sbin
MANDIR=gliethttp/share/man
INCLUDEDIR=gliethttp/include
luther@gliethttp:~/mtd-utils-20080508$ vim recv_image.c
拷貝/usr/include/netinet/in.h文件中
arm-linux-gcc中不需要拷貝它.
struct ip_mreq
{

struct in_addr imr_multiaddr;

struct in_addr imr_interface;
};
結構體數據到頭部,否則在u盤版的ubuntu 8.10上老是提示沒有ip_mreq定義,雖然上面明明寫了#define _USE_MISC
arm-linux-gcc中還需要創建如3下個目錄
luther@gliethttp:~/mtd-utils-20080508$ mkdir arm-linux
luther@gliethttp:~/mtd-utils-20080508$ cp -r ubi-utils arm-linux/
luther@gliethttp:~/mtd-utils-20080508$ cp -r include arm-linux/
luther@gliethttp:~/mtd-utils-20080508$ vim ubi-utils/src/libpfiflash.c
將所有EBUF(PFIFLASH_ERRSTR[-rc]);全部替換為EBUF("%s", PFIFLASH_ERRSTR[-rc]);
vim下替換腳本為
:%s/EBUF(PFIFLASH_ERRSTR\[-rc\]);/EBUF("\%s", PFIFLASH_ERRSTR\[-rc\]);/g
luther@gliethttp:~/mtd-utils-20080508$ vim ubi-utils/src/ubimirror.c
將第206行的
fprintf(stderr, err_buf);
改為
fprintf(stderr, "%s", err_buf); // 想法是好的,因為err_buf中含有%d等format信息,這樣介面更加統一,但是編譯器似乎還並不支持這樣的操作.[luther.gliethttp]
luther@gliethttp:~/mtd-utils-20080508$ vim ubi-utils/src/unubi.c
將第898行
char fname[PATH_MAX];
改為
char fname[PATH_MAX+1];
luther@gliethttp:~/mtd-utils-20080508$ cd ubi-utils/new-utils
因為-O2優化的原因,會導致如下log信息
error: ignoring return value of 『scanf』, declared with attribute warn_unused_result
所有手工先編譯.o
luther@gliethttp:~/mtd-utils-20080508/ubi-utils/new-utils$ gcc -Iinclude -Isrc -I../../include -Wall -Werror -Wall src/ubiformat.c -c -o ubiformat.o
對於交叉編譯執行如下1條語句
luther@gliethttp:~/mtd-utils-20080508/ubi-utils/new-utils$ arm-linux-gcc -Iinclude -Isrc -I../../include -Wall -Werror -Wall src/ubiformat.c -c -o ubiformat.o
luther@gliethttp:~/mtd-utils-20080508/ubi-utils/new-utils$ cd -
好了,上面的所有修改完成之後,就可以執行make成功編譯了[luther.gliethttp].
luther@gliethttp:~/mtd-utils-20080508$ make
如果是交叉編譯,執行
luther@gliethttp:~/mtd-utils-20080508$ make CROSS=arm-linux-
luther@gliethttp:~/mtd-utils-20080508$ make install
對於交叉編譯,執行
luther@gliethttp:~/mtd-utils-20080508$ make CROSS=arm-linux- install
luther@gliethttp:~/mtd-utils-20080508$ tree gliethttp/
gliethttp/
|-- sbin
| |-- bin2nand
| |-- doc_loadbios
| |-- docfdisk
| |-- flash_erase
| |-- flash_eraseall
| |-- flash_info
| |-- flash_lock
| |-- flash_otp_mp
| |-- flash_otp_info
| |-- flash_unlock
| |-- flashcp
| |-- ftl_check
| |-- ftl_format
| |-- jffs2mp
| |-- mkbootenv
| |-- mkfs.jffs2
| |-- mkpfi
| |-- mtd_debug
| |-- nand2bin
| |-- nandmp
| |-- nandtest
| |-- nandwrite
| |-- nftl_format
| |-- nftlmp
| |-- pddcustomize
| |-- pfi2bin
| |-- pfiflash
| |-- recv_image
| |-- rfdmp
| |-- rfdformat
| |-- serve_image
| |-- sumtool
| |-- ubiattach
| |-- ubicrc32
| |-- ubicrc32.pl
| |-- ubidetach
| |-- ubigen
| |-- ubimirror
| |-- ubimkvol
| |-- ubinfo
| |-- ubinize
| |-- ubirmvol
| |-- ubiupdatevol
| `-- unubi
`-- share
`-- man
`-- man1
`-- mkfs.jffs2.1.gz
4 directories, 45 files
ep9312開發板上沒有任何文件系統flash數據讀取
# ./mtd_debug read /dev/mtd0 0 100 gliethttp.bin
Copied 100 bytes from address 0x00000000 in flash to gliethttp.bin
# hexmp gliethttp.bin
0000000 03ff ea00 350c e59f 001c e583 410e e3a0
0000010 4004 e583 4a03 e3a0 4001 e254 fffd 1aff
0000020 4106 e3a0 4004 e583 420f e202 5000 e594
0000030 4001 e084 5000 e594 4001 e084 5000 e594
0000040 4001 e084 5000 e594 4010 e3a0 4008 e583
0000050 4050 e3a0 4001 e254 fffd 1aff 4e1e e3a0
0000060 4008 e583
0000064
#
# ./mtd_debug read /dev/mtd2 0 100 gliethttp.bin;hexmp gliethttp.bin -Cv
Copied 100 bytes from address 0x00000000 in flash to gliethttp.bin
00000000 1f 8b 08 00 ca 14 7d 4a 02 03 e4 5a 0f 70 93 e7 |......}J...Z.p..|
00000010 79 7f 3f 49 36 b2 31 41 80 a0 0e 38 cd 57 70 16 |y.?I6.1A...8.Wp.|
00000020 93 18 f3 19 3b 60 12 9a d9 60 08 09 4e 22 c0 a4 |....;`...`..N"..|
00000030 b4 81 ca 42 92 6d 0d 59 d2 49 72 02 2b 4d dd 60 |...B.m.Y.Ir.+M.`|
00000040 72 84 e1 86 03 a7 21 01 8a d2 b2 4b 2e f3 56 76 |r.....!....K..Vv|
00000050 63 b7 34 0b 1d cd b1 1d 6b b3 95 36 dc 95 db d1 |c.4.....k..6....|
00000060 8b 90 d1 ea |....|
00000064

㈥ 如何調試android NDK 交叉編譯的cpp文件

主要講一下具體的步驟,具體的ndk指令我就不說了,貼的文章都有:
首先是寫一個.java文件,本例中是HprofDumper.java
具體如下:

public class HprofDumper {

public native boolean hprofDumper(String filename, String outname);
}

然後用命令javac HprofDumper.java 生成.class文件
再用javah HprofDumper 生成相應的.h文件

生成的.h文件如下
#include

#ifndef _Included_HprofDumper
#define _Included_HprofDumper
#ifdef __cplusplus
extern "C" {
#endif
JNIEXPORT jboolean JNICALL Java_HprofDumper_hprofDumper
(JNIEnv *, jobject, jstring, jstring);

#ifdef __cplusplus
}
#endif
#endif

然後只需要在對應的.cpp文件完成相應函數即可,核心代碼如下:
#include "HprofDumper.h"
#include "hprof.h"

JNIEXPORT jboolean JNICALL Java_HprofDumper_hprofDumper
(JNIEnv *env, jobject obj, jstring in_file, jstring out_file)
{
const char *filename = env->GetStringUTFChars(in_file, 0);
const char *outname = env->GetStringUTFChars(out_file, 0);
return hprof_mp(filename, outname);
}
其中hprof_mp是純c++代碼,引入即可。
有一點需要注意,標紅了已經,就是生成的.h文件函數並沒具體形參名字,只有形參類型,在.cpp文件中要加入相應的形參名字,本例為env、 obj、 in_file和out_file。
還有一點c和c++的區別,就是env的使用。
本例中C++為env->GetStringUTFChars(in_file, 0);
如果是C就應該改為(env)->GetStringUTFChars(env,in_file, 0);
調用Java類型 : C中調用Java中的String類型為 jstring;

C語言方法名規則 : Java_完整包名類名_方法名(JNIEnv *env, jobject thiz), 注意完整的類名包名中包名的點要用 _ 代替;

參數介紹 : C語言方法中有兩個重要的參數, JNIEnv *env, jobject thiz ;
-- JNIEnv參數 : 該參數代表Java環境, 通過這個環境可以調用Java中的方法;
-- jobject參數 : 該參數代表調用jni方法的類,;

調用jni.h中的NewStringUTF方法 : 該方法的作用是在C語言中創建一個Java語言中的String類型對象, jni.h中是這樣定義的 jstring (*NewStringUTF)(JNIEnv*, const char*), JNIEnv 結構體中包含了 NewStringUTF 函數指針, 通過 JNIEnv 就可以調用這個方法;

完成代碼編寫後,在當前目錄下完成Android.mk和Application.mk的編寫
首先是Android.mk
本例中為:
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := hprof-mper
LOCAL_C_INCLUDES += external/stlport/stlport
LOCAL_C_INCLUDES += bionic
LOCAL_C_INCLUDES += bionic/libstdc++/include
LOCAL_SRC_FILES := HprofDumper.cpp \
xx.cpp \
xx.cpp \
xx.cpp \
xx.cpp \
xx.cpp \
xx.cpp \
xxx.cpp
LOCAL_SHARED_LIBRARIES := libstlport
include $(BUILD_SHARED_LIBRARY)
注意標紅的是最關鍵的,LOCAL_C_INCLUDES 顧名思義是需要的頭文件的所在的目錄,那三個參數主要為了引入STL,最重要!!LOCAL_SHARED_LIBRARIES 我一直生成失敗就是沒加這個參數,不光要引入頭文件,還要引入具體的lib,這就是這個欄位的作用。
具體欄位的作用:
-- LOCAL_PATH : 代表mk文件所在的目錄;
-- include $(CLEAR_VARS) : 編譯工具函數, 通過該函數可以進行一些初始化操作;
-- LOCAL_MODULE : 編譯後的 .so 後綴文件叫什麼名字;
-- LOCAL_SRC_FILES: 指定編譯的源文件名稱;
-- include $(BUILD_SHARED_LIBRARY) : 告訴編譯器需要生成動態庫;

Applicaion.mk中就一行
APP_STL = stlport_static
表示使用stl靜態庫。

注意:我用了STL,大家沒有用STL的當然不用引入這些啦~

㈦ tcpmp抓包按了Ctrl+C後依然沒有停止抓包是為什麼

我想問問,我的tcpmp在官網下載了,自己交叉編譯以後,在設備里啟動跑,但是Ctrl+C根本沒有反應

㈧ 交叉編譯libnpg庫 ./configure CC=mipsisa32-elf-gcc --host=mipsisa32-linux 求大神給予幫助

編譯安裝。關鍵要看configure後,屏幕上出現的那一堆內容的最末尾有沒有error:
沒有就可以進行下一步。至於其他的,例如warning,可以忽略。
make和make install也是一樣

㈨ 如何將tcpmp移植到arm嵌入式系統

(1)進入tcpmp目錄,打開configure,將下面一段代碼注釋掉
# if test $ac_cv_linux_vers = unknown ; then
# { { echo "$as_me:$LINENO: error: cannot determine linux version when cross-compiling" >&5
#echo "$as_me: error: cannot determine linux version when cross-compiling" >&2;}
# { (exit 1); exit 1; }; }
# fi
運行./configure --host=arm-linux
(2)打開生成的Makefile,將INCLS項改為INCLS=-I.-I./../libpcap-0.9.8 -I$(srcdir)/missing -I/usr/local/include,
DEFS項改為DEFS=-DHAVE_CONFIG_H -I./../libpcap-0.9.8 -I/usr/local/include -I$(srcdir)missing -D_U="__attribute__((unused))"。
LDFLAGS=-L/usr/local/lib。然後make,make install。在/usr/local/sbin下有個tcpmp的二進制文件,這個就是交叉編譯成功的tcpmp
(3)將這個二進制文件放到tftpboot文件夾,用過tftp將這個文件下載到arm板上,chmod 777 tcpmp將其變為可執行文件。
(4)運行tcpmp,成功!

熱點內容
安卓手機236開發者選項在哪裡 發布:2024-05-06 04:11:13 瀏覽:258
sql過濾條件 發布:2024-05-06 04:05:18 瀏覽:562
ifconfiglinux 發布:2024-05-06 03:47:59 瀏覽:533
c語言開發集成環境 發布:2024-05-06 03:47:06 瀏覽:607
腳本uzi比賽視頻 發布:2024-05-06 03:46:19 瀏覽:823
php給文本框賦值 發布:2024-05-06 03:21:24 瀏覽:26
androidjsonkey 發布:2024-05-06 03:07:31 瀏覽:732
python主線程子線程 發布:2024-05-06 03:07:20 瀏覽:764
android系統截屏 發布:2024-05-06 02:57:51 瀏覽:777
android居左 發布:2024-05-06 02:40:26 瀏覽:45