Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to AOSPv14 #30

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion aosptree/vendor/devices-community/gd_rpi4/device.mk
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ PRODUCT_VENDOR_PROPERTIES += \
ro.hardware.vulkan=broadcom \

# Enable Vulkan backend for SKIA/HWUI
TARGET_USES_VULKAN = true
# TARGET_USES_VULKAN = true

# Bluetooth
PRODUCT_VENDOR_PROPERTIES += \
Expand Down
8 changes: 6 additions & 2 deletions manifests/glodroid.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<remove-project name="platform/external/mesa3d" />
<remove-project name="platform/external/v4l2_codec2" />
<remove-project name="platform/external/drm_hwcomposer" />
<remove-project name="platform/external/wpa_supplicant_8" />

<project path="glodroid" remote="glodroid" name="glodroid_configuration.git" groups="glodroid" revision="refs/tags/basedir-v0.9.0" />
<project path="glodroid/configuration" remote="glodroid" name="glodroid_configuration.git" groups="glodroid" revision="1ba92aede3fccf6fb07ef3787a7bdd55f58e03fc" />
Expand All @@ -20,7 +21,7 @@
<!-- gpu+display components (vendor) -->
<project path="glodroid/vendor/minigbm" remote="aosp" name="platform/external/minigbm" groups="glodroid" revision="84b3a09ef0e620c1b2ec19c7626c327e68a847bc" />
<project path="glodroid/vendor/drm_hwcomposer" remote="aosp" name="platform/external/drm_hwcomposer" groups="glodroid" revision="5de61b5e4fbf43b78b605dab68465aa6722930c4" />
<project path="glodroid/vendor/mesa3d" remote="aosp" name="platform/external/mesa3d" groups="glodroid" revision="f88338f80127d8bbbb49269e2399fd9e7e460c5c" />
<project path="glodroid/vendor/mesa3d" remote="aosp" name="platform/external/mesa3d" groups="glodroid" revision="9b0960cfe39414815b1dc5a786e6312639f49352" />

<!-- camera components (vendor) -->
<project path="glodroid/vendor/libcamera" remote="libcamera" name="libcamera.git" groups="glodroid" revision="960d0c1e19feaf310321c906e14bd5410c6be629" />
Expand All @@ -45,11 +46,14 @@
<project path="glodroid/vendor/glib/subprojects/proxy-libintl" remote="github" name="frida/proxy-libintl.git" groups="glodroid" revision="refs/tags/0.4" />

<!-- other components (vendor) -->
<project path="glodroid/vendor/aospext" remote="glodroid" name="aospext.git" groups="glodroid" revision="03accdcd9e5f4dd08b9d9ad05c7f57ef4137b579" />
<project path="glodroid/vendor/aospext" remote="glodroid" name="aospext.git" groups="glodroid" revision="7f85fd53d7a90239135b27e96643996e31744233" />
<project path="glodroid/vendor/iio-sensors-hal" remote="glodroid" name="glodroid_forks.git" groups="glodroid" revision="refs/tags/iio-sensors-hal-v0.9.0" />
<project path="glodroid/vendor/tinyhal" remote="github" name="CirrusLogic/tinyhal.git" groups="glodroid" revision="9c5df120b33ca51f05d4f997da659111ab63498e" />
<project path="glodroid/vendor/libudev-zero" remote="glodroid" name="glodroid_forks.git" groups="glodroid" revision="refs/tags/libudev_zero-v0.8.2" />

<!-- Downgrade wpa_supplicant to Android-13 commit point. TODO: Remove this when the RPI4 WIFI issue is found/fixed -->
<project path="external/wpa_supplicant_8" remote="aosp" name="platform/external/wpa_supplicant_8" revision="1d9ae9a55470b894973457e3a4892a8820ca1bd7" />

