summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/selinux/android-tools/android-tools/fastboot_dont_use_sparse_file_import_auto_in_load_buf_fd.patch
diff options
context:
space:
mode:
authorNisha Parrakat <nishaparrakat@gmail.com>2021-08-08 08:18:35 +0000
committerKhem Raj <raj.khem@gmail.com>2021-08-12 10:08:16 -0700
commit1f1d3812a10e5a20069545d3ec1e2ae034ab05af (patch)
tree8526dd017f373037618726fe20db169d8a561c31 /dynamic-layers/selinux/android-tools/android-tools/fastboot_dont_use_sparse_file_import_auto_in_load_buf_fd.patch
parenteb92914e31ff872c032155997c42ca8b6e6d82a3 (diff)
downloadmeta-clang-1f1d3812a10e5a20069545d3ec1e2ae034ab05af.tar.gz
upgrade of android-tools to 10.0.0.r36
An older version is present in the meta-oe layer. Took the old recipe and adapted it in the following way: --Deleted all the old patches that were applicable for old version. --Used all the makefiles that come with the new version directly from the source code, just modifying them to install output to a specific folder as below a)added rules_yocto.mk that will mimic the debian/rules b)modified the makefiles of the components to output to a common dir. c) Built boringssl crypto with the option -DOPENSSL_NO_ASM to solve the below errors libcrypto.so.0: undefined reference to `aes_hw_encrypt' libcrypto.so.0: undefined reference to `aes_hw_set_encrypt_key' libcrypto.so.0: undefined reference to `gcm_gmult_v8' libcrypto.so.0: undefined reference to `gcm_init_v8' libcrypto.so.0: undefined reference to `sha256_block_data_order' libcrypto.so.0: undefined reference to `aes_hw_ctr32_encrypt_blocks' libcrypto.so.0: undefined reference to `aes_hw_cbc_encrypt' libcrypto.so.0: undefined reference to `vpaes_decrypt' libcrypto.so.0: undefined reference to `vpaes_encrypt' libcrypto.so.0: undefined reference to `gcm_gmult_neon' libcrypto.so.0: undefined reference to `sha1_block_data_order' libcrypto.so.0: undefined reference to `sha512_block_data_order' libcrypto.so.0: undefined reference to `gcm_init_neon' libcrypto.so.0: undefined reference to `aes_hw_set_decrypt_key' libcrypto.so.0: undefined reference to `vpaes_set_decrypt_key' libcrypto.so.0: undefined reference to `gcm_ghash_neon' libcrypto.so.0: undefined reference to `bn_mul_mont' libcrypto.so.0: undefined reference to `aes_hw_decrypt' libcrypto.so.0: undefined reference to `gcm_ghash_v8' libcrypto.so.0: undefined reference to `vpaes_cbc_encrypt' libcrypto.so.0: undefined reference to `ChaCha20_ctr32' libcrypto.so.0: undefined reference to `vpaes_ctr32_encrypt_blocks' libcrypto.so.0: undefined reference to `vpaes_set_encrypt_key' Attention : https://github.com/grpc/grpc/issues/9440 d) compiled android compatible version of libunwind to be used to build libbacktrace e) REQUIRES meta-selinux for libselinux, thus added it to BBFILES_DYNAMIC of this layer. f) checked compilation and packaging for for x86_64 and aarch64 g) UNTESTED android-tools-adbd.service , couldn't find how to build adbd that is needed by the service with the new version of android-tools. At present the service is still packaged but may not work. h) tested the adb and fastboot on the core-image-minimal by including the android-tools in the image and ran the commands with 'help' Signed-off-by: Nisha Parrakat <Nisha.Parrakat@kpit.com> Signed-off-by: Nisha Parrakat <nishaparrakat@gmail.com>
Diffstat (limited to 'dynamic-layers/selinux/android-tools/android-tools/fastboot_dont_use_sparse_file_import_auto_in_load_buf_fd.patch')
-rw-r--r--dynamic-layers/selinux/android-tools/android-tools/fastboot_dont_use_sparse_file_import_auto_in_load_buf_fd.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/dynamic-layers/selinux/android-tools/android-tools/fastboot_dont_use_sparse_file_import_auto_in_load_buf_fd.patch b/dynamic-layers/selinux/android-tools/android-tools/fastboot_dont_use_sparse_file_import_auto_in_load_buf_fd.patch
new file mode 100644
index 0000000..d8c74be
--- /dev/null
+++ b/dynamic-layers/selinux/android-tools/android-tools/fastboot_dont_use_sparse_file_import_auto_in_load_buf_fd.patch
@@ -0,0 +1,42 @@
1upstream commit taken as below
2Original Issue link
3https://android-review.googlesource.com/c/platform/system/core/+/1123485
4
5Commit taken below:
6
7fastboot: don't use sparse_file_import_auto() in load_buf_fd()
8
9load_buf_fd() attempts to find the size of the file that it is about
10to load by first calling sparse_file_import_auto() then using
11sparse_file_len() upon success or falling back to the file size on the
12filesystem on failure.
13
14This is problematic however as sparse_file_import_auto() creates a
15sparse_file out of the normal file, but does not resparse it, so an
16assertion fails during the sparse_file_len() call.
17
18This is fixed by using sparse_file_import() instead. This will fail
19in the case that the file is not sparse and the call to
20sparse_file_len() will be properly skipped.
21
22Bug: 140538105
23Test: flash blueline factory image with assertions enabled in
24 libsparse/sparse.cpp
25
26Change-Id: I0283be33563a3301ce5b09bde41105a20f91086c
27
28https://android.googlesource.com/platform/system/core/+/fbb9535aaea5ae4011f3c3edf4c00b27452f57ec
29Upstream-Status: Backport(commit fbb9535aaea5ae4011f3c3edf4c00b27452f57ec)
30Signed-off-by: Nisha Parrakat <Nisha.Parrakat@kpit.com>
31
32--- git/system/core/fastboot/fastboot.cpp 2021-05-28 09:24:15.583963227 +0000
33+++ git/system/core/fastboot/fastboot.cpp 2021-05-28 09:25:09.948974990 +0000
34@@ -869,7 +869,7 @@
35 return false;
36 }
37
38- if (sparse_file* s = sparse_file_import_auto(fd, false, false)) {
39+ if (sparse_file* s = sparse_file_import(fd, false, false)) {
40 buf->image_size = sparse_file_len(s, false, false);
41 sparse_file_destroy(s);
42 } else {