cross compile ethtool

http://www.kernel.org/pub/software/network/ethtool/

ethtool - utility for controlling network drivers and hardware
Introduction

ethtool is the standard Linux utility for controlling network drivers and hardware, particularly for wired Ethernet devices. It can be used to:

    Get identification and diagnostic information
    Get extended device statistics
    Control speed, duplex, autonegotiation and flow control for Ethernet devices
    Control checksum offload and other hardware offload features
    Control DMA ring sizes and interrupt moderation
    Control receive queue selection for multiqueue devices
    Upgrade firmware in flash memory

Most features are dependent on support in the specific driver. See the manual page for full information.

cross compile ethtool
step 1: Download ethtool-3.6.tar.bz2 from http://www.kernel.org/pub/software/network/ethtool/
step 2: tar -jxvf ethtool-3.6.tar.bz2
step 3: cd ethtool-3.6, 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}as"
        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 4: ./cross_configure.sh, make
step 5: cp ethtool-3.6/ethtool to target board.
step 6: use "./ethtool -S eth0" to watch network status.
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值