Эх сурвалжийг харах

ci: apply 10_enable_susfs_for_ksu patch for classic KernelSU

TheWildJames 3 долоо хоног өмнө
parent
commit
04c5f406e5

+ 22 - 0
.github/actions/susfs/action.yml

@@ -20,6 +20,10 @@ inputs:
   sublevel:
     description: 'Kernel sublevel'
     required: true
+  root_flavor:
+    description: 'Selected root implementation (classic / next / resukisu). Classic KernelSU (tiann main) needs the 10_enable_susfs_for_ksu patch; other flavors already ship SUSFS.'
+    required: false
+    default: ""
 
 runs:
   using: "composite"
@@ -30,6 +34,24 @@ runs:
         susfs_commit: ${{ inputs.susfs_commit }}
         version: ${{ inputs.version }}
 
+    - name: Enable SUSFS for Classic KernelSU
+      # tiann/KernelSU main does NOT carry SUSFS, so for the classic flavor we
+      # apply the enable patch from susfs4ksu onto the KernelSU checkout.
+      # pershoot dev-susfs (next) and ReSukiSU already include SUSFS, so this is
+      # a no-op for those flavors.
+      if: inputs.root_flavor == 'classic'
+      shell: bash
+      working-directory: ${{ github.workspace }}/kernel/KernelSU
+      run: |
+        set -euo pipefail
+        PATCH="${{ github.workspace }}/susfs4ksu/kernel_patches/KernelSU/10_enable_susfs_for_ksu.patch"
+        if [ ! -f "$PATCH" ]; then
+          echo "Missing 10_enable_susfs_for_ksu.patch at $PATCH" >&2
+          exit 1
+        fi
+        echo "Applying SUSFS enable patch to classic KernelSU checkout (kernel/KernelSU/kernel)"
+        patch -p1 < "$PATCH"
+
     - name: Enable SUSFS Kernel Configs
       uses: ./.github/actions/susfs-config
 

+ 1 - 0
.github/workflows/build.yml

@@ -206,6 +206,7 @@ jobs:
         kernel_version: ${{ inputs.kernel_version }}
         os_patch_level: ${{ inputs.os_patch_level }}
         sublevel: ${{ steps.extract.outputs.sublevel }}
+        root_flavor: ${{ inputs.root_flavor }}
 
     - name: Baseband Guard
       if: (contains(inputs.feature_set, 'BBG') || inputs.feature_set == 'All')