<!-- bootloader components (platform) -->
<project path="glodroid/bootloader/u-boot" remote="github" name="u-boot/u-boot.git" groups="glodroid" revision="487e42f7bc5e685c9337890a38358581bb4f31bc" />
<project path="glodroid/bootloader/atf" name="platform/external/arm-trusted-firmware" groups="glodroid" revision="a127b99d5a063c798d1c6d2e1d4791a630f78355" />
Expand Down
29 changes: 0 additions & 29 deletions patches-aosp/build/soong/0001-GLODROID-Don-t-use-clang-tidy.patch

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
From 13fed80854c281cc7eaf78e5848b10f5becb947a Mon Sep 17 00:00:00 2001
From: Jooyung Han <[email protected]>
Date: Tue, 26 Jul 2022 12:56:00 +0900
Subject: [PATCH 1/3] Add netlink public header library

libwifi-hal-bcm has been using the header via LOCAL_C_INCLUDES. To
convert libwifi-hal-bcm into a Soong module, the header is exposed as a
header lib.

Bug: 239984067
Test: m libwifi-hal-bcm
Merged-In: I92e044565b291c003cff9ac580dd36299fab9851
Change-Id: I92e044565b291c003cff9ac580dd36299fab9851
(cherry picked from commit eb043d58c236676a019ff8579d46b06f83a6daa1)
---
Android.bp | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/Android.bp b/Android.bp
index cbb1a90f..35cdb4f5 100644
--- a/Android.bp
+++ b/Android.bp
@@ -26,3 +26,11 @@ license {
],
license_text: ["LICENSE"],
}
+
+cc_library_headers {
+ name: "libnetlink_iface_headers",
+ vendor_available: true,
+ export_include_dirs: [
+ "src/drivers",
+ ],
+}
--
2.39.2

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From c5ccabd03d222c26b8a255f3e4c9b5ec3a002270 Mon Sep 17 00:00:00 2001
From: Jeongik Cha <[email protected]>
Date: Fri, 18 Nov 2022 15:09:34 +0900
Subject: [PATCH 2/3] Decalre a soong module for hostapd manifest

Bug: 202992812
Bug: 259516259
Test: build
Change-Id: Ibc2b7a0d66f6c07660dee96a6a3f7976687ce18e
---
hostapd/Android.bp | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/hostapd/Android.bp b/hostapd/Android.bp
index 2a252080..3194d369 100644
--- a/hostapd/Android.bp
+++ b/hostapd/Android.bp
@@ -318,3 +318,9 @@ filegroup {
],

}
+
+// This manifest can used by a vendor apex module for hostapd as well.
+filegroup {
+ name: "android.hardware.wifi.hostapd.xml",
+ srcs: ["android.hardware.wifi.hostapd.xml"],
+}
--
2.39.2

Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
From 61b76bf4a6ee2a1b47aea2d47baa22cfe8e43568 Mon Sep 17 00:00:00 2001
From: David Benjamin <[email protected]>
Date: Mon, 13 Jun 2022 12:22:05 -0400
Subject: [PATCH 3/3] Remove a host of incorrect OPENSSL_IS_BORINGSSL ifdefs

The <openssl/buf.h> include is neccessary in both OpenSSL and BoringSSL
because the file uses BUF_MEM (IWYU). It's just that OpenSSL spells it
<openssl/buffer.h>, not matching the type, so use the compatible
spelling.

Additionally all the CHECKED_CAST and manual STACK_OF(T) definitions are
calling into BoringSSL internals that we were only keeping around for
compatible with wpa_supplicant's incorrect use of the APIs. The correct
APIs are simply to just use the same code as OpenSSL and call the
DEFINE_STACK_OF macros.

(tls_openssl_ocsp.c needs to be rewritten entirely later, as the use of
<openssl/asn1t.h> is also quite dangerous, but I've left that alone for
now.)

Test: treehugger
Change-Id: Id923db6513f9e2833854322994aa3a113ee1579d
---
hs20/client/est.c | 28 +++-------------------------
src/crypto/tls_openssl_ocsp.c | 8 +-------
src/utils/http_curl.c | 23 -----------------------
3 files changed, 4 insertions(+), 55 deletions(-)

