X-Git-Url: https://sigrok.org/gitweb/?p=sigrok-util.git;a=blobdiff_plain;f=cross-compile%2Fandroid%2Fsigrok-cross-android;h=4a79770d580ec8e9b3cacd2118327ee2e613e95b;hp=30519f7824fa8cf48985e20ad7f9f82b7d7b1eeb;hb=8a189c87c0612e2d106b7c784f806d897d077b44;hpb=10adf5499c9f36c0958a65c5502c8f2da65ee5db diff --git a/cross-compile/android/sigrok-cross-android b/cross-compile/android/sigrok-cross-android index 30519f7..4a79770 100755 --- a/cross-compile/android/sigrok-cross-android +++ b/cross-compile/android/sigrok-cross-android @@ -26,7 +26,7 @@ set -e ANDROID_PATH=$HOME/android # The path where the Android NDK is located. -ANDROID_NDK=$ANDROID_PATH/android-ndk-r10d +ANDROID_NDK=$ANDROID_PATH/android-ndk-r10e # The path where the Android SDK is located. ANDROID_SDK=$ANDROID_PATH/android-sdk-linux @@ -62,26 +62,31 @@ PARALLEL="-j 2" # ----------------------------------------------------------------------------- VER_LIBICONV=1.14 -VER_GETTEXT=0.19.4 +VER_GETTEXT=0.19.5.1 VER_ZLIB=1.2.8 -VER_PCRE=8.36 +VER_PCRE=8.37 VER_LIBFFI=3.2.1 -VER_GLIB=2.43.3 -VER_GLIB_SHORT=2.43 -VER_LIBSIGCXX=2.4.0 -VER_LIBSIGCXX_SHORT=2.4 +VER_GLIB=2.45.4 +VER_GLIB_SHORT=2.45 +VER_GLIBMM=2.45.41 +VER_GLIBMM_SHORT=2.45 +VER_LIBSIGCXX=2.5.1 +VER_LIBSIGCXX_SHORT=2.5 VER_LIBZIP=0.11.2 VER_LIBFTDI1=1.2 VER_LIBUSB=1.0.19 VER_PYTHON=3.3.3 -VER_BOOST=1.57.0 -VER_QT=5.3.1 -VER_NDK=10d -VER_SDK=23.0.2 +VER_BOOST=1.58.0 +VER_QT=5.4.1 +VER_SIGROK_FIRMWARE_FX2LAFW=0.1.2 +VER_NDK=10e +VER_SDK=24.3.3 +VER_AND_BT=22.0.1 # Android build tools version +VER_AND_API=16 # Target Android API version SF_MIRROR=download.sourceforge.net -WGET="wget --quiet" +WGET="wget -c --quiet" GIT_CLONE="git clone --depth=1" case "$TOOLCHAIN_TRIPLET" in @@ -101,18 +106,24 @@ if [ "x$1" = "xprepare" ]; then # NDK $WGET http://dl.google.com/android/ndk/android-ndk-r$VER_NDK-linux-x86.bin chmod 700 android-ndk-r$VER_NDK-linux-x86.bin - ./android-ndk-r$VER_NDK-linux-x86.bin + ./android-ndk-r$VER_NDK-linux-x86.bin -y cd android-ndk-r$VER_NDK - ./build/tools/make-standalone-toolchain.sh --platform=android-16 \ + ./build/tools/make-standalone-toolchain.sh --platform=android-$VER_AND_API \ --toolchain=arm-linux-androideabi-4.9 \ --install-dir=$ANDROID_PATH/android-arm-toolchain + ./build/tools/make-standalone-toolchain.sh --platform=android-$VER_AND_API \ + --toolchain=x86-4.9 \ + --install-dir=$ANDROID_PATH/android-i686-toolchain + ./build/tools/make-standalone-toolchain.sh --platform=android-$VER_AND_API \ + --toolchain=mipsel-linux-android-4.9 \ + --install-dir=$ANDROID_PATH/android-mipsel-toolchain cd .. # SDK $WGET http://dl.google.com/android/android-sdk_r$VER_SDK-linux.tgz tar xfz android-sdk_r$VER_SDK-linux.tgz cd android-sdk-linux - ./tools/android update sdk --no-ui --filter platform-tools,build-tools-21.1.2,android-8,android-10,android-11,android-14,android-16 + echo y | ./tools/android update sdk --no-ui --all --filter platform-tools,build-tools-$VER_AND_BT,android-$VER_AND_API cd .. exit @@ -153,7 +164,7 @@ if test -d "$TOOLCHAIN"/sysroot; then SYSROOT= else STANDALONE_TOOLCHAIN= - NATIVE_API_LEVEL=16 + NATIVE_API_LEVEL=$VER_AND_API SYSROOT_DIR=${ANDROID_NDK}/platforms/android-${NATIVE_API_LEVEL}/arch-${TARGET_ARCH%eabi*} if [ ! -d "$SYSROOT_DIR" ]; then echo >&2 "Can't build with NDK toolchain; sysroot $SYSROOT_DIR is missing" @@ -212,6 +223,8 @@ autoreconf patch -p1 < ../../Python-$VER_PYTHON.patch ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no ac_cv_func_pipe2=no ac_cv_func_fdatasync=no ac_cv_func_killpg=no ac_cv_func_waitid=no ac_cv_func_sigaltstack=no ./configure $C --build=x86_64-linux-gnu --disable-ipv6 sed -i "s/^#zlib/zlib/g" Modules/Setup +sed -i "s/^#math/math/g" Modules/Setup +sed -i "s/^#time/time/g" Modules/Setup make PYTHON_FOR_BUILD='_PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) ./hostpython' install $V cd .. @@ -310,7 +323,7 @@ cd .. $WGET http://www.intra2net.com/en/developer/libftdi/download/libftdi1-$VER_LIBFTDI1.tar.bz2 tar xfj libftdi1-$VER_LIBFTDI1.tar.bz2 cd libftdi1-$VER_LIBFTDI1 -cmake $CM -DFTDIPP=no -DDOCUMENTATION=no -DEXAMPLES=no -DFTDI_EEPROM=no -DPYTHON_BINDINGS=no . +cmake $CM -DFTDIPP=no -DDOCUMENTATION=no -DEXAMPLES=no -DFTDI_EEPROM=no -DPYTHON_BINDINGS=no -DBUILD_TESTS=n . make $PARALLEL $V make install $V cd .. @@ -342,9 +355,9 @@ if [ x"$CPPFLAGS_STL" != x ]; then cd .. # glibmm (needed for libsigrok bindings) - $WGET http://ftp.gnome.org/pub/gnome/sources/glibmm/$VER_GLIB_SHORT/glibmm-$VER_GLIB.tar.xz - tar xfJ glibmm-$VER_GLIB.tar.xz - cd glibmm-$VER_GLIB + $WGET http://ftp.gnome.org/pub/gnome/sources/glibmm/$VER_GLIBMM_SHORT/glibmm-$VER_GLIBMM.tar.xz + tar xfJ glibmm-$VER_GLIBMM.tar.xz + cd glibmm-$VER_GLIBMM CPPFLAGS="$CPPFLAGS_STL" LDFLAGS="$LDFLAGS_STL -lgnustl_shared" ./configure --disable-documentation $C make $PARALLEL $V make install $V @@ -374,6 +387,24 @@ make $PARALLEL $V make install $V cd ../.. +# sigrok-firmware +$GIT_CLONE git://sigrok.org/sigrok-firmware +cd sigrok-firmware +./autogen.sh +mkdir build +cd build +../configure $C +make $PARALLEL $V +make install $V +cd ../.. + +# sigrok-firmware-fx2lafw +$WGET http://sigrok.org/download/binary/sigrok-firmware-fx2lafw/sigrok-firmware-fx2lafw-bin-$VER_SIGROK_FIRMWARE_FX2LAFW.tar.gz +tar xfz sigrok-firmware-fx2lafw-bin-$VER_SIGROK_FIRMWARE_FX2LAFW.tar.gz +cd sigrok-firmware-fx2lafw-bin-$VER_SIGROK_FIRMWARE_FX2LAFW +cp *.fw $PREFIX/share/sigrok-firmware/ +cd .. + # sigrok-cli $GIT_CLONE git://sigrok.org/sigrok-cli cd sigrok-cli @@ -392,13 +423,8 @@ if [ -z "$ANDROID_NDK" -o ! -d "$ANDROID_NDK" ]; then exit 0 fi -if [ -z "$ANDROID_SDK" -o \ - ! -d "$ANDROID_SDK"/platforms/android-8 -o \ - ! -d "$ANDROID_SDK"/platforms/android-10 -o \ - ! -d "$ANDROID_SDK"/platforms/android-11 -o \ - ! -d "$ANDROID_SDK"/platforms/android-14 -o \ - ! -d "$ANDROID_SDK"/platforms/android-16 ]; then - echo "Android SDK with platforms 8 10 11 14 16 not available, not building PulseView." +if [ -z "$ANDROID_SDK" -o ! -d "$ANDROID_SDK"/platforms/android-$VER_AND_API ]; then + echo "Android SDK with platform $VER_AND_API not available, not building PulseView." exit 0 fi @@ -423,7 +449,26 @@ $WGET http://download.qt-project.org/official_releases/qt/${VER_QT%.*}/${VER_QT} tar xfz qt-everywhere-opensource-src-${VER_QT}.tar.gz cd qt-everywhere-opensource-src-${VER_QT} patch -p1 < ../../android-qt.patch -CC= CXX= ./configure --prefix="$PREFIX" -developer-build -xplatform android-g++ -nomake tests -nomake examples -android-sdk "$ANDROID_SDK" -android-ndk "$ANDROID_NDK" -android-ndk-host "$NDK_HOST" -android-arch "$TARGET_ARCH" -android-toolchain-version "$NDK_TOOLCHAIN_VERSION" -skip qttranslations -skip qtwebkit -skip qtserialport -skip qtwebkit-examples -skip qtlocation -skip qtconnectivity -opensource -confirm-license -silent +CC= CXX= ./configure \ + --prefix="$PREFIX" \ + -developer-build \ + -xplatform android-g++ \ + -nomake tests \ + -nomake examples \ + -android-sdk "$ANDROID_SDK" \ + -android-ndk "$ANDROID_NDK" \ + -android-ndk-host "$NDK_HOST" \ + -android-arch "$TARGET_ARCH" \ + -android-toolchain-version "$NDK_TOOLCHAIN_VERSION" \ + -skip qttranslations \ + -skip qtwebkit \ + -skip qtserialport \ + -skip qtwebkit-examples \ + -skip qtlocation \ + -skip qtconnectivity \ + -opensource -confirm-license -silent +export ANDROID_API_VERSION=android-$VER_AND_API +export ANDROID_BUILD_TOOLS_REVISION=$VER_AND_BT make module-qtbase module-qtandroidextras module-qtsvg module-qtimageformats $PARALLEL $V make install $V cd .. @@ -432,7 +477,7 @@ cd .. $GIT_CLONE git://sigrok.org/sigrok-androidutils cd sigrok-androidutils ./autogen.sh -./configure $C --with-android-sdk="${ANDROID_SDK}" +./configure $C --with-android-sdk="${ANDROID_SDK}" --with-android-platform=android-$VER_AND_API make $PARALLEL $V make install $V cd .. @@ -448,7 +493,6 @@ make $PARALLEL $V make install $V ${TOOLCHAIN_TRIPLET}-strip -S libs/$TARGET_ARCH/libpulseview.so cd android -"${ANDROID_SDK}/tools/android" update project -p . -t android-14 -n PulseView +"${ANDROID_SDK}/tools/android" update project -p . -t android-$VER_AND_API -n PulseView ant debug cd ../.. -