http://ftp.kernel.org/pub/software/network/ethtool/
解壓縮之後,先在資料夾中新增一個檔案cross_configure.sh內容如下:
================= cross_configure.sh ==================
#!/bin/sh
ARM_TOOLCHAIN_DIR=/opt/arm/bin #please type your toolchain path
export CROSS_COMPILE="${ARM_TOOLCHAIN_DIR}/arm-linux-gnueabi-"
export AR="${CROSS_COMPILE}ar"
export AS="${CROSS_COMPILE}as"
export LD="${CROSS_COMPILE}ld"
export NM="${CROSS_COMPILE}nm"
export CC="${CROSS_COMPILE}gcc"
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 -static"
./configure --target=arm-linux --host=arm-linux
===================================================
接下來幾個步驟分別為:
1. ./cross_configure.sh
2. make
3. cp ethtool 到目標板上
4. use "./ethtool -S eth0" to watch network status.
完成!!!
沒有留言:
張貼留言