Based on the solution mentioned by brianmcfadden, I git clone the openssl into AOSP sub-folder external/openssl. Added different Android.mk files in the external/openssl, external/openssl/apps, external/openssl/crypto, external/openssl/ssl folder along with android-config.mk, and Application.mk to external/openssl folder. The *.mk files are from https://github.com/eighthave/openssl-android
But when I run the command mm.
It had an error:
build/core/base_rules.mk:217: *** external/openssl/crypto: MODULE.TARGET.SHARED_LIBRARIES.libcrypto already defined by external/boringssl.
build/core/ninja.mk:155: recipe for target 'out/build-aosp_arm-mmm-external_openssl_Android.mk.ninja' failed
make: *** [out/build-aosp_arm-mmm-external_openssl_Android.mk.ninja] Error 1
make: Leaving directory '/home/rong/projects/Android/src'
[Attempt 1]
Tried to port missing function from OpenSSL to Open-TEE, so Open-TEE is able to use BoringSSL on Android.
For most functions like OPENSSL_malloc or BNswap, I could simply copy the implementation from OpenSSL. But functions EVP* are special, like EVP_aes_128_xts or EVP_aes_256_xts, they are automatically generated in building process and I could not find the implementation online. So I believe this is a dead end.
[Attempt 2]
Tried to use prebuild OpenSSL library files. I copied library files libcrypto.so.1.0.0, libssl.so.1.0.0 and libc.so.1.0.0 from /lib/x86_64-linux-gnu/ into Open-TEE working repository along with OpenSSL headers from usr/include/opnessl. But the ninja builder does not like my configurations, so I have following build error:
Starting build with ninja
ninja: Entering directory `.'
ninja: error: 'out/target/product/generic/obj/SHARED_LIBRARIES/opnessl_libssl_intermediates/export_includes', needed by 'out/target/product/generic/obj/SHARED_LIBRARIES/libInternalApi_intermediates/import_includes', missing and no known rule to make it
build/core/ninja.mk:140: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
#### make failed to build some targets (25 seconds) ####
Hello mighty Open-TEE coders,
I had some compile errors about undefined reference to OpenSSL functions.
[Attempt 0] There was an issue about Open-TEE on Android M (opened issue 10)
Based on the solution mentioned by brianmcfadden, I git clone the openssl into AOSP sub-folder external/openssl. Added different Android.mk files in the external/openssl, external/openssl/apps, external/openssl/crypto, external/openssl/ssl folder along with android-config.mk, and Application.mk to external/openssl folder. The *.mk files are from https://github.com/eighthave/openssl-android
But when I run the command mm.
It had an error:
I also tried to git clone the repository git clone https://github.com/eighthave/openssl-android . directly, got the same error.
[Attempt 1] Tried to port missing function from OpenSSL to Open-TEE, so Open-TEE is able to use BoringSSL on Android.
For most functions like OPENSSL_malloc or BNswap, I could simply copy the implementation from OpenSSL. But functions EVP* are special, like EVP_aes_128_xts or EVP_aes_256_xts, they are automatically generated in building process and I could not find the implementation online. So I believe this is a dead end.
[Attempt 2] Tried to use prebuild OpenSSL library files. I copied library files libcrypto.so.1.0.0, libssl.so.1.0.0 and libc.so.1.0.0 from /lib/x86_64-linux-gnu/ into Open-TEE working repository along with OpenSSL headers from usr/include/opnessl. But the ninja builder does not like my configurations, so I have following build error:
I also asked about the build error here
All suggestions are welcome && Thanks in advance.