caffe能否移植到arm平台( 三 )


* 编译:make * 编译后生成的库和头文件在如下目录:
out-shared out-static include
五.snappy移植1.编译环境:
* Ubuntu16.04 + arm-hisiv500-linux- * snappy-1.1.4下载地址:https://github.com/google/snappy/releases
2.移植到3519:
1)编译步骤:
* 生成配置文件:autoconf.sh * 配置:./configure --build=i686-pc-linux --host=arm-hisiv500-linux CC=arm-hisiv500-linux-gcc CXX=arm-hisiv500-linux-g++ --prefix=/home/shunzhi/software/snappy/snappy-1.1.4/install * 编译:make * 检测:make check # 检测会出现错误,不用管他( If "make check" fails, you can still install, but it is likely that some features of this library will not work correctly on your system. Proceed at your own risk.) * 安装:make install
2)移植结果:
shunzhi@ubuntu:~/software/snappy/snappy-1.1.4/install$ tree.├── include│ ├── snappy-c.h│ ├── snappy.h│ ├── snappy-sinksource.h│ └── snappy-stubs-public.h├── lib│ ├── libsnappy.a│ ├── libsnappy.la│ ├── libsnappy.so -\u0026gt; libsnappy.so.1.3.1│ ├── libsnappy.so.1 -\u0026gt; libsnappy.so.1.3.1│ ├── libsnappy.so.1.3.1│ └── pkgconfig│ └── snappy.pc└── share └── doc └── snappy ├── ChangeLog ├── COPYING ├── format_description.txt ├── framing_format.txt ├── INSTALL ├── NEWS └── README
6 directories, 17 files
六.hdf5移植1.编译环境
* Ubuntu16.4 + arm-hisiv500-linux- * 下载地址:https://support.hdfgroup.org/HDF5/release/obtain518.html
2.移植
* cmake配置:cmake-gui
选择源码路径,编译配置文件路径,编译器,点击configure(其会报错,不用管,再次点击即可),选择安装路径,点击generate
* 参考如下脚本来安装:
1)更改一下交叉编译工具 2)如果ssh工具没有,可以使用telnet,该库的移植需要在宿主机编译,在目标机执行一些初始化的程序,生成一些arm平台的配置文件,然后在继续编译
#!/bin/sh# to cross compile the hdf5 library on arm we need some generated source code# from the target platform.# This script does the following:# 1. setup a cmake build# 2. try to build with pre generated files (you have to generate them)# Place them in arm_files/generated/${platform}# (relative to the directory you start this script) eg:## arm_files/generated/# ├── sam9# │ ├── H5lib_settings.c# │ └── H5Tinit.c# └── xilinx# ├── H5lib_settings.c# └── H5Tinit.c# # 2. OR connect via ssh with this script to your arm target and it will# generate the files on the fly## preconditions:# -------------# - we need cmake# - we need a cross compiler reachable within $PATH so cmake can detect# - download source code: hdf5-1.8.16.tar.bz2# - extract tarball# - go into extracted tarball and start this script# eg ./build_hdf5.sh generate# OR if you have pregenerated files for H5lib_settings.c and H5Tinit.c# ./build_hdf5.sh##########################################################


推荐阅读