Skip to content

Instantly share code, notes, and snippets.

@Mygod
Created January 16, 2019 06:53
Show Gist options
  • Save Mygod/f5b23ed493e3b892537940ae8e2645f4 to your computer and use it in GitHub Desktop.
Save Mygod/f5b23ed493e3b892537940ae8e2645f4 to your computer and use it in GitHub Desktop.
Cross compile iftop for mips
sudo apt-get install --install-recommends gcc-mips-linux-gnu cpp-mips-linux-gnu
# libpcap
git checkout libpcap-1.9.0
mkdir out
export LIBPCAP=`pwd`/out
./configure --host=mips-linux-gnu --prefix=$LIBPCAP
make install
# libncurses
mkdir out
export NCURSES=`pwd`/out
./configure --host=mips-linux-gnu --prefix=$NCURSES
make install
automake --add-missing
./configure --host=mips-linux-gnu --with-resolver=none --with-libpcap=$LIBPCAP LDFLAGS="-static -L$LIBPCAP/lib -L$NCURSES/lib"
make
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment