arm build script work

This commit is contained in:
Dan Ballard 2018-10-27 12:43:41 -07:00
parent 294fe03e36
commit 7a1e509985
3 changed files with 58 additions and 1 deletions

52
tor/build-tor-arm.sh Executable file
View File

@ -0,0 +1,52 @@
#!/bin/sh
BUILD_DIR=${PWD}/build-tor
ZLIB_VERSION=1.2.11
LIBEVENT_VERSION=2.1.8-stable
OPENSSL_VERSION=1.0.2p
TOR_VERSION=0.3.5.2-alpha
mkdir ${BUILD_DIR}
cd ${BUILD_DIR}
curl -fsSL "https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz" | tar zxvf -
cd zlib-${ZLIB_VERSION}
./configure --prefix=$PWD/install
make -j$(nproc)
make install
cd ..
curl -fsSL "https://github.com/libevent/libevent/releases/download/release-${LIBEVENT_VERSION}/libevent-${LIBEVENT_VERSION}.tar.gz" | tar zxvf -
cd libevent-${LIBEVENT_VERSION}
./configure --prefix=$PWD/install \
--disable-shared \
--enable-static \
--with-pic \
--host=arm-linux-gnueabihf
make -j$(nproc)
make install
cd ..
curl -fsSL "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" | tar zxvf -
cd openssl-${OPENSSL_VERSION}
export ANDROID_NDK_HOME="${BUILD_DIR}/ndk"
./Configure --openssldir=$PWD/install no-shared no-dso android-armv7
make -j$(nproc) INSTALL_PREFIX=$PWD/install
make install
cd ..
curl -fsSL "https://www.torproject.org/dist/tor-${TOR_VERSION}.tar.gz" | tar zxvf -
cd tor-${TOR_VERSION}
./configure --prefix=$PWD/install \
--enable-static-tor \
--with-libevent-dir=$PWD/../libevent-${LIBEVENT_VERSION}/install \
--with-openssl-dir=$PWD/../openssl-${OPENSSL_VERSION}/install \
--with-zlib-dir=$PWD/../zlib-${ZLIB_VERSION}/install \
--host=arm-linux-gnueabihf \
CC=arm-linux-gnueabihf-gcc \
AR=arm-linux-gnueabihf-ar STRIP=arm-linux-gnueabihf-strip RANLIB=arm-linux-gnueabihf-ranlib
make -j$(nproc)
make install
echo ""
echo "Results in ${BUILD_DIR}/tor-${TOR_VERSION}/install/bin"

View File

@ -0,0 +1,5 @@
#!/bin/sh
docker run --rm dockcross/linux-armv7 > ./dockcross-linux-armv7
chmod a+x ./dockcross-linux-armv7
./dockcross-linux-armv7 ./build-tor-arm.sh

View File

@ -1,6 +1,6 @@
#!/bin/sh
BUILD_DIR=tor-x86
BUILD_DIR=build-tor
ZLIB_VERSION=1.2.11
LIBEVENT_VERSION=2.1.8-stable
OPENSSL_VERSION=1.0.2p