2
0

README.android 1.1 KB

12345678910111213141516171819202122232425
  1. Quick how-to cross compile tinc for android (done from $HOME/android/):
  2. - Download android NDK and setup local ARM toolchain:
  3. wget http://dl.google.com/android/ndk/android-ndk-r9d-linux-x86.tar.bz2
  4. tar xfj android-ndk-r9d-linux-x86.tar.bz2
  5. ./android-ndk-r9d/build/tools/make-standalone-toolchain.sh --platform=android-5 --install-dir=/tmp/my-android-toolchain
  6. - Download and cross-compile openSSL for ARM:
  7. wget http://www.openssl.org/source/openssl-1.0.1h.tar.gz
  8. tar xfz openssl-1.0.1h.tar.gz
  9. cd openssl-1.0.1h
  10. ./Configure dist
  11. make CC=/tmp/my-android-toolchain/bin/arm-linux-androideabi-gcc AR="/tmp/my-android-toolchain/bin/arm-linux-androideabi-ar r" RANLIB=/tmp/my-android-toolchain/bin/arm-linux-androideabi-ranlib
  12. cd -
  13. - Clone and cross-compile tinc:
  14. git clone git://tinc-vpn.org/tinc
  15. cd tinc
  16. autoreconf -fsi
  17. CC=/tmp/my-android-toolchain/bin/arm-linux-androideabi-gcc ./configure --host=arm-linux --disable-lzo --with-openssl-lib=$HOME/android/openssl-1.0.1g --with-openssl-include=$HOME/android/openssl-1.0.1g/include/ --disable-hardening
  18. make -j5
  19. - Strip tincd binary to make it smaller
  20. /tmp/my-android-toolchain/bin/arm-linux-androideabi-strip src/tincd