g12: Build kernel modules inline
authorAaron Kling <webgeek1234@gmail.com>
Fri, 25 Jun 2021 05:01:52 +0000 (01:01 -0400)
committerNolen Johnson <johnsonnolen@gmail.com>
Tue, 27 Jul 2021 21:18:36 +0000 (17:18 -0400)
* Edit tee-supplicant to load modules from the correct
  location.

Change-Id: Iaf409805dbdf6c4b4661c4246c3a54d6453e58f5

extract-files.sh
g12.mk
lineage.dependencies

index d591b8e8c6f13e65aff22c60da9b03a472c0a4a8..90a24a0eb76cea332733ef5619771a59d1ddaff0 100755 (executable)
@@ -77,6 +77,9 @@ function blob_fixup() {
         vendor/bin/hw/android.hardware.graphics.allocator@3.0-service)
              "${PATCHELF}" --remove-needed "libhidltransport.so" "${2}"
              ;;
+        vendor/etc/init/tee-supplicant.rc)
+             sed -i s#/vendor/lib/#/vendor/lib/modules/#g "${2}"
+             ;;
      esac
  }
 
diff --git a/g12.mk b/g12.mk
index 0a59478995c6009d2465a1b5f8e727e6221dcecb..b82055f7ab3c31c9d4748aa82b8c60e2ca46d215 100644 (file)
--- a/g12.mk
+++ b/g12.mk
@@ -115,6 +115,12 @@ PRODUCT_COPY_FILES += \
     $(COMMON_PATH)/init-files/init.recovery.amlogic.rc:recovery/root/init.recovery.amlogic.rc \
     $(COMMON_PATH)/init-files/ueventd.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc
 
+## Kernel Modules
+PRODUCT_PACKAGES += \
+    mali \
+    media \
+    optee-module
+
 ## Keymaster
 PRODUCT_PACKAGES += \
     libkeymaster4.vendor \
index 5be7d394f69f65ba3c0a307b5590559d3dbba930..8858252f90a2079bed252159635e411293cf8ace 100644 (file)
@@ -3,6 +3,18 @@
     "repository": "android_kernel_amlogic_linux-4.9",
     "target_path": "device/amlogic/linux-4.9"
   },
+  {
+    "repository": "android_hardware_amlogic_kernel-modules_mali-driver",
+    "target_path": "hardware/amlogic/kernel-modules/mali-driver"
+  },
+  {
+    "repository": "android_hardware_amlogic_kernel-modules_media",
+    "target_path": "hardware/amlogic/kernel-modules/media"
+  },
+  {
+    "repository": "android_hardware_amlogic_kernel-modules_optee",
+    "target_path": "hardware/amlogic/kernel-modules/optee"
+  }
   {
     "repository": "android_hardware_amlogic_tools_dtbtool",
     "target_path": "hardware/amlogic/tools/dtbtool"