交叉编译pf_ring

 

1、下载源代码包 PF_RING-6.0.3.tar.gz

2、编译内核模块

  2.1  kernel/Makefile的内容如下:

#
# (C) 2009-10 - Luca Deri 
#

obj-m := pf_ring.o

  2.2 单独编译模块:

       make CROSS_COMPILE=mips-openwrt-linux- ARCH=mips -C /home/netbox/ilwifi/9531/QSDK_9531_SVN70215/build_dir/linux-ar71xx_generic/linux-3.3.8/ M=$(pwd) modules

 

3、编译libpfring.a libpfring.so

  3.1 修改configure  (解决问题:pfring_dna_bouncer.o: could not read symbols: File in wrong format)

    sed -i "s/ar t/mips-openwrt-linux-ar t/g"  ./configure

  3.2 修改Makefile

    CC ar ranlib都要加上前序mips-openwrt-linux-    

  3.3 make

 

4、 编译libpfring_cpp.a

  4.1 修改Makefile

    CC ar ranlib都要加上前序mips-openwrt-linux- 

  4.2 make

转载于:https://www.cnblogs.com/Li-Jiake/p/4975401.html

你可能感兴趣的:(交叉编译pf_ring)