From 0d497d055beab942757b9b60a24d0c710477f9cd Mon Sep 17 00:00:00 2001 From: Anders Dellien Date: Fri, 4 Jun 2021 14:45:04 +0100 Subject: [PATCH 1/2] Update Android patches for AOSP master as of 18.05.2021 Remove patches that have been merged upstream and add new patches for external/drm_composer and packages/modules/common Signed-off-by: Anders Dellien Change-Id: Ie0e545ca318cd448d6f075a1bb1019442eb7b4ef --- ...amba-bus-support-to-platform-devices.patch | 45 --- .../0001-Add-fvp_mini-launch-target.patch | 325 ------------------ tc0/patches/0001-Add-include-of-fcntl.h.patch | 28 ++ ...roid-buffers-immediately-after-locki.patch | 47 --- ...ooth-not-working-on-the-OnePlus7-Pro.patch | 51 --- ...lowed_deps.txt-to-avoid-build-errors.patch | 32 ++ .../0001-minigbm-komeda-Add-driver.patch | 85 ----- tc0/vendorsetup.sh | 7 +- 8 files changed, 62 insertions(+), 558 deletions(-) delete mode 100644 tc0/patches/0001-Add-amba-bus-support-to-platform-devices.patch delete mode 100644 tc0/patches/0001-Add-fvp_mini-launch-target.patch create mode 100644 tc0/patches/0001-Add-include-of-fcntl.h.patch delete mode 100644 tc0/patches/0001-Don-t-unlock-Android-buffers-immediately-after-locki.patch delete mode 100644 tc0/patches/0001-Revert-Fix-bluetooth-not-working-on-the-OnePlus7-Pro.patch create mode 100644 tc0/patches/0001-Update-allowed_deps.txt-to-avoid-build-errors.patch delete mode 100644 tc0/patches/0001-minigbm-komeda-Add-driver.patch diff --git a/tc0/patches/0001-Add-amba-bus-support-to-platform-devices.patch b/tc0/patches/0001-Add-amba-bus-support-to-platform-devices.patch deleted file mode 100644 index 656cd56..0000000 --- a/tc0/patches/0001-Add-amba-bus-support-to-platform-devices.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 2b44791d16cdb11008ba46e3d37f01d7efe1337d Mon Sep 17 00:00:00 2001 -From: Usama Arif -Date: Fri, 12 Jun 2020 13:45:11 +0100 -Subject: [PATCH] Add amba bus support to platform devices - -AMBA specification from Arm is a freely available open -standard for the connection and management of functional -blocks in a system-on-chip. -AMBA devices create a device kernel object in /sys/devices/platform -and a kernel object of the bus for the respective device in -/sys/bus/amba. For e.g. for pl180 mmc: -device: /sys/devices/platform/1c050000.mmci -bus: /sys/bus/amba/devices/1c050000.mmci - -In first stage init, android creates a symlink from /sys/devices/platform/... -to /dev/block/platform/... for all partitions and then to -/dev/block/by-name for the boot_device used. However this is only done -for devices that "attach" to bus/platform. This patch adds support for -platform devices that attach to bus/amba. - -Signed-off-by: Usama Arif -Change-Id: I9da7456407c4f62335c959502d8b2d16026fddfc ---- - init/devices.cpp | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/init/devices.cpp b/init/devices.cpp -index 159c75e03e..1fa9379403 100644 ---- a/init/devices.cpp -+++ b/init/devices.cpp -@@ -206,8 +206,9 @@ bool DeviceHandler::FindPlatformDevice(std::string path, std::string* platform_d - while (directory != "/" && directory != ".") { - std::string subsystem_link_path; - if (Realpath(directory + "/subsystem", &subsystem_link_path) && -- subsystem_link_path == sysfs_mount_point_ + "/bus/platform") { -- // We need to remove the mount point that we added above before returning. -+ (subsystem_link_path == sysfs_mount_point_ + "/bus/platform" || -+ subsystem_link_path == sysfs_mount_point_ + "/bus/amba")) { -+ // We need to remove the mount point that we added above before returning. - directory.erase(0, sysfs_mount_point_.size()); - *platform_device_path = directory; - return true; --- -2.17.1 - diff --git a/tc0/patches/0001-Add-fvp_mini-launch-target.patch b/tc0/patches/0001-Add-fvp_mini-launch-target.patch deleted file mode 100644 index 39b540a..0000000 --- a/tc0/patches/0001-Add-fvp_mini-launch-target.patch +++ /dev/null @@ -1,325 +0,0 @@ -From 6d952204e0cc797383596a14554481dab08993ec Mon Sep 17 00:00:00 2001 -From: Branislav Rankov -Date: Fri, 3 Jul 2020 15:27:26 +0100 -Subject: [PATCH] Add fvp_mini launch target. - -This target can be booted with the same procedure as fvp, but it -only boots to shell. There are no graphics. Only command line -executables can be used on it. It is therefore much smaller and -much faster to boot. - -Change-Id: Idcc79fe7324edec5a59d2f4b9a9ac98ec2533457 ---- - AndroidProducts.mk | 3 +- - fvp.mk | 11 ++---- - fvp_mini.mk | 57 +++++++++++++++++++++++++++++ - fvpbase/BoardConfig.mk | 4 ++- - fvpbase/README.md | 10 +++++- - fvpbase/mini_network.rc | 19 ++++++++++ - fvpbase/mini_network.sh | 24 +++++++++++++ - fvpbase/sepolicy/file_contexts | 1 + - fvpbase/sepolicy/mini_network.te | 10 ++++++ - minimal_system.mk | 61 ++++++++++++++++++++++++++++++++ - 10 files changed, 189 insertions(+), 11 deletions(-) - create mode 100644 fvp_mini.mk - create mode 100644 fvpbase/mini_network.rc - create mode 100755 fvpbase/mini_network.sh - create mode 100644 fvpbase/sepolicy/mini_network.te - create mode 100644 minimal_system.mk - -diff --git a/AndroidProducts.mk b/AndroidProducts.mk -index 364f4ed..9043718 100644 ---- a/AndroidProducts.mk -+++ b/AndroidProducts.mk -@@ -1,3 +1,4 @@ - PRODUCT_MAKEFILES := \ - $(LOCAL_DIR)/sdk_phone_x86_vendor.mk \ -- $(LOCAL_DIR)/fvp.mk -+ $(LOCAL_DIR)/fvp.mk \ -+ $(LOCAL_DIR)/fvp_mini.mk -diff --git a/fvp.mk b/fvp.mk -index 2f7b36f..7ed5c9d 100644 ---- a/fvp.mk -+++ b/fvp.mk -@@ -1,5 +1,5 @@ - # --# Copyright 2019 The Android Open Source Project -+# Copyright 2020 The Android Open Source Project - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. -@@ -96,11 +96,6 @@ WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY := false - - DEVICE_MANIFEST_FILE := device/generic/goldfish/fvpbase/manifest.xml - --# Normally, the bootloader is supposed to concatenate the Android initramfs --# and the initramfs for the kernel modules and let the kernel combine --# them. However, the bootloader that we're using with FVP (U-Boot) doesn't --# support concatenation, so we implement it in the build system. --droid: $(OUT_DIR)/target/product/$(PRODUCT_DEVICE)/boot/ramdisk.img -+ Use a multilib setup (see fvpbase/BoardConfig.mk). -+FVP_MULTILIB_BUILD := true - --$(OUT_DIR)/target/product/$(PRODUCT_DEVICE)/boot/ramdisk.img: $(OUT_DIR)/target/product/$(PRODUCT_DEVICE)/ramdisk.img $(OUT_DIR)/target/product/$(PRODUCT_DEVICE)/boot/initramfs.img -- gzip -dc $^ > $@ -diff --git a/fvp_mini.mk b/fvp_mini.mk -new file mode 100644 -index 0000000..e0e3721 ---- /dev/null -+++ b/fvp_mini.mk -@@ -0,0 +1,57 @@ -+# -+# Copyright 2020 Arm Ltd. All rights reserved. -+# -+# Licensed under the Apache License, Version 2.0 (the "License"); -+# you may not use this file except in compliance with the License. -+# You may obtain a copy of the License at -+# -+# http://www.apache.org/licenses/LICENSE-2.0 -+# -+# Unless required by applicable law or agreed to in writing, software -+# distributed under the License is distributed on an "AS IS" BASIS, -+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+# See the License for the specific language governing permissions and -+# limitations under the License. -+# -+ -+$(call inherit-product, $(LOCAL_PATH)/minimal_system.mk) -+ -+$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk) -+ -+$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit_only.mk) -+ -+PRODUCT_NAME := fvp_mini -+PRODUCT_DEVICE := fvpbase -+PRODUCT_BRAND := Android -+PRODUCT_MODEL := AOSP on FVP -+PRODUCT_SOONG_NAMESPACES += device/generic/goldfish -+ -+PRODUCT_SHIPPING_API_LEVEL := 29 -+PRODUCT_USE_DYNAMIC_PARTITIONS := true -+PRODUCT_FULL_TREBLE_OVERRIDE := true -+PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS := false -+PRODUCT_BUILD_BOOT_IMAGE := true -+ -+OVERRIDE_TARGET_FLATTEN_APEX := true -+ -+# Use a multilib setup (see fvpbase/BoardConfig.mk). -+FVP_MULTILIB_BUILD ?= true -+ -+PRODUCT_PACKAGES += \ -+ com.android.runtime \ -+ gdbserver \ -+ init_vendor \ -+ ip \ -+ ping \ -+ selinux_policy_nonsystem \ -+ -+PRODUCT_HOST_PACKAGES += \ -+ bind_to_localhost -+ -+PRODUCT_COPY_FILES += \ -+ device/generic/goldfish/fvpbase/fstab.fvpbase:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.fvpbase \ -+ device/generic/goldfish/fvpbase/fstab.fvpbase.initrd:$(TARGET_COPY_OUT_RAMDISK)/fstab.fvpbase \ -+ device/generic/goldfish/fvpbase/init.fvpbase.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.fvpbase.rc \ -+ device/generic/goldfish/fvpbase/mini_network.rc:system/etc/init/mini_network.rc \ -+ device/generic/goldfish/fvpbase/mini_network.sh:/system/bin/mini_network.sh \ -+ device/generic/goldfish/fvpbase/required_images:required_images \ -diff --git a/fvpbase/BoardConfig.mk b/fvpbase/BoardConfig.mk -index 234645e..8d99086 100644 ---- a/fvpbase/BoardConfig.mk -+++ b/fvpbase/BoardConfig.mk -@@ -1,4 +1,4 @@ --# Copyright (C) 2019 The Android Open Source Project -+# Copyright (C) 2020 The Android Open Source Project - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. -@@ -18,11 +18,13 @@ TARGET_ARCH_VARIANT := armv8-a - TARGET_CPU_VARIANT := generic - TARGET_CPU_ABI := arm64-v8a - -+ifeq ($(FVP_MULTILIB_BUILD),true) - TARGET_2ND_ARCH := arm - TARGET_2ND_CPU_ABI := armeabi-v7a - TARGET_2ND_CPU_ABI2 := armeabi - TARGET_2ND_ARCH_VARIANT := armv8-a - TARGET_2ND_CPU_VARIANT := generic -+endif - - include build/make/target/board/BoardConfigMainlineCommon.mk - -diff --git a/fvpbase/README.md b/fvpbase/README.md -index 7a15d7c..d05c7ee 100644 ---- a/fvpbase/README.md -+++ b/fvpbase/README.md -@@ -5,10 +5,18 @@ the ARM Fixed Virtual Platform. - - ``` - . build/envsetup.sh --lunch fvp-eng # or fvp-userdebug -+lunch $TARGET - m - ``` - -+Where $TARGET above is one of: fvp-eng, fvp-userdebug, fvp_mini-eng or fvp_mini-userdebug -+The fvp-* will build a full Android with UI support, while fvp_mini-* will build a small -+subset needed to boot to shell and support command line executables. -+ -+It is possible to disable 32 bit support in fvp_mini-* targets with the following command -+before ``m``: -+`export FVP_MULTILIB_BUILD=false` -+ - Note that running ``m`` requires that the kernel is built first following - the instructions below. - -diff --git a/fvpbase/mini_network.rc b/fvpbase/mini_network.rc -new file mode 100644 -index 0000000..15a13f8 ---- /dev/null -+++ b/fvpbase/mini_network.rc -@@ -0,0 +1,19 @@ -+# -+# Copyright 2020 Arm Ltd. All rights reserved. -+# -+# Licensed under the Apache License, Version 2.0 (the "License"); -+# you may not use this file except in compliance with the License. -+# You may obtain a copy of the License at -+# -+# http://www.apache.org/licenses/LICENSE-2.0 -+# -+# Unless required by applicable law or agreed to in writing, software -+# distributed under the License is distributed on an "AS IS" BASIS, -+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+# See the License for the specific language governing permissions and -+# limitations under the License. -+# -+ -+service mini_network /system/bin/mini_network.sh -+ class core -+ oneshot -diff --git a/fvpbase/mini_network.sh b/fvpbase/mini_network.sh -new file mode 100755 -index 0000000..f2c9067 ---- /dev/null -+++ b/fvpbase/mini_network.sh -@@ -0,0 +1,24 @@ -+#!/system/bin/sh -+# -+# Copyright 2020 Arm Ltd. All rights reserved. -+# -+# Licensed under the Apache License, Version 2.0 (the "License"); -+# you may not use this file except in compliance with the License. -+# You may obtain a copy of the License at -+# -+# http://www.apache.org/licenses/LICENSE-2.0 -+# -+# Unless required by applicable law or agreed to in writing, software -+# distributed under the License is distributed on an "AS IS" BASIS, -+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+# See the License for the specific language governing permissions and -+# limitations under the License. -+# -+ -+# The Android network stack is not included in Nano, so we need to -+# configure the network manually. The configuration below is the same as -+# would be obtained from the fast model's emulated DHCP. -+ -+ip address add 172.20.51.1/24 broadcast 172.20.51.255 dev eth0 -+ip link set eth0 up -+ip route add default via 172.20.51.254 -diff --git a/fvpbase/sepolicy/file_contexts b/fvpbase/sepolicy/file_contexts -index 31cea9a..476231c 100644 ---- a/fvpbase/sepolicy/file_contexts -+++ b/fvpbase/sepolicy/file_contexts -@@ -5,3 +5,4 @@ - /vendor/lib(64)?/libEGL_swiftshader\.so u:object_r:same_process_hal_file:s0 - /vendor/lib(64)?/libGLESv1_CM_swiftshader\.so u:object_r:same_process_hal_file:s0 - /vendor/lib(64)?/libGLESv2_swiftshader\.so u:object_r:same_process_hal_file:s0 -+/system/bin/mini_network.sh u:object_r:mini_network_exec:s0 -diff --git a/fvpbase/sepolicy/mini_network.te b/fvpbase/sepolicy/mini_network.te -new file mode 100644 -index 0000000..c330c8c ---- /dev/null -+++ b/fvpbase/sepolicy/mini_network.te -@@ -0,0 +1,10 @@ -+type mini_network, domain, coredomain; -+type mini_network_exec, exec_type, system_file_type, file_type; -+ -+init_daemon_domain(mini_network) -+ -+allow mini_network self:capability net_admin; -+allow mini_network self:netlink_route_socket { bind create getattr nlmsg_write read setopt write }; -+allow mini_network self:udp_socket { create ioctl }; -+allow mini_network shell_exec:file { execute getattr map read }; -+allow mini_network system_file:file execute_no_trans; -diff --git a/minimal_system.mk b/minimal_system.mk -new file mode 100644 -index 0000000..97851eb ---- /dev/null -+++ b/minimal_system.mk -@@ -0,0 +1,61 @@ -+# -+# Copyright 2020 Arm Ltd. All rights reserved. -+# -+# Licensed under the Apache License, Version 2.0 (the "License"); -+# you may not use this file except in compliance with the License. -+# You may obtain a copy of the License at -+# -+# http://www.apache.org/licenses/LICENSE-2.0 -+# -+# Unless required by applicable law or agreed to in writing, software -+# distributed under the License is distributed on an "AS IS" BASIS, -+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+# See the License for the specific language governing permissions and -+# limitations under the License. -+# -+ -+# This file contains system partition contents needed for a minimal -+# Android build that boots to shell. The items here should be present in -+# build/make/target/product/base_system.mk. -+ -+PRODUCT_PACKAGES += \ -+ adbd_system_api \ -+ apexd \ -+ boringssl_self_test \ -+ cgroups.json \ -+ com.android.adbd \ -+ com.android.conscrypt \ -+ debuggerd \ -+ hwservicemanager \ -+ init.environ.rc \ -+ init_system \ -+ libbinder \ -+ libc.bootstrap \ -+ libdl.bootstrap \ -+ libdl_android.bootstrap \ -+ libm.bootstrap \ -+ libstdc++ \ -+ linker \ -+ linkerconfig \ -+ logcat \ -+ logd \ -+ run-as \ -+ selinux_policy_system \ -+ servicemanager \ -+ shell_and_utilities_system \ -+ tombstoned \ -+ vold \ -+ -+PRODUCT_HOST_PACKAGES += \ -+ adb \ -+ -+PRODUCT_COPY_FILES += \ -+ system/core/rootdir/init.usb.rc:system/etc/init/hw/init.usb.rc \ -+ system/core/rootdir/init.usb.configfs.rc:system/etc/init/hw/init.usb.configfs.rc \ -+ system/core/rootdir/etc/hosts:system/etc/hosts -+ -+PRODUCT_SYSTEM_PROPERTIES += debug.atrace.tags.enableflags=0 -+ -+PRODUCT_PACKAGES_DEBUG := \ -+ strace \ -+ su \ --- -2.17.1 - diff --git a/tc0/patches/0001-Add-include-of-fcntl.h.patch b/tc0/patches/0001-Add-include-of-fcntl.h.patch new file mode 100644 index 0000000..4be1cf0 --- /dev/null +++ b/tc0/patches/0001-Add-include-of-fcntl.h.patch @@ -0,0 +1,28 @@ +From 9bad6e749c72900e9f743dd13b939a83241b4c36 Mon Sep 17 00:00:00 2001 +From: Anders Dellien +Date: Mon, 14 Jun 2021 14:38:36 +0100 +Subject: [PATCH] Add include of + +This fixes build errors caused by 'O_RDWR' and 'O_CLOEXEC' missing + +Signed-off-by: Anders Dellien +Change-Id: Ia368cbfabc57117a0ba849b743cfa943a5fad242 +--- + drm/ResourceManager.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drm/ResourceManager.cpp b/drm/ResourceManager.cpp +index fc24aea..5710c9e 100644 +--- a/drm/ResourceManager.cpp ++++ b/drm/ResourceManager.cpp +@@ -22,6 +22,7 @@ + #include + #include + ++#include + #include + + #include "bufferinfo/BufferInfoGetter.h" +-- +2.17.1 + diff --git a/tc0/patches/0001-Don-t-unlock-Android-buffers-immediately-after-locki.patch b/tc0/patches/0001-Don-t-unlock-Android-buffers-immediately-after-locki.patch deleted file mode 100644 index 693a5c4..0000000 --- a/tc0/patches/0001-Don-t-unlock-Android-buffers-immediately-after-locki.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 2b4651f0b27d6b08728f605c84f941e99b9dedfc Mon Sep 17 00:00:00 2001 -From: Peter Collingbourne -Date: Tue, 21 Apr 2020 16:36:54 -0700 -Subject: [PATCH] Don't unlock Android buffers immediately after locking them. - -In some Android gralloc implementations (e.g. minigbm), the lock operation -corresponds to mmap, and unlock corresponds to munmap. This means that -this code was previously returning an unusable buffer in the case where -lockInternal is called passing LOCK_UNLOCKED (e.g. the mipmap buffer -initializer in Sampler.cpp), resulting in segfaults later on. - -To prevent this from happening, don't unlock the native buffer and just leak -the reference. - -Bug: b/142352330 -Change-Id: I553801f32978c1d0af4597baad374381585e78ad -Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/44168 -Reviewed-by: Lingfeng Yang -Reviewed-by: Chris Forbes -Reviewed-by: Nicolas Capens -Presubmit-Ready: Peter Collingbourne -Tested-by: Nicolas Capens ---- - src/OpenGL/common/Image.hpp | 7 ------- - 1 file changed, 7 deletions(-) - -diff --git a/src/OpenGL/common/Image.hpp b/src/OpenGL/common/Image.hpp -index 1a1dfd743..abad4af15 100644 ---- a/src/OpenGL/common/Image.hpp -+++ b/src/OpenGL/common/Image.hpp -@@ -302,13 +302,6 @@ private: - - // Lock the ANativeWindowBuffer and use its address. - data = lockNativeBuffer(GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN); -- -- if(lock == sw::LOCK_UNLOCKED) -- { -- // We're never going to get a corresponding unlock, so unlock -- // immediately. This keeps the gralloc reference counts sane. -- unlockNativeBuffer(); -- } - } - - return data; --- -2.17.1 - diff --git a/tc0/patches/0001-Revert-Fix-bluetooth-not-working-on-the-OnePlus7-Pro.patch b/tc0/patches/0001-Revert-Fix-bluetooth-not-working-on-the-OnePlus7-Pro.patch deleted file mode 100644 index 4cc69ea..0000000 --- a/tc0/patches/0001-Revert-Fix-bluetooth-not-working-on-the-OnePlus7-Pro.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 11e63fba60b2ea64d17fceb7cea8a595243ddb04 Mon Sep 17 00:00:00 2001 -From: Usama Arif -Date: Thu, 18 Mar 2021 18:55:25 +0000 -Subject: [PATCH] Revert "Fix bluetooth not working on the OnePlus7 Pro." - -This reverts commit 74b8bd1ee30d1b4d1a94a29be085b697db209d9f. ---- - xr/packages/BluetoothQtiSymlink/Android.mk | 20 -------------------- - xr/products/experimental_google_xr.mk | 1 - - 2 files changed, 21 deletions(-) - delete mode 100644 xr/packages/BluetoothQtiSymlink/Android.mk - -diff --git a/xr/packages/BluetoothQtiSymlink/Android.mk b/xr/packages/BluetoothQtiSymlink/Android.mk -deleted file mode 100644 -index b25835a..0000000 ---- a/xr/packages/BluetoothQtiSymlink/Android.mk -+++ /dev/null -@@ -1,20 +0,0 @@ --# --# This is a workaround for Bluetooth not working on OnePlus7 Pro. See b/139486342 --# -- --LOCAL_PATH := $(call my-dir) -- --include $(CLEAR_VARS) -- --LOCAL_MODULE := BluetoothQtiSymlink -- --lib_dir := $(PRODUCT_OUT)/system/lib --bluetooth_qti := libbluetooth_qti.so --bluetooth := libbluetooth.so --bluetooth_qti_path := $(lib_dir)/$(bluetooth_qti) --bluetooth_path := $(lib_dir)/$(bluetooth) -- --$(bluetooth_qti_path): $(bluetooth_path) -- cd $(lib_dir) && ln -sf $(bluetooth) $(bluetooth_qti) -- --droid: $(bluetooth_qti_path) -diff --git a/xr/products/experimental_google_xr.mk b/xr/products/experimental_google_xr.mk -index 999b719..f354fe4 100644 ---- a/xr/products/experimental_google_xr.mk -+++ b/xr/products/experimental_google_xr.mk -@@ -48,5 +48,4 @@ PRODUCT_PACKAGES += \ - VrInputMethodIme \ - VrHeadsetPowerPolicy \ - pps-tool.sh \ -- BluetoothQtiSymlink \ - --- -2.17.1 - diff --git a/tc0/patches/0001-Update-allowed_deps.txt-to-avoid-build-errors.patch b/tc0/patches/0001-Update-allowed_deps.txt-to-avoid-build-errors.patch new file mode 100644 index 0000000..35e53a6 --- /dev/null +++ b/tc0/patches/0001-Update-allowed_deps.txt-to-avoid-build-errors.patch @@ -0,0 +1,32 @@ +From 4675de8ef8f42df61dfdc06e678dec825c0f5c49 Mon Sep 17 00:00:00 2001 +From: Anders Dellien +Date: Thu, 15 Jul 2021 17:34:27 +0100 +Subject: [PATCH] Update allowed_deps.txt to avoid build errors + +--- + build/allowed_deps.txt | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/build/allowed_deps.txt b/build/allowed_deps.txt +index 47331ca..f2594c6 100644 +--- a/build/allowed_deps.txt ++++ b/build/allowed_deps.txt +@@ -245,6 +245,7 @@ libbacktrace_headers(minSdkVersion:apex_inherit) + libbase(minSdkVersion:29) + libbase_headers(minSdkVersion:29) + libbase_ndk(minSdkVersion:29) ++libbinder(minSdkVersion:29) + libbinder_headers(minSdkVersion:29) + libbinder_headers_platform_shared(minSdkVersion:29) + libbinderthreadstateutils(minSdkVersion:29) +@@ -414,6 +415,7 @@ libstagefright_amrwbdec(minSdkVersion:29) + libstagefright_amrwbenc(minSdkVersion:29) + libstagefright_bufferpool@2.0.1(minSdkVersion:29) + libstagefright_bufferqueue_helper(minSdkVersion:29) ++libstagefright_bufferqueue_helper_novndk(minSdkVersion:(no version)) + libstagefright_bufferqueue_helper_novndk(minSdkVersion:29) + libstagefright_enc_common(minSdkVersion:29) + libstagefright_esds(minSdkVersion:29) +-- +2.17.1 + diff --git a/tc0/patches/0001-minigbm-komeda-Add-driver.patch b/tc0/patches/0001-minigbm-komeda-Add-driver.patch deleted file mode 100644 index 8061625..0000000 --- a/tc0/patches/0001-minigbm-komeda-Add-driver.patch +++ /dev/null @@ -1,85 +0,0 @@ -From b36482ca73aefffb731837f1580f7b87c73847c8 Mon Sep 17 00:00:00 2001 -From: Anders Dellien -Date: Wed, 10 Jun 2020 10:30:44 +0100 -Subject: [PATCH] minigbm: komeda: Add driver. - -Change-Id: If39605deaef446adf8d6693d760a16c2c3f84649 ---- - Android.bp | 2 +- - drv.c | 2 ++ - komeda.c | 30 ++++++++++++++++++++++++++++++ - 3 files changed, 33 insertions(+), 1 deletion(-) - create mode 100644 komeda.c - -diff --git a/Android.bp b/Android.bp -index 63a50f7..c72f66b 100644 ---- a/Android.bp -+++ b/Android.bp -@@ -34,7 +34,7 @@ cc_defaults { - "vc4.c", - "vgem.c", - "virtio_gpu.c", -- -+ "komeda.c", - "cros_gralloc/cros_gralloc_buffer.cc", - "cros_gralloc/cros_gralloc_driver.cc", - "cros_gralloc/cros_gralloc_helpers.cc", -diff --git a/drv.c b/drv.c -index 920cf4d..1bb6d50 100644 ---- a/drv.c -+++ b/drv.c -@@ -66,6 +66,7 @@ extern const struct backend backend_vc4; - #endif - extern const struct backend backend_vgem; - extern const struct backend backend_virtio_gpu; -+extern const struct backend backend_komeda; - - static const struct backend *drv_get_backend(int fd) - { -@@ -118,6 +119,7 @@ static const struct backend *drv_get_backend(int fd) - &backend_vc4, - #endif - &backend_vgem, &backend_virtio_gpu, -+ &backend_komeda, - }; - - for (i = 0; i < ARRAY_SIZE(backend_list); i++) { -diff --git a/komeda.c b/komeda.c -new file mode 100644 -index 0000000..e7ded76 ---- /dev/null -+++ b/komeda.c -@@ -0,0 +1,30 @@ -+/* -+ * Copyright 2020 The Chromium OS Authors. All rights reserved. -+ * Use of this source code is governed by a BSD-style license that can be -+ * found in the LICENSE file. -+ */ -+ -+#include "drv_priv.h" -+#include "helpers.h" -+#include "util.h" -+ -+static const uint32_t render_target_formats[] = -+ { DRM_FORMAT_ARGB8888, DRM_FORMAT_XRGB8888, DRM_FORMAT_ABGR8888, DRM_FORMAT_XBGR8888}; -+ -+static int komeda_init(struct driver *drv) -+{ -+ drv_add_combinations(drv, render_target_formats, ARRAY_SIZE(render_target_formats), -+ &LINEAR_METADATA, BO_USE_RENDER_MASK); -+ -+ return drv_modify_linear_combinations(drv); -+} -+ -+const struct backend backend_komeda = { -+ .name = "komeda", -+ .init = komeda_init, -+ .bo_create = drv_dumb_bo_create, -+ .bo_destroy = drv_dumb_bo_destroy, -+ .bo_import = drv_prime_bo_import, -+ .bo_map = drv_dumb_bo_map, -+ .bo_unmap = drv_bo_munmap, -+}; --- -2.17.1 - diff --git a/tc0/vendorsetup.sh b/tc0/vendorsetup.sh index a0388cd..1307a36 100644 --- a/tc0/vendorsetup.sh +++ b/tc0/vendorsetup.sh @@ -33,8 +33,5 @@ function apply_patch { ANDROID_TOP_DIR=$(pwd) PATCHES_DIR=$ANDROID_TOP_DIR/device/arm/tc0/patches -apply_patch "system/core" "0001-Add-amba-bus-support-to-platform-devices.patch" -apply_patch "external/minigbm" "0001-minigbm-komeda-Add-driver.patch" -apply_patch "external/swiftshader" "0001-Don-t-unlock-Android-buffers-immediately-after-locki.patch" -apply_patch "device/generic/goldfish" "0001-Add-fvp_mini-launch-target.patch" -apply_patch "device/google/vrservices/" "0001-Revert-Fix-bluetooth-not-working-on-the-OnePlus7-Pro.patch" +apply_patch "external/drm_hwcomposer" "0001-Add-include-of-fcntl.h.patch" +apply_patch "packages/modules/common" "0001-Update-allowed_deps.txt-to-avoid-build-errors.patch" -- GitLab From b96546597e628c41aed078827f3c24f95133ffbf Mon Sep 17 00:00:00 2001 From: Anders Dellien Date: Wed, 14 Jul 2021 12:07:30 +0100 Subject: [PATCH 2/2] tc0: Enable PAC/BTI Signed-off-by: Anders Dellien Change-Id: I5ae7d66982f66e7cfe682f8238b7cccf7d36c8c1 --- tc0/BoardConfig_common.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc0/BoardConfig_common.mk b/tc0/BoardConfig_common.mk index 562d62f..aa9e866 100644 --- a/tc0/BoardConfig_common.mk +++ b/tc0/BoardConfig_common.mk @@ -19,7 +19,7 @@ TARGET_NO_KERNEL := true TARGET_NO_RECOVERY := true TARGET_ARCH := arm64 -TARGET_ARCH_VARIANT := armv8-a +TARGET_ARCH_VARIANT := armv8-a-branchprot TARGET_CPU_VARIANT := generic TARGET_CPU_ABI := arm64-v8a -- GitLab