Skip to content

Commit 72f30de

Browse files
Fix patch application logic in action.yml
1 parent add41d2 commit 72f30de

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

.github/actions/build-kernel/action.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,7 @@ runs:
10131013
patch -p1 --forward --fuzz=3 < "$SUSFS_FOLDER/kernel_patches/KernelSU/10_enable_susfs_for_ksu.patch"
10141014
fi
10151015
;;
1016-
"v1.5.9"|"v1.5.10"|"v1.5.11"|"v1.5.12")
1016+
"v1.5.9"|"v1.5.10"|"v1.5.11"|"v1.5.12")
10171017
if [ "${{ inputs.ksu_type }}" = "KSUN" ]; then
10181018
cd "$KSUN_FOLDER"
10191019
patch -p1 --forward < "$SUSFS_FOLDER/kernel_patches/KernelSU/10_enable_susfs_for_ksu.patch" || true
@@ -1032,7 +1032,6 @@ runs:
10321032
cd "$KSUN_FOLDER"
10331033
patch -p1 --forward < "$SUSFS_FOLDER/kernel_patches/KernelSU/10_enable_susfs_for_ksu.patch" || true
10341034
1035-
# Apply all fix patches directly
10361035
for patch_file in "$KERNEL_PATCHES_FOLDER/next/susfs_fix_patches/$susfs_version"/*.patch; do
10371036
if [ -f "$patch_file" ]; then
10381037
echo "Applying fix patch: $(basename "$patch_file")"
@@ -1049,7 +1048,6 @@ runs:
10491048
cd "$KSUN_FOLDER"
10501049
patch -p1 --forward < "$SUSFS_FOLDER/kernel_patches/KernelSU/10_enable_susfs_for_ksu.patch" || true
10511050
1052-
# Apply all fix patches directly
10531051
for patch_file in "$KERNEL_PATCHES_FOLDER/next/susfs_fix_patches/$susfs_version"/*.patch; do
10541052
if [ -f "$patch_file" ]; then
10551053
echo "Applying fix patch: $(basename "$patch_file")"
@@ -1074,15 +1072,13 @@ runs:
10741072
fi
10751073
fi
10761074
1077-
# Fake kernel patch to fix failures
10781075
fake_patched=0
10791076
if [ "${{ env.ANDROID_VER }}" = "android15" ] && [ "${{ env.KERNEL_VER }}" = "6.6" ]; then
10801077
if ! grep -qxF $'\tunsigned int nr_subpages = __PAGE_SIZE / PAGE_SIZE;' ./fs/proc/task_mmu.c; then
10811078
echo "nr_subpages Line not found. Fake Patching!"
10821079
sed -i -e '/int ret = 0, copied = 0;/a \\tunsigned int nr_subpages \= __PAGE_SIZE \/ PAGE_SIZE;' -e '/int ret = 0, copied = 0;/a \\tpagemap_entry_t \*res = NULL;' ./fs/proc/task_mmu.c
10831080
fake_patched=1
10841081
fi
1085-
10861082
if ! grep -qxF '#include <linux/dma-buf.h>' ./fs/proc/base.c; then
10871083
echo "#include <linux/dma-buf.h> Line not found. Adding missing header"
10881084
sed -i '/#include <linux\/cpufreq_times.h>/a #include <linux\/dma-buf.h>' ./fs/proc/base.c
@@ -1115,7 +1111,6 @@ runs:
11151111
11161112
patch -p1 --forward < "$SUSFS_FOLDER/kernel_patches/50_add_susfs_in_${{ env.SUSFS_KERNEL_BRANCH }}.patch"
11171113
1118-
# Revert Fake kernel patch
11191114
if [ "$fake_patched" = 1 ]; then
11201115
if [ "${{ env.ANDROID_VER }}" = "android15" ] && [ "${{ env.KERNEL_VER }}" = "6.6" ]; then
11211116
if grep -qxF $'\tunsigned int nr_subpages = __PAGE_SIZE / PAGE_SIZE;' ./fs/proc/task_mmu.c; then
@@ -1214,10 +1209,10 @@ runs:
12141209
else
12151210
echo "Hmbird not enabled, skipping fengchi patch"
12161211
fi
1217-
## patch -p1 --forward < "$KERNEL_PATCHES_FOLDER/common/optimized_mem_operations.patch"
1212+
1213+
patch -p1 --forward < "$KERNEL_PATCHES_FOLDER/common/optimized_mem_operations.patch"
12181214
patch -p1 --forward < "$KERNEL_PATCHES_FOLDER/common/file_struct_8bytes_align.patch"
12191215
patch -p1 --forward < "$KERNEL_PATCHES_FOLDER/common/reduce_cache_pressure.patch"
1220-
12211216
patch -p1 --forward < "$KERNEL_PATCHES_FOLDER/common/mem_opt_prefetch.patch"
12221217
12231218
if [ "$(printf '%s\n' "$KERNEL_VERSION" "$MIN_VERSION" | sort -V | tail -n1)" = "$KERNEL_VERSION" ]; then
@@ -1241,7 +1236,6 @@ runs:
12411236
cat "$KERNEL_PATCHES_FOLDER/common/clear_page_16bytes_align.patch" | sed -e 's/SYM_FUNC_START_PI(clear_page)/SYM_FUNC_START_PI(__pi_clear_page)/' | patch -p1 -F3 --forward
12421237
fi
12431238
1244-
12451239
echo "Patching add_limitation_scaling_min_freq.patch"
12461240
patch -p1 -F3 --forward < "$KERNEL_PATCHES_FOLDER/common/add_limitation_scaling_min_freq.patch"
12471241
echo "Patching re_write_limitation_scaling_min_freq.patch"

0 commit comments

Comments
 (0)