Browse Source

ci(build): improve module symbol fix patch application logic

Refactor the patch application to handle different kernel versions more effectively. For 6.1 and 6.6 kernels, apply the patch to version.c in the module directory, while maintaining the original behavior for other versions.
TheWildJames 1 năm trước cách đây
mục cha
commit
d31a16b9cc
1 tập tin đã thay đổi với 9 bổ sung4 xóa
  1. 9 4
      .github/workflows/build.yml

+ 9 - 4
.github/workflows/build.yml

@@ -203,11 +203,16 @@ jobs:
           patch -p1 --forward -F 3 < 69_hide_stuff.patch
 
       - name: Apply Module Symbol Version Fix Patch
-        if: ${{ inputs.kernel_version != '6.1' && inputs.kernel_version != '6.6' }}
         run: |
-          cd "$CONFIG/common"
-          curl -s -o module_symbol_fix.patch "https://github.com/Anything-at-25-00/android_kernel_common_android12-5.10/commit/2476d262b597fe8af82cfb7aaf96676f51c6b4ed.patch"
-          patch -p1 --forward < module_symbol_fix.patch
+          if [[ "${{ inputs.kernel_version }}" == "6.1" || "${{ inputs.kernel_version }}" == "6.6" ]]; then
+            cd "$CONFIG/kernel/module"
+            curl -s -o module_symbol_fix.patch "https://github.com/Anything-at-25-00/android_kernel_common_android12-5.10/commit/2476d262b597fe8af82cfb7aaf96676f51c6b4ed.patch"
+            patch -p1 --forward version.c < module_symbol_fix.patch
+          else
+            cd "$CONFIG/common"
+            curl -s -o module_symbol_fix.patch "https://github.com/Anything-at-25-00/android_kernel_common_android12-5.10/commit/2476d262b597fe8af82cfb7aaf96676f51c6b4ed.patch"
+            patch -p1 --forward < module_symbol_fix.patch
+          fi
 
       - name: Fix WiFi and Bluetooth on Samsung 6.6 GKI devices
         if: ${{ ( inputs.kernel_version == '6.6' ) }}