sudo mkdir /data
and change owner to your user account.build/tools/make-standalone-toolchain.sh --platform=android-8
--install-dir=/data/toolchain-arm
Set environment variables
export PATH=export PATH=/data/toolchain-arm/bin:/data/bin/:$PATH
export PREFIX=/data/data/jackpal.androidterm/app_HOME/local
export CC=arm-linux-androideabi-gcc
export LD=arm-linux-androideabi-ld
export CXX=arm-linux-androideabi-c++
export AR=arm-linux-androideabi-ar
export RANLIB=arm-linux-androideabi-ranlib
export HOSTCONFIG=arm-linux-androideabi
configure
with options./configure --prefix $PREFIX --host $HOSTCONFIG LIBS="-L/data/data/jackpal.androidterm/app_HOME/local/lib" CFLAGS="-I/data/data/jackpal.androidterm/app_HOME/local/include"
make
Since libc
of Android is not full set of standard C library,
compile error is not strange. If a missing function is required in a
software, there are two way to fix it. One of them is patching to
remove dependency, and the other is copy the required function from
other C library.
Another common reason of compile error is failure of
configure
. Because of cross compile, configure
often failed to
detect functions and libraries. To resolve this problem, make a patch
for sources. Another way to resolve is to run configure
with
--config-cache
, and fix config.cache
.
zlib is compression library.
./configure --prefix $PREFIX
make
make install
dropbear is tiny ssh client/server. To build, apply patch first.
./configure --prefix $PREFIX --host $HOSTCONFIG --disable-syslog --disable-loginfunc --with-zlib=/data/data/jackpal.androidterm/app_HOME/local --disable-utmp --disable-utmpx --disable-wtmp --disable-wtmpx --disable-pututline --disable-pututxline --without-pam
make
make install
ncurses is collection of escape sequence and library of terminal manipulation. To build, apply patch first.
./configure --prefix $PREFIX --host $HOSTCONFIG
make
make install