mirror of https://github.com/qt/qtdoc.git
Android: Update OpenSSL page
Fixes: QTBUG-76202 Change-Id: I0ea577fcc573ae181cda25d4860c8527dccae415 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This commit is contained in:
parent
4bde3f575a
commit
2fa86c4279
|
@ -317,83 +317,23 @@ support on the target.
|
||||||
The following instructions guide you to build and add the OpenSSL libraries to
|
The following instructions guide you to build and add the OpenSSL libraries to
|
||||||
the APK:
|
the APK:
|
||||||
\list 1
|
\list 1
|
||||||
\li Download the \l{OpenSSL: Build Setup Script}{setup script} to configure
|
\li Download the latest OpenSSL 1.1.x sources from \l{http://www.openssl.org/source}.
|
||||||
the build environment.
|
|
||||||
|
|
||||||
\note Ensure that you save the script with Unix line-endings if your
|
|
||||||
build host is Unix or Linux.
|
|
||||||
|
|
||||||
\li Make the following changes in the setup script:
|
|
||||||
\list
|
|
||||||
\li Set appropriate values to the \c _ANDROID_EABI and
|
|
||||||
\c _ANDROID_ARCH variables. For example, to build for 64-bit ARM
|
|
||||||
architecture using toolchain version v4.9, set
|
|
||||||
\c aarch64-linux-android-4.9 and \c arch-arm64 values to
|
|
||||||
\c _ANDROID_EABI and \c _ANDROID_ARCH respectively.
|
|
||||||
\li Add the \c windows-x86 or \c windows-x86_64 to the \c hosts list on
|
|
||||||
line \c 107, if your build host is Windows.
|
|
||||||
\li Add the following after line \c 128 to build for 64-bit ARM
|
|
||||||
architecture:
|
|
||||||
|
|
||||||
\badcode
|
|
||||||
arch-arm64)
|
|
||||||
ANDROID_TOOLS="aarch64-linux-android-gcc aarch64-linux-android-ranlib aarch64-linux-android-ld"
|
|
||||||
;;
|
|
||||||
\endcode
|
|
||||||
\li Add the following after line \c 213 if \c _ANDROID_ARCH is set
|
|
||||||
to \c arch-arm64:
|
|
||||||
|
|
||||||
\badcode
|
|
||||||
if [ "$_ANDROID_ARCH" == "arch-arm64" ]; then
|
|
||||||
export MACHINE=armv8
|
|
||||||
export RELEASE=2.6.37
|
|
||||||
export SYSTEM=android64
|
|
||||||
export ARCH=arm
|
|
||||||
export CROSS_COMPILE="aarch64-linux-android-"
|
|
||||||
fi
|
|
||||||
\endcode
|
|
||||||
\li Comment out the \c FIPS section if it is not used or define the
|
|
||||||
\c FIPS_SIG environment variable with the FIPS signature
|
|
||||||
location.
|
|
||||||
\endlist
|
|
||||||
|
|
||||||
\li Define \c ANDROID_NDK_ROOT environment variable with the NDK
|
|
||||||
location.
|
|
||||||
|
|
||||||
\li Provide executable rights for the setup script and run it:
|
|
||||||
|
|
||||||
\badcode
|
|
||||||
chmod a+x Setenv-android.sh
|
|
||||||
. ./Setenv-android.sh
|
|
||||||
\endcode
|
|
||||||
|
|
||||||
The script prints the following configuration details to the prompt when it
|
|
||||||
completes:
|
|
||||||
|
|
||||||
\badcode
|
|
||||||
ANDROID_NDK_ROOT: /home/user1/android-ndk-r10d
|
|
||||||
ANDROID_ARCH: arch-arm64
|
|
||||||
ANDROID_EABI: aarch64-linux-android-4.9
|
|
||||||
ANDROID_API: android-21
|
|
||||||
ANDROID_SYSROOT: /home/user1/android-ndk-r10d/platforms/android-21/arch-arm64
|
|
||||||
ANDROID_TOOLCHAIN: /home/user1/android-ndk-r10d/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin
|
|
||||||
FIPS_SIG:
|
|
||||||
CROSS_COMPILE: aarch64-linux-androideabi-
|
|
||||||
ANDROID_DEV: /home/user1/android-ndk-r10d/platforms/android-21/arch-arm64/usr
|
|
||||||
\endcode
|
|
||||||
|
|
||||||
\li Download the latest OpenSSL sources from \l{http://www.openssl.org/source}.
|
|
||||||
|
|
||||||
\li Extract the sources to a folder and navigate to that folder using
|
\li Extract the sources to a folder and navigate to that folder using
|
||||||
the CLI.
|
the CLI.
|
||||||
\note If your development platform is Windows, you need \c msys with
|
\note If your development platform is Windows, you need \c msys with
|
||||||
\c perl v5.14 or later to build OpenSSL.
|
\c perl v5.14 or later to build OpenSSL.
|
||||||
|
|
||||||
|
\li Add android llvm toolchain to your path:
|
||||||
|
\badcode
|
||||||
|
export PATH="<android_ndk_path>/toolchains/llvm/prebuilt/<host>/bin":$PATH
|
||||||
|
\endcode
|
||||||
|
|
||||||
\li Configure the OpenSSL sources to build for Android using
|
\li Configure the OpenSSL sources to build for Android using
|
||||||
the following command:
|
the following command:
|
||||||
|
|
||||||
\badcode
|
\badcode
|
||||||
./Configure shared android
|
./Configure shared android-<arch> -D__ANDROID_API__=21
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
\note You must consider enabling/disabling the SSL features based on the
|
\note You must consider enabling/disabling the SSL features based on the
|
||||||
|
@ -413,6 +353,9 @@ the APK:
|
||||||
\li Run your application to see it running on the device.
|
\li Run your application to see it running on the device.
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
|
\note here \l{https://github.com/KDAB/android_openssl} you can find a script which
|
||||||
|
can be used to compile openssl for all android abis and also latest prebuilt libs.
|
||||||
|
|
||||||
Qt Creator builds your application and creates an application package (APK)
|
Qt Creator builds your application and creates an application package (APK)
|
||||||
with the OpenSSL libraries bundled in it. Once the APK is ready, it uses \c adb
|
with the OpenSSL libraries bundled in it. Once the APK is ready, it uses \c adb
|
||||||
to deploy the APK on the target you chose and launch the application.
|
to deploy the APK on the target you chose and launch the application.
|
||||||
|
|
Loading…
Reference in New Issue