|
|
@@ -21,9 +21,7 @@ on:
|
|
|
os_patch_level:
|
|
|
required: true
|
|
|
type: string
|
|
|
- kernelsu_variant:
|
|
|
- required: true
|
|
|
- type: string
|
|
|
+
|
|
|
revision:
|
|
|
required: false
|
|
|
type: string
|
|
|
@@ -131,17 +129,8 @@ jobs:
|
|
|
echo "Changing to configuration directory: $CONFIG..."
|
|
|
cd "$CONFIG"
|
|
|
|
|
|
- case "${{ inputs.kernelsu_variant }}" in
|
|
|
- "WKSU")
|
|
|
- echo "Adding WKSU..."
|
|
|
- curl -LSs "https://raw.githubusercontent.com/WildKernels/Wild_KSU/wild/kernel/setup.sh" | bash -s wild
|
|
|
- ;;
|
|
|
- "KSU")
|
|
|
- echo "Adding KernelSU Official..."
|
|
|
- curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -
|
|
|
- ;;
|
|
|
-
|
|
|
- esac
|
|
|
+ echo "Adding WKSU..."
|
|
|
+ curl -LSs "https://raw.githubusercontent.com/WildKernels/Wild_KSU/wild/kernel/setup.sh" | bash -s wild
|
|
|
|
|
|
- name: Apply SUSFS Patches for KernelSU Variants
|
|
|
run: |
|
|
|
@@ -158,55 +147,36 @@ jobs:
|
|
|
cp ../susfs4ksu/kernel_patches/fs/* ./common/fs/
|
|
|
cp ../susfs4ksu/kernel_patches/include/linux/* ./common/include/linux/
|
|
|
|
|
|
- case "${{ inputs.kernelsu_variant }}" in
|
|
|
- "WKSU")
|
|
|
- echo "Applying SUSFS patches for WKSU..."
|
|
|
- cd ./Wild_KSU
|
|
|
- cp ../../susfs4ksu/kernel_patches/KernelSU/10_enable_susfs_for_ksu.patch ./
|
|
|
- patch -p1 --forward < 10_enable_susfs_for_ksu.patch || true
|
|
|
-
|
|
|
- cp ../../kernel_patches/wild/susfs_fix_patches/v1.5.9/fix_core_hook.c.patch ./
|
|
|
- patch -p1 --forward --fuzz=3 < fix_core_hook.c.patch
|
|
|
-
|
|
|
- cp ../../kernel_patches/wild/susfs_fix_patches/v1.5.9/fix_rules.c.patch ./
|
|
|
- patch -p1 --forward < fix_rules.c.patch
|
|
|
-
|
|
|
- cp ../../kernel_patches/wild/susfs_fix_patches/v1.5.9/fix_sucompat.c.patch ./
|
|
|
- patch -p1 --forward < fix_sucompat.c.patch
|
|
|
-
|
|
|
- cp ../../kernel_patches/wild/susfs_fix_patches/v1.5.9/fix_kernel_compat.c.patch ./
|
|
|
- patch -p1 --forward < fix_kernel_compat.c.patch
|
|
|
- ;;
|
|
|
- "KSU")
|
|
|
- echo "Applying SUSFS patches for Official KernelSU..."
|
|
|
- cd ./KernelSU
|
|
|
- cp ../../susfs4ksu/kernel_patches/KernelSU/10_enable_susfs_for_ksu.patch ./
|
|
|
- patch -p1 --forward < 10_enable_susfs_for_ksu.patch
|
|
|
- ;;
|
|
|
+ echo "Applying SUSFS patches for WKSU..."
|
|
|
+ cd ./Wild_KSU
|
|
|
+ cp ../../susfs4ksu/kernel_patches/KernelSU/10_enable_susfs_for_ksu.patch ./
|
|
|
+ patch -p1 --forward < 10_enable_susfs_for_ksu.patch || true
|
|
|
+
|
|
|
+ cp ../../kernel_patches/wild/susfs_fix_patches/v1.5.9/fix_core_hook.c.patch ./
|
|
|
+ patch -p1 --forward --fuzz=3 < fix_core_hook.c.patch
|
|
|
+
|
|
|
+ cp ../../kernel_patches/wild/susfs_fix_patches/v1.5.9/fix_rules.c.patch ./
|
|
|
+ patch -p1 --forward < fix_rules.c.patch
|
|
|
|
|
|
+ cp ../../kernel_patches/wild/susfs_fix_patches/v1.5.9/fix_sucompat.c.patch ./
|
|
|
+ patch -p1 --forward < fix_sucompat.c.patch
|
|
|
|
|
|
- esac
|
|
|
+ cp ../../kernel_patches/wild/susfs_fix_patches/v1.5.9/fix_kernel_compat.c.patch ./
|
|
|
+ patch -p1 --forward < fix_kernel_compat.c.patch
|
|
|
|
|
|
- name: Getting KernelSU Version
|
|
|
run: |
|
|
|
echo "Changing to configuration directory: $CONFIG..."
|
|
|
cd "$CONFIG"
|
|
|
|
|
|
- if [[ "${{ inputs.kernelsu_variant }}" == "WKSU" ]]; then
|
|
|
- echo "Getting KSU Version for WKSU..."
|
|
|
- cd ./Wild_KSU/kernel
|
|
|
- BASE_VERSION=10200
|
|
|
- KSU_VERSION=$(expr $(/usr/bin/git rev-list --count HEAD) "+" $BASE_VERSION)
|
|
|
- elif [[ "${{ inputs.kernelsu_variant }}" == "KSU" ]]; then
|
|
|
- echo "Getting KSU Version for Official KernelSU..."
|
|
|
- # Use the tag version directly for KSU
|
|
|
- KSU_VERSION="${{ env.KSU_REF }}"
|
|
|
- fi
|
|
|
+ echo "Getting KSU Version for WKSU..."
|
|
|
+ cd ./Wild_KSU/kernel
|
|
|
+ BASE_VERSION=10200
|
|
|
+ KSU_VERSION=$(expr $(/usr/bin/git rev-list --count HEAD) "+" $BASE_VERSION)
|
|
|
|
|
|
echo "KSUVER=$KSU_VERSION" >> $GITHUB_ENV
|
|
|
|
|
|
- name: Apply Hooks Patches
|
|
|
- if: ${{ inputs.kernelsu_variant == 'WKSU' }}
|
|
|
run: |
|
|
|
echo "Changing to configuration directory: $CONFIG..."
|
|
|
cd "$CONFIG/common"
|
|
|
@@ -252,9 +222,7 @@ jobs:
|
|
|
# Add KSU configuration settings
|
|
|
echo "CONFIG_KSU=y" >> ./common/arch/arm64/configs/gki_defconfig
|
|
|
|
|
|
- if [ "${{ inputs.kernelsu_variant }}" == "WKSU" ]; then
|
|
|
- echo "CONFIG_KSU_KPROBES_HOOK=n" >> ./common/arch/arm64/configs/gki_defconfig
|
|
|
- fi
|
|
|
+ echo "CONFIG_KSU_KPROBES_HOOK=n" >> ./common/arch/arm64/configs/gki_defconfig
|
|
|
|
|
|
# Add additional tmpfs config setting
|
|
|
echo "CONFIG_TMPFS_XATTR=y" >> ./common/arch/arm64/configs/gki_defconfig
|
|
|
@@ -313,11 +281,7 @@ jobs:
|
|
|
echo "CONFIG_KSU_SUSFS_SPOOF_CMDLINE_OR_BOOTCONFIG=y" >> ./common/arch/arm64/configs/gki_defconfig
|
|
|
echo "CONFIG_KSU_SUSFS_OPEN_REDIRECT=y" >> ./common/arch/arm64/configs/gki_defconfig
|
|
|
|
|
|
- if [ "${{ inputs.kernelsu_variant }}" == "WKSU" ]; then
|
|
|
- echo "CONFIG_KSU_SUSFS_SUS_SU=n" >> ./common/arch/arm64/configs/gki_defconfig
|
|
|
- else
|
|
|
- echo "CONFIG_KSU_SUSFS_SUS_SU=y" >> ./common/arch/arm64/configs/gki_defconfig
|
|
|
- fi
|
|
|
+ echo "CONFIG_KSU_SUSFS_SUS_SU=n" >> ./common/arch/arm64/configs/gki_defconfig
|
|
|
|
|
|
- name: Change Kernel Name
|
|
|
if: ${{ inputs.use_make == false }}
|
|
|
@@ -325,14 +289,14 @@ jobs:
|
|
|
cd "$CONFIG"
|
|
|
if [ -f "build/build.sh" ]; then
|
|
|
perl -pi -e 's/-dirty//' ./common/scripts/setlocalversion
|
|
|
- perl -0777 -pi -e 's/(echo "\$res")(?!.*echo "\$res")/echo "\$res-${{ inputs.kernelsu_variant }}-\$KSUVER-SUSFS-v1.5.9-Wild"/s' ./common/scripts/setlocalversion
|
|
|
+ perl -0777 -pi -e 's/(echo "\$res")(?!.*echo "\$res")/echo "\$res-WKSU-\$KSUVER-SUSFS-v1.5.9-Wild"/s' ./common/scripts/setlocalversion
|
|
|
perl -pi -e 's{UTS_VERSION="\$\(echo \$UTS_VERSION \$CONFIG_FLAGS \$TIMESTAMP \| cut -b -\$UTS_LEN\)"}{UTS_VERSION="#1 SMP PREEMPT Sun Apr 20 04:20:00 UTC 2025"}' ./common/scripts/mkcompile_h
|
|
|
else
|
|
|
#Remove -maybe-dirty
|
|
|
perl -pi -e 's/-maybe-dirty//g' ./build/kernel/kleaf/impl/stamp.bzl
|
|
|
|
|
|
#Set Kernel Name
|
|
|
- echo "CONFIG_LOCALVERSION=\"-${{ inputs.kernelsu_variant }}-$KSUVER-SUSFS-v1.5.9-Wild\"" >> ./common/arch/arm64/configs/gki_defconfig
|
|
|
+ echo "CONFIG_LOCALVERSION=\"-WKSU-$KSUVER-SUSFS-v1.5.9-Wild\"" >> ./common/arch/arm64/configs/gki_defconfig
|
|
|
|
|
|
#Set Kernel Timestamp
|
|
|
perl -pi -e 's/build-timestamp = \$\(or \$\(KBUILD_BUILD_TIMESTAMP\), \$\(build-timestamp-auto\)\)/build-timestamp = "Sun Apr 20 04:20:00 UTC 2025"/' ./common/init/Makefile
|
|
|
@@ -503,14 +467,14 @@ jobs:
|
|
|
|
|
|
# Create ZIP file
|
|
|
cd AnyKernel3
|
|
|
- ZIP_NAME="${{ inputs.kernelsu_variant }}-$KSUVER-${{ inputs.android_version }}-${{ inputs.kernel_version }}.${{ inputs.sub_level }}-${{ inputs.os_patch_level }}-AnyKernel3.zip"
|
|
|
+ ZIP_NAME="WKSU-$KSUVER-${{ inputs.android_version }}-${{ inputs.kernel_version }}.${{ inputs.sub_level }}-${{ inputs.os_patch_level }}-AnyKernel3.zip"
|
|
|
echo "Creating zip file: $ZIP_NAME..."
|
|
|
zip -r "../$ZIP_NAME" ./*
|
|
|
|
|
|
- name: Upload Build Artifacts
|
|
|
uses: actions/upload-artifact@v4
|
|
|
with:
|
|
|
- name: ${{ inputs.kernelsu_variant }}-kernel-${{ env.CONFIG }}
|
|
|
+ name: WKSU-kernel-${{ env.CONFIG }}
|
|
|
path: |
|
|
|
*.zip
|
|
|
*.img.gz
|