linux系统移植到arm裸板上,libpcap1.0.0移植到ARM开发板上

1、从http://www.tcpdump.org/官方网址上下载libpcap1.0.0源码压缩包,进行解压。

2、修改confiugre文件,把下面两段注释掉,在6249行和6587行,为什么要这样做,没有深入了解其原因。

#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

3、 执行./configure --host=arm-linux,这样就会使用arm-linux-gcc进行configure,生成Makefile

4、修改Makefile的prefix项为prefix=/usr/local/arm/3.4.1/arm-linux(这个就是你的交叉编译器所在目录,根据自己的情况修改),同时查看CC是否已=arm-linux-gcc。

5、接下来make,make install,完成了libpcap的编译和安装,查看/usr/local/arm/3.4.1/arm-linux/include,是否多出pcap文件夹和pcap.h、pcap-bpf.h、pcap-namedb.h这四个东西。

到此libpcap1.0.0移植成功,接下来就是自己编写相关应用程序进行测试了。0b1331709591d260c1c78e86d0c51c18.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值