Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bore #43

Closed
wants to merge 18 commits into from
Closed

Bore #43

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 0 additions & 43 deletions .github/workflows/clearn-repo.yml

This file was deleted.

207 changes: 100 additions & 107 deletions .github/workflows/gki-kernel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ jobs:
git clone https://github.com/WildPlusKernel/AnyKernel3.git -b "$ANYKERNEL_BRANCH"
git clone https://gitlab.com/simonpunk/susfs4ksu.git -b "$SUSFS_BRANCH"
git clone https://github.com/WildPlusKernel/kernel_patches.git
git clone https://github.com/firelzrd/bore-scheduler.git

- name: Set CONFIG Environment Variable
run: |
Expand Down Expand Up @@ -159,135 +160,84 @@ jobs:
$REPO --version
$REPO --trace sync -c -j$(nproc --all) --no-tags --fail-fast

- name: Determine the branch for KernelSU & MKSU
if: ${{ inputs.kernelsu_variant == 'Official' || inputs.kernelsu_variant == 'MKSU' }}
- name: Determine the branch for KernelSU
run: |
if [[ "${{ inputs.kernelsu_branch }}" == "Stable" ]]; then
echo "BRANCH=-" >> $GITHUB_ENV
elif [[ "${{ inputs.kernelsu_branch }}" == "Dev" ]]; then
echo "BRANCH=-s main" >> $GITHUB_ENV
echo "BRANCH=-" >> $GITHUB_ENV
elif [[ "${{ inputs.kernelsu_branch }}" == "Dev" && ( "${{ inputs.kernelsu_variant }}" == "Official" || "${{ inputs.kernelsu_variant }}" == "MKSU" ) ]]; then
echo "BRANCH=-s main" >> $GITHUB_ENV
elif [[ "${{ inputs.kernelsu_branch }}" == "Dev" && "${{ inputs.kernelsu_variant }}" == "Next" ]]; then
echo "BRANCH=-s main" >> $GITHUB_ENV
elif [[ "${{ inputs.kernelsu_branch }}" == "Other" && -n "${{ inputs.kernelsu_branch_other }}" ]]; then
echo "BRANCH=-s ${{ inputs.kernelsu_branch_other }}" >> $GITHUB_ENV
else
echo "Error: Custom branch not provided for 'Other'" >&2
exit 1
fi

- name: Determine the branch for kernelsu-next
if: ${{ inputs.kernelsu_variant == 'Next' }}
run: |
if [[ "${{ inputs.kernelsu_branch }}" == "Stable" ]]; then
echo "BRANCH=-" >> $GITHUB_ENV
elif [[ "${{ inputs.kernelsu_branch }}" == "Dev" ]]; then
echo "BRANCH=-s next" >> $GITHUB_ENV
elif [[ "${{ inputs.kernelsu_branch }}" == "Other" && -n "${{ inputs.kernelsu_branch_other }}" ]]; then
echo "BRANCH=-s ${{ inputs.kernelsu_branch_other }}" >> $GITHUB_ENV
else
echo "Error: Custom branch not provided for 'Other'" >&2
exit 1
fi

- name: Add KernelSU-Official
if: ${{ inputs.kernelsu_variant == 'Official' }}

- name: Add KernelSU
run: |
echo "Changing to configuration directory: $CONFIG..."
cd "$CONFIG"

echo "Adding KernelSU..."
curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash $BRANCH

- name: Add KernelSU-Next
if: ${{ inputs.kernelsu_variant == 'Next' }}
run: |
echo "Changing to configuration directory: $CONFIG..."
cd "$CONFIG"

echo "Adding KernelSU..."
curl -LSs "https://raw.githubusercontent.com/rifsxd/KernelSU-Next/next/kernel/setup.sh" | bash $BRANCH

- name: Add KernelSU-MKSU
if: ${{ inputs.kernelsu_variant == 'MKSU' }}
run: |
echo "Changing to configuration directory: $CONFIG..."
cd "$CONFIG"

echo "Adding KernelSU..."
curl -LSs "https://raw.githubusercontent.com/5ec1cff/KernelSU/main/kernel/setup.sh" | bash $BRANCH

