Skip to content

Commit d93ea30

Browse files
Add Build Support for KSUN v1.0.7 and some changes inline with GKI Repo. (WildKernels#29)
- Add BBR Support. - Add TTL Target Support. - Add Dynamic Build Date. - Update CONFIG_KSU_WITH_KPROBES to CONFIG_KSU_KPROBES_HOOK. - Fix Tag Issue in Build release.
1 parent c0d7412 commit d93ea30

File tree

2 files changed

+47
-18
lines changed

2 files changed

+47
-18
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,12 @@ jobs:
183183

184184
- name: Generate and Create New Tag
185185
run: |
186+
BASE_TAG="v1.5.7-r0"
186187
LATEST_TAG=$(gh api repos/$REPO_OWNER/$REPO_NAME/tags --jq '.[0].name')
187188
if [ -z "$LATEST_TAG" ]; then
188-
LATEST_TAG="v1.5.7-r0"
189+
LATEST_TAG="$BASE_TAG"
190+
else
191+
LATEST_TAG=$(printf "%s\n%s\n" "$LATEST_TAG" "$BASE_TAG" | sort -rV | head -n1)
189192
fi
190193
NEW_TAG=$(echo "$LATEST_TAG" | awk -F'-r' '{suffix=$2; if (!suffix) suffix=0; suffix++; printf "%s-r%d", $1, suffix}')
191194
echo "New tag: $NEW_TAG"

.github/workflows/build.yml

Lines changed: 43 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -148,22 +148,22 @@ jobs:
148148
149149
if [ "${{ inputs.ksun_branch }}" == "stable" ] || [ "${{ inputs.ksun_branch }}" == "next" ]; then
150150
echo "Applying next SUSFS patches..."
151-
cp ../../../kernel_patches/next/kernel-patch-susfs-v1.5.7-to-KernelSU-Next.patch ./ksun_susfs_latest.patch
151+
cp ../../../kernel_patches/next/0001-kernel-patch-susfs-v1.5.7-to-KernelSU-Next-v1.0.7.patch ./ksun_susfs_latest.patch
152152
patch -p1 --forward < ksun_susfs_latest.patch || true
153153
fi
154154
155155
# 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
156+
case "${{ inputs.ksun_branch }}" in
157+
next|stable)
158+
BASE_VERSION=10200
159+
;;
160+
next-susfs|next-susfs-dev)
161+
BASE_VERSION=10198
162+
;;
163+
*)
164+
BASE_VERSION=10200
165+
;;
166+
esac
167167
168168
cd ./kernel
169169
KSU_VERSION=$(expr $(/usr/bin/git rev-list --count HEAD) "+" $BASE_VERSION)
@@ -193,7 +193,7 @@ jobs:
193193
cp ../../../kernel_patches/69_hide_stuff.patch ./
194194
patch -p1 -F 3 < 69_hide_stuff.patch
195195
196-
- name: Add SUSFS Configuration Settings
196+
- name: Add KernelSU-Next and SUSFS Configuration Settings
197197
run: |
198198
echo "Changing to configuration directory: $CONFIG..."
199199
cd "$CONFIG/kernel_platform"
@@ -202,7 +202,7 @@ jobs:
202202
203203
# Add KSU configuration settings
204204
echo "CONFIG_KSU=y" >> ./common/arch/arm64/configs/gki_defconfig
205-
echo "CONFIG_KSU_WITH_KPROBES=n" >> ./common/arch/arm64/configs/gki_defconfig
205+
echo "CONFIG_KSU_KPROBES_HOOK=n" >> ./common/arch/arm64/configs/gki_defconfig
206206
207207
# Add SUSFS configuration settings
208208
echo "CONFIG_KSU_SUSFS=y" >> ./common/arch/arm64/configs/gki_defconfig
@@ -226,6 +226,31 @@ jobs:
226226
echo "CONFIG_TMPFS_XATTR=y" >> ./common/arch/arm64/configs/gki_defconfig
227227
echo "CONFIG_TMPFS_POSIX_ACL=y" >> ./common/arch/arm64/configs/gki_defconfig
228228
229+
- name: Add BBR Support
230+
run: |
231+
echo "Changing to configuration directory: $CONFIG..."
232+
cd "$CONFIG/kernel_platform"
233+
234+
echo "Adding configuration settings to gki_defconfig..."
235+
echo "CONFIG_TCP_CONG_ADVANCED=y" >> ./common/arch/arm64/configs/gki_defconfig
236+
echo "CONFIG_TCP_CONG_BBR=y" >> ./common/arch/arm64/configs/gki_defconfig
237+
echo "CONFIG_TCP_CONG_BIC=y" >> ./common/arch/arm64/configs/gki_defconfig
238+
echo "CONFIG_TCP_CONG_WESTWOOD=y" >> ./common/arch/arm64/configs/gki_defconfig
239+
echo "CONFIG_TCP_CONG_HTCP=y" >> ./common/arch/arm64/configs/gki_defconfig
240+
241+
echo "CONFIG_NET_SCH_FQ=y" >> ./common/arch/arm64/configs/gki_defconfig
242+
echo "CONFIG_NET_SCH_FQ_CODEL=y" >> ./common/arch/arm64/configs/gki_defconfig
243+
244+
- name: Add TTL Target Support
245+
run: |
246+
echo "Changing to configuration directory: $CONFIG..."
247+
cd "$CONFIG/kernel_platform"
248+
249+
echo "Adding configuration settings to gki_defconfig..."
250+
echo "CONFIG_IP_NF_TARGET_TTL=y" >> ./common/arch/arm64/configs/gki_defconfig
251+
echo "CONFIG_IP6_NF_TARGET_HL=y" >> ./common/arch/arm64/configs/gki_defconfig
252+
echo "CONFIG_IP6_NF_MATCH_HL=y" >> ./common/arch/arm64/configs/gki_defconfig
253+
229254
- name: Run sed and perl Commands
230255
run: |
231256
echo "Changing to configuration directory: $CONFIG..."
@@ -252,10 +277,11 @@ jobs:
252277
sed -i 's/export REPACK_IMG=true/export REPACK_IMG=false/g' ./oplus/build/oplus_setup.sh
253278
254279
# Run perl command to modify UTS_VERSION
255-
perl -pi -e 's{UTS_VERSION="\$\(echo \$UTS_VERSION \$CONFIG_FLAGS \$TIMESTAMP \| cut -b -\$UTS_LEN\)"}{UTS_VERSION="#1 SMP PREEMPT Thu Mar 05 04:20:00 UTC 2025"}' ./common/scripts/mkcompile_h
256-
perl -pi -e 's{UTS_VERSION="\$\(echo \$UTS_VERSION \$CONFIG_FLAGS \$TIMESTAMP \| cut -b -\$UTS_LEN\)"}{UTS_VERSION="#1 SMP PREEMPT Thu Mar 05 04:20:00 UTC 2025"}' ./msm-kernel/scripts/mkcompile_h
280+
DATESTR=$(date -u)
281+
perl -pi -e 's{UTS_VERSION="\$\(echo \$UTS_VERSION \$CONFIG_FLAGS \$TIMESTAMP \| cut -b -\$UTS_LEN\)"}{UTS_VERSION="#1 SMP PREEMPT $DATESTR"}' ./common/scripts/mkcompile_h
282+
perl -pi -e 's{UTS_VERSION="\$\(echo \$UTS_VERSION \$CONFIG_FLAGS \$TIMESTAMP \| cut -b -\$UTS_LEN\)"}{UTS_VERSION="#1 SMP PREEMPT $DATESTR"}' ./msm-kernel/scripts/mkcompile_h
257283
258-
find . -type f -exec sed -i 's/\(make\s\+-C[^\n]*\)\s\+/\1 -j$(nproc) /g' {} +
284+
# find . -type f -exec sed -i 's/\(make\s\+-C[^\n]*\)\s\+/\1 -j$(nproc) /g' {} +
259285
260286
- name: Build the Kernel
261287
run: |

0 commit comments

Comments
 (0)