Skip to content

Commit 3dc4c74

Browse files
committed
Update KSUN SusFS patches to 1.5.7 and Other features.
1. Update SusFS Patches and release text to v1.5.7. 2. Add Feature to select KSUN Branch. 3. Update Kernel Name from Wild+ to Wild to maintain uniformity with GKI Kernel. 4. Update KSUN Version based on KSUN Branch.
1 parent 4159f06 commit 3dc4c74

File tree

2 files changed

+67
-28
lines changed

2 files changed

+67
-28
lines changed

.github/workflows/build-kernel-release.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,20 @@ on:
1212
required: true
1313
type: boolean
1414
default: true
15+
ksun_branch:
16+
description: "Choose KernelSU Next Branch"
17+
required: true
18+
type: choice
19+
options:
20+
- stable
21+
- next
22+
- next-susfs
23+
- next-susfs-dev
24+
default: stable
1525

1626
jobs:
1727
build-batch-1: # Non Bazel Builds
28+
name: build-batch-1 (${{ matrix.model }}, ${{ matrix.soc }}, ${{ matrix.branch }}, ${{ matrix.manifest }}, ${{ matrix.android_version }}, ${{ matrix.kernel_version }}, ${{ inputs.ksun_branch }})
1829
strategy:
1930
fail-fast: false
2031
matrix:
@@ -70,9 +81,11 @@ jobs:
7081
manifest: ${{ matrix.manifest }}
7182
android_version: ${{ matrix.android_version }}
7283
kernel_version: ${{ matrix.kernel_version }}
84+
ksun_branch: ${{ inputs.ksun_branch }}
7385

7486
build-batch-2:
7587
# needs: build-batch-1
88+
name: build-batch-2 (${{ matrix.model }}, ${{ matrix.soc }}, ${{ matrix.branch }}, ${{ matrix.manifest }}, ${{ matrix.android_version }}, ${{ matrix.kernel_version }}, ${{ inputs.ksun_branch }})
7689
strategy:
7790
fail-fast: false
7891
matrix:
@@ -128,6 +141,7 @@ jobs:
128141
manifest: ${{ matrix.manifest }}
129142
android_version: ${{ matrix.android_version }}
130143
kernel_version: ${{ matrix.kernel_version }}
144+
ksun_branch: ${{ inputs.ksun_branch }}
131145

132146
trigger-release:
133147
needs:
@@ -139,9 +153,9 @@ jobs:
139153
REPO_OWNER: ${{ github.repository_owner }}
140154
REPO_NAME: ${{ github.event.repository.name }}
141155
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
142-
RELEASE_NAME: "*TEST BUILD* OnePlus Kernels With KernelSU Next & SUSFS v1.5.5 *TEST BUILD*"
156+
RELEASE_NAME: "*TEST BUILD* OnePlus Kernels With KernelSU Next & SUSFS v1.5.7 *TEST BUILD*"
143157
RELEASE_NOTES: |
144-
This release contains KernelSU Next and SUSFS v1.5.5
158+
This release contains KernelSU Next and SUSFS v1.5.7
145159
146160
Module:
147161
-> https://github.com/sidex15/ksu_module_susfs
@@ -151,7 +165,7 @@ jobs:
151165
152166
Features:
153167
[+] KernelSU-Next
154-
[+] SUSFS v1.5.5
168+
[+] SUSFS v1.5.7
155169
[+] Wireguard Support
156170
[+] Maphide LineageOS Detections
157171
[+] Futile Maphide for jit-zygote-cache Detections
@@ -165,7 +179,7 @@ jobs:
165179
run: |
166180
LATEST_TAG=$(gh api repos/$REPO_OWNER/$REPO_NAME/tags --jq '.[0].name')
167181
if [ -z "$LATEST_TAG" ]; then
168-
LATEST_TAG="v1.5.5-r0"
182+
LATEST_TAG="v1.5.7-r0"
169183
fi
170184
NEW_TAG=$(echo "$LATEST_TAG" | awk -F'-r' '{suffix=$2; if (!suffix) suffix=0; suffix++; printf "%s-r%d", $1, suffix}')
171185
echo "New tag: $NEW_TAG"

.github/workflows/build.yml