# Revert commit of remove pts_unix98_lookup_pre
cd KernelSU
git revert -m 1 $(git log --grep="remove devpts hook" --pretty=format:"%h") -n
KSU_VERSION=$(expr $(/usr/bin/git rev-list --count HEAD) "+" 12063)
echo "KSUVER=$KSU_VERSION" >> $GITHUB_ENV
sed -i "s/DKSU_VERSION=16/DKSU_VERSION=${KSU_VERSION}/" kernel/Makefile

- name: Apply SUSFS Patches KernelSU
if: ${{ inputs.kernelsu_variant == 'Official' }}
run: |
echo "Changing to configuration directory: $CONFIG..."
cd "$CONFIG"

echo "Applying SUSFS patches..."

# Copy SUSFS patches
cp ../susfs4ksu/kernel_patches/KernelSU/10_enable_susfs_for_ksu.patch ./KernelSU/
cp ../susfs4ksu/kernel_patches/50_add_susfs_in_gki-${{ inputs.android_version }}-${{ inputs.kernel_version }}.patch ./common/
cp ../susfs4ksu/kernel_patches/fs/* ./common/fs/
cp ../susfs4ksu/kernel_patches/include/linux/* ./common/include/linux/

cd ./KernelSU
echo "Applying SUSFS patches..."
patch -p1 --forward < 10_enable_susfs_for_ksu.patch

# Change to common directory and apply SUSFS patch
cd ../common
patch -p1 < 50_add_susfs_in_gki-${{ inputs.android_version }}-${{ inputs.kernel_version }}.patch || true

- name: Apply SUSFS Patches KernelSU-Next
if: ${{ inputs.kernelsu_variant == 'Next' }}
run: |
echo "Changing to configuration directory: $CONFIG..."
cd "$CONFIG"

echo "Applying SUSFS patches..."

# Copy SUSFS patches
cp ../susfs4ksu/kernel_patches/50_add_susfs_in_gki-${{ inputs.android_version }}-${{ inputs.kernel_version }}.patch ./common/
cp ../susfs4ksu/kernel_patches/fs/* ./common/fs/
cp ../susfs4ksu/kernel_patches/include/linux/* ./common/include/linux/

cd ./KernelSU-Next
echo "Applying next SUSFS patches..."
cp ../../kernel_patches/KernelSU-Next-Implement-SUSFS-v1.5.5-Universal.patch ./
patch -p1 --forward < KernelSU-Next-Implement-SUSFS-v1.5.5-Universal.patch || true

# Change to common directory and apply SUSFS patch
cd ../common
patch -p1 < 50_add_susfs_in_gki-${{ inputs.android_version }}-${{ inputs.kernel_version }}.patch || true
if [ "${{ inputs.kernelsu_variant }}" == "Official" ]; then
echo "Adding KernelSU Official..."
curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash $BRANCH
elif [ "${{ inputs.kernelsu_variant }}" == "Next" ]; then
echo "Adding KernelSU Next..."
curl -LSs "https://raw.githubusercontent.com/rifsxd/KernelSU-Next/next/kernel/setup.sh" | bash $BRANCH
elif [ "${{ inputs.kernelsu_variant }}" == "MKSU" ]; then
echo "Adding KernelSU MKSU..."
curl -LSs "https://raw.githubusercontent.com/5ec1cff/KernelSU/main/kernel/setup.sh" | bash $BRANCH

# Revert commit of remove pts_unix98_lookup_pre
cd KernelSU
git revert -m 1 $(git log --grep="remove devpts hook" --pretty=format:"%h") -n
KSU_VERSION=$(expr $(/usr/bin/git rev-list --count HEAD) "+" 12063)
echo "KSUVER=$KSU_VERSION" >> $GITHUB_ENV
sed -i "s/DKSU_VERSION=16/DKSU_VERSION=${KSU_VERSION}/" kernel/Makefile
else
echo "Invalid KernelSU variant selected!"
exit 1
fi

- name: Apply SUSFS Patches MKSU
if: ${{ inputs.kernelsu_variant == 'MKSU' }}
- name: Apply SUSFS Patches for KernelSU Variants
run: |
echo "Changing to configuration directory: $CONFIG..."
cd "$CONFIG"

echo "Applying SUSFS patches..."

# Copy SUSFS patches
cp ../susfs4ksu/kernel_patches/KernelSU/10_enable_susfs_for_ksu.patch ./KernelSU/
cp ../susfs4ksu/kernel_patches/50_add_susfs_in_gki-${{ inputs.android_version }}-${{ inputs.kernel_version }}.patch ./common/
cp ../susfs4ksu/kernel_patches/fs/* ./common/fs/
cp ../susfs4ksu/kernel_patches/include/linux/* ./common/include/linux/

cd ./KernelSU
echo "Applying SUSFS patches..."
patch -p1 --forward < 10_enable_susfs_for_ksu.patch || true

echo "Applying mksu_susfs.patch"
cp ../../kernel_patches/mksu_susfs.patch ../KernelSU/
patch -p1 < mksu_susfs.patch
if [ "${{ inputs.kernelsu_variant }}" == "Official" ]; then
echo "Applying SUSFS patches for Official KernelSU..."
cp ../susfs4ksu/kernel_patches/KernelSU/10_enable_susfs_for_ksu.patch ./KernelSU/
cd ./KernelSU
patch -p1 --forward < 10_enable_susfs_for_ksu.patch
elif [ "${{ inputs.kernelsu_variant }}" == "Next" ]; then
echo "Applying SUSFS patches for KernelSU-Next..."
cd ./KernelSU-Next
cp ../../kernel_patches/KernelSU-Next-Implement-SUSFS-v1.5.5-Universal.patch ./
patch -p1 --forward < KernelSU-Next-Implement-SUSFS-v1.5.5-Universal.patch || true
elif [ "${{ inputs.kernelsu_variant }}" == "MKSU" ]; then
echo "Applying SUSFS patches for MKSU..."
cp ../susfs4ksu/kernel_patches/KernelSU/10_enable_susfs_for_ksu.patch ./KernelSU/
cd ./KernelSU
patch -p1 --forward < 10_enable_susfs_for_ksu.patch || true

echo "Applying MKSU specific SUSFS patch..."
cp ../../kernel_patches/mksu_susfs.patch ../KernelSU/
patch -p1 < mksu_susfs.patch
else
echo "Invalid KernelSU variant selected!"
exit 1
fi

# Change to common directory and apply SUSFS patch
# Change to common directory and apply common SUSFS patch
cd ../common
patch -p1 < 50_add_susfs_in_gki-${{ inputs.android_version }}-${{ inputs.kernel_version }}.patch || true

Expand All @@ -299,6 +249,49 @@ jobs:
cp ../../kernel_patches/69_hide_stuff.patch ./
patch -p1 -F 3 < 69_hide_stuff.patch

- name: BORE?
run: |
echo "Changing to configuration directory: $CONFIG..."
cd "$CONFIG/common"

if [[ "${{ inputs.kernel_version }}" == "5.10" || ( "${{ inputs.kernel_version }}" == "5.15" && "${{ inputs.android_version }}" == "android13" ) ]]; then
cp ../../kernel_patches/0001-linux5.10.y-bore5.1.0.patch ./
cp ../../kernel_patches/0002-constgran-vanilla-max-android-5.10.patch ./
echo "Patch1"
patch -p1 -F 3 < 0001-linux5.15.y-bore5.1.0.patch
echo "Patch2"
patch -p1 -F 3 < 0002-constgran-vanilla-max-android-5.10.patch

elif [[ "${{ inputs.kernel_version }}" == "5.15" && "${{ inputs.android_version }}" == "android14" && "${{ inputs.sub_level }}" < "144" ]]; then
cp ../../kernel_patches/0001-linux5.15.y-bore5.1.0.patch ./
cp ../../kernel_patches/0002-constgran-vanilla-max-android-5.10.patch ./
echo "Patch1"
patch -p1 -F 3 < 0001-linux5.15.y-bore5.1.0.patch
echo "Patch2"
patch -p1 -F 3 < 0002-constgran-vanilla-max-android-5.10.patch

elif [[ "${{ inputs.kernel_version }}" == "5.15" ]]; then
cp ../../kernel_patches/0001-linux5.15.y-bore5.1.0.patch ./
cp ../../kernel_patches/0002-constgran-vanilla-max-android-5.15.patch ./
echo "Patch1"
patch -p1 -F 3 < 0001-linux5.15.y-bore5.1.0.patch
echo "Patch2"
patch -p1 -F 3 < 0002-constgran-vanilla-max-android-5.15.patch

elif [[ "${{ inputs.kernel_version }}" == "6.1" ]]; then
cp ../../bore-scheduler/patches/legacy/linux-6.1-bore/0001-linux6.1.y-bore5.1.0.patch ./
cp ../../kernel_patches/0002-constgran-vanilla-max-android.patch ./
echo "Patch1"
patch -p1 -F 3 < 0001-linux6.1.y-bore5.1.0.patch
echo "Patch2"
patch -p1 -F 3 < 0002-constgran-vanilla-max-android.patch

elif [[ "${{ inputs.kernel_version }}" == "6.6" ]]; then
cp ../../bore-scheduler/patches/stable/linux-6.6-bore/0001-linux6.6.67-bore5.9.6.patch ./
echo "Patch1"
patch -p1 -F 3 < 0001-linux6.6.67-bore5.9.6.patch
fi

- name: Add SUSFS Configuration Settings
run: |
echo "Changing to configuration directory: $CONFIG..."
Expand All @@ -315,7 +308,7 @@ jobs:
echo "CONFIG_KSU_SUSFS_AUTO_ADD_SUS_KSU_DEFAULT_MOUNT=y" >> ./common/arch/arm64/configs/gki_defconfig
echo "CONFIG_KSU_SUSFS_AUTO_ADD_SUS_BIND_MOUNT=y" >> ./common/arch/arm64/configs/gki_defconfig
echo "CONFIG_KSU_SUSFS_SUS_KSTAT=y" >> ./common/arch/arm64/configs/gki_defconfig
echo "CONFIG_KSU_SUSFS_SUS_OVERLAYFS=y" >> ./common/arch/arm64/configs/gki_defconfig
echo "CONFIG_KSU_SUSFS_SUS_OVERLAYFS=n" >> ./common/arch/arm64/configs/gki_defconfig
echo "CONFIG_KSU_SUSFS_TRY_UMOUNT=y" >> ./common/arch/arm64/configs/gki_defconfig
echo "CONFIG_KSU_SUSFS_AUTO_ADD_TRY_UMOUNT_FOR_BIND_MOUNT=y" >> ./common/arch/arm64/configs/gki_defconfig
echo "CONFIG_KSU_SUSFS_SPOOF_UNAME=y" >> ./common/arch/arm64/configs/gki_defconfig
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/kernel-a12-5.10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ on:
jobs:
build-kernel-a12-5-10-kernelsu-susfs:
strategy:
fail-fast: false
matrix:
include:
- sub_level: "66"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/kernel-a13-5.10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ on:
jobs:
build-kernel-a13-5-10-kernelsu-susfs:
strategy:
fail-fast: false
matrix:
include:
- sub_level: "189"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/kernel-a13-5.15.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ on:
jobs:
build-kernel-a13-5-15-kernelsu-susfs:
strategy:
fail-fast: false
matrix:
include:
- sub_level: "94"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/kernel-a14-5.15.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ on:
jobs:
build-kernel-a14-5-15-kernelsu-susfs:
strategy:
fail-fast: false
matrix:
include:
- sub_level: "131"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/kernel-a14-6.1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ on:
jobs:
build-kernel-a14-6-1-kernelsu-susfs:
strategy:
fail-fast: false
matrix:
include:
- sub_level: "25"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/kernel-a15-6.6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ on:
jobs:
build-kernel-a15-6-6-kernelsu-susfs:
strategy:
fail-fast: false
matrix:
include:
#- sub_level: "30"
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/test_telegram.yml

This file was deleted.

Loading