SNMP 添加MIB 节点 (十二) --- 龙芯2K1000交叉编译

NET-SNMP 5.7.3

gcc   mips64el-linux-4.4.7

1.配置交叉编译环境    /etc/enviroment 添加gcc路径

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/ubuntu/loongson/gcc-4.4-64-gnu/bin"

/home/ubuntu/loongson/gcc-4.4-64-gnu/bin路径下文件如下

mips64el-linux-addr2line  mips64el-linux-gcc-4.4.7  mips64el-linux-objdump
mips64el-linux-ar         mips64el-linux-gccbug     mips64el-linux-ranlib
mips64el-linux-as         mips64el-linux-gcov       mips64el-linux-readelf
mips64el-linux-c++        mips64el-linux-gfortran   mips64el-linux-size
mips64el-linux-c++filt    mips64el-linux-gprof      mips64el-linux-strings
mips64el-linux-cpp        mips64el-linux-ld         mips64el-linux-strip
mips64el-linux-g++        mips64el-linux-nm
mips64el-linux-gcc        mips64el-linux-objcopy

ubuntu@ubuntu:~/loongson/gcc-4.4-64-gnu/bin$ mips64el-linux-gcc -v
Using built-in specs.
Target: mips64el-linux
Configured with: ../gcc-4.4.7-centos64-104-schedule/configure --disable-werror --prefix=/opt/gcc-4.4-64-gnu/ --host=i486-pc-linux-gnu --build=i486-pc-linux-gnu --target=mips64el-linux --host=i486-pc-linux-gnu --with-sysroot=/opt/gcc-4.4-64-gnu//sysroot --with-abi=64 --enable-static --with-build-sysroot=/opt/gcc-4.4-64-gnu//sysroot --enable-poison-system-directories --disable-nls --enable-shared --disable-multilib --enable-__cxa_atexit --enable-c99 --enable-long-long --enable-threads=posix --enable-languages=c,c++,fortran
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-3.1) (GCC) 
 

2.进入net-snmp5.7.3配置,编译

2.1       ./configure  --host=mips64el --target=mips64el-linux --with-cc=mips64el-linux-gcc  --with-mib-modules="healthyManager"  --with-ar=mips64el-linux-ar --disable-embedded-perl --disable-shared --prefix=/usr/local/SNMP/
2.2     make -j8

3.在net-snmp-5.7.3/agent下获取snmpd,之后移植snmpd到开发板,添加配置文件snmpd.conf

3.5 如果需要其他库文件,请自行添加

4.启动snmpd -c /home/loongson/snmpd.conf

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值