Cross compile tcpdump Tool

Source: Internet
Author: User

Cross compile tcpdump:
Step 1: Down libpcap-1.3.0.tar.gz form http://www.tcpdump.org/
Step 2: Down tcpdump-4.3.0.tar.gz form http://www.tcpdump.org/
Step 3: Tar xvf libpcap-1.3.0.tar.gz
Step 4: Tar xvf tcpdump-4.3.0.tar.gz
Step 5: CD libpcap-1.3.0, touch cross_configure.sh as follow:
Mips_toolchain_dir =/opt/mips-4.4/bin
Export cross_compile = "$ {mips_toolchain_dir}/MIPS-Linux-GNU -"
Export AR = "$ {cross_compile} ar"
Export as = "$ {cross_compile}"
Export LD = "$ {cross_compile} lD"
Export Nm = "$ {cross_compile} nm"
Export cc = "$ {cross_compile} gcc-OS-pipe-O2-mtune = mips32r2-mabi = 32-d_largefile_source-d_largefile64_source-d_file_offset_bits = 64-El"
Export fc = "$ {cross_compile} gfortran"
Export ranlib = "$ {cross_compile} ranlib"
Export strip = "$ {cross_compile} strip"
Export objcopy = "$ {cross_compile} objcopy"
Export cflags = "-OS-pipe-O2-mtune = mips32r2-mabi = 32-d_largefile_source-d_largefile64_source-d_file_offset_bits = 64-El"
Export cxxflags = "-OS-pipe-O2-mtune = mips32r2-mabi = 32-d_largefile_source-d_largefile64_source-d_file_offset_bits = 64-El"

./Configure -- target = mipsel-Linux -- Host = mipsel-Linux -- With-pcap = Linux
Step 6:./cross_configure.sh, make
Step 7: CD tcpdump-4.3.0, touch cross_configure.sh as follow:
Mips_toolchain_dir =/opt/mips-4.4/bin
Export cross_compile = "$ {mips_toolchain_dir}/MIPS-Linux-GNU -"
Export AR = "$ {cross_compile} ar"
Export as = "$ {cross_compile}"
Export LD = "$ {cross_compile} lD"
Export Nm = "$ {cross_compile} nm"
Export cc = "$ {cross_compile} gcc-OS-pipe-O2-mtune = mips32r2-mabi = 32-d_largefile_source-d_largefile64_source-d_file_offset_bits = 64-El"
Export fc = "$ {cross_compile} gfortran"
Export ranlib = "$ {cross_compile} ranlib"
Export strip = "$ {cross_compile} strip"
Export objcopy = "$ {cross_compile} objcopy"
Export cflags = "-OS-pipe-O2-mtune = mips32r2-mabi = 32-d_largefile_source-d_largefile64_source-d_file_offset_bits = 64-El"
Export cxxflags = "-OS-pipe-O2-mtune = mips32r2-mabi = 32-d_largefile_source-d_largefile64_source-d_file_offset_bits = 64-El"

./Configure -- target = mipsel-Linux -- Host = mipsel-Linux
Step 8:./cross_configure.sh, make
Step 9: CP tcpdump-4.3.0/tcpdump to target board.
Step A: Use "tcpdump-W test. Cap" Capture packages and save to test. Cap file.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.