From d6f64450af1a605cf10d2d173d9d0318e3fe7f8d Mon Sep 17 00:00:00 2001 From: Phapoom Saksri Date: Sat, 25 Jan 2025 18:47:18 +0700 Subject: [PATCH] No more ksu fetching/this script better. --- scripts/Kbuild.include | 1 - scripts/fetch-latest-kernelsu.sh | 29 ----------------------------- variables.sh | 1 + 3 files changed, 1 insertion(+), 30 deletions(-) delete mode 100755 scripts/fetch-latest-kernelsu.sh diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index f41ce7ff9fb6..880e1a458e39 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -461,7 +461,6 @@ endif endef # ############################################################################### -$(shell cd "$(srctree)" && ./scripts/fetch-latest-kernelsu.sh) # delete partially updated (i.e. corrupted) files on error .DELETE_ON_ERROR: diff --git a/scripts/fetch-latest-kernelsu.sh b/scripts/fetch-latest-kernelsu.sh deleted file mode 100755 index 6a3a487b97ec..000000000000 --- a/scripts/fetch-latest-kernelsu.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -set -e -exec 9>.kernelsu-fetch-lock -flock -n 9 || exit 0 -[[ $(( $(date +%s) - $(stat -c %Y "drivers/kernelsu/.check" 2>/dev/null || echo 0) )) -gt 86400 ]] || exit 0 - -AUTHOR="galaxybuild-project" -REPO="KernelSU-Next" -VERSION=`curl -s -I -k "https://api.github.com/repos/$AUTHOR/$REPO/commits?sha=next&per_page=1" | sed -n '/^[Ll]ink:/ s/.*"next".*page=\([0-9]*\).*"last".*/\1/p'` - -if [[ -f drivers/kernelsu/.version && *$(cat drivers/kernelsu/.version)* == *$VERSION* ]]; then - touch drivers/kernelsu/.check - exit 0 -fi - -# printf "$REPO updating to $((10000+$VERSION+200))\n" -rm -rf drivers/kernelsu -mkdir -p drivers/kernelsu -cd drivers/kernelsu -wget -q -O - https://github.com/$AUTHOR/$REPO/archive/refs/heads/next.tar.gz | tar -xz --strip=2 "$REPO-next/kernel" -echo $VERSION >> .version -touch .check - -# You can patch for your kernel here -echo "" >> Makefile -sed -i '/warning /d' Makefile -sed -i '/DKSU_VERSION/d' Makefile -echo "ccflags-y += -DKSU_VERSION=$((10000 + $VERSION + 200))" >> Makefile -gawk -i inplace '/11,/{c++;if(c==2||c==3){sub("11,","9,");}}1' sucompat.c diff --git a/variables.sh b/variables.sh index 3ef3543688ff..5bb520127da0 100755 --- a/variables.sh +++ b/variables.sh @@ -90,6 +90,7 @@ patch_kernelsu() { sed -i 's/# CONFIG_KSU_SUSFS_OPEN_REDIRECT is not set/CONFIG_KSU_SUSFS_OPEN_REDIRECT=y/g' "$CUR_DIR"/arch/arm64/configs/exynos9810_temp_defconfig KERNEL_NAME="$KERNEL_NAME-ksu" + curl -sL https://raw.githubusercontent.com/galaxybuild-project/tools/refs/heads/main/Scripts/KernelSU-SuSFS.sh | bash } patch_wifi() {