diff --git a/hs20/client/est.c b/hs20/client/est.c
index 97f91321..c3f27e1e 100644
--- a/hs20/client/est.c
+++ b/hs20/client/est.c
@@ -17,9 +17,7 @@
#include <openssl/x509.h>
#include <openssl/x509v3.h>
#include <openssl/opensslv.h>
-#ifdef OPENSSL_IS_BORINGSSL
-#include <openssl/buf.h>
-#endif /* OPENSSL_IS_BORINGSSL */
+#include <openssl/buffer.h>

#include "common.h"
#include "utils/base64.h"
@@ -220,9 +218,7 @@ typedef struct {
} d;
} AttrOrOID;

-#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(OPENSSL_IS_BORINGSSL)
DEFINE_STACK_OF(AttrOrOID)
-#endif

typedef struct {
int type;
@@ -340,30 +336,13 @@ static void add_csrattrs(struct hs20_osu_client *ctx, CsrAttrs *csrattrs,
if (!csrattrs || ! csrattrs->attrs)
return;

-#ifdef OPENSSL_IS_BORINGSSL
- num = sk_num(CHECKED_CAST(_STACK *, STACK_OF(AttrOrOID) *,
- csrattrs->attrs));
- for (i = 0; i < num; i++) {
- AttrOrOID *ao = sk_value(
- CHECKED_CAST(_STACK *, const STACK_OF(AttrOrOID) *,
- csrattrs->attrs), i);
- switch (ao->type) {
- case 0:
- add_csrattrs_oid(ctx, ao->d.oid, exts);
- break;
- case 1:
- add_csrattrs_attr(ctx, ao->d.attribute, exts);
- break;
- }
- }
-#else /* OPENSSL_IS_BORINGSSL */
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(OPENSSL_IS_BORINGSSL)
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
num = sk_AttrOrOID_num(csrattrs->attrs);
#else
num = SKM_sk_num(AttrOrOID, csrattrs->attrs);
#endif
for (i = 0; i < num; i++) {
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(OPENSSL_IS_BORINGSSL)
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
AttrOrOID *ao = sk_AttrOrOID_value(csrattrs->attrs, i);
#else
AttrOrOID *ao = SKM_sk_value(AttrOrOID, csrattrs->attrs, i);
@@ -377,7 +356,6 @@ static void add_csrattrs(struct hs20_osu_client *ctx, CsrAttrs *csrattrs,
break;
}
}
-#endif /* OPENSSL_IS_BORINGSSL */
}


diff --git a/src/crypto/tls_openssl_ocsp.c b/src/crypto/tls_openssl_ocsp.c
index b570bea0..a74e6f3d 100644
--- a/src/crypto/tls_openssl_ocsp.c
+++ b/src/crypto/tls_openssl_ocsp.c
@@ -216,13 +216,7 @@ ASN1_SEQUENCE(BasicOCSPResponse) = {

IMPLEMENT_ASN1_FUNCTIONS(BasicOCSPResponse);

-#define sk_SingleResponse_num(sk) \
-sk_num(CHECKED_CAST(_STACK *, STACK_OF(SingleResponse) *, sk))
-
-#define sk_SingleResponse_value(sk, i) \
- ((SingleResponse *) \
- sk_value(CHECKED_CAST(_STACK *, STACK_OF(SingleResponse) *, sk), (i)))
-
+DEFINE_STACK_OF(SingleResponse)

static char * mem_bio_to_str(BIO *out)
{
diff --git a/src/utils/http_curl.c b/src/utils/http_curl.c
index 30b07f23..77d5b357 100644
--- a/src/utils/http_curl.c
+++ b/src/utils/http_curl.c
@@ -433,28 +433,6 @@ ASN1_SEQUENCE(LogotypeExtn) = {

IMPLEMENT_ASN1_FUNCTIONS(LogotypeExtn);

-#ifdef OPENSSL_IS_BORINGSSL
-#define sk_LogotypeInfo_num(st) \
-sk_num(CHECKED_CAST(_STACK *, STACK_OF(LogotypeInfo) *, (st)))
-#define sk_LogotypeInfo_value(st, i) (LogotypeInfo *) \
-sk_value(CHECKED_CAST(_STACK *, const STACK_OF(LogotypeInfo) *, (st)), (i))
-#define sk_LogotypeImage_num(st) \
-sk_num(CHECKED_CAST(_STACK *, STACK_OF(LogotypeImage) *, (st)))
-#define sk_LogotypeImage_value(st, i) (LogotypeImage *) \
-sk_value(CHECKED_CAST(_STACK *, const STACK_OF(LogotypeImage) *, (st)), (i))
-#define sk_LogotypeAudio_num(st) \
-sk_num(CHECKED_CAST(_STACK *, STACK_OF(LogotypeAudio) *, (st)))
-#define sk_LogotypeAudio_value(st, i) (LogotypeAudio *) \
-sk_value(CHECK_CAST(_STACK *, const STACK_OF(LogotypeAudio) *, (st)), (i))
-#define sk_HashAlgAndValue_num(st) \
-sk_num(CHECKED_CAST(_STACK *, STACK_OF(HashAlgAndValue) *, (st)))
-#define sk_HashAlgAndValue_value(st, i) (HashAlgAndValue *) \
-sk_value(CHECKED_CAST(_STACK *, const STACK_OF(HashAlgAndValue) *, (st)), (i))
-#define sk_ASN1_IA5STRING_num(st) \
-sk_num(CHECKED_CAST(_STACK *, STACK_OF(ASN1_IA5STRING) *, (st)))
-#define sk_ASN1_IA5STRING_value(st, i) (ASN1_IA5STRING *) \
-sk_value(CHECKED_CAST(_STACK *, const STACK_OF(ASN1_IA5STRING) *, (st)), (i))
-#else /* OPENSSL_IS_BORINGSSL */
#if OPENSSL_VERSION_NUMBER < 0x10100000L
#define sk_LogotypeInfo_num(st) SKM_sk_num(LogotypeInfo, (st))
#define sk_LogotypeInfo_value(st, i) SKM_sk_value(LogotypeInfo, (st), (i))
@@ -473,7 +451,6 @@ DEFINE_STACK_OF(LogotypeAudio)
DEFINE_STACK_OF(HashAlgAndValue)
DEFINE_STACK_OF(ASN1_IA5STRING)
#endif
-#endif /* OPENSSL_IS_BORINGSSL */


static void add_logo(struct http_ctx *ctx, struct http_cert *hcert,
--
2.39.2

Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
From 2be0dae3f8fb3c912edb49dba2f2cd434b8d9401 Mon Sep 17 00:00:00 2001
From: Roman Stratiienko <[email protected]>
Date: Thu, 19 Oct 2023 03:37:01 +0300
Subject: [PATCH] HWUI: Fix deadlock in graphics pipeline

Mutex lock() causes deadlock when the queue is empty.
Regression is caused by b013c8dee3b3e897b3557206f2d6c75b8c9f2f84
For some unknown reason, it is reproduced only on GloDroid :)
So probably some other part of GD is to blame.
Or, it is just a coincidence.

TODO: Do one more investigation attempt.

Change-Id: Ic981947babe62b83032e9ba1630cc0458c228f44
Signed-off-by: Roman Stratiienko <[email protected]>
---
libs/hwui/renderthread/CanvasContext.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index 16b35ffcabac..a9dde31e83e7 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -586,7 +586,11 @@ void CanvasContext::draw(bool solelyTextureViewUpdates) {
// not visible to IRenderPipeline much less FrameInfoVisualizer. And since this is
// the thread we're primarily concerned about being responsive, this being too broad
// shouldn't pose a performance issue.
- std::scoped_lock lock(mFrameMetricsReporterMutex);
+
+// Causes deadlock when the queue is empty. Regression is caused by b013c8dee3b3e897b3557206f2d6c75b8c9f2f84
+// For some unknown reason, it is reproduced only on GloDroid :) So probably some other part of GD is to blame. Or, it is just a coincidence.
+// std::scoped_lock lock(mFrameMetricsReporterMutex);
+
drawResult = mRenderPipeline->draw(frame, windowDirty, dirty, mLightGeometry,
&mLayerUpdateQueue, mContentDrawBounds, mOpaque,
mLightInfo, mRenderNodes, &(profiler()), mBufferParams);
--
2.39.2

Loading