You've already forked KernelSU-Next
mirror of
https://github.com/KernelSU-Next/KernelSU-Next.git
synced 2025-08-27 23:46:34 +00:00
ci: replaced KernelSU dir with KernelSU-Next
This commit is contained in:
2
.github/scripts/build_a12.sh
vendored
2
.github/scripts/build_a12.sh
vendored
@@ -51,7 +51,7 @@ build_from_image() {
|
|||||||
echo "[+] Images to upload"
|
echo "[+] Images to upload"
|
||||||
find . -type f -name "*.gz"
|
find . -type f -name "*.gz"
|
||||||
|
|
||||||
# find . -type f -name "*.gz" -exec python3 "$GITHUB_WORKSPACE"/KernelSU/scripts/ksubot.py {} +
|
# find . -type f -name "*.gz" -exec python3 "$GITHUB_WORKSPACE"/KernelSU-Next/scripts/ksubot.py {} +
|
||||||
}
|
}
|
||||||
|
|
||||||
for dir in Image*; do
|
for dir in Image*; do
|
||||||
|
|||||||
2
.github/scripts/build_a13.sh
vendored
2
.github/scripts/build_a13.sh
vendored
@@ -30,7 +30,7 @@ build_from_image() {
|
|||||||
echo '[+] Images to upload'
|
echo '[+] Images to upload'
|
||||||
find . -type f -name "*.gz"
|
find . -type f -name "*.gz"
|
||||||
|
|
||||||
# find . -type f -name "*.gz" -exec python3 "$GITHUB_WORKSPACE"/KernelSU/scripts/ksubot.py {} +
|
# find . -type f -name "*.gz" -exec python3 "$GITHUB_WORKSPACE"/KernelSU-Next/scripts/ksubot.py {} +
|
||||||
}
|
}
|
||||||
|
|
||||||
for dir in Image*; do
|
for dir in Image*; do
|
||||||
|
|||||||
28
.github/workflows/avd-kernel.yml
vendored
28
.github/workflows/avd-kernel.yml
vendored
@@ -51,7 +51,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: KernelSU
|
path: KernelSU-Next
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup need_upload
|
- name: Setup need_upload
|
||||||
@@ -70,37 +70,37 @@ jobs:
|
|||||||
cd $GITHUB_WORKSPACE
|
cd $GITHUB_WORKSPACE
|
||||||
sudo apt-get install repo -y
|
sudo apt-get install repo -y
|
||||||
mkdir android-kernel && cd android-kernel
|
mkdir android-kernel && cd android-kernel
|
||||||
repo init --depth=1 -u https://android.googlesource.com/kernel/manifest -m "$GITHUB_WORKSPACE/KernelSU/.github/manifests/${{ inputs.manifest_name }}" --repo-rev=v2.16
|
repo init --depth=1 -u https://android.googlesource.com/kernel/manifest -m "$GITHUB_WORKSPACE/KernelSU-Next/.github/manifests/${{ inputs.manifest_name }}" --repo-rev=v2.16
|
||||||
repo --version
|
repo --version
|
||||||
repo --trace sync -c -j$(nproc --all) --no-tags
|
repo --trace sync -c -j$(nproc --all) --no-tags
|
||||||
df -h
|
df -h
|
||||||
|
|
||||||
- name: Setup KernelSU
|
- name: Setup KernelSU-Next
|
||||||
env:
|
env:
|
||||||
PATCH_PATH: ${{ inputs.patch_path }}
|
PATCH_PATH: ${{ inputs.patch_path }}
|
||||||
IS_DEBUG_KERNEL: ${{ inputs.debug }}
|
IS_DEBUG_KERNEL: ${{ inputs.debug }}
|
||||||
run: |
|
run: |
|
||||||
cd $GITHUB_WORKSPACE/android-kernel
|
cd $GITHUB_WORKSPACE/android-kernel
|
||||||
echo "[+] KernelSU setup"
|
echo "[+] KernelSU-Next setup"
|
||||||
GKI_ROOT=$(pwd)
|
GKI_ROOT=$(pwd)
|
||||||
echo "[+] GKI_ROOT: $GKI_ROOT"
|
echo "[+] GKI_ROOT: $GKI_ROOT"
|
||||||
echo "[+] Copy KernelSU driver to $GKI_ROOT/common/drivers"
|
echo "[+] Copy KernelSU-Next driver to $GKI_ROOT/common/drivers"
|
||||||
ln -sf $GITHUB_WORKSPACE/KernelSU/kernel $GKI_ROOT/common/drivers/kernelsu
|
ln -sf $GITHUB_WORKSPACE/KernelSU-Next/kernel $GKI_ROOT/common/drivers/kernelsu
|
||||||
echo "[+] Add KernelSU driver to Makefile"
|
echo "[+] Add KernelSU-Next driver to Makefile"
|
||||||
DRIVER_MAKEFILE=$GKI_ROOT/common/drivers/Makefile
|
DRIVER_MAKEFILE=$GKI_ROOT/common/drivers/Makefile
|
||||||
DRIVER_KCONFIG=$GKI_ROOT/common/drivers/Kconfig
|
DRIVER_KCONFIG=$GKI_ROOT/common/drivers/Kconfig
|
||||||
grep -q "kernelsu" "$DRIVER_MAKEFILE" || printf "\nobj-\$(CONFIG_KSU) += kernelsu/\n" >> "$DRIVER_MAKEFILE"
|
grep -q "kernelsu" "$DRIVER_MAKEFILE" || printf "\nobj-\$(CONFIG_KSU) += kernelsu/\n" >> "$DRIVER_MAKEFILE"
|
||||||
grep -q "kernelsu" "$DRIVER_KCONFIG" || sed -i "/endmenu/i\\source \"drivers/kernelsu/Kconfig\"" "$DRIVER_KCONFIG"
|
grep -q "kernelsu" "$DRIVER_KCONFIG" || sed -i "/endmenu/i\\source \"drivers/kernelsu/Kconfig\"" "$DRIVER_KCONFIG"
|
||||||
echo "[+] Apply KernelSU patches"
|
echo "[+] Apply KernelSU-Next patches"
|
||||||
cd $GKI_ROOT/common/ && git apply $GITHUB_WORKSPACE/KernelSU/.github/patches/$PATCH_PATH/*.patch || echo "[-] No patch found"
|
cd $GKI_ROOT/common/ && git apply $GITHUB_WORKSPACE/KernelSU-Next/.github/patches/$PATCH_PATH/*.patch || echo "[-] No patch found"
|
||||||
|
|
||||||
if [ "$IS_DEBUG_KERNEL" = "true" ]; then
|
if [ "$IS_DEBUG_KERNEL" = "true" ]; then
|
||||||
echo "[+] Enable debug features for kernel"
|
echo "[+] Enable debug features for kernel"
|
||||||
printf "\nccflags-y += -DCONFIG_KSU_DEBUG\n" >> $GITHUB_WORKSPACE/KernelSU/kernel/Makefile
|
printf "\nccflags-y += -DCONFIG_KSU_DEBUG\n" >> $GITHUB_WORKSPACE/KernelSU-Next/kernel/Makefile
|
||||||
fi
|
fi
|
||||||
repo status
|
repo status
|
||||||
echo "[+] KernelSU setup done."
|
echo "[+] KernelSU-Next setup done."
|
||||||
cd $GITHUB_WORKSPACE/KernelSU
|
cd $GITHUB_WORKSPACE/KernelSU-Next
|
||||||
VERSION=$(($(git rev-list --count HEAD) + 10200))
|
VERSION=$(($(git rev-list --count HEAD) + 10200))
|
||||||
echo "VERSION: $VERSION"
|
echo "VERSION: $VERSION"
|
||||||
echo "kernelsu_version=$VERSION" >> $GITHUB_ENV
|
echo "kernelsu_version=$VERSION" >> $GITHUB_ENV
|
||||||
@@ -110,8 +110,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
rm common/android/abi_gki_protected_exports_* || echo "No protected exports!"
|
rm common/android/abi_gki_protected_exports_* || echo "No protected exports!"
|
||||||
git config --global user.email "bot@kernelsu.org"
|
git config --global user.email "bot@kernelsu.org"
|
||||||
git config --global user.name "KernelSUBot"
|
git config --global user.name "KernelSU-NextBot"
|
||||||
cd common/ && git add -A && git commit -a -m "Add KernelSU"
|
cd common/ && git add -A && git commit -a -m "Add KernelSU-Next"
|
||||||
repo status
|
repo status
|
||||||
|
|
||||||
- name: Build kernel
|
- name: Build kernel
|
||||||
|
|||||||
6
.github/workflows/build-kernel-a12.yml
vendored
6
.github/workflows/build-kernel-a12.yml
vendored
@@ -55,7 +55,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: KernelSU
|
path: KernelSU-Next
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: List artifacts
|
- name: List artifacts
|
||||||
@@ -94,11 +94,11 @@ jobs:
|
|||||||
export LZ4=$GITHUB_WORKSPACE/build-tools/path/linux-x86/lz4
|
export LZ4=$GITHUB_WORKSPACE/build-tools/path/linux-x86/lz4
|
||||||
export MKBOOTIMG=$GITHUB_WORKSPACE/mkbootimg/mkbootimg.py
|
export MKBOOTIMG=$GITHUB_WORKSPACE/mkbootimg/mkbootimg.py
|
||||||
export UNPACK_BOOTIMG=$GITHUB_WORKSPACE/mkbootimg/unpack_bootimg.py
|
export UNPACK_BOOTIMG=$GITHUB_WORKSPACE/mkbootimg/unpack_bootimg.py
|
||||||
cd $GITHUB_WORKSPACE/KernelSU
|
cd $GITHUB_WORKSPACE/KernelSU-Next
|
||||||
export VERSION=$(($(git rev-list --count HEAD) + 10200))
|
export VERSION=$(($(git rev-list --count HEAD) + 10200))
|
||||||
echo "VERSION: $VERSION"
|
echo "VERSION: $VERSION"
|
||||||
cd -
|
cd -
|
||||||
bash $GITHUB_WORKSPACE/KernelSU/.github/scripts/build_a12.sh
|
bash $GITHUB_WORKSPACE/KernelSU-Next/.github/scripts/build_a12.sh
|
||||||
|
|
||||||
- name: Display structure of boot files
|
- name: Display structure of boot files
|
||||||
run: ls -R
|
run: ls -R
|
||||||
|
|||||||
6
.github/workflows/build-kernel-a13.yml
vendored
6
.github/workflows/build-kernel-a13.yml
vendored
@@ -86,7 +86,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: KernelSU
|
path: KernelSU-Next
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: List artifacts
|
- name: List artifacts
|
||||||
@@ -125,11 +125,11 @@ jobs:
|
|||||||
export LZ4=$GITHUB_WORKSPACE/build-tools/path/linux-x86/lz4
|
export LZ4=$GITHUB_WORKSPACE/build-tools/path/linux-x86/lz4
|
||||||
export MKBOOTIMG=$GITHUB_WORKSPACE/mkbootimg/mkbootimg.py
|
export MKBOOTIMG=$GITHUB_WORKSPACE/mkbootimg/mkbootimg.py
|
||||||
export UNPACK_BOOTIMG=$GITHUB_WORKSPACE/mkbootimg/unpack_bootimg.py
|
export UNPACK_BOOTIMG=$GITHUB_WORKSPACE/mkbootimg/unpack_bootimg.py
|
||||||
cd $GITHUB_WORKSPACE/KernelSU
|
cd $GITHUB_WORKSPACE/KernelSU-Next
|
||||||
export VERSION=$(($(git rev-list --count HEAD) + 10200))
|
export VERSION=$(($(git rev-list --count HEAD) + 10200))
|
||||||
echo "VERSION: $VERSION"
|
echo "VERSION: $VERSION"
|
||||||
cd -
|
cd -
|
||||||
bash $GITHUB_WORKSPACE/KernelSU/.github/scripts/build_a13.sh
|
bash $GITHUB_WORKSPACE/KernelSU-Next/.github/scripts/build_a13.sh
|
||||||
|
|
||||||
- name: Display structure of boot files
|
- name: Display structure of boot files
|
||||||
run: ls -R
|
run: ls -R
|
||||||
|
|||||||
6
.github/workflows/build-kernel-a14.yml
vendored
6
.github/workflows/build-kernel-a14.yml
vendored
@@ -92,7 +92,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: KernelSU
|
path: KernelSU-Next
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: List artifacts
|
- name: List artifacts
|
||||||
@@ -131,11 +131,11 @@ jobs:
|
|||||||
export LZ4=$GITHUB_WORKSPACE/build-tools/path/linux-x86/lz4
|
export LZ4=$GITHUB_WORKSPACE/build-tools/path/linux-x86/lz4
|
||||||
export MKBOOTIMG=$GITHUB_WORKSPACE/mkbootimg/mkbootimg.py
|
export MKBOOTIMG=$GITHUB_WORKSPACE/mkbootimg/mkbootimg.py
|
||||||
export UNPACK_BOOTIMG=$GITHUB_WORKSPACE/mkbootimg/unpack_bootimg.py
|
export UNPACK_BOOTIMG=$GITHUB_WORKSPACE/mkbootimg/unpack_bootimg.py
|
||||||
cd $GITHUB_WORKSPACE/KernelSU
|
cd $GITHUB_WORKSPACE/KernelSU-Next
|
||||||
export VERSION=$(($(git rev-list --count HEAD) + 10200))
|
export VERSION=$(($(git rev-list --count HEAD) + 10200))
|
||||||
echo "VERSION: $VERSION"
|
echo "VERSION: $VERSION"
|
||||||
cd -
|
cd -
|
||||||
bash $GITHUB_WORKSPACE/KernelSU/.github/scripts/build_a13.sh
|
bash $GITHUB_WORKSPACE/KernelSU-Next/.github/scripts/build_a13.sh
|
||||||
|
|
||||||
- name: Display structure of boot files
|
- name: Display structure of boot files
|
||||||
run: ls -R
|
run: ls -R
|
||||||
|
|||||||
6
.github/workflows/build-kernel-a15.yml
vendored
6
.github/workflows/build-kernel-a15.yml
vendored
@@ -50,7 +50,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: KernelSU
|
path: KernelSU-Next
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: List artifacts
|
- name: List artifacts
|
||||||
@@ -89,11 +89,11 @@ jobs:
|
|||||||
export LZ4=$GITHUB_WORKSPACE/build-tools/path/linux-x86/lz4
|
export LZ4=$GITHUB_WORKSPACE/build-tools/path/linux-x86/lz4
|
||||||
export MKBOOTIMG=$GITHUB_WORKSPACE/mkbootimg/mkbootimg.py
|
export MKBOOTIMG=$GITHUB_WORKSPACE/mkbootimg/mkbootimg.py
|
||||||
export UNPACK_BOOTIMG=$GITHUB_WORKSPACE/mkbootimg/unpack_bootimg.py
|
export UNPACK_BOOTIMG=$GITHUB_WORKSPACE/mkbootimg/unpack_bootimg.py
|
||||||
cd $GITHUB_WORKSPACE/KernelSU
|
cd $GITHUB_WORKSPACE/KernelSU-Next
|
||||||
export VERSION=$(($(git rev-list --count HEAD) + 10200))
|
export VERSION=$(($(git rev-list --count HEAD) + 10200))
|
||||||
echo "VERSION: $VERSION"
|
echo "VERSION: $VERSION"
|
||||||
cd -
|
cd -
|
||||||
bash $GITHUB_WORKSPACE/KernelSU/.github/scripts/build_a13.sh
|
bash $GITHUB_WORKSPACE/KernelSU-Next/.github/scripts/build_a13.sh
|
||||||
|
|
||||||
- name: Display structure of boot files
|
- name: Display structure of boot files
|
||||||
run: ls -R
|
run: ls -R
|
||||||
|
|||||||
24
.github/workflows/build-kernel-arcvm.yml
vendored
24
.github/workflows/build-kernel-arcvm.yml
vendored
@@ -65,10 +65,10 @@ jobs:
|
|||||||
sudo ln -s --force /usr/bin/llvm-readelf-$LLVM_VERSION /usr/bin/llvm-readelf
|
sudo ln -s --force /usr/bin/llvm-readelf-$LLVM_VERSION /usr/bin/llvm-readelf
|
||||||
sudo ln -s --force /usr/bin/clang++-$LLVM_VERSION /usr/bin/clang++
|
sudo ln -s --force /usr/bin/clang++-$LLVM_VERSION /usr/bin/clang++
|
||||||
|
|
||||||
- name: Checkout KernelSU
|
- name: Checkout KernelSU-Next
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: KernelSU
|
path: KernelSU-Next
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup kernel source
|
- name: Setup kernel source
|
||||||
@@ -83,31 +83,31 @@ jobs:
|
|||||||
echo "ChromeOS ARCVM Linux kernel version: $VERSION.$PATCHLEVEL.$SUBLEVEL"
|
echo "ChromeOS ARCVM Linux kernel version: $VERSION.$PATCHLEVEL.$SUBLEVEL"
|
||||||
echo "version=$VERSION.$PATCHLEVEL.$SUBLEVEL" >> $GITHUB_ENV
|
echo "version=$VERSION.$PATCHLEVEL.$SUBLEVEL" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Setup KernelSU
|
- name: Setup KernelSU-Next
|
||||||
working-directory: kernel
|
working-directory: kernel
|
||||||
run: |
|
run: |
|
||||||
echo "[+] KernelSU setup"
|
echo "[+] KernelSU-Next setup"
|
||||||
KERNEL_ROOT=$GITHUB_WORKSPACE/kernel
|
KERNEL_ROOT=$GITHUB_WORKSPACE/kernel
|
||||||
echo "[+] KERNEL_ROOT: $KERNEL_ROOT"
|
echo "[+] KERNEL_ROOT: $KERNEL_ROOT"
|
||||||
echo "[+] Copy KernelSU driver to $KERNEL_ROOT/drivers"
|
echo "[+] Copy KernelSU-Next driver to $KERNEL_ROOT/drivers"
|
||||||
ln -sf $GITHUB_WORKSPACE/KernelSU/kernel $KERNEL_ROOT/drivers/kernelsu
|
ln -sf $GITHUB_WORKSPACE/KernelSU-Next/kernel $KERNEL_ROOT/drivers/kernelsu
|
||||||
|
|
||||||
echo "[+] Add KernelSU driver to Makefile"
|
echo "[+] Add KernelSU-Next driver to Makefile"
|
||||||
DRIVER_MAKEFILE=$KERNEL_ROOT/drivers/Makefile
|
DRIVER_MAKEFILE=$KERNEL_ROOT/drivers/Makefile
|
||||||
DRIVER_KCONFIG=$KERNEL_ROOT/drivers/Kconfig
|
DRIVER_KCONFIG=$KERNEL_ROOT/drivers/Kconfig
|
||||||
grep -q "kernelsu" "$DRIVER_MAKEFILE" || printf "\nobj-\$(CONFIG_KSU) += kernelsu/\n" >> "$DRIVER_MAKEFILE"
|
grep -q "kernelsu" "$DRIVER_MAKEFILE" || printf "\nobj-\$(CONFIG_KSU) += kernelsu/\n" >> "$DRIVER_MAKEFILE"
|
||||||
grep -q "kernelsu" "$DRIVER_KCONFIG" || sed -i "/endmenu/i\\source \"drivers/kernelsu/Kconfig\"" "$DRIVER_KCONFIG"
|
grep -q "kernelsu" "$DRIVER_KCONFIG" || sed -i "/endmenu/i\\source \"drivers/kernelsu/Kconfig\"" "$DRIVER_KCONFIG"
|
||||||
|
|
||||||
echo "[+] Apply KernelSU patches"
|
echo "[+] Apply KernelSU-Next patches"
|
||||||
cd $KERNEL_ROOT && git apply $GITHUB_WORKSPACE/KernelSU/.github/patches/5.10/*.patch || echo "[-] No patch found"
|
cd $KERNEL_ROOT && git apply $GITHUB_WORKSPACE/KernelSU-Next/.github/patches/5.10/*.patch || echo "[-] No patch found"
|
||||||
|
|
||||||
echo "[+] Patch script/setlocalversion"
|
echo "[+] Patch script/setlocalversion"
|
||||||
sed -i 's/-dirty//g' $KERNEL_ROOT/scripts/setlocalversion
|
sed -i 's/-dirty//g' $KERNEL_ROOT/scripts/setlocalversion
|
||||||
|
|
||||||
echo "[+] KernelSU setup done."
|
echo "[+] KernelSU-Next setup done."
|
||||||
cd $GITHUB_WORKSPACE/KernelSU
|
cd $GITHUB_WORKSPACE/KernelSU-Next
|
||||||
KSU_VERSION=$(($(git rev-list --count HEAD) + 10200))
|
KSU_VERSION=$(($(git rev-list --count HEAD) + 10200))
|
||||||
echo "KernelSU version: $KSU_VERSION"
|
echo "KernelSU-Next version: $KSU_VERSION"
|
||||||
echo "kernelsu_version=$KSU_VERSION" >> $GITHUB_ENV
|
echo "kernelsu_version=$KSU_VERSION" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Build Kernel
|
- name: Build Kernel
|
||||||
|
|||||||
2
.github/workflows/build-lkm.yml
vendored
2
.github/workflows/build-lkm.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: Build LKM for KernelSU
|
name: Build LKM for KernelSU-Next
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "next" ]
|
branches: [ "next" ]
|
||||||
|
|||||||
28
.github/workflows/gki-kernel.yml
vendored
28
.github/workflows/gki-kernel.yml
vendored
@@ -84,7 +84,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: KernelSU
|
path: KernelSU-Next
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup need_upload
|
- name: Setup need_upload
|
||||||
@@ -115,41 +115,41 @@ jobs:
|
|||||||
repo --trace sync -c -j$(nproc --all) --no-tags
|
repo --trace sync -c -j$(nproc --all) --no-tags
|
||||||
df -h
|
df -h
|
||||||
|
|
||||||
- name: Setup KernelSU
|
- name: Setup KernelSU-Next
|
||||||
env:
|
env:
|
||||||
PATCH_PATH: ${{ inputs.patch_path }}
|
PATCH_PATH: ${{ inputs.patch_path }}
|
||||||
IS_DEBUG_KERNEL: ${{ inputs.debug }}
|
IS_DEBUG_KERNEL: ${{ inputs.debug }}
|
||||||
run: |
|
run: |
|
||||||
cd $GITHUB_WORKSPACE/android-kernel
|
cd $GITHUB_WORKSPACE/android-kernel
|
||||||
echo "[+] KernelSU setup"
|
echo "[+] KernelSU-Next setup"
|
||||||
GKI_ROOT=$(pwd)
|
GKI_ROOT=$(pwd)
|
||||||
echo "[+] GKI_ROOT: $GKI_ROOT"
|
echo "[+] GKI_ROOT: $GKI_ROOT"
|
||||||
echo "[+] Copy KernelSU driver to $GKI_ROOT/common/drivers"
|
echo "[+] Copy KernelSU-Next driver to $GKI_ROOT/common/drivers"
|
||||||
ln -sf $GITHUB_WORKSPACE/KernelSU/kernel $GKI_ROOT/common/drivers/kernelsu
|
ln -sf $GITHUB_WORKSPACE/KernelSU-Next/kernel $GKI_ROOT/common/drivers/kernelsu
|
||||||
echo "[+] Add KernelSU driver to Makefile"
|
echo "[+] Add KernelSU-Next driver to Makefile"
|
||||||
DRIVER_MAKEFILE=$GKI_ROOT/common/drivers/Makefile
|
DRIVER_MAKEFILE=$GKI_ROOT/common/drivers/Makefile
|
||||||
DRIVER_KCONFIG=$GKI_ROOT/common/drivers/Kconfig
|
DRIVER_KCONFIG=$GKI_ROOT/common/drivers/Kconfig
|
||||||
grep -q "kernelsu" "$DRIVER_MAKEFILE" || printf "\nobj-\$(CONFIG_KSU) += kernelsu/\n" >> "$DRIVER_MAKEFILE"
|
grep -q "kernelsu" "$DRIVER_MAKEFILE" || printf "\nobj-\$(CONFIG_KSU) += kernelsu/\n" >> "$DRIVER_MAKEFILE"
|
||||||
grep -q "kernelsu" "$DRIVER_KCONFIG" || sed -i "/endmenu/i\\source \"drivers/kernelsu/Kconfig\"" "$DRIVER_KCONFIG"
|
grep -q "kernelsu" "$DRIVER_KCONFIG" || sed -i "/endmenu/i\\source \"drivers/kernelsu/Kconfig\"" "$DRIVER_KCONFIG"
|
||||||
echo "[+] Apply KernelSU patches"
|
echo "[+] Apply KernelSU-Next patches"
|
||||||
cd $GKI_ROOT/common/ && git apply $GITHUB_WORKSPACE/KernelSU/.github/patches/$PATCH_PATH/*.patch || echo "[-] No patch found"
|
cd $GKI_ROOT/common/ && git apply $GITHUB_WORKSPACE/KernelSU-Next/.github/patches/$PATCH_PATH/*.patch || echo "[-] No patch found"
|
||||||
|
|
||||||
if [ "$IS_DEBUG_KERNEL" = "true" ]; then
|
if [ "$IS_DEBUG_KERNEL" = "true" ]; then
|
||||||
echo "[+] Enable debug features for kernel"
|
echo "[+] Enable debug features for kernel"
|
||||||
printf "\nccflags-y += -DCONFIG_KSU_DEBUG\n" >> $GITHUB_WORKSPACE/KernelSU/kernel/Makefile
|
printf "\nccflags-y += -DCONFIG_KSU_DEBUG\n" >> $GITHUB_WORKSPACE/KernelSU-Next/kernel/Makefile
|
||||||
fi
|
fi
|
||||||
repo status
|
repo status
|
||||||
echo "[+] KernelSU setup done."
|
echo "[+] KernelSU-Next setup done."
|
||||||
|
|
||||||
- name: Symbol magic
|
- name: Symbol magic
|
||||||
run: |
|
run: |
|
||||||
echo "[+] Export all symbol from abi_gki_aarch64.xml"
|
echo "[+] Export all symbol from abi_gki_aarch64.xml"
|
||||||
COMMON_ROOT=$GITHUB_WORKSPACE/android-kernel/common
|
COMMON_ROOT=$GITHUB_WORKSPACE/android-kernel/common
|
||||||
KSU_ROOT=$GITHUB_WORKSPACE/KernelSU
|
KSU_ROOT=$GITHUB_WORKSPACE/KernelSU-Next
|
||||||
ABI_XML=$COMMON_ROOT/android/abi_gki_aarch64.xml
|
ABI_XML=$COMMON_ROOT/android/abi_gki_aarch64.xml
|
||||||
SYMBOL_LIST=$COMMON_ROOT/android/abi_gki_aarch64
|
SYMBOL_LIST=$COMMON_ROOT/android/abi_gki_aarch64
|
||||||
# python3 $KSU_ROOT/scripts/abi_gki_all.py $ABI_XML > $SYMBOL_LIST
|
# python3 $KSU_ROOT/scripts/abi_gki_all.py $ABI_XML > $SYMBOL_LIST
|
||||||
echo "[+] Add KernelSU symbols"
|
echo "[+] Add KernelSU-Next symbols"
|
||||||
cat $KSU_ROOT/kernel/export_symbol.txt | awk '{sub("[ \t]+","");print " "$0}' >> $SYMBOL_LIST
|
cat $KSU_ROOT/kernel/export_symbol.txt | awk '{sub("[ \t]+","");print " "$0}' >> $SYMBOL_LIST
|
||||||
|
|
||||||
- name: Setup ccache
|
- name: Setup ccache
|
||||||
@@ -193,8 +193,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
rm common/android/abi_gki_protected_exports_* || echo "No protected exports!"
|
rm common/android/abi_gki_protected_exports_* || echo "No protected exports!"
|
||||||
git config --global user.email "bot@kernelsu.org"
|
git config --global user.email "bot@kernelsu.org"
|
||||||
git config --global user.name "KernelSUBot"
|
git config --global user.name "KernelSU-NextBot"
|
||||||
cd common/ && git add -A && git commit -a -m "Add KernelSU"
|
cd common/ && git add -A && git commit -a -m "Add KernelSU-Next"
|
||||||
repo status
|
repo status
|
||||||
|
|
||||||
- name: Build Kernel/LKM
|
- name: Build Kernel/LKM
|
||||||
|
|||||||
Reference in New Issue
Block a user