Lines changed: 49 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ on:
2424
kernel_version:
2525
required: true
2626
type: string
27-
27+
ksun_branch:
28+
required: true
29+
type: string
30+
default: stable
31+
2832
jobs:
2933
build-kernel-oneplus-kernelsu-susfs:
3034
runs-on: ubuntu-latest
@@ -89,11 +93,11 @@ jobs:
8993
9094
ANYKERNEL_BRANCH="gki-2.0"
9195
SUSFS_BRANCH="gki-${{ inputs.android_version }}-${{ inputs.kernel_version }}"
92-
96+
9397
# Debug print the branches
9498
echo "Using branch for AnyKernel3: $ANYKERNEL_BRANCH"
9599
echo "Using branch for SUSFS: $SUSFS_BRANCH"
96-
100+
97101
# Clone repositories using the branch names
98102
git clone https://github.com/TheWildJames/AnyKernel3.git -b "$ANYKERNEL_BRANCH"
99103
git clone https://gitlab.com/simonpunk/susfs4ksu.git -b "$SUSFS_BRANCH"
@@ -113,19 +117,20 @@ jobs:
113117
$REPO --version
114118
$REPO --trace sync -c --no-clone-bundle --no-tags --optimized-fetch -j$(nproc --all) --fail-fast
115119
116-
- name: Add KernelSU
120+
- name: Add KernelSU Next
117121
run: |
118122
echo "Changing to configuration directory: $CONFIG..."
119123
cd "$CONFIG/kernel_platform"
120124
121-
echo "Adding KernelSU..."
122-
curl -LSs "https://raw.githubusercontent.com/KernelSU-Next/KernelSU-Next/next/kernel/setup.sh" | bash -s next
125+
echo "Adding KernelSU Next..."
126+
127+
if [ "${{ inputs.ksun_branch }}" == "stable" ]; then
128+
curl -LSs "https://raw.githubusercontent.com/KernelSU-Next/KernelSU-Next/next/kernel/setup.sh" | bash -
129+
else
130+
curl -LSs "https://raw.githubusercontent.com/KernelSU-Next/KernelSU-Next/next/kernel/setup.sh" | bash -s ${{ inputs.ksun_branch }}
131+
fi
123132
124133
git submodule update --init --recursive
125-
cd KernelSU-Next/kernel
126-
KSU_VERSION=$(expr $(/usr/bin/git rev-list --count HEAD) "+" 10200)
127-
echo "KSUVER=$KSU_VERSION" >> $GITHUB_ENV
128-
sed -i "s/DKSU_VERSION=11998/DKSU_VERSION=${KSU_VERSION}/" Makefile
129134
130135
- name: Apply SUSFS Patches
131136
run: |
@@ -141,22 +146,42 @@ jobs:
141146
142147
cd ./KernelSU-Next
143148
144-
echo "Applying next SUSFS patches..."
145-
cp ../../../kernel_patches/next/0001-kernel-patch-susfs-v1.5.5-to-KernelSU-Next-v1.0.5.patch ./
146-
patch -p1 --forward < 0001-kernel-patch-susfs-v1.5.5-to-KernelSU-Next-v1.0.5.patch || true
149+
if [ "${{ inputs.ksun_branch }}" == "stable" ] || [ "${{ inputs.ksun_branch }}" == "next" ]; then
150+
echo "Applying next SUSFS patches..."
151+
cp ../../../kernel_patches/next/kernel-patch-susfs-v1.5.7-to-KernelSU-Next.patch ./ksun_susfs_latest.patch
152+
patch -p1 --forward < ksun_susfs_latest.patch || true
153+
fi
154+
155+
# Determine base version based on branch
156+
if [ "${{ inputs.ksun_branch }}" == "stable" ]; then
157+
BASE_VERSION=10200
158+
elif [ "${{ inputs.ksun_branch }}" == "next" ]; then
159+
BASE_VERSION=10200
160+
elif [ "${{ inputs.ksun_branch }}" == "next-susfs" ]; then
161+
BASE_VERSION=10198
162+
elif [ "${{ inputs.ksun_branch }}" == "next-susfs-dev" ]; then
163+
BASE_VERSION=10198
164+
else
165+
BASE_VERSION=10200
166+
fi
167+
168+
cd ./kernel
169+
KSU_VERSION=$(expr $(/usr/bin/git rev-list --count HEAD) "+" $BASE_VERSION)
170+
echo "KSUVER=$KSU_VERSION" >> $GITHUB_ENV
171+
sed -i "s/DKSU_VERSION=11998/DKSU_VERSION=${KSU_VERSION}/" Makefile
147172
148173
# Change to common directory and apply SUSFS patch
149-
cd ../common
174+
cd ../../common
150175
if [ "${{ inputs.soc }}" == "sun" ]; then
151176
sed -i '/#include <trace\/hooks\/blk.h>/a #include <trace/hooks/fs.h>' ./fs/namespace.c
152177
fi
153178
patch -p1 < 50_add_susfs_in_gki-${{ inputs.android_version }}-${{ inputs.kernel_version }}.patch || true
154179
155-
- name: Apply KSU Hooks
180+
- name: Apply KSUN Hooks
156181
run: |
157182
echo "Changing to configuration directory: $CONFIG..."
158183
cd "$CONFIG/kernel_platform/common"
159-
# Apply additional patch
184+
echo "Applying KSUN Hooks..."
160185
cp ../../../kernel_patches/next/syscall_hooks.patch ./
161186
patch -p1 --fuzz=3 < ./syscall_hooks.patch
162187
@@ -174,7 +199,7 @@ jobs:
174199
cd "$CONFIG/kernel_platform"
175200
176201
echo "Adding configuration settings to gki_defconfig..."
177-
202+
178203
# Add KSU configuration settings
179204
echo "CONFIG_KSU=y" >> ./common/arch/arm64/configs/gki_defconfig
180205
echo "CONFIG_KSU_WITH_KPROBES=n" >> ./common/arch/arm64/configs/gki_defconfig
@@ -207,22 +232,22 @@ jobs:
207232
cd "$CONFIG/kernel_platform"
208233
209234
echo "Running sed commands..."
210-
235+
211236
sed -i 's/CONFIG_LTO=n/CONFIG_LTO=y/' "./common/arch/arm64/configs/gki_defconfig"
212237
sed -i 's/CONFIG_LTO_CLANG_FULL=y/CONFIG_LTO_CLANG_THIN=y/' "./common/arch/arm64/configs/gki_defconfig"
213238
sed -i 's/CONFIG_LTO_CLANG_NONE=y/CONFIG_LTO_CLANG_THIN=y/' "./common/arch/arm64/configs/gki_defconfig"
214239
215240
# Run sed commands for modifications
216241
sed -i 's/check_defconfig//' ./common/build.config.gki
217-
sed -i '$s|echo "\$res"|echo "\$res-Wild+"|' ./common/scripts/setlocalversion
218-
sed -i '$s|echo "\$res"|echo "\$res-Wild+"|' ./msm-kernel/scripts/setlocalversion
219-
sed -i '$s|echo "\$res"|echo "\$res-Wild+"|' ./external/dtc/scripts/setlocalversion
242+
sed -i '$s|echo "\$res"|echo "\$res-Wild"|' ./common/scripts/setlocalversion
243+
sed -i '$s|echo "\$res"|echo "\$res-Wild"|' ./msm-kernel/scripts/setlocalversion
244+
sed -i '$s|echo "\$res"|echo "\$res-Wild"|' ./external/dtc/scripts/setlocalversion
220245
sed -i "/stable_scmversion_cmd/s/-maybe-dirty//g" ./build/kernel/kleaf/impl/stamp.bzl || echo "No stamp.bzl!"
221246
sed -i 's/-dirty//' ./common/scripts/setlocalversion
222247
sed -i 's/-dirty//' ./msm-kernel/scripts/setlocalversion
223248
sed -i 's/-dirty//' ./external/dtc/scripts/setlocalversion
224249
sed -i 's/-dirty//' ./build/kernel/kleaf/workspace_status_stamp.py || echo "No workspace_status_stamp.py!"
225-
250+
226251
sed -i '/echo "LTO $LTO "/i export LTO=thin' ./oplus/build/oplus_setup.sh
227252
sed -i 's/export REPACK_IMG=true/export REPACK_IMG=false/g' ./oplus/build/oplus_setup.sh
228253
@@ -277,7 +302,7 @@ jobs:
277302
run: |
278303
echo "Changing to configuration directory: $CONFIG..."
279304
cd "$CONFIG"
280-
305+
281306
echo "Copying Image"
282307
cp ./out/dist/Image ../AnyKernel3/Image
283308
if [ "${{ inputs.model }}" == "OPAce5Pro" ]; then
@@ -291,7 +316,7 @@ jobs:
291316
run: |
292317
echo "Navigating to AnyKernel3 directory..."
293318
cd ./AnyKernel3
294-
319+
295320
# Zip the files in the AnyKernel3 directory with a new naming convention
296321
ZIP_NAME="${{ inputs.model }}_${{ inputs.android_version }}_${{ inputs.kernel_version }}_Next_SUSFS_AnyKernel3.zip"
297322
echo "Creating zip file $ZIP_NAME..."

0 commit comments

Comments
 (0)