aboutsummaryrefslogtreecommitdiffstats
path: root/HOWTO/INSTALL-ANDROID.md
diff options
context:
space:
mode:
authorDmitry Kolesnikov <dmitry.kolesnikov>2014-02-11 00:27:11 +0200
committerHenrik Nord <[email protected]>2014-03-21 13:23:03 +0100
commitf43a1dc55d42de3097f75ca65baead9a2ff05c78 (patch)
treef5b0705515e4c571db694f8d8dea3562bae265e4 /HOWTO/INSTALL-ANDROID.md
parent3c06b5b3cdde72453d97910889e38e91c1dd4870 (diff)
downloadotp-f43a1dc55d42de3097f75ca65baead9a2ff05c78.tar.gz
otp-f43a1dc55d42de3097f75ca65baead9a2ff05c78.tar.bz2
otp-f43a1dc55d42de3097f75ca65baead9a2ff05c78.zip
Raspberry PI / Android a minimal cross-compile configuration
Enable a cross compile Erlang/OTP platform to Android or Raspberry PI using Android NDK. Port emulator and core application to support target HW platform. Exclude any add-on services required for OTP platform deployment into target hardware due to device fragmentation and jail-break requirements. * fix erts/emulator/beam/sys.h Disable redefinition of __noreturn macro * port erts/emulator/sys/unix/erl_child_setup.c Use techniques proposed by https://code.google.com/p/erlang4android to access system properties * fix erts/emulator/sys/unix/erl_unix_sys_ddll.c The static linking of emulator cannot find dlerror(), dlopen() symbols * port erts/emulator/sys/unix/sys.c make path to shell configurable at build time * port erts/etc/common/Makefile.in disable librt for *-linux-androideabi * port erts/lib_src/pthread/ethread.c Use techniques proposed by https://code.google.com/p/erlang4android to disable emulator crash if kernel threads are on. Replace unreliable pthread_sigmask() by sigprocmask() * port lib/erl_interface/src/connect/ei_connect.c Disable call to undefined gethostid() * port lib/erl_interface/src/connect/ei_resolve.c Use gethostbyname_r() on Android platform
Diffstat (limited to 'HOWTO/INSTALL-ANDROID.md')
-rw-r--r--HOWTO/INSTALL-ANDROID.md52
1 files changed, 52 insertions, 0 deletions
diff --git a/HOWTO/INSTALL-ANDROID.md b/HOWTO/INSTALL-ANDROID.md
new file mode 100644
index 0000000000..31698d4ce3
--- /dev/null
+++ b/HOWTO/INSTALL-ANDROID.md
@@ -0,0 +1,52 @@
+Cross Compiling Erlang/OTP - ANDROID
+====================================
+
+Introduction
+------------
+
+This document describes how to cross compile Erlang OTP to Android/Rasberry Pi platforms.
+
+### Download and Install Android NDK ###
+
+https://developer.android.com/tools/sdk/ndk/index.html
+
+### Define System Variables ###
+
+export NDK_ROOT=/usr/local/android
+export NDK_PLAT=android-9
+export PATH=$NDK_ROOT/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin:$PATH
+
+### Configure OTP ###
+
+./otp_build configure \
+ --xcomp-conf=./xcomp/erl-xcomp-arm-android.conf \
+ --without-ssl
+
+### Compile OTP ###
+
+make noboot [-j4]
+
+### Make Release ###
+
+./otp_build release -a /usr/local/otp_R16B03_arm
+
+### Target Deployment ###
+
+Make a tarball out of /usr/local/otp_R16B03_arm and copy it to target device
+(e.g. Raspberry Pi). Extract it and install
+
+./Install /usr/local/otp_R16B03_arm
+
+Android SDK (adb tool) is used to deploy OTP/Erlang to target device for
+evaluation purpose only.
+
+adb push /usr/local/otp_R16B03_arm /mnt/sdcard/otp_R16B03_arm
+adb shell
+
+### Known Issues ###
+
+ * native inet:gethostbyname/1 return {error, nxdomain} on Raspberry PI. Use dns resolver to by-pass the issue (see http://www.erlang.org/doc/apps/erts/inet_cfg.html)
+
+### References ###
+
+ The port derives some solutions from https://code.google.com/p/erlang4android/