HIPL on Android
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
HIPL |
Fix Committed
|
Wishlist
|
Pupu Toivonen |
Bug Description
HIPL does not build or work on Android yet. Android platform is problematic because it is targeted for java applications. The challenges include:
* DNS proxy is written with python, so it's not possible to port it at all
* The h/w platform for Android is really picky with memory alignments and requires some modifications to the code.
* Many of the libraries are missing, so HIPL has to be cross-compiled and statically linked with some ofthe libraries.
However, the latest Android 2.3 seems to have OpenSSL already available should make the work easier. Please check out (especially the end of the latter link):
http://
http://
Changed in hipl: | |
assignee: | nobody → ibrahim (brah-gharbi) |
Changed in hipl: | |
assignee: | nobody → Vidhuran (vidhuran2012) |
Changed in hipl: | |
assignee: | Vidhuran (vidhuran2012) → Juhani Toivonen (scolphoy) |
Changed in hipl: | |
status: | New → In Progress |
Changed in hipl: | |
status: | In Progress → Fix Committed |
This is what we have managed so far to complete with a student with a bit older version of HIPL:
1 Download arm-linux tools-chain: www.handhelds. org/download/ projects/ toolchain/ arm-linux- gcc-3.4. 1.tar.bz2 /usr/local/ arm/3.4. 1/bin
download from http://
unzip tar to / directory.
export PATH=$PATH:
2 build openssl: www.openssl. org/source/
download openssl source code from http://
./config noï¼asm shared
Change the Makefile
replace the section started from line 62 with the following:
CC= arm-linux-gcc frame-pointer -Wall NO_RFC3779 -DOPENSSL_NO_STORE
CFLAG= -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DOPENSSL_N -DL_ENDIAN -DTERMIO -O3 -fomit-
DEPFLAG= -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_R C5 -DOPENSSL_
PEX_LIBS=
EX_LIBS= -ldl
EXE_EXT=
ARFLAGS=
AR= arm-linux-ar $(ARFLAGS) r
RANLIB= arm-linux-ranlib
NM= arm-linux-nm
PERL= /usr/bin/perl
TAR= tar
TARFLAGS= --no-recursion
MAKEDEPPROG= gcc
LIBDIR=lib
and then make it!
make install
3 download Android SDK and NDK developer. android. com/sdk/ index.html developer. android. com/sdk/ ndk/index. html ROOT=XXX/ android- sdk-linux_ 86/android- ndk-r3 XXX/android- sdk-linux_ 86/android- ndk-r3/ build/prebuilt/ linux-x86/ arm-eabi- 4.4.0/bin
http://
http://
unzip ndk into sdk directory.
export ANDROID_
export PATH=$PATH:
copy openssl headers from openssl- 1.0.0a/ include/ openssl directory to $ANDROID_ ROOT/build/ platforms/ android- 3/arch- arm/usr/ include/ directory ROOT/build/ platforms/ android- 3/arch- arm/usr/ lib/ directory
copy libcrypto.so and libcrypto.a libraries to $ANDROID_
4 build HIPL
product configure by run command
autoreconf --install
method 1: use arm-eabi-gcc provided by NDK: â€-I$ANDROID_ ROOT/build/ platforms/ android- 3/arch- arm/usr/ include/ †CFLAGS= â€-nostdlib†LDFLAGS= â€-Wl, -rpath- link=$ANDROID_ ROOT/build/ platforms/ android- 3/arch- arm/usr/ lib/ -L$ANDROID_ ROOT/build/ platforms/ android- 3/arch- arm/usr/ lib/†LIBS=â€-lc “ "-I$OPENSSL/ include/ " CFLAGS="-nostdlib" LDFLAGS= "-Wl,-rpath- link=$ANDROID_ ROOT/build/ platforms/ android- 3/arch- arm/usr/ lib,-L$ ANDROID_ ROOT/build/ platforms/ android- 3/arch- arm/usr/ lib/" LIBS="-lc"
./configure -host=arm-eabi CC=arm-eabi-gcc CPPFLAGS=
method 2 (WORKS): use arm-linux-gcc which is a general crosscompile tool:
./configure --disable-gcc-warn --disable-firewall -host=arm-linux CC=arm-linux-gcc CPPFLAGS=
If you get this far, there are some compilation issues for you to solve:
In file included from ./lib/modulariz ation/lmod. h:37,
from lib/core/ state.h: 37,
from lib/core/ builder. h:43,
from lib/core/ builder. c:98: linkedlist. h:64: warning: declaration of 'index' shadows a global declaration usr/local/ arm/3.4. 1/bin/. ./lib/gcc/ arm-linux/ 3.4.1/. ./../.. /../arm- linux/sys- include/ string. h:267: warning: shadowed declaration is here linkedlist. h:67: warning: declaration of 'index' shadows a global declaration usr/local/ arm/3.4. 1/bin/. ./lib/gcc/ arm-linux/ 3.4.1/. ./../.. /../arm- linux/sys- include/ string. h:267: warning: shadowed declaration is here linkedlist. h:70: warning: declaration of 'index' shadows a global declaration usr/l.. .
./lib/core/
/home/mkomu/
./lib/core/
/home/mkomu/
./lib/core/
/home/mkomu/