Make Toolchains

Make Toolchains

Before reading the following content, we recommend you set up some environment variables to avoid any path error. For example:

export TOPCNN_HOME=~/workspace/TopCNN
export TOOLCHAIN_HOME=~/toolchains

Download

Download Android NDK, for example, from http://www.androiddevtools.cn/ (a link friendly to China)

This turtorial is based on android-ndk-r10e package. You can choose another newer version as you like, while the steps are almost the same. But make sure the generated folder’s name is android-ndk-r10e/ for ARMv7 and aarch64-linux-android-4.9 for ARMv8

Make toolchains for ARMv7

You will get a arm-linux-androideabi-4.9/ folder including compile environment for ARMv7 by following.

mkdir -p ${TOOLCHAIN_HOME}
cd path/to/your/android-ndk-r10e/
./build/tools/make-standalone-toolchain.sh --platform=android-21 --toolchain=arm-linux-androideabi-4.9  --package-dir=${TOOLCHAIN_HOME}
cd ${TOOLCHAIN_HOME}
tar -jxvf  arm-linux-androideabi-4.9.tar.bz2 
cd arm-linux-androideabi-4.9/
cp ${TOPCNN_HOME}/cmake/cross_compile_support/armv7/* ./

Make toolchains for ARMv8

You will get a aarch64-linux-android/ folder including compile environment for ARMv8 by following.

cd ~
mkdir -p toolchains
cd android-ndk-r10e/
./build/tools/make-standalone-toolchain.sh --platform=android-21 --toolchain=aarch64-linux-android-4.9  --package-dir=${TOOLCHAIN_HOME}
cd ${TOOLCHAIN_HOME}
tar -jxvf  aarch64-linux-android-4.9.tar.bz2
cd aarch64-linux-android-4.9
cp ${TOPCNN_HOME}/cmake/cross_compile_support/armv8/* ./
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值