Comment 9 for bug 715126

Revision history for this message
Pupu Toivonen (scolphoy) wrote :

Just an update, the code doesn't completely compile yet, but this is how I'd initialize a build environment under Ubuntu 13.04 now:

sudo apt-get -y install gcc-4.7-arm-linux-gnueabi autoconf automake libtool make gcc libssl-dev iptables-dev libnet-ip-perl libnet-dns-perl bzr libnetfilter-queue-dev xmlto doxygen check libconfig8-dev fakeroot dpkg-dev debhelper devscripts w3m;

cd ~
wget http://dl.google.com/android/android-sdk_r22.0.5-linux.tgz
tar xvf android-sdk_r22.0.5-linux.tgz
cd android-sdk-linux/
wget http://dl.google.com/android/ndk/android-ndk-r9-linux-x86_64.tar.bz2
tar xvf android-ndk-r9-linux-x86_64.tar.bz2
cd android-ndk-r9/
echo "export ANDROID_ROOT=$(pwd)" >> ~/.bashrc
export ANDROID_ROOT=$(pwd)

cd ~
wget http://www.openssl.org/source/openssl-1.0.0g.tar.gz
tar xvzf openssl-1.0.0g.tar.gz
cd openssl-1.0.0g
./config no-asm shared --prefix=$ANDROID_ROOT/platforms/android-18/arch-arm/usr
wget http://bit.net.co/hipl/droid-openssl-makefile.patch
patch Makefile < droid-openssl-makefile.patch
make install

cd ~
mkdir hipl
cd hipl
bzr branch lp:~hipl-core/hipl/android-port-new
cd android-port-new
autoreconf --install
./configure --disable-gcc-warn --disable-firewall -host=arm-linux CC=arm-linux-gnueabi-gcc-4.7 CPPFLAGS="-I$ANDROID_ROOT/platforms/android-18/arch-arm/usr/include" CFLAGS="-nostdlib -std=gnu99" LDFLAGS="-Wl,-rpath-link=$ANDROID_ROOT/platforms/android-18/arch-arm/usr/lib,-L$ANDROID_ROOT/platforms/android-18/arch-arm/usr/lib" LIBS="-lc"

echo "You are now ready to run 'make' and 'make all-am'"