cross compile ethtool

來源:互聯網
上載者:User

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.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.