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
3.在net-snmp-5.7.3/agent下获取snmpd,之后移植snmpd到开发板,添加配置文件snmpd.conf
3.5 如果需要其他库文件,请自行添加
4.启动snmpd -c /home/loongson/snmpd.conf