diff options
author | Rechi <Rechi@users.noreply.github.com> | 2018-09-24 11:00:00 +0200 |
---|---|---|
committer | Rechi <Rechi@users.noreply.github.com> | 2018-09-24 11:00:00 +0200 |
commit | ce328e95df78f73303052571d46018b6e64cb153 (patch) | |
tree | 1b692fbe62800ca9ff6a863426015e4a6290ec3d | |
parent | 27a57a614f44e201b7a81b5b0d8823fea35b16d0 (diff) |
[android] use ndk 18
-rw-r--r-- | docs/README.Android.md | 20 | ||||
-rw-r--r-- | tools/android/packaging/Makefile.in | 4 | ||||
-rw-r--r-- | tools/buildsteps/defaultenv | 2 | ||||
-rw-r--r-- | tools/depends/README.md | 6 |
4 files changed, 18 insertions, 14 deletions
diff --git a/docs/README.Android.md b/docs/README.Android.md index b754bf81a6..a2d4d14ea7 100644 --- a/docs/README.Android.md +++ b/docs/README.Android.md @@ -65,7 +65,7 @@ sudo apt install autoconf build-essential curl default-jdk gawk git gperf lib32s **[back to top](#table-of-contents)** ## 3. Prerequisites -Building Kodi for Android requires Android NDK revision 16. For the SDK just use the latest available. +Building Kodi for Android requires Android NDK revision 18. For the SDK just use the latest available. * **[Android SDK](https://developer.android.com/studio/index.html)** (Look for `Get just the command line tools`) * **[Android NDK](https://developer.android.com/ndk/downloads/index.html)** @@ -85,7 +85,7 @@ unzip $HOME/Downloads/sdk-tools-linux-4333796.zip -d $HOME/android-tools/android Extract Android NDK: ``` -unzip $HOME/Downloads/android-ndk-r16-linux-x86_64.zip -d $HOME/android-tools +unzip $HOME/Downloads/android-ndk-r18-linux-x86_64.zip -d $HOME/android-tools ``` ### 3.2. Configure Android SDK @@ -103,22 +103,22 @@ To be able to build Kodi and the libraries it depends on for the Android platfor Change to Android NDK tools directory: ``` -cd $HOME/android-tools/android-ndk-r16/build/tools +cd $HOME/android-tools/android-ndk-r18/build/tools ``` Set up the aarch64 toolchain: ``` -./make-standalone-toolchain.sh --install-dir=$HOME/android-tools/aarch64-linux-android-4.9-vanilla/android-21 --platform=android-21 --toolchain=aarch64-linux-android-4.9 --stl=libc++ +./make-standalone-toolchain.sh --install-dir=$HOME/android-tools/aarch64-linux-android-vanilla/android-21 --platform=android-21 --toolchain=aarch64-linux-android ``` Set up the arm toolchain: ``` -./make-standalone-toolchain.sh --install-dir=$HOME/android-tools/arm-linux-androideabi-4.9-vanilla/android-21 --platform=android-21 --toolchain=arm-linux-androideabi-4.9 --stl=libc++ +./make-standalone-toolchain.sh --install-dir=$HOME/android-tools/arm-linux-androideabi-vanilla/android-21 --platform=android-21 --toolchain=arm-linux-androideabi ``` Set up the x86 toolchain: ``` -./make-standalone-toolchain.sh --install-dir=$HOME/android-tools/x86-linux-android-4.9-vanilla/android-21 --platform=android-21 --toolchain=x86-linux-android-4.9 --stl=libc++ +./make-standalone-toolchain.sh --install-dir=$HOME/android-tools/x86-linux-android-vanilla/android-21 --platform=android-21 --toolchain=x86-linux-android ``` **NOTE:** You only need the toolchain for your target architecture but toolchains are installed in different directories and will not interfere with each other. @@ -137,7 +137,7 @@ keytool -genkey -keystore ~/.android/debug.keystore -v -alias androiddebugkey -d * Whenever you want to compile/develop you need to mount the image * `open ~/android-dev.dmg` * Once you have your hdd image with case sensitive hfs+ file system execute all the steps inside of this filesystem. You need to adapt all paths in this guide so that they match your local environment. As an example here is a configure line that demonstrates possible paths: - * `./configure --with-tarballs=/Users/Shared/xbmc-depends/tarballs --host=arm-linux-androideabi --with-sdk-path=/Volumes/android-dev/android/android-sdk-macosx --with-ndk-path=/Volumes/android-dev/android/android-ndk-r16 --with-toolchain=/Volumes/android-dev/android/android-toolchain-arm/android-21 --prefix=/Volumes/android-dev/android/xbmc-depends` + * `./configure --with-tarballs=/Users/Shared/xbmc-depends/tarballs --host=arm-linux-androideabi --with-sdk-path=/Volumes/android-dev/android/android-sdk-macosx --with-ndk-path=/Volumes/android-dev/android/android-ndk-r18 --with-toolchain=/Volumes/android-dev/android/android-toolchain-arm/android-21 --prefix=/Volumes/android-dev/android/xbmc-depends` **[back to top](#table-of-contents)** | **[back to section top](#3-prerequisites)** @@ -163,17 +163,17 @@ cd $HOME/kodi/tools/depends Configure build for aarch64: ``` -./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=aarch64-linux-android --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r16 --with-toolchain=$HOME/android-tools/aarch64-linux-android-4.9-vanilla/android-21 --prefix=$HOME/android-tools/xbmc-depends +./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=aarch64-linux-android --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r18 --with-toolchain=$HOME/android-tools/aarch64-linux-android-vanilla/android-21 --prefix=$HOME/android-tools/xbmc-depends ``` Or configure build for arm: ``` -./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=arm-linux-androideabi --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r16 --with-toolchain=$HOME/android-tools/arm-linux-androideabi-4.9-vanilla/android-21 --prefix=$HOME/android-tools/xbmc-depends +./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=arm-linux-androideabi --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r18 --with-toolchain=$HOME/android-tools/arm-linux-androideabi-vanilla/android-21 --prefix=$HOME/android-tools/xbmc-depends ``` Or configure build for x86: ``` -./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=i686-linux-android --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r16 --with-toolchain=$HOME/android-tools/x86-linux-android-4.9-vanilla/android-21 --prefix=$HOME/android-tools/xbmc-depends +./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=i686-linux-android --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r18 --with-toolchain=$HOME/android-tools/x86-linux-android-vanilla/android-21 --prefix=$HOME/android-tools/xbmc-depends ``` Build tools and dependencies: diff --git a/tools/android/packaging/Makefile.in b/tools/android/packaging/Makefile.in index d3987ec237..07776ce320 100644 --- a/tools/android/packaging/Makefile.in +++ b/tools/android/packaging/Makefile.in @@ -45,6 +45,10 @@ endif # libc++ STLLIB=$(TOOLCHAIN)/$(HOST)/lib/libc++_shared.so +# https://android.googlesource.com/platform/ndk/+/fe0fe5dc32682d1811d32492c3055becb512c147/build/tools/make_standalone_toolchain.py#308 +ifeq ($(findstring armeabi-v7a,$(CPU)),armeabi-v7a) + STLLIB=$(TOOLCHAIN)/$(HOST)/lib/armv7-a/libc++_shared.so +endif #older ndk x86 GDBPATH=$(NDKROOT)/toolchains/$(ARCH)-$(GCC_VERSION)/prebuilt/gdbserver diff --git a/tools/buildsteps/defaultenv b/tools/buildsteps/defaultenv index cd11615ad0..4310a1405c 100644 --- a/tools/buildsteps/defaultenv +++ b/tools/buildsteps/defaultenv @@ -34,7 +34,7 @@ case $XBMC_PLATFORM_DIR in ;; android) - DEFAULT_NDK_VERSION="16" + DEFAULT_NDK_VERSION="18" DEFAULT_NDK_API="21" DEFAULT_XBMC_DEPENDS_ROOT=$WORKSPACE/tools/depends/xbmc-depends DEFAULT_CONFIGURATION="Debug" diff --git a/tools/depends/README.md b/tools/depends/README.md index 7f75d71461..16398334d0 100644 --- a/tools/depends/README.md +++ b/tools/depends/README.md @@ -39,13 +39,13 @@ Paths below are examples. If you want to build Kodi, follow our **[build guides] ### Android **arm** -`./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=arm-linux-androideabi --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r16 --with-toolchain=$HOME/android-tools/arm-linux-androideabi-4.9-vanilla/android-21 --prefix=$HOME/android-tools/xbmc-depends` +`./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=arm-linux-androideabi --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r18 --with-toolchain=$HOME/android-tools/arm-linux-androideabi-vanilla/android-21 --prefix=$HOME/android-tools/xbmc-depends` **aarch64** -`./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=aarch64-linux-android --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r16 --with-toolchain=$HOME/android-tools/aarch64-linux-android-4.9-vanilla/android-21 --prefix=$HOME/android-tools/xbmc-depends` +`./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=aarch64-linux-android --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r18 --with-toolchain=$HOME/android-tools/aarch64-linux-android-vanilla/android-21 --prefix=$HOME/android-tools/xbmc-depends` **x86** -`./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=i686-linux-android --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r16 --with-toolchain=$HOME/android-tools/x86-linux-android-4.9-vanilla/android-21 --prefix=$HOME/android-tools/xbmc-depends` +`./configure --with-tarballs=$HOME/android-tools/xbmc-tarballs --host=i686-linux-android --with-sdk-path=$HOME/android-tools/android-sdk-linux --with-ndk-path=$HOME/android-tools/android-ndk-r18 --with-toolchain=$HOME/android-tools/x86-linux-android-vanilla/android-21 --prefix=$HOME/android-tools/xbmc-depends` ### Linux **ARM (codesourcery/lenaro/etc)** |