From 2e67df7de2fccf9c838ef81cb341f4fddfe8892b Mon Sep 17 00:00:00 2001 From: Michael Bestas Date: Sat, 13 Aug 2022 04:25:09 +0300 Subject: [PATCH] pantah: Copy touch modules to vendor_kernel_boot Makes touch work in recovery Co-authored-by: LuK1337 Change-Id: Iaa5a158af827732b13ab79b60bed2f319ce56391 --- BoardConfigLineage.mk | 6 ++++++ cheetah/Android.bp | 11 +++++++++++ cheetah/device-lineage.mk | 4 ++++ cheetah/init.recovery.touch.rc | 2 ++ modules.blocklist.vendor_kernel_boot | 2 ++ modules.load.vendor_kernel_boot | 2 ++ panther/Android.bp | 11 +++++++++++ panther/device-lineage.mk | 4 ++++ panther/init.recovery.touch.rc | 2 ++ 9 files changed, 44 insertions(+) create mode 100644 cheetah/Android.bp create mode 100644 cheetah/init.recovery.touch.rc create mode 100644 modules.blocklist.vendor_kernel_boot create mode 100644 modules.load.vendor_kernel_boot create mode 100644 panther/Android.bp create mode 100644 panther/init.recovery.touch.rc diff --git a/BoardConfigLineage.mk b/BoardConfigLineage.mk index eadedb9..4c3a41b 100644 --- a/BoardConfigLineage.mk +++ b/BoardConfigLineage.mk @@ -3,3 +3,9 @@ # SPDX-FileCopyrightText: 2021-2024 The Calyx Institute # SPDX-License-Identifier: Apache-2.0 # + +# Kernel modules +BOARD_VENDOR_KERNEL_RAMDISK_KERNEL_MODULES_BLOCKLIST_FILE := $(DEVICE_PATH)/modules.blocklist.vendor_kernel_boot +BOARD_VENDOR_KERNEL_RAMDISK_KERNEL_MODULES_LOAD_RAW := $(strip $(shell cat $(DEVICE_PATH)/modules.load.vendor_kernel_boot)) +BOARD_VENDOR_KERNEL_RAMDISK_KERNEL_MODULES_LOAD += $(BOARD_VENDOR_KERNEL_RAMDISK_KERNEL_MODULES_LOAD_RAW) +BOARD_VENDOR_KERNEL_RAMDISK_KERNEL_MODULES += $(addprefix $(KERNEL_MODULE_DIR)/, $(notdir $(BOARD_VENDOR_KERNEL_RAMDISK_KERNEL_MODULES_LOAD_RAW))) diff --git a/cheetah/Android.bp b/cheetah/Android.bp new file mode 100644 index 0000000..b0767b0 --- /dev/null +++ b/cheetah/Android.bp @@ -0,0 +1,11 @@ +// +// SPDX-FileCopyrightText: 2024 The LineageOS Project +// SPDX-License-Identifier: Apache-2.0 +// + +prebuilt_etc { + name: "init.recovery.cheetah.touch.rc", + src: "init.recovery.touch.rc", + sub_dir: "init", + recovery: true, +} diff --git a/cheetah/device-lineage.mk b/cheetah/device-lineage.mk index fd82a16..56f79f3 100644 --- a/cheetah/device-lineage.mk +++ b/cheetah/device-lineage.mk @@ -7,3 +7,7 @@ $(call inherit-product, $(DEVICE_PATH)/device-lineage.mk) DEVICE_PACKAGE_OVERLAYS += $(DEVICE_PATH)/$(DEVICE_CODENAME)/overlay-lineage + +# Init +PRODUCT_PACKAGES += \ + init.recovery.cheetah.touch.rc diff --git a/cheetah/init.recovery.touch.rc b/cheetah/init.recovery.touch.rc new file mode 100644 index 0000000..a32a7cd --- /dev/null +++ b/cheetah/init.recovery.touch.rc @@ -0,0 +1,2 @@ +on init + insmod /lib/modules/syna_touch.ko diff --git a/modules.blocklist.vendor_kernel_boot b/modules.blocklist.vendor_kernel_boot new file mode 100644 index 0000000..ad4c864 --- /dev/null +++ b/modules.blocklist.vendor_kernel_boot @@ -0,0 +1,2 @@ +blocklist focal_touch.ko +blocklist syna_touch.ko diff --git a/modules.load.vendor_kernel_boot b/modules.load.vendor_kernel_boot new file mode 100644 index 0000000..dad35a5 --- /dev/null +++ b/modules.load.vendor_kernel_boot @@ -0,0 +1,2 @@ +extra/focal_touch.ko +extra/syna_touch.ko diff --git a/panther/Android.bp b/panther/Android.bp new file mode 100644 index 0000000..88d133b --- /dev/null +++ b/panther/Android.bp @@ -0,0 +1,11 @@ +// +// SPDX-FileCopyrightText: 2024 The LineageOS Project +// SPDX-License-Identifier: Apache-2.0 +// + +prebuilt_etc { + name: "init.recovery.panther.touch.rc", + src: "init.recovery.touch.rc", + sub_dir: "init", + recovery: true, +} diff --git a/panther/device-lineage.mk b/panther/device-lineage.mk index 8480329..2add27e 100644 --- a/panther/device-lineage.mk +++ b/panther/device-lineage.mk @@ -11,3 +11,7 @@ DEVICE_PACKAGE_OVERLAYS += $(DEVICE_PATH)/$(DEVICE_CODENAME)/overlay-lineage # HBM PRODUCT_PACKAGES += \ HbmSVManagerOverlayPanther + +# Init +PRODUCT_PACKAGES += \ + init.recovery.panther.touch.rc diff --git a/panther/init.recovery.touch.rc b/panther/init.recovery.touch.rc new file mode 100644 index 0000000..b2a97c0 --- /dev/null +++ b/panther/init.recovery.touch.rc @@ -0,0 +1,2 @@ +on init + insmod /lib/modules/focal_touch.ko