libpcap1.0.0移植到arm开发板上
2011-09-20 19:38
661 查看
在移植的过程中,主要参考了这篇博文http://blog.sina.com.cn/s/blog_4bec945b010009r2.html。
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移植成功,接下来就是自己编写相关应用程序进行测试了。
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移植成功,接下来就是自己编写相关应用程序进行测试了。
相关文章推荐
- arm开发板的NTFS-3G完整移植+中文目录支持+自动挂载(udev)
- gsm库(libgsm)在ARM-Linux下的移植
- SQLITE+PYTHON成功移植到ARM开发板运行
- lib-jpeg在TQ2440上的移植
- MiniGUI 移植到pc和arm开发板全过程详解 及错误解答
- 没有ARM开发板一样移植uboot并用SKYEYE仿真
- 移植alsa-lib遇到的问题
- linux2.26.32.8上的alsa-lib与utils移植
- Libpcap tutorial-02
- 编译ARM平台的 QtEmbedded 的MySQL插件和移植MySQL到ARM开发板
- 关于libwebsocket移植问题
- alsa-lib移植
- android NDK libpcap undefined reference to `pcap_parse 等错误解决
- TCPDUMP/LIBPCAP 2-搭建环境
- libpcap+PF_RING源码分析一、二
- JRTPLib 移植到Android - Ubuntu
- TX2440 ARM开发板Uboot移植(四、对DM9000网卡的支持)
- ARM开发板上uClinux内核移植
- 将libvex移植到Visual Studio编译平台下的经验总结