diff options
author | Nisha Parrakat <nishaparrakat@gmail.com> | 2021-08-08 08:18:35 +0000 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-08-12 10:08:16 -0700 |
commit | 1f1d3812a10e5a20069545d3ec1e2ae034ab05af (patch) | |
tree | 8526dd017f373037618726fe20db169d8a561c31 /dynamic-layers/selinux/android-tools/android-tools-conf-configfs | |
parent | eb92914e31ff872c032155997c42ca8b6e6d82a3 (diff) | |
download | meta-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-conf-configfs')
4 files changed, 70 insertions, 0 deletions
diff --git a/dynamic-layers/selinux/android-tools/android-tools-conf-configfs/10-adbd-configfs.conf b/dynamic-layers/selinux/android-tools/android-tools-conf-configfs/10-adbd-configfs.conf new file mode 100644 index 0000000..ddf155a --- /dev/null +++ b/dynamic-layers/selinux/android-tools/android-tools-conf-configfs/10-adbd-configfs.conf | |||
@@ -0,0 +1,4 @@ | |||
1 | [Service] | ||
2 | ExecStartPre=/usr/bin/android-gadget-setup | ||
3 | ExecStartPost=/usr/bin/android-gadget-start | ||
4 | ExecStopPost=/usr/bin/android-gadget-cleanup | ||
diff --git a/dynamic-layers/selinux/android-tools/android-tools-conf-configfs/android-gadget-cleanup b/dynamic-layers/selinux/android-tools/android-tools-conf-configfs/android-gadget-cleanup new file mode 100644 index 0000000..517227d --- /dev/null +++ b/dynamic-layers/selinux/android-tools/android-tools-conf-configfs/android-gadget-cleanup | |||
@@ -0,0 +1,24 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | [ -d /sys/kernel/config/usb_gadget ] || exit 0 | ||
4 | |||
5 | cd /sys/kernel/config/usb_gadget | ||
6 | |||
7 | cd adb | ||
8 | |||
9 | echo "" > UDC || true | ||
10 | |||
11 | killall adbd || true | ||
12 | |||
13 | umount /dev/usb-ffs/adb | ||
14 | |||
15 | rm configs/c.1/ffs.usb0 | ||
16 | |||
17 | rmdir configs/c.1/strings/0x409 | ||
18 | rmdir configs/c.1 | ||
19 | |||
20 | rmdir functions/ffs.usb0 | ||
21 | rmdir strings/0x409 | ||
22 | |||
23 | cd .. | ||
24 | rmdir adb | ||
diff --git a/dynamic-layers/selinux/android-tools/android-tools-conf-configfs/android-gadget-setup b/dynamic-layers/selinux/android-tools/android-tools-conf-configfs/android-gadget-setup new file mode 100644 index 0000000..e44d1ba --- /dev/null +++ b/dynamic-layers/selinux/android-tools/android-tools-conf-configfs/android-gadget-setup | |||
@@ -0,0 +1,35 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | set -e | ||
4 | |||
5 | manufacturer=RPB | ||
6 | model="Android device" | ||
7 | serial=0123456789ABCDEF | ||
8 | |||
9 | if [ -r /etc/android-gadget-setup.machine ] ; then | ||
10 | . /etc/android-gadget-setup.machine | ||
11 | fi | ||
12 | |||
13 | [ -d /sys/kernel/config/usb_gadget ] || modprobe libcomposite | ||
14 | |||
15 | cd /sys/kernel/config/usb_gadget | ||
16 | |||
17 | [ -d adb ] && /usr/bin/android-gadget-cleanup || true | ||
18 | |||
19 | mkdir adb | ||
20 | cd adb | ||
21 | |||
22 | mkdir configs/c.1 | ||
23 | mkdir functions/ffs.usb0 | ||
24 | mkdir strings/0x409 | ||
25 | mkdir configs/c.1/strings/0x409 | ||
26 | echo 0x18d1 > idVendor | ||
27 | echo 0xd002 > idProduct | ||
28 | echo "$serial" > strings/0x409/serialnumber | ||
29 | echo "$manufacturer" > strings/0x409/manufacturer | ||
30 | echo "$model" > strings/0x409/product | ||
31 | echo "Conf 1" > configs/c.1/strings/0x409/configuration | ||
32 | ln -s functions/ffs.usb0 configs/c.1 | ||
33 | |||
34 | mkdir -p /dev/usb-ffs/adb | ||
35 | mount -t functionfs usb0 /dev/usb-ffs/adb | ||
diff --git a/dynamic-layers/selinux/android-tools/android-tools-conf-configfs/android-gadget-start b/dynamic-layers/selinux/android-tools/android-tools-conf-configfs/android-gadget-start new file mode 100644 index 0000000..ca6c3df --- /dev/null +++ b/dynamic-layers/selinux/android-tools/android-tools-conf-configfs/android-gadget-start | |||
@@ -0,0 +1,7 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | set -e | ||
4 | |||
5 | sleep 3 | ||
6 | |||
7 | ls /sys/class/udc/ > /sys/kernel/config/usb_gadget/adb/UDC | ||