caffe能否移植到arm平台( 五 )
# below steps needs to be done twice as make tries to generate with arm binary on x86 (H5detect) # and second for H5make_libsettings make generate_fake_tools cp "$path_gen_files"/$G_GENERATE_H5MAKE_LIBSETTINGS . cp "$path_gen_files"/$G_GENERATE_H5DETECT .
make generate_fake_tools cp "$path_gen_files"/$G_GENERATE_H5MAKE_LIBSETTINGS . cp "$path_gen_files"/$G_GENERATE_H5DETECT .
# no start the real build make -j4 make install}
#build_for_platform "xilinx" "$PWD/build_xilinx" "arm-xilinx-linux-gnueabi" "$PWD/install_xilinx"#build_for_platform "sam9" "$PWD/build_sam9" "arm-none-linux-gnueabi" "$PWD/install_sam9"
七.boost移植
1.编译环境:
* Ubuntu16.04 + arm-hisiv500-linux-gcc * 下载地址: http://sourceforge.net/projects/boost/files/boost/
2.移植:
* 解压: * 新建安装目录:mkdir install * 运行安装包自带脚本:./bootstrap.sh --prefix=/home/shunzhi/software/boost/boost_1_64_0/install * 修改project-config.jam文件,具体修改如下:
10 if ! gcc in 11 {12 using gcc : arm : arm-hisiv500-linux-gcc ; #注意中间空格13 }
* 编译安装:./bjam install toolset=gcc-arm --layout=tagged --build-type=complete --prefix=/home/shunzhi/software/boost/boost_1_63_0/install
3.测试程序:
#include\u0026lt;iostream\u0026gt;#include\u0026lt;boost/lexical_cast.hpp\u0026gt;
int main() {
int a = boost::lexical_cast\u0026lt;int\u0026gt;("1008611");
std::cout \u0026lt;\u0026lt; a \u0026lt;\u0026lt;std::endl;
return 0; }
编译测试程序:arm-hisiv500-linux-g++ boost_test.cpp -L ../stage/lib/ -I ../ -o test
注意:
* option.set prefix 交叉编译器所在位置); * option.set exec-prefix 交叉编译器所在位置)/bin ; * option.set libdir 交叉编译器所在位置)/lib ; * option.set includedir 交叉编译器所在位置)/include
八.OpenBLAS移植
1.编译环境:
* Ubuntu16.04 + arm-hisiv500-linux-gcc * 下载地址: https://github.com/xianyi/OpenBLAS/releases
2.移植步骤:
修改Makefile.arm
12 ifeq ($(CORE), ARMV7) 13 ifeq ($(OSNAME), Android) 14 CCOMMON_OPT += -marm -mfpu=neon -mfloat-abi=hard -march=armv7-a -Wl,--no-warn-mismatch 15 FCOMMON_OPT += -marm -mfpu=neon -mfloat-abi=hard -march=armv7-a -Wl,--no-warn-mismatch 16 else 17 #CCOMMON_OPT += -marm -mfpu=vfpv3 -mfloat-abi=hard -march=armv7-a 18 #FCOMMON_OPT += -marm -mfpu=vfpv3 -mfloat-abi=hard -march=armv7-a 19 CCOMMON_OPT += -mcpu=cortex-a17.cortex-a7 -mfloat-abi=softfp -mfpu=neon-vfpv4 -mno-unaligned-access -fno-aggressive-loop-optimizations 20 FCOMMON_OPT += -mcpu=cortex-a17.cortex-a7 -mfloat-abi=softfp -mfpu=neon-vfpv4 -mno-unaligned-access -fno-aggressive-loop-optimizations 21 endif 22 endif
推荐阅读
- 广东今年角膜捐献量和移植手术量较往年均有增加
- 汽车知识|押宝全新造型,东风雪铁龙新C5能否成为神龙公司“救世主”
- 中国版Evan能火吗美国9岁男童录制评测玩具视频年入800万,中国能否复制成功
- 汽车市场|中期改款再战D级车市场,新雷克萨斯LS能否超过宝马7系等对手?
- 澎湃汽车圈|试驾名爵MG领航 运动性和实用性能否兼顾?
- 天天汽车|超高性价比实力宠粉,2021款奕歌能否点燃你的心?
- 能否推荐一个能用快播看电影且电影都是中英双字幕的网站
- 汽车|定位更细分SUV市场,领克06能否扩大领克的“朋友圈”?
- 汽车白话|看脸蛋、观腰身、品内饰长安欧尚X5“塑光美学”能否打动挑剔的你
- 环球车讯网|软件能否定义汽车