From 0773acc85e5a87a3805e247c9e311043b8560083 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 01:20:38 +0700 Subject: [PATCH 01/77] Create build-kernel.yml --- github/workflows/build-kernel.yml | 329 ++++++++++++++++++++++++++++++ 1 file changed, 329 insertions(+) create mode 100644 github/workflows/build-kernel.yml diff --git a/github/workflows/build-kernel.yml b/github/workflows/build-kernel.yml new file mode 100644 index 0000000000000..b086db4b522c5 --- /dev/null +++ b/github/workflows/build-kernel.yml @@ -0,0 +1,329 @@ +name: Build Redmi 15 (creek) Kernel with KernelSU-Next & SUSFS + +on: + workflow_dispatch: + inputs: + kernel_url: + description: '๐Ÿ”— Kernel source repository URL' + required: false + default: 'https://github.com/MiCode/Xiaomi_Kernel_OpenSource' + type: string + kernel_branch: + description: '๐ŸŒฟ Kernel source branch' + required: false + default: 'creek-v-oss' + type: string + defconfig: + description: 'โš™๏ธ Defconfig name (fragment config name)' + required: false + default: 'creek_GKI-config' + type: string + ksun_branch: + description: '๐ŸŒฑ KernelSU-Next branch' + required: false + default: 'main' + type: choice + options: + - main + - v3.1.0 + use_anykernel3: + description: '๐Ÿ“ฆ Package as AnyKernel3 ZIP?' + required: false + default: true + type: boolean + +env: + KERNEL_PATH: ${{ github.workspace }}/kernel-source + TOOLCHAIN_PATH: ${{ github.workspace }}/toolchain + KSU_NEXT_REPO: 'https://github.com/KernelSU-Next/KernelSU-Next.git' + SUSFS_REPO: 'https://gitlab.com/simonpunk/susfs4ksu.git' + ANYKERNEL3_REPO: 'https://github.com/osm0sis/AnyKernel3' + +jobs: + build: + runs-on: ubuntu-24.04 + steps: + # ============================================ + # 1. Setup Environment + # ============================================ + - name: ๐Ÿงน Optimize runner and install tools + run: | + sudo apt update + sudo apt install -y git make bc bison flex libssl-dev build-essential \ + python3 python3-distutils device-tree-compiler lz4 cpio zip wget curl + sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /opt/hostedtoolcache/CodeQL + + - name: ๐Ÿ”ง Create working directories + run: | + mkdir -p ${{ env.KERNEL_PATH }} + mkdir -p ${{ env.TOOLCHAIN_PATH }} + + # ============================================ + # 2. Download Kernel Source + # ============================================ + - name: ๐Ÿ“ฅ Checkout kernel source + uses: actions/checkout@v4 + with: + repository: ${{ inputs.kernel_url }} + ref: ${{ inputs.kernel_branch }} + path: ${{ env.KERNEL_PATH }} + fetch-depth: 1 + + # ============================================ + # 3. Download Toolchains (Clang + GCC) + # ============================================ + - name: ๐Ÿ”จ Download Clang (AOSP r522817 - Android 14/15/16 compatible) + run: | + cd ${{ env.TOOLCHAIN_PATH }} + wget -q https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+archive/refs/heads/main/r522817/clang-r522817.tar.gz + mkdir clang + tar -xf clang-r522817.tar.gz -C clang + + - name: ๐Ÿ”จ Download GCC (aarch64-linux-android-4.9) + run: | + cd ${{ env.TOOLCHAIN_PATH }} + git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 gcc + + - name: ๐Ÿ”จ Download GCC ARM32 (arm-linux-androideabi-4.9) + run: | + cd ${{ env.TOOLCHAIN_PATH }} + git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9 gcc32 + + # ============================================ + # 4. Prepare Config (Merge Fragment + Base GKI) + # ============================================ + - name: ๐Ÿ”ง Merge fragment config to full defconfig + run: | + cd ${{ env.KERNEL_PATH }} + + # Base GKI defconfig for kernel 5.15 + if [ -f arch/arm64/configs/gki_defconfig ]; then + cp arch/arm64/configs/gki_defconfig arch/arm64/configs/creek_full_defconfig + else + # Fallback: create minimal base + echo "CONFIG_ARCH_BENGAL=y" > arch/arm64/configs/creek_full_defconfig + fi + + # Merge fragment config + if [ -f arch/arm64/configs/${{ inputs.defconfig }} ]; then + cat arch/arm64/configs/${{ inputs.defconfig }} >> arch/arm64/configs/creek_full_defconfig + else + echo "โš ๏ธ Fragment config ${{ inputs.defconfig }} not found, using base only" + fi + + # Remove duplicate lines + sort -u arch/arm64/configs/creek_full_defconfig > arch/arm64/configs/creek_full_defconfig.tmp + mv arch/arm64/configs/creek_full_defconfig.tmp arch/arm64/configs/creek_full_defconfig + + # ============================================ + # 5. Integrate KernelSU-Next (ReSukiSU) + # ============================================ + - name: ๐ŸŒฑ Integrate KernelSU-Next + run: | + cd ${{ env.KERNEL_PATH }} + echo "::group::Integrating KernelSU-Next" + + # Clone KernelSU-Next + git clone --depth=1 -b ${{ inputs.ksun_branch }} ${{ env.KSU_NEXT_REPO }} KernelSU-Next + + # Run KernelSU-Next init script + if [ -f KernelSU-Next/tools/init_kernelsu.sh ]; then + bash KernelSU-Next/tools/init_kernelsu.sh $(pwd) + else + # Manual symlink for GKI + ln -sf $(pwd)/KernelSU-Next/kernel . + fi + + echo "KernelSU-Next integrated successfully" + echo "::endgroup::" + + # ============================================ + # 6. Integrate SUSFS (Root Hiding) + # ============================================ + - name: ๐Ÿ”’ Integrate SUSFS + run: | + cd ${{ env.KERNEL_PATH }} + echo "::group::Integrating SUSFS" + + # Clone SUSFS + git clone --depth=1 ${{ env.SUSFS_REPO }} susfs4ksu + + # Find kernel version + KERNEL_VER=$(make kernelversion 2>/dev/null || echo "5.15") + SUSFS_DIR="susfs4ksu/kernel_patches" + + # Apply SUSFS patches based on kernel version + if [ -d "$SUSFS_DIR/$KERNEL_VER" ]; then + for patch in $(ls $SUSFS_DIR/$KERNEL_VER/*.patch 2>/dev/null); do + echo "Applying patch: $patch" + patch -p1 -N -r - < "$patch" || echo "โš ๏ธ Patch may already be applied" + done + elif [ -d "$SUSFS_DIR/5.15" ]; then + for patch in $(ls $SUSFS_DIR/5.15/*.patch 2>/dev/null); do + echo "Applying patch: $patch" + patch -p1 -N -r - < "$patch" || echo "โš ๏ธ Patch may already be applied" + done + fi + + echo "SUSFS integration completed" + echo "::endgroup::" + + # ============================================ + # 7. Configure Kernel (Enable KSU & SUSFS) + # ============================================ + - name: โš™๏ธ Configure kernel + run: | + cd ${{ env.KERNEL_PATH }} + + export PATH=${{ env.TOOLCHAIN_PATH }}/clang/bin:${{ env.TOOLCHAIN_PATH }}/gcc/bin:${{ env.TOOLCHAIN_PATH }}/gcc32/bin:$PATH + export CLANG_TRIPLE=aarch64-linux-gnu- + export CROSS_COMPILE=aarch64-linux-android- + export CROSS_COMPILE_ARM32=arm-linux-androideabi- + export ARCH=arm64 + + # Generate .config + make O=out ARCH=arm64 creek_full_defconfig + + # Enable KernelSU config + scripts/config --file out/.config -e KSU + + # Enable SUSFS configs + scripts/config --file out/.config -e KSU_SUSFS + scripts/config --file out/.config -e KSU_SUSFS_HAS_MAGIC_MOUNT + scripts/config --file out/.config -e KSU_SUSFS_SUS_PATH + scripts/config --file out/.config -e KSU_SUSFS_SUS_MOUNT + scripts/config --file out/.config -e KSU_SUSFS_AUTO_ADD_SUS_KSU_DEFAULT_MOUNT + scripts/config --file out/.config -e KSU_SUSFS_AUTO_ADD_SUS_BIND_MOUNT + scripts/config --file out/.config -e KSU_SUSFS_SUS_KSTAT + scripts/config --file out/.config -e KSU_SUSFS_TRY_UMOUNT + scripts/config --file out/.config -e KSU_SUSFS_SPOOF_UNAME + scripts/config --file out/.config -e KSU_SUSFS_ENABLE_LOG + scripts/config --file out/.config -e KSU_SUSFS_HIDE_KSU_SUSFS_SYMBOLS + scripts/config --file out/.config -e KSU_SUSFS_SPOOF_CMDLINE_OR_BOOTCONFIG + scripts/config --file out/.config -e KSU_SUSFS_OPEN_REDIRECT + + # Optional: Performance optimization + scripts/config --file out/.config -e CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE + scripts/config --file out/.config --set-val CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE y + scripts/config --file out/.config --set-val CONFIG_CC_OPTIMIZE_FOR_SIZE n + + echo "Final kernel configuration:" + cat out/.config | grep -E "(KSU|SUSFS)" | sort + + # Save final config + cp out/.config arch/arm64/configs/creek_full_defconfig + + # ============================================ + # 8. Build Kernel + # ============================================ + - name: ๐Ÿ—๏ธ Build kernel + run: | + cd ${{ env.KERNEL_PATH }} + + export PATH=${{ env.TOOLCHAIN_PATH }}/clang/bin:${{ env.TOOLCHAIN_PATH }}/gcc/bin:${{ env.TOOLCHAIN_PATH }}/gcc32/bin:$PATH + export CLANG_TRIPLE=aarch64-linux-gnu- + export CROSS_COMPILE=aarch64-linux-android- + export CROSS_COMPILE_ARM32=arm-linux-androideabi- + export ARCH=arm64 + + # Build with LLVM + make O=out ARCH=arm64 LLVM=1 LLVM_IAS=1 -j$(nproc) 2>&1 | tee build.log + + # Check if build succeeded + if [ ! -f out/arch/arm64/boot/Image.gz ]; then + echo "โŒ Build failed: Image.gz not found!" + echo "Last 100 lines of build log:" + tail -100 build.log + exit 1 + fi + + echo "โœ… Build successful!" + ls -la out/arch/arm64/boot/ + + # ============================================ + # 9. Prepare AnyKernel3 Package + # ============================================ + - name: ๐Ÿ“ฆ Prepare AnyKernel3 package + if: inputs.use_anykernel3 == true + run: | + # Clone AnyKernel3 template + git clone --depth=1 ${{ env.ANYKERNEL3_REPO }} AnyKernel3 + + # Copy kernel image + cp ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/Image.gz AnyKernel3/ + + # Copy dtb/dtbo if available + if [ -f ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtbo.img ]; then + cp ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtbo.img AnyKernel3/ + fi + if [ -f ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtb.img ]; then + cp ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtb.img AnyKernel3/ + fi + + # Create custom anykernel.sh for creek + cd AnyKernel3 + cat > anykernel.sh << 'EOF' +# AnyKernel3 Ramdisk Mod Script +# osm0sis @ xda-developers + +## AnyKernel setup +# begin properties +properties() { ' +kernel.string=Custom Kernel for Redmi 15 (creek) - KernelSU-Next + SUSFS +do.devicecheck=0 +do.modules=0 +do.systemless=1 +do.cleanup=1 +do.cleanuponabort=0 +device.name1=creek +device.name2=redmi15 +device.name3=Redmi15 +supported.versions= +supported.patchlevels= +'; } # end properties + +# shell variables +block=auto; +is_slot_device=auto; +ramdisk_compression=auto; + +## AnyKernel methods (DO NOT CHANGE) +# import patching functions/variables - see for reference +. tools/ak3-core.sh; + +## AnyKernel install +# dump boot and vendor boot +dump_boot; + +# flash kernel +write_boot; + +# flash dtb if present +if [ -f $home/dtb ]; then + flash_dtb; +fi; + +# end install +EOF + + # Create ZIP + zip -r9 ../creek-ksu-susfs-anykernel3.zip ./* + cd .. + + # ============================================ + # 10. Upload Artifacts + # ============================================ + - name: ๐Ÿ“ค Upload AnyKernel3 ZIP + if: inputs.use_anykernel3 == true + uses: actions/upload-artifact@v4 + with: + name: creek-kernel-ksu-susfs-anykernel3 + path: creek-ksu-susfs-anykernel3.zip + if-no-files-found: error + + - name: ๐Ÿ“ค Upload boot image (raw) + uses: actions/upload-artifact@v4 + with: + name: creek-boot-image-raw + path: ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/Image.gz + if-no-files-found: warn From 409395e9a45f1466041d6937ca88776785342cb7 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 01:25:15 +0700 Subject: [PATCH 02/77] Create build-kernel-creek.yml --- github/workflows/build-kernel-creek.yml | 329 ++++++++++++++++++++++++ 1 file changed, 329 insertions(+) create mode 100644 github/workflows/build-kernel-creek.yml diff --git a/github/workflows/build-kernel-creek.yml b/github/workflows/build-kernel-creek.yml new file mode 100644 index 0000000000000..b086db4b522c5 --- /dev/null +++ b/github/workflows/build-kernel-creek.yml @@ -0,0 +1,329 @@ +name: Build Redmi 15 (creek) Kernel with KernelSU-Next & SUSFS + +on: + workflow_dispatch: + inputs: + kernel_url: + description: '๐Ÿ”— Kernel source repository URL' + required: false + default: 'https://github.com/MiCode/Xiaomi_Kernel_OpenSource' + type: string + kernel_branch: + description: '๐ŸŒฟ Kernel source branch' + required: false + default: 'creek-v-oss' + type: string + defconfig: + description: 'โš™๏ธ Defconfig name (fragment config name)' + required: false + default: 'creek_GKI-config' + type: string + ksun_branch: + description: '๐ŸŒฑ KernelSU-Next branch' + required: false + default: 'main' + type: choice + options: + - main + - v3.1.0 + use_anykernel3: + description: '๐Ÿ“ฆ Package as AnyKernel3 ZIP?' + required: false + default: true + type: boolean + +env: + KERNEL_PATH: ${{ github.workspace }}/kernel-source + TOOLCHAIN_PATH: ${{ github.workspace }}/toolchain + KSU_NEXT_REPO: 'https://github.com/KernelSU-Next/KernelSU-Next.git' + SUSFS_REPO: 'https://gitlab.com/simonpunk/susfs4ksu.git' + ANYKERNEL3_REPO: 'https://github.com/osm0sis/AnyKernel3' + +jobs: + build: + runs-on: ubuntu-24.04 + steps: + # ============================================ + # 1. Setup Environment + # ============================================ + - name: ๐Ÿงน Optimize runner and install tools + run: | + sudo apt update + sudo apt install -y git make bc bison flex libssl-dev build-essential \ + python3 python3-distutils device-tree-compiler lz4 cpio zip wget curl + sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /opt/hostedtoolcache/CodeQL + + - name: ๐Ÿ”ง Create working directories + run: | + mkdir -p ${{ env.KERNEL_PATH }} + mkdir -p ${{ env.TOOLCHAIN_PATH }} + + # ============================================ + # 2. Download Kernel Source + # ============================================ + - name: ๐Ÿ“ฅ Checkout kernel source + uses: actions/checkout@v4 + with: + repository: ${{ inputs.kernel_url }} + ref: ${{ inputs.kernel_branch }} + path: ${{ env.KERNEL_PATH }} + fetch-depth: 1 + + # ============================================ + # 3. Download Toolchains (Clang + GCC) + # ============================================ + - name: ๐Ÿ”จ Download Clang (AOSP r522817 - Android 14/15/16 compatible) + run: | + cd ${{ env.TOOLCHAIN_PATH }} + wget -q https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+archive/refs/heads/main/r522817/clang-r522817.tar.gz + mkdir clang + tar -xf clang-r522817.tar.gz -C clang + + - name: ๐Ÿ”จ Download GCC (aarch64-linux-android-4.9) + run: | + cd ${{ env.TOOLCHAIN_PATH }} + git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 gcc + + - name: ๐Ÿ”จ Download GCC ARM32 (arm-linux-androideabi-4.9) + run: | + cd ${{ env.TOOLCHAIN_PATH }} + git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9 gcc32 + + # ============================================ + # 4. Prepare Config (Merge Fragment + Base GKI) + # ============================================ + - name: ๐Ÿ”ง Merge fragment config to full defconfig + run: | + cd ${{ env.KERNEL_PATH }} + + # Base GKI defconfig for kernel 5.15 + if [ -f arch/arm64/configs/gki_defconfig ]; then + cp arch/arm64/configs/gki_defconfig arch/arm64/configs/creek_full_defconfig + else + # Fallback: create minimal base + echo "CONFIG_ARCH_BENGAL=y" > arch/arm64/configs/creek_full_defconfig + fi + + # Merge fragment config + if [ -f arch/arm64/configs/${{ inputs.defconfig }} ]; then + cat arch/arm64/configs/${{ inputs.defconfig }} >> arch/arm64/configs/creek_full_defconfig + else + echo "โš ๏ธ Fragment config ${{ inputs.defconfig }} not found, using base only" + fi + + # Remove duplicate lines + sort -u arch/arm64/configs/creek_full_defconfig > arch/arm64/configs/creek_full_defconfig.tmp + mv arch/arm64/configs/creek_full_defconfig.tmp arch/arm64/configs/creek_full_defconfig + + # ============================================ + # 5. Integrate KernelSU-Next (ReSukiSU) + # ============================================ + - name: ๐ŸŒฑ Integrate KernelSU-Next + run: | + cd ${{ env.KERNEL_PATH }} + echo "::group::Integrating KernelSU-Next" + + # Clone KernelSU-Next + git clone --depth=1 -b ${{ inputs.ksun_branch }} ${{ env.KSU_NEXT_REPO }} KernelSU-Next + + # Run KernelSU-Next init script + if [ -f KernelSU-Next/tools/init_kernelsu.sh ]; then + bash KernelSU-Next/tools/init_kernelsu.sh $(pwd) + else + # Manual symlink for GKI + ln -sf $(pwd)/KernelSU-Next/kernel . + fi + + echo "KernelSU-Next integrated successfully" + echo "::endgroup::" + + # ============================================ + # 6. Integrate SUSFS (Root Hiding) + # ============================================ + - name: ๐Ÿ”’ Integrate SUSFS + run: | + cd ${{ env.KERNEL_PATH }} + echo "::group::Integrating SUSFS" + + # Clone SUSFS + git clone --depth=1 ${{ env.SUSFS_REPO }} susfs4ksu + + # Find kernel version + KERNEL_VER=$(make kernelversion 2>/dev/null || echo "5.15") + SUSFS_DIR="susfs4ksu/kernel_patches" + + # Apply SUSFS patches based on kernel version + if [ -d "$SUSFS_DIR/$KERNEL_VER" ]; then + for patch in $(ls $SUSFS_DIR/$KERNEL_VER/*.patch 2>/dev/null); do + echo "Applying patch: $patch" + patch -p1 -N -r - < "$patch" || echo "โš ๏ธ Patch may already be applied" + done + elif [ -d "$SUSFS_DIR/5.15" ]; then + for patch in $(ls $SUSFS_DIR/5.15/*.patch 2>/dev/null); do + echo "Applying patch: $patch" + patch -p1 -N -r - < "$patch" || echo "โš ๏ธ Patch may already be applied" + done + fi + + echo "SUSFS integration completed" + echo "::endgroup::" + + # ============================================ + # 7. Configure Kernel (Enable KSU & SUSFS) + # ============================================ + - name: โš™๏ธ Configure kernel + run: | + cd ${{ env.KERNEL_PATH }} + + export PATH=${{ env.TOOLCHAIN_PATH }}/clang/bin:${{ env.TOOLCHAIN_PATH }}/gcc/bin:${{ env.TOOLCHAIN_PATH }}/gcc32/bin:$PATH + export CLANG_TRIPLE=aarch64-linux-gnu- + export CROSS_COMPILE=aarch64-linux-android- + export CROSS_COMPILE_ARM32=arm-linux-androideabi- + export ARCH=arm64 + + # Generate .config + make O=out ARCH=arm64 creek_full_defconfig + + # Enable KernelSU config + scripts/config --file out/.config -e KSU + + # Enable SUSFS configs + scripts/config --file out/.config -e KSU_SUSFS + scripts/config --file out/.config -e KSU_SUSFS_HAS_MAGIC_MOUNT + scripts/config --file out/.config -e KSU_SUSFS_SUS_PATH + scripts/config --file out/.config -e KSU_SUSFS_SUS_MOUNT + scripts/config --file out/.config -e KSU_SUSFS_AUTO_ADD_SUS_KSU_DEFAULT_MOUNT + scripts/config --file out/.config -e KSU_SUSFS_AUTO_ADD_SUS_BIND_MOUNT + scripts/config --file out/.config -e KSU_SUSFS_SUS_KSTAT + scripts/config --file out/.config -e KSU_SUSFS_TRY_UMOUNT + scripts/config --file out/.config -e KSU_SUSFS_SPOOF_UNAME + scripts/config --file out/.config -e KSU_SUSFS_ENABLE_LOG + scripts/config --file out/.config -e KSU_SUSFS_HIDE_KSU_SUSFS_SYMBOLS + scripts/config --file out/.config -e KSU_SUSFS_SPOOF_CMDLINE_OR_BOOTCONFIG + scripts/config --file out/.config -e KSU_SUSFS_OPEN_REDIRECT + + # Optional: Performance optimization + scripts/config --file out/.config -e CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE + scripts/config --file out/.config --set-val CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE y + scripts/config --file out/.config --set-val CONFIG_CC_OPTIMIZE_FOR_SIZE n + + echo "Final kernel configuration:" + cat out/.config | grep -E "(KSU|SUSFS)" | sort + + # Save final config + cp out/.config arch/arm64/configs/creek_full_defconfig + + # ============================================ + # 8. Build Kernel + # ============================================ + - name: ๐Ÿ—๏ธ Build kernel + run: | + cd ${{ env.KERNEL_PATH }} + + export PATH=${{ env.TOOLCHAIN_PATH }}/clang/bin:${{ env.TOOLCHAIN_PATH }}/gcc/bin:${{ env.TOOLCHAIN_PATH }}/gcc32/bin:$PATH + export CLANG_TRIPLE=aarch64-linux-gnu- + export CROSS_COMPILE=aarch64-linux-android- + export CROSS_COMPILE_ARM32=arm-linux-androideabi- + export ARCH=arm64 + + # Build with LLVM + make O=out ARCH=arm64 LLVM=1 LLVM_IAS=1 -j$(nproc) 2>&1 | tee build.log + + # Check if build succeeded + if [ ! -f out/arch/arm64/boot/Image.gz ]; then + echo "โŒ Build failed: Image.gz not found!" + echo "Last 100 lines of build log:" + tail -100 build.log + exit 1 + fi + + echo "โœ… Build successful!" + ls -la out/arch/arm64/boot/ + + # ============================================ + # 9. Prepare AnyKernel3 Package + # ============================================ + - name: ๐Ÿ“ฆ Prepare AnyKernel3 package + if: inputs.use_anykernel3 == true + run: | + # Clone AnyKernel3 template + git clone --depth=1 ${{ env.ANYKERNEL3_REPO }} AnyKernel3 + + # Copy kernel image + cp ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/Image.gz AnyKernel3/ + + # Copy dtb/dtbo if available + if [ -f ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtbo.img ]; then + cp ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtbo.img AnyKernel3/ + fi + if [ -f ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtb.img ]; then + cp ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtb.img AnyKernel3/ + fi + + # Create custom anykernel.sh for creek + cd AnyKernel3 + cat > anykernel.sh << 'EOF' +# AnyKernel3 Ramdisk Mod Script +# osm0sis @ xda-developers + +## AnyKernel setup +# begin properties +properties() { ' +kernel.string=Custom Kernel for Redmi 15 (creek) - KernelSU-Next + SUSFS +do.devicecheck=0 +do.modules=0 +do.systemless=1 +do.cleanup=1 +do.cleanuponabort=0 +device.name1=creek +device.name2=redmi15 +device.name3=Redmi15 +supported.versions= +supported.patchlevels= +'; } # end properties + +# shell variables +block=auto; +is_slot_device=auto; +ramdisk_compression=auto; + +## AnyKernel methods (DO NOT CHANGE) +# import patching functions/variables - see for reference +. tools/ak3-core.sh; + +## AnyKernel install +# dump boot and vendor boot +dump_boot; + +# flash kernel +write_boot; + +# flash dtb if present +if [ -f $home/dtb ]; then + flash_dtb; +fi; + +# end install +EOF + + # Create ZIP + zip -r9 ../creek-ksu-susfs-anykernel3.zip ./* + cd .. + + # ============================================ + # 10. Upload Artifacts + # ============================================ + - name: ๐Ÿ“ค Upload AnyKernel3 ZIP + if: inputs.use_anykernel3 == true + uses: actions/upload-artifact@v4 + with: + name: creek-kernel-ksu-susfs-anykernel3 + path: creek-ksu-susfs-anykernel3.zip + if-no-files-found: error + + - name: ๐Ÿ“ค Upload boot image (raw) + uses: actions/upload-artifact@v4 + with: + name: creek-boot-image-raw + path: ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/Image.gz + if-no-files-found: warn From a60e83cba7bf26a6c0425238ec05519993dc1d29 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 01:41:49 +0700 Subject: [PATCH 03/77] Update build-kernel-creek.yml --- github/workflows/build-kernel-creek.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github/workflows/build-kernel-creek.yml b/github/workflows/build-kernel-creek.yml index b086db4b522c5..b76bffb23fb6f 100644 --- a/github/workflows/build-kernel-creek.yml +++ b/github/workflows/build-kernel-creek.yml @@ -1,4 +1,4 @@ -name: Build Redmi 15 (creek) Kernel with KernelSU-Next & SUSFS +name: Build Redmi 15 (creek) Kernel with KernelSU-Next & SUSFS! on: workflow_dispatch: From 3bbe7d8d1cf4d6b4637e6dc59da08ddb982f3e12 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 01:45:05 +0700 Subject: [PATCH 04/77] Update build-kernel-creek.yml --- github/workflows/build-kernel-creek.yml | 332 +----------------------- 1 file changed, 5 insertions(+), 327 deletions(-) diff --git a/github/workflows/build-kernel-creek.yml b/github/workflows/build-kernel-creek.yml index b76bffb23fb6f..653dde978e623 100644 --- a/github/workflows/build-kernel-creek.yml +++ b/github/workflows/build-kernel-creek.yml @@ -1,329 +1,7 @@ -name: Build Redmi 15 (creek) Kernel with KernelSU-Next & SUSFS! - -on: - workflow_dispatch: - inputs: - kernel_url: - description: '๐Ÿ”— Kernel source repository URL' - required: false - default: 'https://github.com/MiCode/Xiaomi_Kernel_OpenSource' - type: string - kernel_branch: - description: '๐ŸŒฟ Kernel source branch' - required: false - default: 'creek-v-oss' - type: string - defconfig: - description: 'โš™๏ธ Defconfig name (fragment config name)' - required: false - default: 'creek_GKI-config' - type: string - ksun_branch: - description: '๐ŸŒฑ KernelSU-Next branch' - required: false - default: 'main' - type: choice - options: - - main - - v3.1.0 - use_anykernel3: - description: '๐Ÿ“ฆ Package as AnyKernel3 ZIP?' - required: false - default: true - type: boolean - -env: - KERNEL_PATH: ${{ github.workspace }}/kernel-source - TOOLCHAIN_PATH: ${{ github.workspace }}/toolchain - KSU_NEXT_REPO: 'https://github.com/KernelSU-Next/KernelSU-Next.git' - SUSFS_REPO: 'https://gitlab.com/simonpunk/susfs4ksu.git' - ANYKERNEL3_REPO: 'https://github.com/osm0sis/AnyKernel3' - +name: Test Workflow +on: [push, workflow_dispatch] jobs: - build: - runs-on: ubuntu-24.04 + test: + runs-on: ubuntu-latest steps: - # ============================================ - # 1. Setup Environment - # ============================================ - - name: ๐Ÿงน Optimize runner and install tools - run: | - sudo apt update - sudo apt install -y git make bc bison flex libssl-dev build-essential \ - python3 python3-distutils device-tree-compiler lz4 cpio zip wget curl - sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /opt/hostedtoolcache/CodeQL - - - name: ๐Ÿ”ง Create working directories - run: | - mkdir -p ${{ env.KERNEL_PATH }} - mkdir -p ${{ env.TOOLCHAIN_PATH }} - - # ============================================ - # 2. Download Kernel Source - # ============================================ - - name: ๐Ÿ“ฅ Checkout kernel source - uses: actions/checkout@v4 - with: - repository: ${{ inputs.kernel_url }} - ref: ${{ inputs.kernel_branch }} - path: ${{ env.KERNEL_PATH }} - fetch-depth: 1 - - # ============================================ - # 3. Download Toolchains (Clang + GCC) - # ============================================ - - name: ๐Ÿ”จ Download Clang (AOSP r522817 - Android 14/15/16 compatible) - run: | - cd ${{ env.TOOLCHAIN_PATH }} - wget -q https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+archive/refs/heads/main/r522817/clang-r522817.tar.gz - mkdir clang - tar -xf clang-r522817.tar.gz -C clang - - - name: ๐Ÿ”จ Download GCC (aarch64-linux-android-4.9) - run: | - cd ${{ env.TOOLCHAIN_PATH }} - git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 gcc - - - name: ๐Ÿ”จ Download GCC ARM32 (arm-linux-androideabi-4.9) - run: | - cd ${{ env.TOOLCHAIN_PATH }} - git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9 gcc32 - - # ============================================ - # 4. Prepare Config (Merge Fragment + Base GKI) - # ============================================ - - name: ๐Ÿ”ง Merge fragment config to full defconfig - run: | - cd ${{ env.KERNEL_PATH }} - - # Base GKI defconfig for kernel 5.15 - if [ -f arch/arm64/configs/gki_defconfig ]; then - cp arch/arm64/configs/gki_defconfig arch/arm64/configs/creek_full_defconfig - else - # Fallback: create minimal base - echo "CONFIG_ARCH_BENGAL=y" > arch/arm64/configs/creek_full_defconfig - fi - - # Merge fragment config - if [ -f arch/arm64/configs/${{ inputs.defconfig }} ]; then - cat arch/arm64/configs/${{ inputs.defconfig }} >> arch/arm64/configs/creek_full_defconfig - else - echo "โš ๏ธ Fragment config ${{ inputs.defconfig }} not found, using base only" - fi - - # Remove duplicate lines - sort -u arch/arm64/configs/creek_full_defconfig > arch/arm64/configs/creek_full_defconfig.tmp - mv arch/arm64/configs/creek_full_defconfig.tmp arch/arm64/configs/creek_full_defconfig - - # ============================================ - # 5. Integrate KernelSU-Next (ReSukiSU) - # ============================================ - - name: ๐ŸŒฑ Integrate KernelSU-Next - run: | - cd ${{ env.KERNEL_PATH }} - echo "::group::Integrating KernelSU-Next" - - # Clone KernelSU-Next - git clone --depth=1 -b ${{ inputs.ksun_branch }} ${{ env.KSU_NEXT_REPO }} KernelSU-Next - - # Run KernelSU-Next init script - if [ -f KernelSU-Next/tools/init_kernelsu.sh ]; then - bash KernelSU-Next/tools/init_kernelsu.sh $(pwd) - else - # Manual symlink for GKI - ln -sf $(pwd)/KernelSU-Next/kernel . - fi - - echo "KernelSU-Next integrated successfully" - echo "::endgroup::" - - # ============================================ - # 6. Integrate SUSFS (Root Hiding) - # ============================================ - - name: ๐Ÿ”’ Integrate SUSFS - run: | - cd ${{ env.KERNEL_PATH }} - echo "::group::Integrating SUSFS" - - # Clone SUSFS - git clone --depth=1 ${{ env.SUSFS_REPO }} susfs4ksu - - # Find kernel version - KERNEL_VER=$(make kernelversion 2>/dev/null || echo "5.15") - SUSFS_DIR="susfs4ksu/kernel_patches" - - # Apply SUSFS patches based on kernel version - if [ -d "$SUSFS_DIR/$KERNEL_VER" ]; then - for patch in $(ls $SUSFS_DIR/$KERNEL_VER/*.patch 2>/dev/null); do - echo "Applying patch: $patch" - patch -p1 -N -r - < "$patch" || echo "โš ๏ธ Patch may already be applied" - done - elif [ -d "$SUSFS_DIR/5.15" ]; then - for patch in $(ls $SUSFS_DIR/5.15/*.patch 2>/dev/null); do - echo "Applying patch: $patch" - patch -p1 -N -r - < "$patch" || echo "โš ๏ธ Patch may already be applied" - done - fi - - echo "SUSFS integration completed" - echo "::endgroup::" - - # ============================================ - # 7. Configure Kernel (Enable KSU & SUSFS) - # ============================================ - - name: โš™๏ธ Configure kernel - run: | - cd ${{ env.KERNEL_PATH }} - - export PATH=${{ env.TOOLCHAIN_PATH }}/clang/bin:${{ env.TOOLCHAIN_PATH }}/gcc/bin:${{ env.TOOLCHAIN_PATH }}/gcc32/bin:$PATH - export CLANG_TRIPLE=aarch64-linux-gnu- - export CROSS_COMPILE=aarch64-linux-android- - export CROSS_COMPILE_ARM32=arm-linux-androideabi- - export ARCH=arm64 - - # Generate .config - make O=out ARCH=arm64 creek_full_defconfig - - # Enable KernelSU config - scripts/config --file out/.config -e KSU - - # Enable SUSFS configs - scripts/config --file out/.config -e KSU_SUSFS - scripts/config --file out/.config -e KSU_SUSFS_HAS_MAGIC_MOUNT - scripts/config --file out/.config -e KSU_SUSFS_SUS_PATH - scripts/config --file out/.config -e KSU_SUSFS_SUS_MOUNT - scripts/config --file out/.config -e KSU_SUSFS_AUTO_ADD_SUS_KSU_DEFAULT_MOUNT - scripts/config --file out/.config -e KSU_SUSFS_AUTO_ADD_SUS_BIND_MOUNT - scripts/config --file out/.config -e KSU_SUSFS_SUS_KSTAT - scripts/config --file out/.config -e KSU_SUSFS_TRY_UMOUNT - scripts/config --file out/.config -e KSU_SUSFS_SPOOF_UNAME - scripts/config --file out/.config -e KSU_SUSFS_ENABLE_LOG - scripts/config --file out/.config -e KSU_SUSFS_HIDE_KSU_SUSFS_SYMBOLS - scripts/config --file out/.config -e KSU_SUSFS_SPOOF_CMDLINE_OR_BOOTCONFIG - scripts/config --file out/.config -e KSU_SUSFS_OPEN_REDIRECT - - # Optional: Performance optimization - scripts/config --file out/.config -e CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE - scripts/config --file out/.config --set-val CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE y - scripts/config --file out/.config --set-val CONFIG_CC_OPTIMIZE_FOR_SIZE n - - echo "Final kernel configuration:" - cat out/.config | grep -E "(KSU|SUSFS)" | sort - - # Save final config - cp out/.config arch/arm64/configs/creek_full_defconfig - - # ============================================ - # 8. Build Kernel - # ============================================ - - name: ๐Ÿ—๏ธ Build kernel - run: | - cd ${{ env.KERNEL_PATH }} - - export PATH=${{ env.TOOLCHAIN_PATH }}/clang/bin:${{ env.TOOLCHAIN_PATH }}/gcc/bin:${{ env.TOOLCHAIN_PATH }}/gcc32/bin:$PATH - export CLANG_TRIPLE=aarch64-linux-gnu- - export CROSS_COMPILE=aarch64-linux-android- - export CROSS_COMPILE_ARM32=arm-linux-androideabi- - export ARCH=arm64 - - # Build with LLVM - make O=out ARCH=arm64 LLVM=1 LLVM_IAS=1 -j$(nproc) 2>&1 | tee build.log - - # Check if build succeeded - if [ ! -f out/arch/arm64/boot/Image.gz ]; then - echo "โŒ Build failed: Image.gz not found!" - echo "Last 100 lines of build log:" - tail -100 build.log - exit 1 - fi - - echo "โœ… Build successful!" - ls -la out/arch/arm64/boot/ - - # ============================================ - # 9. Prepare AnyKernel3 Package - # ============================================ - - name: ๐Ÿ“ฆ Prepare AnyKernel3 package - if: inputs.use_anykernel3 == true - run: | - # Clone AnyKernel3 template - git clone --depth=1 ${{ env.ANYKERNEL3_REPO }} AnyKernel3 - - # Copy kernel image - cp ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/Image.gz AnyKernel3/ - - # Copy dtb/dtbo if available - if [ -f ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtbo.img ]; then - cp ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtbo.img AnyKernel3/ - fi - if [ -f ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtb.img ]; then - cp ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtb.img AnyKernel3/ - fi - - # Create custom anykernel.sh for creek - cd AnyKernel3 - cat > anykernel.sh << 'EOF' -# AnyKernel3 Ramdisk Mod Script -# osm0sis @ xda-developers - -## AnyKernel setup -# begin properties -properties() { ' -kernel.string=Custom Kernel for Redmi 15 (creek) - KernelSU-Next + SUSFS -do.devicecheck=0 -do.modules=0 -do.systemless=1 -do.cleanup=1 -do.cleanuponabort=0 -device.name1=creek -device.name2=redmi15 -device.name3=Redmi15 -supported.versions= -supported.patchlevels= -'; } # end properties - -# shell variables -block=auto; -is_slot_device=auto; -ramdisk_compression=auto; - -## AnyKernel methods (DO NOT CHANGE) -# import patching functions/variables - see for reference -. tools/ak3-core.sh; - -## AnyKernel install -# dump boot and vendor boot -dump_boot; - -# flash kernel -write_boot; - -# flash dtb if present -if [ -f $home/dtb ]; then - flash_dtb; -fi; - -# end install -EOF - - # Create ZIP - zip -r9 ../creek-ksu-susfs-anykernel3.zip ./* - cd .. - - # ============================================ - # 10. Upload Artifacts - # ============================================ - - name: ๐Ÿ“ค Upload AnyKernel3 ZIP - if: inputs.use_anykernel3 == true - uses: actions/upload-artifact@v4 - with: - name: creek-kernel-ksu-susfs-anykernel3 - path: creek-ksu-susfs-anykernel3.zip - if-no-files-found: error - - - name: ๐Ÿ“ค Upload boot image (raw) - uses: actions/upload-artifact@v4 - with: - name: creek-boot-image-raw - path: ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/Image.gz - if-no-files-found: warn + - run: echo "Workflow is working!" From 5d5a9e1541e06a760724cc6a9ea57dde4eb55a85 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 01:48:13 +0700 Subject: [PATCH 05/77] Update build-kernel.yml From c8e94d6d2900e0cc22ebeb473b66a8221ac26564 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 02:44:43 +0700 Subject: [PATCH 06/77] Create c-cpp.yml --- .github/workflows/c-cpp.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/c-cpp.yml diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml new file mode 100644 index 0000000000000..391df9a8c233b --- /dev/null +++ b/.github/workflows/c-cpp.yml @@ -0,0 +1,23 @@ +name: C/C++ CI + +on: + push: + branches: [ "creek-v-oss" ] + pull_request: + branches: [ "creek-v-oss" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: configure + run: ./configure + - name: make + run: make + - name: make check + run: make check + - name: make distcheck + run: make distcheck From 99e823c0178fe43a9191728e1e7212be1ec70bb2 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 02:45:39 +0700 Subject: [PATCH 07/77] Delete github/workflows directory --- github/workflows/build-kernel-creek.yml | 7 - github/workflows/build-kernel.yml | 329 ------------------------ 2 files changed, 336 deletions(-) delete mode 100644 github/workflows/build-kernel-creek.yml delete mode 100644 github/workflows/build-kernel.yml diff --git a/github/workflows/build-kernel-creek.yml b/github/workflows/build-kernel-creek.yml deleted file mode 100644 index 653dde978e623..0000000000000 --- a/github/workflows/build-kernel-creek.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: Test Workflow -on: [push, workflow_dispatch] -jobs: - test: - runs-on: ubuntu-latest - steps: - - run: echo "Workflow is working!" diff --git a/github/workflows/build-kernel.yml b/github/workflows/build-kernel.yml deleted file mode 100644 index b086db4b522c5..0000000000000 --- a/github/workflows/build-kernel.yml +++ /dev/null @@ -1,329 +0,0 @@ -name: Build Redmi 15 (creek) Kernel with KernelSU-Next & SUSFS - -on: - workflow_dispatch: - inputs: - kernel_url: - description: '๐Ÿ”— Kernel source repository URL' - required: false - default: 'https://github.com/MiCode/Xiaomi_Kernel_OpenSource' - type: string - kernel_branch: - description: '๐ŸŒฟ Kernel source branch' - required: false - default: 'creek-v-oss' - type: string - defconfig: - description: 'โš™๏ธ Defconfig name (fragment config name)' - required: false - default: 'creek_GKI-config' - type: string - ksun_branch: - description: '๐ŸŒฑ KernelSU-Next branch' - required: false - default: 'main' - type: choice - options: - - main - - v3.1.0 - use_anykernel3: - description: '๐Ÿ“ฆ Package as AnyKernel3 ZIP?' - required: false - default: true - type: boolean - -env: - KERNEL_PATH: ${{ github.workspace }}/kernel-source - TOOLCHAIN_PATH: ${{ github.workspace }}/toolchain - KSU_NEXT_REPO: 'https://github.com/KernelSU-Next/KernelSU-Next.git' - SUSFS_REPO: 'https://gitlab.com/simonpunk/susfs4ksu.git' - ANYKERNEL3_REPO: 'https://github.com/osm0sis/AnyKernel3' - -jobs: - build: - runs-on: ubuntu-24.04 - steps: - # ============================================ - # 1. Setup Environment - # ============================================ - - name: ๐Ÿงน Optimize runner and install tools - run: | - sudo apt update - sudo apt install -y git make bc bison flex libssl-dev build-essential \ - python3 python3-distutils device-tree-compiler lz4 cpio zip wget curl - sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /opt/hostedtoolcache/CodeQL - - - name: ๐Ÿ”ง Create working directories - run: | - mkdir -p ${{ env.KERNEL_PATH }} - mkdir -p ${{ env.TOOLCHAIN_PATH }} - - # ============================================ - # 2. Download Kernel Source - # ============================================ - - name: ๐Ÿ“ฅ Checkout kernel source - uses: actions/checkout@v4 - with: - repository: ${{ inputs.kernel_url }} - ref: ${{ inputs.kernel_branch }} - path: ${{ env.KERNEL_PATH }} - fetch-depth: 1 - - # ============================================ - # 3. Download Toolchains (Clang + GCC) - # ============================================ - - name: ๐Ÿ”จ Download Clang (AOSP r522817 - Android 14/15/16 compatible) - run: | - cd ${{ env.TOOLCHAIN_PATH }} - wget -q https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+archive/refs/heads/main/r522817/clang-r522817.tar.gz - mkdir clang - tar -xf clang-r522817.tar.gz -C clang - - - name: ๐Ÿ”จ Download GCC (aarch64-linux-android-4.9) - run: | - cd ${{ env.TOOLCHAIN_PATH }} - git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 gcc - - - name: ๐Ÿ”จ Download GCC ARM32 (arm-linux-androideabi-4.9) - run: | - cd ${{ env.TOOLCHAIN_PATH }} - git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9 gcc32 - - # ============================================ - # 4. Prepare Config (Merge Fragment + Base GKI) - # ============================================ - - name: ๐Ÿ”ง Merge fragment config to full defconfig - run: | - cd ${{ env.KERNEL_PATH }} - - # Base GKI defconfig for kernel 5.15 - if [ -f arch/arm64/configs/gki_defconfig ]; then - cp arch/arm64/configs/gki_defconfig arch/arm64/configs/creek_full_defconfig - else - # Fallback: create minimal base - echo "CONFIG_ARCH_BENGAL=y" > arch/arm64/configs/creek_full_defconfig - fi - - # Merge fragment config - if [ -f arch/arm64/configs/${{ inputs.defconfig }} ]; then - cat arch/arm64/configs/${{ inputs.defconfig }} >> arch/arm64/configs/creek_full_defconfig - else - echo "โš ๏ธ Fragment config ${{ inputs.defconfig }} not found, using base only" - fi - - # Remove duplicate lines - sort -u arch/arm64/configs/creek_full_defconfig > arch/arm64/configs/creek_full_defconfig.tmp - mv arch/arm64/configs/creek_full_defconfig.tmp arch/arm64/configs/creek_full_defconfig - - # ============================================ - # 5. Integrate KernelSU-Next (ReSukiSU) - # ============================================ - - name: ๐ŸŒฑ Integrate KernelSU-Next - run: | - cd ${{ env.KERNEL_PATH }} - echo "::group::Integrating KernelSU-Next" - - # Clone KernelSU-Next - git clone --depth=1 -b ${{ inputs.ksun_branch }} ${{ env.KSU_NEXT_REPO }} KernelSU-Next - - # Run KernelSU-Next init script - if [ -f KernelSU-Next/tools/init_kernelsu.sh ]; then - bash KernelSU-Next/tools/init_kernelsu.sh $(pwd) - else - # Manual symlink for GKI - ln -sf $(pwd)/KernelSU-Next/kernel . - fi - - echo "KernelSU-Next integrated successfully" - echo "::endgroup::" - - # ============================================ - # 6. Integrate SUSFS (Root Hiding) - # ============================================ - - name: ๐Ÿ”’ Integrate SUSFS - run: | - cd ${{ env.KERNEL_PATH }} - echo "::group::Integrating SUSFS" - - # Clone SUSFS - git clone --depth=1 ${{ env.SUSFS_REPO }} susfs4ksu - - # Find kernel version - KERNEL_VER=$(make kernelversion 2>/dev/null || echo "5.15") - SUSFS_DIR="susfs4ksu/kernel_patches" - - # Apply SUSFS patches based on kernel version - if [ -d "$SUSFS_DIR/$KERNEL_VER" ]; then - for patch in $(ls $SUSFS_DIR/$KERNEL_VER/*.patch 2>/dev/null); do - echo "Applying patch: $patch" - patch -p1 -N -r - < "$patch" || echo "โš ๏ธ Patch may already be applied" - done - elif [ -d "$SUSFS_DIR/5.15" ]; then - for patch in $(ls $SUSFS_DIR/5.15/*.patch 2>/dev/null); do - echo "Applying patch: $patch" - patch -p1 -N -r - < "$patch" || echo "โš ๏ธ Patch may already be applied" - done - fi - - echo "SUSFS integration completed" - echo "::endgroup::" - - # ============================================ - # 7. Configure Kernel (Enable KSU & SUSFS) - # ============================================ - - name: โš™๏ธ Configure kernel - run: | - cd ${{ env.KERNEL_PATH }} - - export PATH=${{ env.TOOLCHAIN_PATH }}/clang/bin:${{ env.TOOLCHAIN_PATH }}/gcc/bin:${{ env.TOOLCHAIN_PATH }}/gcc32/bin:$PATH - export CLANG_TRIPLE=aarch64-linux-gnu- - export CROSS_COMPILE=aarch64-linux-android- - export CROSS_COMPILE_ARM32=arm-linux-androideabi- - export ARCH=arm64 - - # Generate .config - make O=out ARCH=arm64 creek_full_defconfig - - # Enable KernelSU config - scripts/config --file out/.config -e KSU - - # Enable SUSFS configs - scripts/config --file out/.config -e KSU_SUSFS - scripts/config --file out/.config -e KSU_SUSFS_HAS_MAGIC_MOUNT - scripts/config --file out/.config -e KSU_SUSFS_SUS_PATH - scripts/config --file out/.config -e KSU_SUSFS_SUS_MOUNT - scripts/config --file out/.config -e KSU_SUSFS_AUTO_ADD_SUS_KSU_DEFAULT_MOUNT - scripts/config --file out/.config -e KSU_SUSFS_AUTO_ADD_SUS_BIND_MOUNT - scripts/config --file out/.config -e KSU_SUSFS_SUS_KSTAT - scripts/config --file out/.config -e KSU_SUSFS_TRY_UMOUNT - scripts/config --file out/.config -e KSU_SUSFS_SPOOF_UNAME - scripts/config --file out/.config -e KSU_SUSFS_ENABLE_LOG - scripts/config --file out/.config -e KSU_SUSFS_HIDE_KSU_SUSFS_SYMBOLS - scripts/config --file out/.config -e KSU_SUSFS_SPOOF_CMDLINE_OR_BOOTCONFIG - scripts/config --file out/.config -e KSU_SUSFS_OPEN_REDIRECT - - # Optional: Performance optimization - scripts/config --file out/.config -e CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE - scripts/config --file out/.config --set-val CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE y - scripts/config --file out/.config --set-val CONFIG_CC_OPTIMIZE_FOR_SIZE n - - echo "Final kernel configuration:" - cat out/.config | grep -E "(KSU|SUSFS)" | sort - - # Save final config - cp out/.config arch/arm64/configs/creek_full_defconfig - - # ============================================ - # 8. Build Kernel - # ============================================ - - name: ๐Ÿ—๏ธ Build kernel - run: | - cd ${{ env.KERNEL_PATH }} - - export PATH=${{ env.TOOLCHAIN_PATH }}/clang/bin:${{ env.TOOLCHAIN_PATH }}/gcc/bin:${{ env.TOOLCHAIN_PATH }}/gcc32/bin:$PATH - export CLANG_TRIPLE=aarch64-linux-gnu- - export CROSS_COMPILE=aarch64-linux-android- - export CROSS_COMPILE_ARM32=arm-linux-androideabi- - export ARCH=arm64 - - # Build with LLVM - make O=out ARCH=arm64 LLVM=1 LLVM_IAS=1 -j$(nproc) 2>&1 | tee build.log - - # Check if build succeeded - if [ ! -f out/arch/arm64/boot/Image.gz ]; then - echo "โŒ Build failed: Image.gz not found!" - echo "Last 100 lines of build log:" - tail -100 build.log - exit 1 - fi - - echo "โœ… Build successful!" - ls -la out/arch/arm64/boot/ - - # ============================================ - # 9. Prepare AnyKernel3 Package - # ============================================ - - name: ๐Ÿ“ฆ Prepare AnyKernel3 package - if: inputs.use_anykernel3 == true - run: | - # Clone AnyKernel3 template - git clone --depth=1 ${{ env.ANYKERNEL3_REPO }} AnyKernel3 - - # Copy kernel image - cp ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/Image.gz AnyKernel3/ - - # Copy dtb/dtbo if available - if [ -f ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtbo.img ]; then - cp ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtbo.img AnyKernel3/ - fi - if [ -f ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtb.img ]; then - cp ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtb.img AnyKernel3/ - fi - - # Create custom anykernel.sh for creek - cd AnyKernel3 - cat > anykernel.sh << 'EOF' -# AnyKernel3 Ramdisk Mod Script -# osm0sis @ xda-developers - -## AnyKernel setup -# begin properties -properties() { ' -kernel.string=Custom Kernel for Redmi 15 (creek) - KernelSU-Next + SUSFS -do.devicecheck=0 -do.modules=0 -do.systemless=1 -do.cleanup=1 -do.cleanuponabort=0 -device.name1=creek -device.name2=redmi15 -device.name3=Redmi15 -supported.versions= -supported.patchlevels= -'; } # end properties - -# shell variables -block=auto; -is_slot_device=auto; -ramdisk_compression=auto; - -## AnyKernel methods (DO NOT CHANGE) -# import patching functions/variables - see for reference -. tools/ak3-core.sh; - -## AnyKernel install -# dump boot and vendor boot -dump_boot; - -# flash kernel -write_boot; - -# flash dtb if present -if [ -f $home/dtb ]; then - flash_dtb; -fi; - -# end install -EOF - - # Create ZIP - zip -r9 ../creek-ksu-susfs-anykernel3.zip ./* - cd .. - - # ============================================ - # 10. Upload Artifacts - # ============================================ - - name: ๐Ÿ“ค Upload AnyKernel3 ZIP - if: inputs.use_anykernel3 == true - uses: actions/upload-artifact@v4 - with: - name: creek-kernel-ksu-susfs-anykernel3 - path: creek-ksu-susfs-anykernel3.zip - if-no-files-found: error - - - name: ๐Ÿ“ค Upload boot image (raw) - uses: actions/upload-artifact@v4 - with: - name: creek-boot-image-raw - path: ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/Image.gz - if-no-files-found: warn From 39882eeba582ab1d56334d66a16ead8963548857 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 02:46:55 +0700 Subject: [PATCH 08/77] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 338 ++++++++++++++++++++++++++++++++++-- 1 file changed, 322 insertions(+), 16 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 391df9a8c233b..b086db4b522c5 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -1,23 +1,329 @@ -name: C/C++ CI +name: Build Redmi 15 (creek) Kernel with KernelSU-Next & SUSFS on: - push: - branches: [ "creek-v-oss" ] - pull_request: - branches: [ "creek-v-oss" ] + workflow_dispatch: + inputs: + kernel_url: + description: '๐Ÿ”— Kernel source repository URL' + required: false + default: 'https://github.com/MiCode/Xiaomi_Kernel_OpenSource' + type: string + kernel_branch: + description: '๐ŸŒฟ Kernel source branch' + required: false + default: 'creek-v-oss' + type: string + defconfig: + description: 'โš™๏ธ Defconfig name (fragment config name)' + required: false + default: 'creek_GKI-config' + type: string + ksun_branch: + description: '๐ŸŒฑ KernelSU-Next branch' + required: false + default: 'main' + type: choice + options: + - main + - v3.1.0 + use_anykernel3: + description: '๐Ÿ“ฆ Package as AnyKernel3 ZIP?' + required: false + default: true + type: boolean + +env: + KERNEL_PATH: ${{ github.workspace }}/kernel-source + TOOLCHAIN_PATH: ${{ github.workspace }}/toolchain + KSU_NEXT_REPO: 'https://github.com/KernelSU-Next/KernelSU-Next.git' + SUSFS_REPO: 'https://gitlab.com/simonpunk/susfs4ksu.git' + ANYKERNEL3_REPO: 'https://github.com/osm0sis/AnyKernel3' jobs: build: + runs-on: ubuntu-24.04 + steps: + # ============================================ + # 1. Setup Environment + # ============================================ + - name: ๐Ÿงน Optimize runner and install tools + run: | + sudo apt update + sudo apt install -y git make bc bison flex libssl-dev build-essential \ + python3 python3-distutils device-tree-compiler lz4 cpio zip wget curl + sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /opt/hostedtoolcache/CodeQL - runs-on: ubuntu-latest + - name: ๐Ÿ”ง Create working directories + run: | + mkdir -p ${{ env.KERNEL_PATH }} + mkdir -p ${{ env.TOOLCHAIN_PATH }} - steps: - - uses: actions/checkout@v4 - - name: configure - run: ./configure - - name: make - run: make - - name: make check - run: make check - - name: make distcheck - run: make distcheck + # ============================================ + # 2. Download Kernel Source + # ============================================ + - name: ๐Ÿ“ฅ Checkout kernel source + uses: actions/checkout@v4 + with: + repository: ${{ inputs.kernel_url }} + ref: ${{ inputs.kernel_branch }} + path: ${{ env.KERNEL_PATH }} + fetch-depth: 1 + + # ============================================ + # 3. Download Toolchains (Clang + GCC) + # ============================================ + - name: ๐Ÿ”จ Download Clang (AOSP r522817 - Android 14/15/16 compatible) + run: | + cd ${{ env.TOOLCHAIN_PATH }} + wget -q https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+archive/refs/heads/main/r522817/clang-r522817.tar.gz + mkdir clang + tar -xf clang-r522817.tar.gz -C clang + + - name: ๐Ÿ”จ Download GCC (aarch64-linux-android-4.9) + run: | + cd ${{ env.TOOLCHAIN_PATH }} + git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 gcc + + - name: ๐Ÿ”จ Download GCC ARM32 (arm-linux-androideabi-4.9) + run: | + cd ${{ env.TOOLCHAIN_PATH }} + git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9 gcc32 + + # ============================================ + # 4. Prepare Config (Merge Fragment + Base GKI) + # ============================================ + - name: ๐Ÿ”ง Merge fragment config to full defconfig + run: | + cd ${{ env.KERNEL_PATH }} + + # Base GKI defconfig for kernel 5.15 + if [ -f arch/arm64/configs/gki_defconfig ]; then + cp arch/arm64/configs/gki_defconfig arch/arm64/configs/creek_full_defconfig + else + # Fallback: create minimal base + echo "CONFIG_ARCH_BENGAL=y" > arch/arm64/configs/creek_full_defconfig + fi + + # Merge fragment config + if [ -f arch/arm64/configs/${{ inputs.defconfig }} ]; then + cat arch/arm64/configs/${{ inputs.defconfig }} >> arch/arm64/configs/creek_full_defconfig + else + echo "โš ๏ธ Fragment config ${{ inputs.defconfig }} not found, using base only" + fi + + # Remove duplicate lines + sort -u arch/arm64/configs/creek_full_defconfig > arch/arm64/configs/creek_full_defconfig.tmp + mv arch/arm64/configs/creek_full_defconfig.tmp arch/arm64/configs/creek_full_defconfig + + # ============================================ + # 5. Integrate KernelSU-Next (ReSukiSU) + # ============================================ + - name: ๐ŸŒฑ Integrate KernelSU-Next + run: | + cd ${{ env.KERNEL_PATH }} + echo "::group::Integrating KernelSU-Next" + + # Clone KernelSU-Next + git clone --depth=1 -b ${{ inputs.ksun_branch }} ${{ env.KSU_NEXT_REPO }} KernelSU-Next + + # Run KernelSU-Next init script + if [ -f KernelSU-Next/tools/init_kernelsu.sh ]; then + bash KernelSU-Next/tools/init_kernelsu.sh $(pwd) + else + # Manual symlink for GKI + ln -sf $(pwd)/KernelSU-Next/kernel . + fi + + echo "KernelSU-Next integrated successfully" + echo "::endgroup::" + + # ============================================ + # 6. Integrate SUSFS (Root Hiding) + # ============================================ + - name: ๐Ÿ”’ Integrate SUSFS + run: | + cd ${{ env.KERNEL_PATH }} + echo "::group::Integrating SUSFS" + + # Clone SUSFS + git clone --depth=1 ${{ env.SUSFS_REPO }} susfs4ksu + + # Find kernel version + KERNEL_VER=$(make kernelversion 2>/dev/null || echo "5.15") + SUSFS_DIR="susfs4ksu/kernel_patches" + + # Apply SUSFS patches based on kernel version + if [ -d "$SUSFS_DIR/$KERNEL_VER" ]; then + for patch in $(ls $SUSFS_DIR/$KERNEL_VER/*.patch 2>/dev/null); do + echo "Applying patch: $patch" + patch -p1 -N -r - < "$patch" || echo "โš ๏ธ Patch may already be applied" + done + elif [ -d "$SUSFS_DIR/5.15" ]; then + for patch in $(ls $SUSFS_DIR/5.15/*.patch 2>/dev/null); do + echo "Applying patch: $patch" + patch -p1 -N -r - < "$patch" || echo "โš ๏ธ Patch may already be applied" + done + fi + + echo "SUSFS integration completed" + echo "::endgroup::" + + # ============================================ + # 7. Configure Kernel (Enable KSU & SUSFS) + # ============================================ + - name: โš™๏ธ Configure kernel + run: | + cd ${{ env.KERNEL_PATH }} + + export PATH=${{ env.TOOLCHAIN_PATH }}/clang/bin:${{ env.TOOLCHAIN_PATH }}/gcc/bin:${{ env.TOOLCHAIN_PATH }}/gcc32/bin:$PATH + export CLANG_TRIPLE=aarch64-linux-gnu- + export CROSS_COMPILE=aarch64-linux-android- + export CROSS_COMPILE_ARM32=arm-linux-androideabi- + export ARCH=arm64 + + # Generate .config + make O=out ARCH=arm64 creek_full_defconfig + + # Enable KernelSU config + scripts/config --file out/.config -e KSU + + # Enable SUSFS configs + scripts/config --file out/.config -e KSU_SUSFS + scripts/config --file out/.config -e KSU_SUSFS_HAS_MAGIC_MOUNT + scripts/config --file out/.config -e KSU_SUSFS_SUS_PATH + scripts/config --file out/.config -e KSU_SUSFS_SUS_MOUNT + scripts/config --file out/.config -e KSU_SUSFS_AUTO_ADD_SUS_KSU_DEFAULT_MOUNT + scripts/config --file out/.config -e KSU_SUSFS_AUTO_ADD_SUS_BIND_MOUNT + scripts/config --file out/.config -e KSU_SUSFS_SUS_KSTAT + scripts/config --file out/.config -e KSU_SUSFS_TRY_UMOUNT + scripts/config --file out/.config -e KSU_SUSFS_SPOOF_UNAME + scripts/config --file out/.config -e KSU_SUSFS_ENABLE_LOG + scripts/config --file out/.config -e KSU_SUSFS_HIDE_KSU_SUSFS_SYMBOLS + scripts/config --file out/.config -e KSU_SUSFS_SPOOF_CMDLINE_OR_BOOTCONFIG + scripts/config --file out/.config -e KSU_SUSFS_OPEN_REDIRECT + + # Optional: Performance optimization + scripts/config --file out/.config -e CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE + scripts/config --file out/.config --set-val CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE y + scripts/config --file out/.config --set-val CONFIG_CC_OPTIMIZE_FOR_SIZE n + + echo "Final kernel configuration:" + cat out/.config | grep -E "(KSU|SUSFS)" | sort + + # Save final config + cp out/.config arch/arm64/configs/creek_full_defconfig + + # ============================================ + # 8. Build Kernel + # ============================================ + - name: ๐Ÿ—๏ธ Build kernel + run: | + cd ${{ env.KERNEL_PATH }} + + export PATH=${{ env.TOOLCHAIN_PATH }}/clang/bin:${{ env.TOOLCHAIN_PATH }}/gcc/bin:${{ env.TOOLCHAIN_PATH }}/gcc32/bin:$PATH + export CLANG_TRIPLE=aarch64-linux-gnu- + export CROSS_COMPILE=aarch64-linux-android- + export CROSS_COMPILE_ARM32=arm-linux-androideabi- + export ARCH=arm64 + + # Build with LLVM + make O=out ARCH=arm64 LLVM=1 LLVM_IAS=1 -j$(nproc) 2>&1 | tee build.log + + # Check if build succeeded + if [ ! -f out/arch/arm64/boot/Image.gz ]; then + echo "โŒ Build failed: Image.gz not found!" + echo "Last 100 lines of build log:" + tail -100 build.log + exit 1 + fi + + echo "โœ… Build successful!" + ls -la out/arch/arm64/boot/ + + # ============================================ + # 9. Prepare AnyKernel3 Package + # ============================================ + - name: ๐Ÿ“ฆ Prepare AnyKernel3 package + if: inputs.use_anykernel3 == true + run: | + # Clone AnyKernel3 template + git clone --depth=1 ${{ env.ANYKERNEL3_REPO }} AnyKernel3 + + # Copy kernel image + cp ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/Image.gz AnyKernel3/ + + # Copy dtb/dtbo if available + if [ -f ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtbo.img ]; then + cp ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtbo.img AnyKernel3/ + fi + if [ -f ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtb.img ]; then + cp ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtb.img AnyKernel3/ + fi + + # Create custom anykernel.sh for creek + cd AnyKernel3 + cat > anykernel.sh << 'EOF' +# AnyKernel3 Ramdisk Mod Script +# osm0sis @ xda-developers + +## AnyKernel setup +# begin properties +properties() { ' +kernel.string=Custom Kernel for Redmi 15 (creek) - KernelSU-Next + SUSFS +do.devicecheck=0 +do.modules=0 +do.systemless=1 +do.cleanup=1 +do.cleanuponabort=0 +device.name1=creek +device.name2=redmi15 +device.name3=Redmi15 +supported.versions= +supported.patchlevels= +'; } # end properties + +# shell variables +block=auto; +is_slot_device=auto; +ramdisk_compression=auto; + +## AnyKernel methods (DO NOT CHANGE) +# import patching functions/variables - see for reference +. tools/ak3-core.sh; + +## AnyKernel install +# dump boot and vendor boot +dump_boot; + +# flash kernel +write_boot; + +# flash dtb if present +if [ -f $home/dtb ]; then + flash_dtb; +fi; + +# end install +EOF + + # Create ZIP + zip -r9 ../creek-ksu-susfs-anykernel3.zip ./* + cd .. + + # ============================================ + # 10. Upload Artifacts + # ============================================ + - name: ๐Ÿ“ค Upload AnyKernel3 ZIP + if: inputs.use_anykernel3 == true + uses: actions/upload-artifact@v4 + with: + name: creek-kernel-ksu-susfs-anykernel3 + path: creek-ksu-susfs-anykernel3.zip + if-no-files-found: error + + - name: ๐Ÿ“ค Upload boot image (raw) + uses: actions/upload-artifact@v4 + with: + name: creek-boot-image-raw + path: ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/Image.gz + if-no-files-found: warn From 1a89697103dda362239945c8ab696dbe89cf72c3 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 02:47:49 +0700 Subject: [PATCH 09/77] Delete .github/workflows/c-cpp.yml --- .github/workflows/c-cpp.yml | 329 ------------------------------------ 1 file changed, 329 deletions(-) delete mode 100644 .github/workflows/c-cpp.yml diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml deleted file mode 100644 index b086db4b522c5..0000000000000 --- a/.github/workflows/c-cpp.yml +++ /dev/null @@ -1,329 +0,0 @@ -name: Build Redmi 15 (creek) Kernel with KernelSU-Next & SUSFS - -on: - workflow_dispatch: - inputs: - kernel_url: - description: '๐Ÿ”— Kernel source repository URL' - required: false - default: 'https://github.com/MiCode/Xiaomi_Kernel_OpenSource' - type: string - kernel_branch: - description: '๐ŸŒฟ Kernel source branch' - required: false - default: 'creek-v-oss' - type: string - defconfig: - description: 'โš™๏ธ Defconfig name (fragment config name)' - required: false - default: 'creek_GKI-config' - type: string - ksun_branch: - description: '๐ŸŒฑ KernelSU-Next branch' - required: false - default: 'main' - type: choice - options: - - main - - v3.1.0 - use_anykernel3: - description: '๐Ÿ“ฆ Package as AnyKernel3 ZIP?' - required: false - default: true - type: boolean - -env: - KERNEL_PATH: ${{ github.workspace }}/kernel-source - TOOLCHAIN_PATH: ${{ github.workspace }}/toolchain - KSU_NEXT_REPO: 'https://github.com/KernelSU-Next/KernelSU-Next.git' - SUSFS_REPO: 'https://gitlab.com/simonpunk/susfs4ksu.git' - ANYKERNEL3_REPO: 'https://github.com/osm0sis/AnyKernel3' - -jobs: - build: - runs-on: ubuntu-24.04 - steps: - # ============================================ - # 1. Setup Environment - # ============================================ - - name: ๐Ÿงน Optimize runner and install tools - run: | - sudo apt update - sudo apt install -y git make bc bison flex libssl-dev build-essential \ - python3 python3-distutils device-tree-compiler lz4 cpio zip wget curl - sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /opt/hostedtoolcache/CodeQL - - - name: ๐Ÿ”ง Create working directories - run: | - mkdir -p ${{ env.KERNEL_PATH }} - mkdir -p ${{ env.TOOLCHAIN_PATH }} - - # ============================================ - # 2. Download Kernel Source - # ============================================ - - name: ๐Ÿ“ฅ Checkout kernel source - uses: actions/checkout@v4 - with: - repository: ${{ inputs.kernel_url }} - ref: ${{ inputs.kernel_branch }} - path: ${{ env.KERNEL_PATH }} - fetch-depth: 1 - - # ============================================ - # 3. Download Toolchains (Clang + GCC) - # ============================================ - - name: ๐Ÿ”จ Download Clang (AOSP r522817 - Android 14/15/16 compatible) - run: | - cd ${{ env.TOOLCHAIN_PATH }} - wget -q https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+archive/refs/heads/main/r522817/clang-r522817.tar.gz - mkdir clang - tar -xf clang-r522817.tar.gz -C clang - - - name: ๐Ÿ”จ Download GCC (aarch64-linux-android-4.9) - run: | - cd ${{ env.TOOLCHAIN_PATH }} - git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 gcc - - - name: ๐Ÿ”จ Download GCC ARM32 (arm-linux-androideabi-4.9) - run: | - cd ${{ env.TOOLCHAIN_PATH }} - git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9 gcc32 - - # ============================================ - # 4. Prepare Config (Merge Fragment + Base GKI) - # ============================================ - - name: ๐Ÿ”ง Merge fragment config to full defconfig - run: | - cd ${{ env.KERNEL_PATH }} - - # Base GKI defconfig for kernel 5.15 - if [ -f arch/arm64/configs/gki_defconfig ]; then - cp arch/arm64/configs/gki_defconfig arch/arm64/configs/creek_full_defconfig - else - # Fallback: create minimal base - echo "CONFIG_ARCH_BENGAL=y" > arch/arm64/configs/creek_full_defconfig - fi - - # Merge fragment config - if [ -f arch/arm64/configs/${{ inputs.defconfig }} ]; then - cat arch/arm64/configs/${{ inputs.defconfig }} >> arch/arm64/configs/creek_full_defconfig - else - echo "โš ๏ธ Fragment config ${{ inputs.defconfig }} not found, using base only" - fi - - # Remove duplicate lines - sort -u arch/arm64/configs/creek_full_defconfig > arch/arm64/configs/creek_full_defconfig.tmp - mv arch/arm64/configs/creek_full_defconfig.tmp arch/arm64/configs/creek_full_defconfig - - # ============================================ - # 5. Integrate KernelSU-Next (ReSukiSU) - # ============================================ - - name: ๐ŸŒฑ Integrate KernelSU-Next - run: | - cd ${{ env.KERNEL_PATH }} - echo "::group::Integrating KernelSU-Next" - - # Clone KernelSU-Next - git clone --depth=1 -b ${{ inputs.ksun_branch }} ${{ env.KSU_NEXT_REPO }} KernelSU-Next - - # Run KernelSU-Next init script - if [ -f KernelSU-Next/tools/init_kernelsu.sh ]; then - bash KernelSU-Next/tools/init_kernelsu.sh $(pwd) - else - # Manual symlink for GKI - ln -sf $(pwd)/KernelSU-Next/kernel . - fi - - echo "KernelSU-Next integrated successfully" - echo "::endgroup::" - - # ============================================ - # 6. Integrate SUSFS (Root Hiding) - # ============================================ - - name: ๐Ÿ”’ Integrate SUSFS - run: | - cd ${{ env.KERNEL_PATH }} - echo "::group::Integrating SUSFS" - - # Clone SUSFS - git clone --depth=1 ${{ env.SUSFS_REPO }} susfs4ksu - - # Find kernel version - KERNEL_VER=$(make kernelversion 2>/dev/null || echo "5.15") - SUSFS_DIR="susfs4ksu/kernel_patches" - - # Apply SUSFS patches based on kernel version - if [ -d "$SUSFS_DIR/$KERNEL_VER" ]; then - for patch in $(ls $SUSFS_DIR/$KERNEL_VER/*.patch 2>/dev/null); do - echo "Applying patch: $patch" - patch -p1 -N -r - < "$patch" || echo "โš ๏ธ Patch may already be applied" - done - elif [ -d "$SUSFS_DIR/5.15" ]; then - for patch in $(ls $SUSFS_DIR/5.15/*.patch 2>/dev/null); do - echo "Applying patch: $patch" - patch -p1 -N -r - < "$patch" || echo "โš ๏ธ Patch may already be applied" - done - fi - - echo "SUSFS integration completed" - echo "::endgroup::" - - # ============================================ - # 7. Configure Kernel (Enable KSU & SUSFS) - # ============================================ - - name: โš™๏ธ Configure kernel - run: | - cd ${{ env.KERNEL_PATH }} - - export PATH=${{ env.TOOLCHAIN_PATH }}/clang/bin:${{ env.TOOLCHAIN_PATH }}/gcc/bin:${{ env.TOOLCHAIN_PATH }}/gcc32/bin:$PATH - export CLANG_TRIPLE=aarch64-linux-gnu- - export CROSS_COMPILE=aarch64-linux-android- - export CROSS_COMPILE_ARM32=arm-linux-androideabi- - export ARCH=arm64 - - # Generate .config - make O=out ARCH=arm64 creek_full_defconfig - - # Enable KernelSU config - scripts/config --file out/.config -e KSU - - # Enable SUSFS configs - scripts/config --file out/.config -e KSU_SUSFS - scripts/config --file out/.config -e KSU_SUSFS_HAS_MAGIC_MOUNT - scripts/config --file out/.config -e KSU_SUSFS_SUS_PATH - scripts/config --file out/.config -e KSU_SUSFS_SUS_MOUNT - scripts/config --file out/.config -e KSU_SUSFS_AUTO_ADD_SUS_KSU_DEFAULT_MOUNT - scripts/config --file out/.config -e KSU_SUSFS_AUTO_ADD_SUS_BIND_MOUNT - scripts/config --file out/.config -e KSU_SUSFS_SUS_KSTAT - scripts/config --file out/.config -e KSU_SUSFS_TRY_UMOUNT - scripts/config --file out/.config -e KSU_SUSFS_SPOOF_UNAME - scripts/config --file out/.config -e KSU_SUSFS_ENABLE_LOG - scripts/config --file out/.config -e KSU_SUSFS_HIDE_KSU_SUSFS_SYMBOLS - scripts/config --file out/.config -e KSU_SUSFS_SPOOF_CMDLINE_OR_BOOTCONFIG - scripts/config --file out/.config -e KSU_SUSFS_OPEN_REDIRECT - - # Optional: Performance optimization - scripts/config --file out/.config -e CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE - scripts/config --file out/.config --set-val CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE y - scripts/config --file out/.config --set-val CONFIG_CC_OPTIMIZE_FOR_SIZE n - - echo "Final kernel configuration:" - cat out/.config | grep -E "(KSU|SUSFS)" | sort - - # Save final config - cp out/.config arch/arm64/configs/creek_full_defconfig - - # ============================================ - # 8. Build Kernel - # ============================================ - - name: ๐Ÿ—๏ธ Build kernel - run: | - cd ${{ env.KERNEL_PATH }} - - export PATH=${{ env.TOOLCHAIN_PATH }}/clang/bin:${{ env.TOOLCHAIN_PATH }}/gcc/bin:${{ env.TOOLCHAIN_PATH }}/gcc32/bin:$PATH - export CLANG_TRIPLE=aarch64-linux-gnu- - export CROSS_COMPILE=aarch64-linux-android- - export CROSS_COMPILE_ARM32=arm-linux-androideabi- - export ARCH=arm64 - - # Build with LLVM - make O=out ARCH=arm64 LLVM=1 LLVM_IAS=1 -j$(nproc) 2>&1 | tee build.log - - # Check if build succeeded - if [ ! -f out/arch/arm64/boot/Image.gz ]; then - echo "โŒ Build failed: Image.gz not found!" - echo "Last 100 lines of build log:" - tail -100 build.log - exit 1 - fi - - echo "โœ… Build successful!" - ls -la out/arch/arm64/boot/ - - # ============================================ - # 9. Prepare AnyKernel3 Package - # ============================================ - - name: ๐Ÿ“ฆ Prepare AnyKernel3 package - if: inputs.use_anykernel3 == true - run: | - # Clone AnyKernel3 template - git clone --depth=1 ${{ env.ANYKERNEL3_REPO }} AnyKernel3 - - # Copy kernel image - cp ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/Image.gz AnyKernel3/ - - # Copy dtb/dtbo if available - if [ -f ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtbo.img ]; then - cp ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtbo.img AnyKernel3/ - fi - if [ -f ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtb.img ]; then - cp ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtb.img AnyKernel3/ - fi - - # Create custom anykernel.sh for creek - cd AnyKernel3 - cat > anykernel.sh << 'EOF' -# AnyKernel3 Ramdisk Mod Script -# osm0sis @ xda-developers - -## AnyKernel setup -# begin properties -properties() { ' -kernel.string=Custom Kernel for Redmi 15 (creek) - KernelSU-Next + SUSFS -do.devicecheck=0 -do.modules=0 -do.systemless=1 -do.cleanup=1 -do.cleanuponabort=0 -device.name1=creek -device.name2=redmi15 -device.name3=Redmi15 -supported.versions= -supported.patchlevels= -'; } # end properties - -# shell variables -block=auto; -is_slot_device=auto; -ramdisk_compression=auto; - -## AnyKernel methods (DO NOT CHANGE) -# import patching functions/variables - see for reference -. tools/ak3-core.sh; - -## AnyKernel install -# dump boot and vendor boot -dump_boot; - -# flash kernel -write_boot; - -# flash dtb if present -if [ -f $home/dtb ]; then - flash_dtb; -fi; - -# end install -EOF - - # Create ZIP - zip -r9 ../creek-ksu-susfs-anykernel3.zip ./* - cd .. - - # ============================================ - # 10. Upload Artifacts - # ============================================ - - name: ๐Ÿ“ค Upload AnyKernel3 ZIP - if: inputs.use_anykernel3 == true - uses: actions/upload-artifact@v4 - with: - name: creek-kernel-ksu-susfs-anykernel3 - path: creek-ksu-susfs-anykernel3.zip - if-no-files-found: error - - - name: ๐Ÿ“ค Upload boot image (raw) - uses: actions/upload-artifact@v4 - with: - name: creek-boot-image-raw - path: ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/Image.gz - if-no-files-found: warn From ce0be12c949819614a65684b413359f221cee13d Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 02:49:01 +0700 Subject: [PATCH 10/77] Create build-kernel.yml --- .github/workflows/build-kernel.yml | 329 +++++++++++++++++++++++++++++ 1 file changed, 329 insertions(+) create mode 100644 .github/workflows/build-kernel.yml diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml new file mode 100644 index 0000000000000..b086db4b522c5 --- /dev/null +++ b/.github/workflows/build-kernel.yml @@ -0,0 +1,329 @@ +name: Build Redmi 15 (creek) Kernel with KernelSU-Next & SUSFS + +on: + workflow_dispatch: + inputs: + kernel_url: + description: '๐Ÿ”— Kernel source repository URL' + required: false + default: 'https://github.com/MiCode/Xiaomi_Kernel_OpenSource' + type: string + kernel_branch: + description: '๐ŸŒฟ Kernel source branch' + required: false + default: 'creek-v-oss' + type: string + defconfig: + description: 'โš™๏ธ Defconfig name (fragment config name)' + required: false + default: 'creek_GKI-config' + type: string + ksun_branch: + description: '๐ŸŒฑ KernelSU-Next branch' + required: false + default: 'main' + type: choice + options: + - main + - v3.1.0 + use_anykernel3: + description: '๐Ÿ“ฆ Package as AnyKernel3 ZIP?' + required: false + default: true + type: boolean + +env: + KERNEL_PATH: ${{ github.workspace }}/kernel-source + TOOLCHAIN_PATH: ${{ github.workspace }}/toolchain + KSU_NEXT_REPO: 'https://github.com/KernelSU-Next/KernelSU-Next.git' + SUSFS_REPO: 'https://gitlab.com/simonpunk/susfs4ksu.git' + ANYKERNEL3_REPO: 'https://github.com/osm0sis/AnyKernel3' + +jobs: + build: + runs-on: ubuntu-24.04 + steps: + # ============================================ + # 1. Setup Environment + # ============================================ + - name: ๐Ÿงน Optimize runner and install tools + run: | + sudo apt update + sudo apt install -y git make bc bison flex libssl-dev build-essential \ + python3 python3-distutils device-tree-compiler lz4 cpio zip wget curl + sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /opt/hostedtoolcache/CodeQL + + - name: ๐Ÿ”ง Create working directories + run: | + mkdir -p ${{ env.KERNEL_PATH }} + mkdir -p ${{ env.TOOLCHAIN_PATH }} + + # ============================================ + # 2. Download Kernel Source + # ============================================ + - name: ๐Ÿ“ฅ Checkout kernel source + uses: actions/checkout@v4 + with: + repository: ${{ inputs.kernel_url }} + ref: ${{ inputs.kernel_branch }} + path: ${{ env.KERNEL_PATH }} + fetch-depth: 1 + + # ============================================ + # 3. Download Toolchains (Clang + GCC) + # ============================================ + - name: ๐Ÿ”จ Download Clang (AOSP r522817 - Android 14/15/16 compatible) + run: | + cd ${{ env.TOOLCHAIN_PATH }} + wget -q https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+archive/refs/heads/main/r522817/clang-r522817.tar.gz + mkdir clang + tar -xf clang-r522817.tar.gz -C clang + + - name: ๐Ÿ”จ Download GCC (aarch64-linux-android-4.9) + run: | + cd ${{ env.TOOLCHAIN_PATH }} + git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 gcc + + - name: ๐Ÿ”จ Download GCC ARM32 (arm-linux-androideabi-4.9) + run: | + cd ${{ env.TOOLCHAIN_PATH }} + git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9 gcc32 + + # ============================================ + # 4. Prepare Config (Merge Fragment + Base GKI) + # ============================================ + - name: ๐Ÿ”ง Merge fragment config to full defconfig + run: | + cd ${{ env.KERNEL_PATH }} + + # Base GKI defconfig for kernel 5.15 + if [ -f arch/arm64/configs/gki_defconfig ]; then + cp arch/arm64/configs/gki_defconfig arch/arm64/configs/creek_full_defconfig + else + # Fallback: create minimal base + echo "CONFIG_ARCH_BENGAL=y" > arch/arm64/configs/creek_full_defconfig + fi + + # Merge fragment config + if [ -f arch/arm64/configs/${{ inputs.defconfig }} ]; then + cat arch/arm64/configs/${{ inputs.defconfig }} >> arch/arm64/configs/creek_full_defconfig + else + echo "โš ๏ธ Fragment config ${{ inputs.defconfig }} not found, using base only" + fi + + # Remove duplicate lines + sort -u arch/arm64/configs/creek_full_defconfig > arch/arm64/configs/creek_full_defconfig.tmp + mv arch/arm64/configs/creek_full_defconfig.tmp arch/arm64/configs/creek_full_defconfig + + # ============================================ + # 5. Integrate KernelSU-Next (ReSukiSU) + # ============================================ + - name: ๐ŸŒฑ Integrate KernelSU-Next + run: | + cd ${{ env.KERNEL_PATH }} + echo "::group::Integrating KernelSU-Next" + + # Clone KernelSU-Next + git clone --depth=1 -b ${{ inputs.ksun_branch }} ${{ env.KSU_NEXT_REPO }} KernelSU-Next + + # Run KernelSU-Next init script + if [ -f KernelSU-Next/tools/init_kernelsu.sh ]; then + bash KernelSU-Next/tools/init_kernelsu.sh $(pwd) + else + # Manual symlink for GKI + ln -sf $(pwd)/KernelSU-Next/kernel . + fi + + echo "KernelSU-Next integrated successfully" + echo "::endgroup::" + + # ============================================ + # 6. Integrate SUSFS (Root Hiding) + # ============================================ + - name: ๐Ÿ”’ Integrate SUSFS + run: | + cd ${{ env.KERNEL_PATH }} + echo "::group::Integrating SUSFS" + + # Clone SUSFS + git clone --depth=1 ${{ env.SUSFS_REPO }} susfs4ksu + + # Find kernel version + KERNEL_VER=$(make kernelversion 2>/dev/null || echo "5.15") + SUSFS_DIR="susfs4ksu/kernel_patches" + + # Apply SUSFS patches based on kernel version + if [ -d "$SUSFS_DIR/$KERNEL_VER" ]; then + for patch in $(ls $SUSFS_DIR/$KERNEL_VER/*.patch 2>/dev/null); do + echo "Applying patch: $patch" + patch -p1 -N -r - < "$patch" || echo "โš ๏ธ Patch may already be applied" + done + elif [ -d "$SUSFS_DIR/5.15" ]; then + for patch in $(ls $SUSFS_DIR/5.15/*.patch 2>/dev/null); do + echo "Applying patch: $patch" + patch -p1 -N -r - < "$patch" || echo "โš ๏ธ Patch may already be applied" + done + fi + + echo "SUSFS integration completed" + echo "::endgroup::" + + # ============================================ + # 7. Configure Kernel (Enable KSU & SUSFS) + # ============================================ + - name: โš™๏ธ Configure kernel + run: | + cd ${{ env.KERNEL_PATH }} + + export PATH=${{ env.TOOLCHAIN_PATH }}/clang/bin:${{ env.TOOLCHAIN_PATH }}/gcc/bin:${{ env.TOOLCHAIN_PATH }}/gcc32/bin:$PATH + export CLANG_TRIPLE=aarch64-linux-gnu- + export CROSS_COMPILE=aarch64-linux-android- + export CROSS_COMPILE_ARM32=arm-linux-androideabi- + export ARCH=arm64 + + # Generate .config + make O=out ARCH=arm64 creek_full_defconfig + + # Enable KernelSU config + scripts/config --file out/.config -e KSU + + # Enable SUSFS configs + scripts/config --file out/.config -e KSU_SUSFS + scripts/config --file out/.config -e KSU_SUSFS_HAS_MAGIC_MOUNT + scripts/config --file out/.config -e KSU_SUSFS_SUS_PATH + scripts/config --file out/.config -e KSU_SUSFS_SUS_MOUNT + scripts/config --file out/.config -e KSU_SUSFS_AUTO_ADD_SUS_KSU_DEFAULT_MOUNT + scripts/config --file out/.config -e KSU_SUSFS_AUTO_ADD_SUS_BIND_MOUNT + scripts/config --file out/.config -e KSU_SUSFS_SUS_KSTAT + scripts/config --file out/.config -e KSU_SUSFS_TRY_UMOUNT + scripts/config --file out/.config -e KSU_SUSFS_SPOOF_UNAME + scripts/config --file out/.config -e KSU_SUSFS_ENABLE_LOG + scripts/config --file out/.config -e KSU_SUSFS_HIDE_KSU_SUSFS_SYMBOLS + scripts/config --file out/.config -e KSU_SUSFS_SPOOF_CMDLINE_OR_BOOTCONFIG + scripts/config --file out/.config -e KSU_SUSFS_OPEN_REDIRECT + + # Optional: Performance optimization + scripts/config --file out/.config -e CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE + scripts/config --file out/.config --set-val CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE y + scripts/config --file out/.config --set-val CONFIG_CC_OPTIMIZE_FOR_SIZE n + + echo "Final kernel configuration:" + cat out/.config | grep -E "(KSU|SUSFS)" | sort + + # Save final config + cp out/.config arch/arm64/configs/creek_full_defconfig + + # ============================================ + # 8. Build Kernel + # ============================================ + - name: ๐Ÿ—๏ธ Build kernel + run: | + cd ${{ env.KERNEL_PATH }} + + export PATH=${{ env.TOOLCHAIN_PATH }}/clang/bin:${{ env.TOOLCHAIN_PATH }}/gcc/bin:${{ env.TOOLCHAIN_PATH }}/gcc32/bin:$PATH + export CLANG_TRIPLE=aarch64-linux-gnu- + export CROSS_COMPILE=aarch64-linux-android- + export CROSS_COMPILE_ARM32=arm-linux-androideabi- + export ARCH=arm64 + + # Build with LLVM + make O=out ARCH=arm64 LLVM=1 LLVM_IAS=1 -j$(nproc) 2>&1 | tee build.log + + # Check if build succeeded + if [ ! -f out/arch/arm64/boot/Image.gz ]; then + echo "โŒ Build failed: Image.gz not found!" + echo "Last 100 lines of build log:" + tail -100 build.log + exit 1 + fi + + echo "โœ… Build successful!" + ls -la out/arch/arm64/boot/ + + # ============================================ + # 9. Prepare AnyKernel3 Package + # ============================================ + - name: ๐Ÿ“ฆ Prepare AnyKernel3 package + if: inputs.use_anykernel3 == true + run: | + # Clone AnyKernel3 template + git clone --depth=1 ${{ env.ANYKERNEL3_REPO }} AnyKernel3 + + # Copy kernel image + cp ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/Image.gz AnyKernel3/ + + # Copy dtb/dtbo if available + if [ -f ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtbo.img ]; then + cp ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtbo.img AnyKernel3/ + fi + if [ -f ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtb.img ]; then + cp ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtb.img AnyKernel3/ + fi + + # Create custom anykernel.sh for creek + cd AnyKernel3 + cat > anykernel.sh << 'EOF' +# AnyKernel3 Ramdisk Mod Script +# osm0sis @ xda-developers + +## AnyKernel setup +# begin properties +properties() { ' +kernel.string=Custom Kernel for Redmi 15 (creek) - KernelSU-Next + SUSFS +do.devicecheck=0 +do.modules=0 +do.systemless=1 +do.cleanup=1 +do.cleanuponabort=0 +device.name1=creek +device.name2=redmi15 +device.name3=Redmi15 +supported.versions= +supported.patchlevels= +'; } # end properties + +# shell variables +block=auto; +is_slot_device=auto; +ramdisk_compression=auto; + +## AnyKernel methods (DO NOT CHANGE) +# import patching functions/variables - see for reference +. tools/ak3-core.sh; + +## AnyKernel install +# dump boot and vendor boot +dump_boot; + +# flash kernel +write_boot; + +# flash dtb if present +if [ -f $home/dtb ]; then + flash_dtb; +fi; + +# end install +EOF + + # Create ZIP + zip -r9 ../creek-ksu-susfs-anykernel3.zip ./* + cd .. + + # ============================================ + # 10. Upload Artifacts + # ============================================ + - name: ๐Ÿ“ค Upload AnyKernel3 ZIP + if: inputs.use_anykernel3 == true + uses: actions/upload-artifact@v4 + with: + name: creek-kernel-ksu-susfs-anykernel3 + path: creek-ksu-susfs-anykernel3.zip + if-no-files-found: error + + - name: ๐Ÿ“ค Upload boot image (raw) + uses: actions/upload-artifact@v4 + with: + name: creek-boot-image-raw + path: ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/Image.gz + if-no-files-found: warn From 91e54ea7720530def8903a937020a578c358a91b Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 02:52:06 +0700 Subject: [PATCH 11/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 298 +++-------------------------- 1 file changed, 22 insertions(+), 276 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index b086db4b522c5..19733ddae2bf9 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -1,67 +1,39 @@ -name: Build Redmi 15 (creek) Kernel with KernelSU-Next & SUSFS +name: Build Redmi 15 (creek) Kernel with KernelSU-Next and SUSFS on: workflow_dispatch: inputs: kernel_url: - description: '๐Ÿ”— Kernel source repository URL' + description: 'Kernel source repository URL' required: false default: 'https://github.com/MiCode/Xiaomi_Kernel_OpenSource' type: string kernel_branch: - description: '๐ŸŒฟ Kernel source branch' + description: 'Kernel source branch' required: false default: 'creek-v-oss' type: string defconfig: - description: 'โš™๏ธ Defconfig name (fragment config name)' + description: 'Defconfig name (fragment config name)' required: false default: 'creek_GKI-config' type: string - ksun_branch: - description: '๐ŸŒฑ KernelSU-Next branch' - required: false - default: 'main' - type: choice - options: - - main - - v3.1.0 - use_anykernel3: - description: '๐Ÿ“ฆ Package as AnyKernel3 ZIP?' - required: false - default: true - type: boolean env: KERNEL_PATH: ${{ github.workspace }}/kernel-source TOOLCHAIN_PATH: ${{ github.workspace }}/toolchain - KSU_NEXT_REPO: 'https://github.com/KernelSU-Next/KernelSU-Next.git' - SUSFS_REPO: 'https://gitlab.com/simonpunk/susfs4ksu.git' - ANYKERNEL3_REPO: 'https://github.com/osm0sis/AnyKernel3' jobs: build: - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 steps: - # ============================================ - # 1. Setup Environment - # ============================================ - - name: ๐Ÿงน Optimize runner and install tools + - name: Install build tools run: | sudo apt update sudo apt install -y git make bc bison flex libssl-dev build-essential \ python3 python3-distutils device-tree-compiler lz4 cpio zip wget curl - sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /opt/hostedtoolcache/CodeQL - - - name: ๐Ÿ”ง Create working directories - run: | - mkdir -p ${{ env.KERNEL_PATH }} - mkdir -p ${{ env.TOOLCHAIN_PATH }} - # ============================================ - # 2. Download Kernel Source - # ============================================ - - name: ๐Ÿ“ฅ Checkout kernel source + - name: Checkout kernel source uses: actions/checkout@v4 with: repository: ${{ inputs.kernel_url }} @@ -69,261 +41,35 @@ jobs: path: ${{ env.KERNEL_PATH }} fetch-depth: 1 - # ============================================ - # 3. Download Toolchains (Clang + GCC) - # ============================================ - - name: ๐Ÿ”จ Download Clang (AOSP r522817 - Android 14/15/16 compatible) + - name: Setup toolchain run: | + mkdir -p ${{ env.TOOLCHAIN_PATH }} cd ${{ env.TOOLCHAIN_PATH }} wget -q https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+archive/refs/heads/main/r522817/clang-r522817.tar.gz - mkdir clang - tar -xf clang-r522817.tar.gz -C clang - - - name: ๐Ÿ”จ Download GCC (aarch64-linux-android-4.9) - run: | - cd ${{ env.TOOLCHAIN_PATH }} + mkdir clang && tar -xf clang-r522817.tar.gz -C clang git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 gcc - - name: ๐Ÿ”จ Download GCC ARM32 (arm-linux-androideabi-4.9) - run: | - cd ${{ env.TOOLCHAIN_PATH }} - git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9 gcc32 - - # ============================================ - # 4. Prepare Config (Merge Fragment + Base GKI) - # ============================================ - - name: ๐Ÿ”ง Merge fragment config to full defconfig - run: | - cd ${{ env.KERNEL_PATH }} - - # Base GKI defconfig for kernel 5.15 - if [ -f arch/arm64/configs/gki_defconfig ]; then - cp arch/arm64/configs/gki_defconfig arch/arm64/configs/creek_full_defconfig - else - # Fallback: create minimal base - echo "CONFIG_ARCH_BENGAL=y" > arch/arm64/configs/creek_full_defconfig - fi - - # Merge fragment config - if [ -f arch/arm64/configs/${{ inputs.defconfig }} ]; then - cat arch/arm64/configs/${{ inputs.defconfig }} >> arch/arm64/configs/creek_full_defconfig - else - echo "โš ๏ธ Fragment config ${{ inputs.defconfig }} not found, using base only" - fi - - # Remove duplicate lines - sort -u arch/arm64/configs/creek_full_defconfig > arch/arm64/configs/creek_full_defconfig.tmp - mv arch/arm64/configs/creek_full_defconfig.tmp arch/arm64/configs/creek_full_defconfig - - # ============================================ - # 5. Integrate KernelSU-Next (ReSukiSU) - # ============================================ - - name: ๐ŸŒฑ Integrate KernelSU-Next + - name: Configure kernel run: | cd ${{ env.KERNEL_PATH }} - echo "::group::Integrating KernelSU-Next" - - # Clone KernelSU-Next - git clone --depth=1 -b ${{ inputs.ksun_branch }} ${{ env.KSU_NEXT_REPO }} KernelSU-Next - - # Run KernelSU-Next init script - if [ -f KernelSU-Next/tools/init_kernelsu.sh ]; then - bash KernelSU-Next/tools/init_kernelsu.sh $(pwd) - else - # Manual symlink for GKI - ln -sf $(pwd)/KernelSU-Next/kernel . - fi - - echo "KernelSU-Next integrated successfully" - echo "::endgroup::" - - # ============================================ - # 6. Integrate SUSFS (Root Hiding) - # ============================================ - - name: ๐Ÿ”’ Integrate SUSFS - run: | - cd ${{ env.KERNEL_PATH }} - echo "::group::Integrating SUSFS" - - # Clone SUSFS - git clone --depth=1 ${{ env.SUSFS_REPO }} susfs4ksu - - # Find kernel version - KERNEL_VER=$(make kernelversion 2>/dev/null || echo "5.15") - SUSFS_DIR="susfs4ksu/kernel_patches" - - # Apply SUSFS patches based on kernel version - if [ -d "$SUSFS_DIR/$KERNEL_VER" ]; then - for patch in $(ls $SUSFS_DIR/$KERNEL_VER/*.patch 2>/dev/null); do - echo "Applying patch: $patch" - patch -p1 -N -r - < "$patch" || echo "โš ๏ธ Patch may already be applied" - done - elif [ -d "$SUSFS_DIR/5.15" ]; then - for patch in $(ls $SUSFS_DIR/5.15/*.patch 2>/dev/null); do - echo "Applying patch: $patch" - patch -p1 -N -r - < "$patch" || echo "โš ๏ธ Patch may already be applied" - done - fi - - echo "SUSFS integration completed" - echo "::endgroup::" - - # ============================================ - # 7. Configure Kernel (Enable KSU & SUSFS) - # ============================================ - - name: โš™๏ธ Configure kernel - run: | - cd ${{ env.KERNEL_PATH }} - - export PATH=${{ env.TOOLCHAIN_PATH }}/clang/bin:${{ env.TOOLCHAIN_PATH }}/gcc/bin:${{ env.TOOLCHAIN_PATH }}/gcc32/bin:$PATH - export CLANG_TRIPLE=aarch64-linux-gnu- + export PATH=${{ env.TOOLCHAIN_PATH }}/clang/bin:${{ env.TOOLCHAIN_PATH }}/gcc/bin:$PATH export CROSS_COMPILE=aarch64-linux-android- - export CROSS_COMPILE_ARM32=arm-linux-androideabi- export ARCH=arm64 - - # Generate .config - make O=out ARCH=arm64 creek_full_defconfig - - # Enable KernelSU config - scripts/config --file out/.config -e KSU - - # Enable SUSFS configs - scripts/config --file out/.config -e KSU_SUSFS - scripts/config --file out/.config -e KSU_SUSFS_HAS_MAGIC_MOUNT - scripts/config --file out/.config -e KSU_SUSFS_SUS_PATH - scripts/config --file out/.config -e KSU_SUSFS_SUS_MOUNT - scripts/config --file out/.config -e KSU_SUSFS_AUTO_ADD_SUS_KSU_DEFAULT_MOUNT - scripts/config --file out/.config -e KSU_SUSFS_AUTO_ADD_SUS_BIND_MOUNT - scripts/config --file out/.config -e KSU_SUSFS_SUS_KSTAT - scripts/config --file out/.config -e KSU_SUSFS_TRY_UMOUNT - scripts/config --file out/.config -e KSU_SUSFS_SPOOF_UNAME - scripts/config --file out/.config -e KSU_SUSFS_ENABLE_LOG - scripts/config --file out/.config -e KSU_SUSFS_HIDE_KSU_SUSFS_SYMBOLS - scripts/config --file out/.config -e KSU_SUSFS_SPOOF_CMDLINE_OR_BOOTCONFIG - scripts/config --file out/.config -e KSU_SUSFS_OPEN_REDIRECT - - # Optional: Performance optimization - scripts/config --file out/.config -e CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE - scripts/config --file out/.config --set-val CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE y - scripts/config --file out/.config --set-val CONFIG_CC_OPTIMIZE_FOR_SIZE n - - echo "Final kernel configuration:" - cat out/.config | grep -E "(KSU|SUSFS)" | sort - - # Save final config - cp out/.config arch/arm64/configs/creek_full_defconfig + make ARCH=arm64 ${{ inputs.defconfig }} + scripts/config --file .config -e KSU + cp .config arch/arm64/configs/creek_full_defconfig - # ============================================ - # 8. Build Kernel - # ============================================ - - name: ๐Ÿ—๏ธ Build kernel + - name: Build kernel run: | cd ${{ env.KERNEL_PATH }} - - export PATH=${{ env.TOOLCHAIN_PATH }}/clang/bin:${{ env.TOOLCHAIN_PATH }}/gcc/bin:${{ env.TOOLCHAIN_PATH }}/gcc32/bin:$PATH - export CLANG_TRIPLE=aarch64-linux-gnu- + export PATH=${{ env.TOOLCHAIN_PATH }}/clang/bin:${{ env.TOOLCHAIN_PATH }}/gcc/bin:$PATH export CROSS_COMPILE=aarch64-linux-android- - export CROSS_COMPILE_ARM32=arm-linux-androideabi- export ARCH=arm64 - - # Build with LLVM - make O=out ARCH=arm64 LLVM=1 LLVM_IAS=1 -j$(nproc) 2>&1 | tee build.log - - # Check if build succeeded - if [ ! -f out/arch/arm64/boot/Image.gz ]; then - echo "โŒ Build failed: Image.gz not found!" - echo "Last 100 lines of build log:" - tail -100 build.log - exit 1 - fi - - echo "โœ… Build successful!" - ls -la out/arch/arm64/boot/ - - # ============================================ - # 9. Prepare AnyKernel3 Package - # ============================================ - - name: ๐Ÿ“ฆ Prepare AnyKernel3 package - if: inputs.use_anykernel3 == true - run: | - # Clone AnyKernel3 template - git clone --depth=1 ${{ env.ANYKERNEL3_REPO }} AnyKernel3 - - # Copy kernel image - cp ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/Image.gz AnyKernel3/ - - # Copy dtb/dtbo if available - if [ -f ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtbo.img ]; then - cp ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtbo.img AnyKernel3/ - fi - if [ -f ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtb.img ]; then - cp ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/dtb.img AnyKernel3/ - fi - - # Create custom anykernel.sh for creek - cd AnyKernel3 - cat > anykernel.sh << 'EOF' -# AnyKernel3 Ramdisk Mod Script -# osm0sis @ xda-developers - -## AnyKernel setup -# begin properties -properties() { ' -kernel.string=Custom Kernel for Redmi 15 (creek) - KernelSU-Next + SUSFS -do.devicecheck=0 -do.modules=0 -do.systemless=1 -do.cleanup=1 -do.cleanuponabort=0 -device.name1=creek -device.name2=redmi15 -device.name3=Redmi15 -supported.versions= -supported.patchlevels= -'; } # end properties - -# shell variables -block=auto; -is_slot_device=auto; -ramdisk_compression=auto; - -## AnyKernel methods (DO NOT CHANGE) -# import patching functions/variables - see for reference -. tools/ak3-core.sh; - -## AnyKernel install -# dump boot and vendor boot -dump_boot; - -# flash kernel -write_boot; - -# flash dtb if present -if [ -f $home/dtb ]; then - flash_dtb; -fi; - -# end install -EOF - - # Create ZIP - zip -r9 ../creek-ksu-susfs-anykernel3.zip ./* - cd .. - - # ============================================ - # 10. Upload Artifacts - # ============================================ - - name: ๐Ÿ“ค Upload AnyKernel3 ZIP - if: inputs.use_anykernel3 == true - uses: actions/upload-artifact@v4 - with: - name: creek-kernel-ksu-susfs-anykernel3 - path: creek-ksu-susfs-anykernel3.zip - if-no-files-found: error + make ARCH=arm64 LLVM=1 -j$(nproc) + echo "Build completed" - - name: ๐Ÿ“ค Upload boot image (raw) + - name: Upload kernel image uses: actions/upload-artifact@v4 with: - name: creek-boot-image-raw - path: ${{ env.KERNEL_PATH }}/out/arch/arm64/boot/Image.gz - if-no-files-found: warn + name: kernel-Image.gz + path: ${{ env.KERNEL_PATH }}/arch/arm64/boot/Image.gz From 3a0b59dec94cf6cb21da80f331146e52e3a18ae3 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 02:56:05 +0700 Subject: [PATCH 12/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 19733ddae2bf9..b16c290ea8a1d 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -1,23 +1,7 @@ -name: Build Redmi 15 (creek) Kernel with KernelSU-Next and SUSFS +name: Build Redmi 15 (creek) Kernel on: workflow_dispatch: - inputs: - kernel_url: - description: 'Kernel source repository URL' - required: false - default: 'https://github.com/MiCode/Xiaomi_Kernel_OpenSource' - type: string - kernel_branch: - description: 'Kernel source branch' - required: false - default: 'creek-v-oss' - type: string - defconfig: - description: 'Defconfig name (fragment config name)' - required: false - default: 'creek_GKI-config' - type: string env: KERNEL_PATH: ${{ github.workspace }}/kernel-source @@ -33,11 +17,9 @@ jobs: sudo apt install -y git make bc bison flex libssl-dev build-essential \ python3 python3-distutils device-tree-compiler lz4 cpio zip wget curl - - name: Checkout kernel source + - name: Checkout kernel source (from your repo) uses: actions/checkout@v4 with: - repository: ${{ inputs.kernel_url }} - ref: ${{ inputs.kernel_branch }} path: ${{ env.KERNEL_PATH }} fetch-depth: 1 @@ -55,8 +37,7 @@ jobs: export PATH=${{ env.TOOLCHAIN_PATH }}/clang/bin:${{ env.TOOLCHAIN_PATH }}/gcc/bin:$PATH export CROSS_COMPILE=aarch64-linux-android- export ARCH=arm64 - make ARCH=arm64 ${{ inputs.defconfig }} - scripts/config --file .config -e KSU + make ARCH=arm64 creek_GKI-config cp .config arch/arm64/configs/creek_full_defconfig - name: Build kernel From 5468db32614c966efe43e6dae15917c79938b809 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 03:00:59 +0700 Subject: [PATCH 13/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 44 +++++++++++++++--------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index b16c290ea8a1d..440002cd4cdb4 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -3,10 +3,6 @@ name: Build Redmi 15 (creek) Kernel on: workflow_dispatch: -env: - KERNEL_PATH: ${{ github.workspace }}/kernel-source - TOOLCHAIN_PATH: ${{ github.workspace }}/toolchain - jobs: build: runs-on: ubuntu-22.04 @@ -15,42 +11,46 @@ jobs: run: | sudo apt update sudo apt install -y git make bc bison flex libssl-dev build-essential \ - python3 python3-distutils device-tree-compiler lz4 cpio zip wget curl + python3 device-tree-compiler lz4 cpio zip wget curl - - name: Checkout kernel source (from your repo) + - name: Checkout kernel source uses: actions/checkout@v4 with: - path: ${{ env.KERNEL_PATH }} fetch-depth: 1 - - name: Setup toolchain + - name: Download Clang toolchain run: | - mkdir -p ${{ env.TOOLCHAIN_PATH }} - cd ${{ env.TOOLCHAIN_PATH }} + mkdir -p ${{ github.workspace }}/toolchain + cd ${{ github.workspace }}/toolchain wget -q https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+archive/refs/heads/main/r522817/clang-r522817.tar.gz mkdir clang && tar -xf clang-r522817.tar.gz -C clang - git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 gcc + echo "Clang downloaded" - - name: Configure kernel + - name: Download GCC toolchain run: | - cd ${{ env.KERNEL_PATH }} - export PATH=${{ env.TOOLCHAIN_PATH }}/clang/bin:${{ env.TOOLCHAIN_PATH }}/gcc/bin:$PATH - export CROSS_COMPILE=aarch64-linux-android- - export ARCH=arm64 - make ARCH=arm64 creek_GKI-config - cp .config arch/arm64/configs/creek_full_defconfig + cd ${{ github.workspace }}/toolchain + git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 gcc + echo "GCC downloaded" - name: Build kernel run: | - cd ${{ env.KERNEL_PATH }} - export PATH=${{ env.TOOLCHAIN_PATH }}/clang/bin:${{ env.TOOLCHAIN_PATH }}/gcc/bin:$PATH + cd ${{ github.workspace }} + export PATH=${{ github.workspace }}/toolchain/clang/bin:${{ github.workspace }}/toolchain/gcc/bin:$PATH export CROSS_COMPILE=aarch64-linux-android- export ARCH=arm64 + export CC=clang + + # Configure kernel + make ARCH=arm64 creek_GKI-config + + # Build kernel make ARCH=arm64 LLVM=1 -j$(nproc) + echo "Build completed" - name: Upload kernel image uses: actions/upload-artifact@v4 with: - name: kernel-Image.gz - path: ${{ env.KERNEL_PATH }}/arch/arm64/boot/Image.gz + name: kernel-Image + path: arch/arm64/boot/Image.gz + if-no-files-found: warn From 974f0fb9d45af5606f8571c10c028ee4c335fd4d Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 03:06:57 +0700 Subject: [PATCH 14/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 76 +++++++++++++++++++----------- 1 file changed, 49 insertions(+), 27 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 440002cd4cdb4..e8993a3c6c092 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -1,4 +1,4 @@ -name: Build Redmi 15 (creek) Kernel +name: Build Kernel with KernelSU-Next (AnyKernel3 ZIP) on: workflow_dispatch: @@ -7,50 +7,72 @@ jobs: build: runs-on: ubuntu-22.04 steps: - - name: Install build tools - run: | - sudo apt update - sudo apt install -y git make bc bison flex libssl-dev build-essential \ - python3 device-tree-compiler lz4 cpio zip wget curl - - name: Checkout kernel source uses: actions/checkout@v4 with: fetch-depth: 1 - - name: Download Clang toolchain + - name: Setup build environment run: | - mkdir -p ${{ github.workspace }}/toolchain - cd ${{ github.workspace }}/toolchain - wget -q https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+archive/refs/heads/main/r522817/clang-r522817.tar.gz - mkdir clang && tar -xf clang-r522817.tar.gz -C clang - echo "Clang downloaded" + sudo apt update + sudo apt install -y git make bc bison flex libssl-dev build-essential \ + python3 device-tree-compiler lz4 cpio zip wget curl - - name: Download GCC toolchain + - name: Download toolchain run: | + mkdir -p ${{ github.workspace }}/toolchain cd ${{ github.workspace }}/toolchain + wget -q https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz + tar -xf clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz + mv clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04 clang git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 gcc - echo "GCC downloaded" - - name: Build kernel + - name: Integrate KernelSU-Next + run: | + cd ${{ github.workspace }} + git clone --depth=1 -b main https://github.com/KernelSU-Next/KernelSU-Next.git KernelSU-Next + cp -r KernelSU-Next/kernel/* ./ + + - name: Configure kernel run: | cd ${{ github.workspace }} export PATH=${{ github.workspace }}/toolchain/clang/bin:${{ github.workspace }}/toolchain/gcc/bin:$PATH export CROSS_COMPILE=aarch64-linux-android- export ARCH=arm64 export CC=clang - - # Configure kernel make ARCH=arm64 creek_GKI-config - - # Build kernel - make ARCH=arm64 LLVM=1 -j$(nproc) - - echo "Build completed" - - name: Upload kernel image + - name: Build kernel + run: | + cd ${{ github.workspace }} + export PATH=${{ github.workspace }}/toolchain/clang/bin:${{ github.workspace }}/toolchain/gcc/bin:$PATH + export CROSS_COMPILE=aarch64-linux-android- + export ARCH=arm64 + export CC=clang + make ARCH=arm64 -j$(nproc) + + - name: Prepare AnyKernel3 + run: | + git clone --depth=1 https://github.com/osm0sis/AnyKernel3 AnyKernel3 + cp ${{ github.workspace }}/arch/arm64/boot/Image.gz AnyKernel3/ + cd AnyKernel3 + cat > anykernel.sh << 'EOF' +kernel.string=Custom Kernel for Redmi 15 (creek) - KernelSU-Next +do.devicecheck=0 +do.modules=0 +do.systemless=1 +do.cleanup=1 +device.name1=creek +block=auto +is_slot_device=auto +. tools/ak3-core.sh +dump_boot +write_boot +EOF + zip -r9 ../Creek-Kernel-KSU-Next.zip ./* + + - name: Upload ZIP uses: actions/upload-artifact@v4 with: - name: kernel-Image - path: arch/arm64/boot/Image.gz - if-no-files-found: warn + name: Creek-Kernel-KSU-Next + path: Creek-Kernel-KSU-Next.zip From 98fb671c37438afe221d9401a9cc3bf14dd3de09 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 03:08:45 +0700 Subject: [PATCH 15/77] Update build-kernel.yml From df6a748bf543fd749488ac1f4b80de1c85552af9 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 03:11:36 +0700 Subject: [PATCH 16/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index e8993a3c6c092..fecd37ad8a0a5 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -1,4 +1,4 @@ -name: Build Kernel with KernelSU-Next (AnyKernel3 ZIP) +name: Build Creek Kernel v2 on: workflow_dispatch: From f83f1f6178184e486bd77182561f2f87f520be3d Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 03:13:18 +0700 Subject: [PATCH 17/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 71 +++++++++++------------------- 1 file changed, 25 insertions(+), 46 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index fecd37ad8a0a5..f212b78f023d6 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -1,4 +1,4 @@ -name: Build Creek Kernel v2 +name: Build Redmi 15 (creek) Kernel on: workflow_dispatch: @@ -7,40 +7,31 @@ jobs: build: runs-on: ubuntu-22.04 steps: - - name: Checkout kernel source - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: Setup build environment + - name: Install build tools run: | sudo apt update sudo apt install -y git make bc bison flex libssl-dev build-essential \ python3 device-tree-compiler lz4 cpio zip wget curl - - name: Download toolchain + - name: Checkout kernel source + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Download toolchain (Clang + GCC) run: | mkdir -p ${{ github.workspace }}/toolchain cd ${{ github.workspace }}/toolchain + + # Download Clang (alternative URL) wget -q https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz tar -xf clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz mv clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04 clang + + # Download GCC git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 gcc - - - name: Integrate KernelSU-Next - run: | - cd ${{ github.workspace }} - git clone --depth=1 -b main https://github.com/KernelSU-Next/KernelSU-Next.git KernelSU-Next - cp -r KernelSU-Next/kernel/* ./ - - - name: Configure kernel - run: | - cd ${{ github.workspace }} - export PATH=${{ github.workspace }}/toolchain/clang/bin:${{ github.workspace }}/toolchain/gcc/bin:$PATH - export CROSS_COMPILE=aarch64-linux-android- - export ARCH=arm64 - export CC=clang - make ARCH=arm64 creek_GKI-config + + echo "Toolchain ready" - name: Build kernel run: | @@ -49,30 +40,18 @@ jobs: export CROSS_COMPILE=aarch64-linux-android- export ARCH=arm64 export CC=clang + + # Configure + make ARCH=arm64 creek_GKI-config + + # Build make ARCH=arm64 -j$(nproc) + + echo "Build completed" - - name: Prepare AnyKernel3 - run: | - git clone --depth=1 https://github.com/osm0sis/AnyKernel3 AnyKernel3 - cp ${{ github.workspace }}/arch/arm64/boot/Image.gz AnyKernel3/ - cd AnyKernel3 - cat > anykernel.sh << 'EOF' -kernel.string=Custom Kernel for Redmi 15 (creek) - KernelSU-Next -do.devicecheck=0 -do.modules=0 -do.systemless=1 -do.cleanup=1 -device.name1=creek -block=auto -is_slot_device=auto -. tools/ak3-core.sh -dump_boot -write_boot -EOF - zip -r9 ../Creek-Kernel-KSU-Next.zip ./* - - - name: Upload ZIP + - name: Upload kernel image uses: actions/upload-artifact@v4 with: - name: Creek-Kernel-KSU-Next - path: Creek-Kernel-KSU-Next.zip + name: kernel-Image + path: arch/arm64/boot/Image.gz + if-no-files-found: warn From 2d442341adeef595687261d840cc15aeb308a31f Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 03:15:43 +0700 Subject: [PATCH 18/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 60 ++++++++++++++++++------------ 1 file changed, 37 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index f212b78f023d6..5ae663eac2953 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -1,4 +1,4 @@ -name: Build Redmi 15 (creek) Kernel +name: Build Kernel with KernelSU-Next (AnyKernel3) on: workflow_dispatch: @@ -18,40 +18,54 @@ jobs: with: fetch-depth: 1 - - name: Download toolchain (Clang + GCC) + - name: Download toolchain run: | mkdir -p ${{ github.workspace }}/toolchain cd ${{ github.workspace }}/toolchain - - # Download Clang (alternative URL) wget -q https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz tar -xf clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz mv clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04 clang - - # Download GCC git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 gcc - - echo "Toolchain ready" - - name: Build kernel + - name: Setup environment + run: | + echo "PATH=${{ github.workspace }}/toolchain/clang/bin:${{ github.workspace }}/toolchain/gcc/bin:$PATH" >> $GITHUB_ENV + echo "CROSS_COMPILE=aarch64-linux-android-" >> $GITHUB_ENV + echo "ARCH=arm64" >> $GITHUB_ENV + echo "CC=clang" >> $GITHUB_ENV + + - name: Configure kernel run: | cd ${{ github.workspace }} - export PATH=${{ github.workspace }}/toolchain/clang/bin:${{ github.workspace }}/toolchain/gcc/bin:$PATH - export CROSS_COMPILE=aarch64-linux-android- - export ARCH=arm64 - export CC=clang - - # Configure make ARCH=arm64 creek_GKI-config - - # Build + + - name: Build kernel + run: | + cd ${{ github.workspace }} make ARCH=arm64 -j$(nproc) - - echo "Build completed" - - name: Upload kernel image + - name: Prepare AnyKernel3 + run: | + git clone --depth=1 https://github.com/osm0sis/AnyKernel3 AnyKernel3 + cp ${{ github.workspace }}/arch/arm64/boot/Image.gz AnyKernel3/ + cd AnyKernel3 + cat > anykernel.sh << 'EOF' +kernel.string=Custom Kernel for Redmi 15 (creek) +do.devicecheck=0 +do.modules=0 +do.systemless=1 +do.cleanup=1 +device.name1=creek +block=auto +is_slot_device=auto +. tools/ak3-core.sh +dump_boot +write_boot +EOF + zip -r9 ../Creek-Kernel.zip ./* + + - name: Upload ZIP uses: actions/upload-artifact@v4 with: - name: kernel-Image - path: arch/arm64/boot/Image.gz - if-no-files-found: warn + name: Creek-Kernel + path: Creek-Kernel.zip From ed8531f44f949a51a9a96cbcabe5e4b2c13c005f Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 03:17:21 +0700 Subject: [PATCH 19/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 78 ++++++------------------------ 1 file changed, 15 insertions(+), 63 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 5ae663eac2953..a272d1df9814e 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -1,71 +1,23 @@ -name: Build Kernel with KernelSU-Next (AnyKernel3) - -on: - workflow_dispatch: - +name: Creek Kernel with KSU +on: workflow_dispatch jobs: build: runs-on: ubuntu-22.04 steps: - - name: Install build tools + - uses: actions/checkout@v4 + - name: Install tools + run: sudo apt update && sudo apt install -y git make bc wget + - name: Get KernelSU run: | - sudo apt update - sudo apt install -y git make bc bison flex libssl-dev build-essential \ - python3 device-tree-compiler lz4 cpio zip wget curl - - - name: Checkout kernel source - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: Download toolchain - run: | - mkdir -p ${{ github.workspace }}/toolchain - cd ${{ github.workspace }}/toolchain - wget -q https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz - tar -xf clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz - mv clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04 clang - git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 gcc - - - name: Setup environment - run: | - echo "PATH=${{ github.workspace }}/toolchain/clang/bin:${{ github.workspace }}/toolchain/gcc/bin:$PATH" >> $GITHUB_ENV - echo "CROSS_COMPILE=aarch64-linux-android-" >> $GITHUB_ENV - echo "ARCH=arm64" >> $GITHUB_ENV - echo "CC=clang" >> $GITHUB_ENV - - - name: Configure kernel - run: | - cd ${{ github.workspace }} - make ARCH=arm64 creek_GKI-config - - - name: Build kernel - run: | - cd ${{ github.workspace }} - make ARCH=arm64 -j$(nproc) - - - name: Prepare AnyKernel3 + git clone --depth=1 https://github.com/KernelSU-Next/KernelSU-Next.git + cp -r KernelSU-Next/kernel/* . + - name: Build run: | - git clone --depth=1 https://github.com/osm0sis/AnyKernel3 AnyKernel3 - cp ${{ github.workspace }}/arch/arm64/boot/Image.gz AnyKernel3/ - cd AnyKernel3 - cat > anykernel.sh << 'EOF' -kernel.string=Custom Kernel for Redmi 15 (creek) -do.devicecheck=0 -do.modules=0 -do.systemless=1 -do.cleanup=1 -device.name1=creek -block=auto -is_slot_device=auto -. tools/ak3-core.sh -dump_boot -write_boot -EOF - zip -r9 ../Creek-Kernel.zip ./* - - - name: Upload ZIP + export ARCH=arm64 + make creek_GKI-config + make -j2 + - name: Upload uses: actions/upload-artifact@v4 with: - name: Creek-Kernel - path: Creek-Kernel.zip + name: kernel-ksu + path: arch/arm64/boot/Image.gz From 77eb487ffb3c716104c23d4d15cd8cffaee52237 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 03:20:44 +0700 Subject: [PATCH 20/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 90 +++++++++++++++++++++++++----- 1 file changed, 77 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index a272d1df9814e..83cf5a653c6c1 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -1,23 +1,87 @@ -name: Creek Kernel with KSU +name: Build Creek Kernel with KernelSU-Next on: workflow_dispatch + jobs: build: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 - - name: Install tools - run: sudo apt update && sudo apt install -y git make bc wget - - name: Get KernelSU + - name: Checkout kernel source + uses: actions/checkout@v4 + + - name: Install build tools run: | - git clone --depth=1 https://github.com/KernelSU-Next/KernelSU-Next.git - cp -r KernelSU-Next/kernel/* . - - name: Build + sudo apt update + sudo apt install -y git make bc bison flex libssl-dev build-essential \ + python3 device-tree-compiler lz4 cpio zip wget curl + + - name: Download Clang toolchain run: | + mkdir -p ${{ github.workspace }}/toolchain + cd ${{ github.workspace }}/toolchain + wget -q https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz + tar -xf clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz + mv clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04 clang + + - name: Download GCC toolchain + run: | + cd ${{ github.workspace }}/toolchain + git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 gcc + + - name: Setup KernelSU-Next (proper way) + run: | + cd ${{ github.workspace }} + git clone --depth=1 -b main https://github.com/KernelSU-Next/KernelSU-Next.git KernelSU-Next + + # Gunakan script resmi dari KernelSU-Next (bukan cp manual) + cd KernelSU-Next + if [ -f ksu_setup.sh ]; then + bash ksu_setup.sh .. + else + # Fallback: copy hanya file yang diperlukan + cd kernel + find . -type f -exec cp --parents {} ${{ github.workspace }}/ \; + fi + + - name: Configure kernel + run: | + cd ${{ github.workspace }} + export PATH=${{ github.workspace }}/toolchain/clang/bin:${{ github.workspace }}/toolchain/gcc/bin:$PATH + export CROSS_COMPILE=aarch64-linux-android- export ARCH=arm64 - make creek_GKI-config - make -j2 - - name: Upload + export CC=clang + make ARCH=arm64 creek_GKI-config + + - name: Build kernel + run: | + cd ${{ github.workspace }} + export PATH=${{ github.workspace }}/toolchain/clang/bin:${{ github.workspace }}/toolchain/gcc/bin:$PATH + export CROSS_COMPILE=aarch64-linux-android- + export ARCH=arm64 + export CC=clang + make ARCH=arm64 -j$(nproc) + + - name: Prepare AnyKernel3 + run: | + git clone --depth=1 https://github.com/osm0sis/AnyKernel3 AnyKernel3 + cp ${{ github.workspace }}/arch/arm64/boot/Image.gz AnyKernel3/ + cd AnyKernel3 + cat > anykernel.sh << 'EOF' +kernel.string=Creek Kernel with KernelSU-Next +do.devicecheck=0 +do.modules=0 +do.systemless=1 +do.cleanup=1 +device.name1=creek +block=auto +is_slot_device=auto +. tools/ak3-core.sh +dump_boot +write_boot +EOF + zip -r9 ../Creek-Kernel-KSU.zip ./* + + - name: Upload ZIP uses: actions/upload-artifact@v4 with: - name: kernel-ksu - path: arch/arm64/boot/Image.gz + name: Creek-Kernel-KSU + path: Creek-Kernel-KSU.zip From 9363382ed007b3b29b1ddbfe64a6d4b7f7aab5f5 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 03:21:17 +0700 Subject: [PATCH 21/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 83cf5a653c6c1..faf742ad5e0fb 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -1,4 +1,4 @@ -name: Build Creek Kernel with KernelSU-Next +name: Build Creek Kernel on: workflow_dispatch jobs: From 0f635fca0e8e158b7d7e33aa259f49081d6a1c2d Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 03:22:46 +0700 Subject: [PATCH 22/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 93 +++++------------------------- 1 file changed, 16 insertions(+), 77 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index faf742ad5e0fb..f26b3322b2f26 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -1,87 +1,26 @@ -name: Build Creek Kernel +name: KSU Build with AnyKernel3 on: workflow_dispatch - jobs: build: runs-on: ubuntu-22.04 steps: - - name: Checkout kernel source - uses: actions/checkout@v4 - - - name: Install build tools + - uses: actions/checkout@v4 + - name: Install + run: sudo apt update && sudo apt install -y git make bc wget zip + - name: Get KSU + run: git clone --depth=1 https://github.com/KernelSU-Next/KernelSU-Next.git + - name: Build run: | - sudo apt update - sudo apt install -y git make bc bison flex libssl-dev build-essential \ - python3 device-tree-compiler lz4 cpio zip wget curl - - - name: Download Clang toolchain - run: | - mkdir -p ${{ github.workspace }}/toolchain - cd ${{ github.workspace }}/toolchain - wget -q https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz - tar -xf clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz - mv clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04 clang - - - name: Download GCC toolchain - run: | - cd ${{ github.workspace }}/toolchain - git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 gcc - - - name: Setup KernelSU-Next (proper way) - run: | - cd ${{ github.workspace }} - git clone --depth=1 -b main https://github.com/KernelSU-Next/KernelSU-Next.git KernelSU-Next - - # Gunakan script resmi dari KernelSU-Next (bukan cp manual) - cd KernelSU-Next - if [ -f ksu_setup.sh ]; then - bash ksu_setup.sh .. - else - # Fallback: copy hanya file yang diperlukan - cd kernel - find . -type f -exec cp --parents {} ${{ github.workspace }}/ \; - fi - - - name: Configure kernel - run: | - cd ${{ github.workspace }} - export PATH=${{ github.workspace }}/toolchain/clang/bin:${{ github.workspace }}/toolchain/gcc/bin:$PATH - export CROSS_COMPILE=aarch64-linux-android- - export ARCH=arm64 - export CC=clang - make ARCH=arm64 creek_GKI-config - - - name: Build kernel - run: | - cd ${{ github.workspace }} - export PATH=${{ github.workspace }}/toolchain/clang/bin:${{ github.workspace }}/toolchain/gcc/bin:$PATH - export CROSS_COMPILE=aarch64-linux-android- export ARCH=arm64 - export CC=clang - make ARCH=arm64 -j$(nproc) - - - name: Prepare AnyKernel3 + make creek_GKI-config + make -j2 + - name: AnyKernel3 run: | - git clone --depth=1 https://github.com/osm0sis/AnyKernel3 AnyKernel3 - cp ${{ github.workspace }}/arch/arm64/boot/Image.gz AnyKernel3/ - cd AnyKernel3 - cat > anykernel.sh << 'EOF' -kernel.string=Creek Kernel with KernelSU-Next -do.devicecheck=0 -do.modules=0 -do.systemless=1 -do.cleanup=1 -device.name1=creek -block=auto -is_slot_device=auto -. tools/ak3-core.sh -dump_boot -write_boot -EOF - zip -r9 ../Creek-Kernel-KSU.zip ./* - - - name: Upload ZIP + git clone https://github.com/osm0sis/AnyKernel3 + cp arch/arm64/boot/Image.gz AnyKernel3/ + cd AnyKernel3 && zip -r9 ../kernel-ksu.zip . + - name: Upload uses: actions/upload-artifact@v4 with: - name: Creek-Kernel-KSU - path: Creek-Kernel-KSU.zip + name: kernel-ksu-ak3 + path: kernel-ksu.zip From c8fdbee4f029a553d3b40b8a4ccd31e2edac4410 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 03:26:41 +0700 Subject: [PATCH 23/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index f26b3322b2f26..ba6888d77b740 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -1,4 +1,4 @@ -name: KSU Build with AnyKernel3 +name: KSU Build (vendor config) on: workflow_dispatch jobs: build: @@ -6,13 +6,14 @@ jobs: steps: - uses: actions/checkout@v4 - name: Install - run: sudo apt update && sudo apt install -y git make bc wget zip + run: sudo apt update && sudo apt install -y git make bc wget - name: Get KSU run: git clone --depth=1 https://github.com/KernelSU-Next/KernelSU-Next.git - name: Build run: | export ARCH=arm64 - make creek_GKI-config + # Panggil config dari folder vendor + make ARCH=arm64 vendor/creek_GKI-config make -j2 - name: AnyKernel3 run: | @@ -22,5 +23,5 @@ jobs: - name: Upload uses: actions/upload-artifact@v4 with: - name: kernel-ksu-ak3 + name: kernel-ksu path: kernel-ksu.zip From 237f1db1b239a55b55b99ebd592a43920fb5e9d2 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 03:29:52 +0700 Subject: [PATCH 24/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index ba6888d77b740..078d20101a2c1 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -1,19 +1,19 @@ -name: KSU Build (vendor config) +name: Build Creek Kernel on: workflow_dispatch jobs: build: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - - name: Install - run: sudo apt update && sudo apt install -y git make bc wget - - name: Get KSU + - name: Install tools + run: sudo apt update && sudo apt install -y git make bc wget zip + - name: Get KernelSU-Next run: git clone --depth=1 https://github.com/KernelSU-Next/KernelSU-Next.git - name: Build run: | export ARCH=arm64 - # Panggil config dari folder vendor - make ARCH=arm64 vendor/creek_GKI-config + # Gunakan nama file yang BENAR: creek_GKI.config + make ARCH=arm64 creek_GKI.config make -j2 - name: AnyKernel3 run: | From d43233524ce77115b42d6368058c394964b3de3e Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 03:35:37 +0700 Subject: [PATCH 25/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 97 +++++++++++++++++++++++++----- 1 file changed, 81 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 078d20101a2c1..0f0f17719a6fd 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -1,27 +1,92 @@ -name: Build Creek Kernel +name: Build Creek Kernel with KSU-Next + SUSFS + AnyKernel3 on: workflow_dispatch + jobs: build: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 - - name: Install tools - run: sudo apt update && sudo apt install -y git make bc wget zip - - name: Get KernelSU-Next - run: git clone --depth=1 https://github.com/KernelSU-Next/KernelSU-Next.git - - name: Build + - name: Checkout kernel source + uses: actions/checkout@v4 + + - name: Install build tools run: | + sudo apt update + sudo apt install -y git make bc bison flex libssl-dev build-essential \ + python3 device-tree-compiler lz4 cpio zip wget curl + + - name: Download Clang + run: | + mkdir -p toolchain && cd toolchain + wget -q https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz + tar -xf clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz + mv clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04 clang + + - name: Download GCC + run: | + cd toolchain + git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 gcc + + - name: Download KernelSU-Next + run: | + git clone --depth=1 -b main https://github.com/KernelSU-Next/KernelSU-Next.git KernelSU-Next + cd KernelSU-Next + if [ -f kernel/Makefile ]; then + cp -r kernel/* ${{ github.workspace }}/ + fi + if [ -d kernel/ksu ]; then + cp -r kernel/ksu ${{ github.workspace }}/ksu + fi + + - name: Download SUSFS patches + run: | + git clone --depth=1 https://gitlab.com/simonpunk/susfs4ksu.git susfs4ksu + cd susfs4ksu + if [ -f kernel_patches/5.15/0001-susfs.patch ]; then + patch -p1 -d ${{ github.workspace }} < kernel_patches/5.15/0001-susfs.patch + fi + + - name: Configure kernel + run: | + export PATH=${{ github.workspace }}/toolchain/clang/bin:${{ github.workspace }}/toolchain/gcc/bin:$PATH + export CROSS_COMPILE=aarch64-linux-android- + export ARCH=arm64 + export CC=clang + make ARCH=arm64 defconfig + scripts/config --file .config -e KSU + scripts/config --file .config -e KSU_SUSFS + make ARCH=arm64 savedefconfig + + - name: Build kernel + run: | + export PATH=${{ github.workspace }}/toolchain/clang/bin:${{ github.workspace }}/toolchain/gcc/bin:$PATH + export CROSS_COMPILE=aarch64-linux-android- export ARCH=arm64 - # Gunakan nama file yang BENAR: creek_GKI.config - make ARCH=arm64 creek_GKI.config - make -j2 - - name: AnyKernel3 + export CC=clang + make -j$(nproc) + + - name: Prepare AnyKernel3 run: | - git clone https://github.com/osm0sis/AnyKernel3 + git clone --depth=1 https://github.com/osm0sis/AnyKernel3 AnyKernel3 cp arch/arm64/boot/Image.gz AnyKernel3/ - cd AnyKernel3 && zip -r9 ../kernel-ksu.zip . - - name: Upload + cd AnyKernel3 + cat > anykernel.sh << 'EOF' +kernel.string=Creek Kernel with KSU-Next + SUSFS +do.devicecheck=0 +do.modules=0 +do.systemless=1 +do.cleanup=1 +device.name1=creek +block=auto +is_slot_device=auto +. tools/ak3-core.sh +dump_boot +write_boot +EOF + zip -r9 ../Creek-Kernel-KSU-SUSFS.zip ./* + cd .. + + - name: Upload ZIP uses: actions/upload-artifact@v4 with: - name: kernel-ksu - path: kernel-ksu.zip + name: Creek-Kernel-KSU-SUSFS + path: Creek-Kernel-KSU-SUSFS.zip From a724142a7ee05c7bcb5a71d641b4e82c1aae94a5 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 03:36:17 +0700 Subject: [PATCH 26/77] Create kernelsu-build.yml --- .github/workflows/kernelsu-build.yml | 92 ++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 .github/workflows/kernelsu-build.yml diff --git a/.github/workflows/kernelsu-build.yml b/.github/workflows/kernelsu-build.yml new file mode 100644 index 0000000000000..0f0f17719a6fd --- /dev/null +++ b/.github/workflows/kernelsu-build.yml @@ -0,0 +1,92 @@ +name: Build Creek Kernel with KSU-Next + SUSFS + AnyKernel3 +on: workflow_dispatch + +jobs: + build: + runs-on: ubuntu-22.04 + steps: + - name: Checkout kernel source + uses: actions/checkout@v4 + + - name: Install build tools + run: | + sudo apt update + sudo apt install -y git make bc bison flex libssl-dev build-essential \ + python3 device-tree-compiler lz4 cpio zip wget curl + + - name: Download Clang + run: | + mkdir -p toolchain && cd toolchain + wget -q https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz + tar -xf clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz + mv clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04 clang + + - name: Download GCC + run: | + cd toolchain + git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 gcc + + - name: Download KernelSU-Next + run: | + git clone --depth=1 -b main https://github.com/KernelSU-Next/KernelSU-Next.git KernelSU-Next + cd KernelSU-Next + if [ -f kernel/Makefile ]; then + cp -r kernel/* ${{ github.workspace }}/ + fi + if [ -d kernel/ksu ]; then + cp -r kernel/ksu ${{ github.workspace }}/ksu + fi + + - name: Download SUSFS patches + run: | + git clone --depth=1 https://gitlab.com/simonpunk/susfs4ksu.git susfs4ksu + cd susfs4ksu + if [ -f kernel_patches/5.15/0001-susfs.patch ]; then + patch -p1 -d ${{ github.workspace }} < kernel_patches/5.15/0001-susfs.patch + fi + + - name: Configure kernel + run: | + export PATH=${{ github.workspace }}/toolchain/clang/bin:${{ github.workspace }}/toolchain/gcc/bin:$PATH + export CROSS_COMPILE=aarch64-linux-android- + export ARCH=arm64 + export CC=clang + make ARCH=arm64 defconfig + scripts/config --file .config -e KSU + scripts/config --file .config -e KSU_SUSFS + make ARCH=arm64 savedefconfig + + - name: Build kernel + run: | + export PATH=${{ github.workspace }}/toolchain/clang/bin:${{ github.workspace }}/toolchain/gcc/bin:$PATH + export CROSS_COMPILE=aarch64-linux-android- + export ARCH=arm64 + export CC=clang + make -j$(nproc) + + - name: Prepare AnyKernel3 + run: | + git clone --depth=1 https://github.com/osm0sis/AnyKernel3 AnyKernel3 + cp arch/arm64/boot/Image.gz AnyKernel3/ + cd AnyKernel3 + cat > anykernel.sh << 'EOF' +kernel.string=Creek Kernel with KSU-Next + SUSFS +do.devicecheck=0 +do.modules=0 +do.systemless=1 +do.cleanup=1 +device.name1=creek +block=auto +is_slot_device=auto +. tools/ak3-core.sh +dump_boot +write_boot +EOF + zip -r9 ../Creek-Kernel-KSU-SUSFS.zip ./* + cd .. + + - name: Upload ZIP + uses: actions/upload-artifact@v4 + with: + name: Creek-Kernel-KSU-SUSFS + path: Creek-Kernel-KSU-SUSFS.zip From c6154b2b52eaef9f393776b4d7ec6de0a839f773 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 03:38:38 +0700 Subject: [PATCH 27/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 99 +++++++++--------------------- 1 file changed, 29 insertions(+), 70 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 0f0f17719a6fd..5e32e3f08f66d 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -1,92 +1,51 @@ -name: Build Creek Kernel with KSU-Next + SUSFS + AnyKernel3 +name: Build Creek Kernel with KernelSU-Next and SUSFS on: workflow_dispatch jobs: build: runs-on: ubuntu-22.04 steps: - - name: Checkout kernel source - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - name: Install build tools + - name: Install tools run: | sudo apt update - sudo apt install -y git make bc bison flex libssl-dev build-essential \ - python3 device-tree-compiler lz4 cpio zip wget curl + sudo apt install -y git make bc bison flex libssl-dev build-essential wget zip - - name: Download Clang - run: | - mkdir -p toolchain && cd toolchain - wget -q https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz - tar -xf clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz - mv clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04 clang - - - name: Download GCC - run: | - cd toolchain - git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 gcc - - - name: Download KernelSU-Next - run: | - git clone --depth=1 -b main https://github.com/KernelSU-Next/KernelSU-Next.git KernelSU-Next - cd KernelSU-Next - if [ -f kernel/Makefile ]; then - cp -r kernel/* ${{ github.workspace }}/ - fi - if [ -d kernel/ksu ]; then - cp -r kernel/ksu ${{ github.workspace }}/ksu - fi - - - name: Download SUSFS patches - run: | - git clone --depth=1 https://gitlab.com/simonpunk/susfs4ksu.git susfs4ksu - cd susfs4ksu - if [ -f kernel_patches/5.15/0001-susfs.patch ]; then - patch -p1 -d ${{ github.workspace }} < kernel_patches/5.15/0001-susfs.patch - fi - - - name: Configure kernel - run: | - export PATH=${{ github.workspace }}/toolchain/clang/bin:${{ github.workspace }}/toolchain/gcc/bin:$PATH - export CROSS_COMPILE=aarch64-linux-android- - export ARCH=arm64 - export CC=clang - make ARCH=arm64 defconfig - scripts/config --file .config -e KSU - scripts/config --file .config -e KSU_SUSFS - make ARCH=arm64 savedefconfig + - name: Get KernelSU-Next + run: git clone --depth=1 https://github.com/KernelSU-Next/KernelSU-Next.git - name: Build kernel run: | - export PATH=${{ github.workspace }}/toolchain/clang/bin:${{ github.workspace }}/toolchain/gcc/bin:$PATH - export CROSS_COMPILE=aarch64-linux-android- export ARCH=arm64 - export CC=clang - make -j$(nproc) + make ARCH=arm64 creek_GKI.config + make -j2 - - name: Prepare AnyKernel3 + - name: Create AnyKernel3 zip run: | - git clone --depth=1 https://github.com/osm0sis/AnyKernel3 AnyKernel3 + git clone --depth=1 https://github.com/osm0sis/AnyKernel3 + # Salin kernel yang sudah dibangun ke folder AnyKernel3 cp arch/arm64/boot/Image.gz AnyKernel3/ cd AnyKernel3 - cat > anykernel.sh << 'EOF' -kernel.string=Creek Kernel with KSU-Next + SUSFS -do.devicecheck=0 -do.modules=0 -do.systemless=1 -do.cleanup=1 -device.name1=creek -block=auto -is_slot_device=auto -. tools/ak3-core.sh -dump_boot -write_boot -EOF - zip -r9 ../Creek-Kernel-KSU-SUSFS.zip ./* + # Buat file anykernel.sh untuk perangkat creek + echo 'kernel.string=Creek Kernel with KSU-Next by kusonekoworld-max' > anykernel.sh + echo 'do.devicecheck=0' >> anykernel.sh + echo 'do.modules=0' >> anykernel.sh + echo 'do.systemless=1' >> anykernel.sh + echo 'do.cleanup=1' >> anykernel.sh + echo 'device.name1=creek' >> anykernel.sh + echo 'block=auto' >> anykernel.sh + echo 'is_slot_device=auto' >> anykernel.sh + echo '' >> anykernel.sh + echo '. tools/ak3-core.sh' >> anykernel.sh + echo 'dump_boot' >> anykernel.sh + echo 'write_boot' >> anykernel.sh + # Buat file zip + zip -r9 ../kernel-ksu-susfs.zip . cd .. - - name: Upload ZIP + - name: Upload kernel zip uses: actions/upload-artifact@v4 with: - name: Creek-Kernel-KSU-SUSFS - path: Creek-Kernel-KSU-SUSFS.zip + name: Creek-Kernel-KSU + path: kernel-ksu-susfs.zip From 285d3fcae133fecc817cb49c24ba5fd7607a95fd Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 03:44:24 +0700 Subject: [PATCH 28/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 94 +++++++++++++++++++++--------- 1 file changed, 66 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 5e32e3f08f66d..b82c3e95da35f 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -1,51 +1,89 @@ -name: Build Creek Kernel with KernelSU-Next and SUSFS +name: Build Creek Kernel Full (KSU + SUSFS + AK3) on: workflow_dispatch jobs: build: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 + - name: Checkout source + uses: actions/checkout@v4 - name: Install tools + run: sudo apt update && sudo apt install -y git make bc bison flex libssl-dev build-essential wget zip + + - name: Download Clang + run: | + mkdir -p toolchain && cd toolchain + wget -q https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz + tar -xf clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz + mv clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04 clang + + - name: Download GCC run: | - sudo apt update - sudo apt install -y git make bc bison flex libssl-dev build-essential wget zip + cd toolchain + git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 gcc - name: Get KernelSU-Next - run: git clone --depth=1 https://github.com/KernelSU-Next/KernelSU-Next.git + run: git clone --depth=1 -b main https://github.com/KernelSU-Next/KernelSU-Next.git KernelSU-Next + + - name: Get SUSFS + run: git clone --depth=1 https://gitlab.com/simonpunk/susfs4ksu.git susfs4ksu + + - name: Apply SUSFS patch + run: | + cd susfs4ksu + if [ -f kernel_patches/5.15/0001-susfs.patch ]; then + patch -p1 -d ${{ github.workspace }} < kernel_patches/5.15/0001-susfs.patch + fi + + - name: Copy KernelSU files + run: | + cd KernelSU-Next + if [ -f kernel/Makefile ]; then + cp -r kernel/* ${{ github.workspace }}/ + fi + + - name: Configure kernel + run: | + export PATH=${{ github.workspace }}/toolchain/clang/bin:${{ github.workspace }}/toolchain/gcc/bin:$PATH + export CROSS_COMPILE=aarch64-linux-android- + export ARCH=arm64 + export CC=clang + make ARCH=arm64 defconfig + scripts/config --file .config -e KSU + scripts/config --file .config -e KSU_SUSFS - name: Build kernel run: | + export PATH=${{ github.workspace }}/toolchain/clang/bin:${{ github.workspace }}/toolchain/gcc/bin:$PATH + export CROSS_COMPILE=aarch64-linux-android- export ARCH=arm64 - make ARCH=arm64 creek_GKI.config - make -j2 + export CC=clang + make -j$(nproc) - - name: Create AnyKernel3 zip + - name: Prepare AnyKernel3 ZIP run: | - git clone --depth=1 https://github.com/osm0sis/AnyKernel3 - # Salin kernel yang sudah dibangun ke folder AnyKernel3 + git clone --depth=1 https://github.com/osm0sis/AnyKernel3 AnyKernel3 cp arch/arm64/boot/Image.gz AnyKernel3/ cd AnyKernel3 - # Buat file anykernel.sh untuk perangkat creek - echo 'kernel.string=Creek Kernel with KSU-Next by kusonekoworld-max' > anykernel.sh - echo 'do.devicecheck=0' >> anykernel.sh - echo 'do.modules=0' >> anykernel.sh - echo 'do.systemless=1' >> anykernel.sh - echo 'do.cleanup=1' >> anykernel.sh - echo 'device.name1=creek' >> anykernel.sh - echo 'block=auto' >> anykernel.sh - echo 'is_slot_device=auto' >> anykernel.sh - echo '' >> anykernel.sh - echo '. tools/ak3-core.sh' >> anykernel.sh - echo 'dump_boot' >> anykernel.sh - echo 'write_boot' >> anykernel.sh - # Buat file zip - zip -r9 ../kernel-ksu-susfs.zip . + cat > anykernel.sh << 'EOF' +kernel.string=Creek Kernel with KSU-Next + SUSFS +do.devicecheck=0 +do.modules=0 +do.systemless=1 +do.cleanup=1 +device.name1=creek +block=auto +is_slot_device=auto +. tools/ak3-core.sh +dump_boot +write_boot +EOF + zip -r9 ../Creek-Kernel-Full.zip ./* cd .. - - name: Upload kernel zip + - name: Upload ZIP uses: actions/upload-artifact@v4 with: - name: Creek-Kernel-KSU - path: kernel-ksu-susfs.zip + name: Creek-Kernel-Full + path: Creek-Kernel-Full.zip From a724c213f5d0a12ce689f65e62ff7eee13d62f65 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 03:45:52 +0700 Subject: [PATCH 29/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 81 ++++++++++-------------------- 1 file changed, 26 insertions(+), 55 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index b82c3e95da35f..ec87b5a0f7923 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -1,33 +1,22 @@ -name: Build Creek Kernel Full (KSU + SUSFS + AK3) +name: Build Creek Kernel with KernelSU-Next and SUSFS on: workflow_dispatch jobs: build: runs-on: ubuntu-22.04 steps: - - name: Checkout source - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: Install tools - run: sudo apt update && sudo apt install -y git make bc bison flex libssl-dev build-essential wget zip - - - name: Download Clang - run: | - mkdir -p toolchain && cd toolchain - wget -q https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz - tar -xf clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz - mv clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04 clang - - - name: Download GCC run: | - cd toolchain - git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 gcc + sudo apt update + sudo apt install -y git make bc bison flex libssl-dev build-essential wget zip - name: Get KernelSU-Next - run: git clone --depth=1 -b main https://github.com/KernelSU-Next/KernelSU-Next.git KernelSU-Next + run: git clone --depth=1 https://github.com/KernelSU-Next/KernelSU-Next.git - name: Get SUSFS - run: git clone --depth=1 https://gitlab.com/simonpunk/susfs4ksu.git susfs4ksu + run: git clone --depth=1 https://gitlab.com/simonpunk/susfs4ksu.git - name: Apply SUSFS patch run: | @@ -36,54 +25,36 @@ jobs: patch -p1 -d ${{ github.workspace }} < kernel_patches/5.15/0001-susfs.patch fi - - name: Copy KernelSU files - run: | - cd KernelSU-Next - if [ -f kernel/Makefile ]; then - cp -r kernel/* ${{ github.workspace }}/ - fi - - - name: Configure kernel + - name: Build kernel run: | - export PATH=${{ github.workspace }}/toolchain/clang/bin:${{ github.workspace }}/toolchain/gcc/bin:$PATH - export CROSS_COMPILE=aarch64-linux-android- export ARCH=arm64 - export CC=clang make ARCH=arm64 defconfig scripts/config --file .config -e KSU scripts/config --file .config -e KSU_SUSFS + make -j2 - - name: Build kernel - run: | - export PATH=${{ github.workspace }}/toolchain/clang/bin:${{ github.workspace }}/toolchain/gcc/bin:$PATH - export CROSS_COMPILE=aarch64-linux-android- - export ARCH=arm64 - export CC=clang - make -j$(nproc) - - - name: Prepare AnyKernel3 ZIP + - name: Create AnyKernel3 zip run: | - git clone --depth=1 https://github.com/osm0sis/AnyKernel3 AnyKernel3 + git clone --depth=1 https://github.com/osm0sis/AnyKernel3 cp arch/arm64/boot/Image.gz AnyKernel3/ cd AnyKernel3 - cat > anykernel.sh << 'EOF' -kernel.string=Creek Kernel with KSU-Next + SUSFS -do.devicecheck=0 -do.modules=0 -do.systemless=1 -do.cleanup=1 -device.name1=creek -block=auto -is_slot_device=auto -. tools/ak3-core.sh -dump_boot -write_boot -EOF - zip -r9 ../Creek-Kernel-Full.zip ./* + echo 'kernel.string=Creek Kernel with KSU-Next + SUSFS by kusonekoworld-max' > anykernel.sh + echo 'do.devicecheck=0' >> anykernel.sh + echo 'do.modules=0' >> anykernel.sh + echo 'do.systemless=1' >> anykernel.sh + echo 'do.cleanup=1' >> anykernel.sh + echo 'device.name1=creek' >> anykernel.sh + echo 'block=auto' >> anykernel.sh + echo 'is_slot_device=auto' >> anykernel.sh + echo '' >> anykernel.sh + echo '. tools/ak3-core.sh' >> anykernel.sh + echo 'dump_boot' >> anykernel.sh + echo 'write_boot' >> anykernel.sh + zip -r9 ../kernel-ksu-susfs.zip ./* cd .. - - name: Upload ZIP + - name: Upload kernel zip uses: actions/upload-artifact@v4 with: - name: Creek-Kernel-Full - path: Creek-Kernel-Full.zip + name: Creek-Kernel-KSU-SUSFS + path: kernel-ksu-susfs.zip From a07e23a9e6d13de020bc23557d75346409e9a8ef Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 03:48:45 +0700 Subject: [PATCH 30/77] Update kernelsu-build.yml --- .github/workflows/kernelsu-build.yml | 90 +++------------------------- 1 file changed, 9 insertions(+), 81 deletions(-) diff --git a/.github/workflows/kernelsu-build.yml b/.github/workflows/kernelsu-build.yml index 0f0f17719a6fd..06416a536a265 100644 --- a/.github/workflows/kernelsu-build.yml +++ b/.github/workflows/kernelsu-build.yml @@ -1,92 +1,20 @@ -name: Build Creek Kernel with KSU-Next + SUSFS + AnyKernel3 +name: Check Defconfig on: workflow_dispatch jobs: build: runs-on: ubuntu-22.04 steps: - - name: Checkout kernel source - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - name: Install build tools + - name: List configs run: | - sudo apt update - sudo apt install -y git make bc bison flex libssl-dev build-essential \ - python3 device-tree-compiler lz4 cpio zip wget curl + ls arch/arm64/configs/ + echo "---" + ls arch/arm64/configs/ | grep -E "creek|bengal|khaje|scuba|gki|defconfig" - - name: Download Clang + - name: Try build with gki_defconfig run: | - mkdir -p toolchain && cd toolchain - wget -q https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz - tar -xf clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz - mv clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04 clang - - - name: Download GCC - run: | - cd toolchain - git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 gcc - - - name: Download KernelSU-Next - run: | - git clone --depth=1 -b main https://github.com/KernelSU-Next/KernelSU-Next.git KernelSU-Next - cd KernelSU-Next - if [ -f kernel/Makefile ]; then - cp -r kernel/* ${{ github.workspace }}/ - fi - if [ -d kernel/ksu ]; then - cp -r kernel/ksu ${{ github.workspace }}/ksu - fi - - - name: Download SUSFS patches - run: | - git clone --depth=1 https://gitlab.com/simonpunk/susfs4ksu.git susfs4ksu - cd susfs4ksu - if [ -f kernel_patches/5.15/0001-susfs.patch ]; then - patch -p1 -d ${{ github.workspace }} < kernel_patches/5.15/0001-susfs.patch - fi - - - name: Configure kernel - run: | - export PATH=${{ github.workspace }}/toolchain/clang/bin:${{ github.workspace }}/toolchain/gcc/bin:$PATH - export CROSS_COMPILE=aarch64-linux-android- - export ARCH=arm64 - export CC=clang - make ARCH=arm64 defconfig - scripts/config --file .config -e KSU - scripts/config --file .config -e KSU_SUSFS - make ARCH=arm64 savedefconfig - - - name: Build kernel - run: | - export PATH=${{ github.workspace }}/toolchain/clang/bin:${{ github.workspace }}/toolchain/gcc/bin:$PATH - export CROSS_COMPILE=aarch64-linux-android- export ARCH=arm64 - export CC=clang - make -j$(nproc) - - - name: Prepare AnyKernel3 - run: | - git clone --depth=1 https://github.com/osm0sis/AnyKernel3 AnyKernel3 - cp arch/arm64/boot/Image.gz AnyKernel3/ - cd AnyKernel3 - cat > anykernel.sh << 'EOF' -kernel.string=Creek Kernel with KSU-Next + SUSFS -do.devicecheck=0 -do.modules=0 -do.systemless=1 -do.cleanup=1 -device.name1=creek -block=auto -is_slot_device=auto -. tools/ak3-core.sh -dump_boot -write_boot -EOF - zip -r9 ../Creek-Kernel-KSU-SUSFS.zip ./* - cd .. - - - name: Upload ZIP - uses: actions/upload-artifact@v4 - with: - name: Creek-Kernel-KSU-SUSFS - path: Creek-Kernel-KSU-SUSFS.zip + make ARCH=arm64 gki_defconfig + make -j2 From 5979c5acba87af2c6ed64a8dabbacdcb99db3da8 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 03:51:02 +0700 Subject: [PATCH 31/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 37 +++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index ec87b5a0f7923..d569995bf1cbd 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -1,4 +1,4 @@ -name: Build Creek Kernel with KernelSU-Next and SUSFS +name: Build Creek Kernel with KSU-Next + SUSFS + AK3 on: workflow_dispatch jobs: @@ -12,6 +12,18 @@ jobs: sudo apt update sudo apt install -y git make bc bison flex libssl-dev build-essential wget zip + - name: Download Clang + run: | + mkdir -p toolchain && cd toolchain + wget -q https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz + tar -xf clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz + mv clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04 clang + + - name: Download GCC + run: | + cd toolchain + git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 gcc + - name: Get KernelSU-Next run: git clone --depth=1 https://github.com/KernelSU-Next/KernelSU-Next.git @@ -27,18 +39,27 @@ jobs: - name: Build kernel run: | + export PATH=${{ github.workspace }}/toolchain/clang/bin:${{ github.workspace }}/toolchain/gcc/bin:$PATH + export CROSS_COMPILE=aarch64-linux-android- export ARCH=arm64 - make ARCH=arm64 defconfig + export CC=clang + + # Pakai generic_bengal_defconfig (cocok untuk Redmi 15) + make ARCH=arm64 generic_bengal_defconfig + + # Enable KSU dan SUSFS scripts/config --file .config -e KSU scripts/config --file .config -e KSU_SUSFS - make -j2 + + # Build kernel + make -j$(nproc) - name: Create AnyKernel3 zip run: | git clone --depth=1 https://github.com/osm0sis/AnyKernel3 cp arch/arm64/boot/Image.gz AnyKernel3/ cd AnyKernel3 - echo 'kernel.string=Creek Kernel with KSU-Next + SUSFS by kusonekoworld-max' > anykernel.sh + echo 'kernel.string=Creek Kernel (Redmi 15) with KSU-Next + SUSFS' > anykernel.sh echo 'do.devicecheck=0' >> anykernel.sh echo 'do.modules=0' >> anykernel.sh echo 'do.systemless=1' >> anykernel.sh @@ -50,11 +71,11 @@ jobs: echo '. tools/ak3-core.sh' >> anykernel.sh echo 'dump_boot' >> anykernel.sh echo 'write_boot' >> anykernel.sh - zip -r9 ../kernel-ksu-susfs.zip ./* + zip -r9 ../Creek-Kernel-Final.zip ./* cd .. - - name: Upload kernel zip + - name: Upload ZIP uses: actions/upload-artifact@v4 with: - name: Creek-Kernel-KSU-SUSFS - path: kernel-ksu-susfs.zip + name: Creek-Kernel-Final + path: Creek-Kernel-Final.zip From 4a8e90fb579e08a93b61b6456406900c6f9d964c Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 03:56:52 +0700 Subject: [PATCH 32/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index d569995bf1cbd..e6404815f6a84 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -1,4 +1,4 @@ -name: Build Creek Kernel with KSU-Next + SUSFS + AK3 +name: Build Creek Kernel with KSU-Next + SUSFS on: workflow_dispatch jobs: @@ -12,17 +12,17 @@ jobs: sudo apt update sudo apt install -y git make bc bison flex libssl-dev build-essential wget zip - - name: Download Clang - run: | - mkdir -p toolchain && cd toolchain - wget -q https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz - tar -xf clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz - mv clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04 clang - - - name: Download GCC + - name: Download prebuilt Clang + GCC (AOSP) run: | + mkdir -p toolchain cd toolchain + # Download Clang prebuilt dari AOSP + wget -q https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+archive/refs/heads/main/r522817/clang-r522817.tar.gz + mkdir clang && tar -xf clang-r522817.tar.gz -C clang + # Download GCC aarch64 git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 gcc + # Set environment + echo "Toolchain ready" - name: Get KernelSU-Next run: git clone --depth=1 https://github.com/KernelSU-Next/KernelSU-Next.git @@ -37,15 +37,16 @@ jobs: patch -p1 -d ${{ github.workspace }} < kernel_patches/5.15/0001-susfs.patch fi - - name: Build kernel + - name: Build kernel with creek_GKI.config run: | export PATH=${{ github.workspace }}/toolchain/clang/bin:${{ github.workspace }}/toolchain/gcc/bin:$PATH export CROSS_COMPILE=aarch64-linux-android- export ARCH=arm64 export CC=clang + export LD=ld.lld - # Pakai generic_bengal_defconfig (cocok untuk Redmi 15) - make ARCH=arm64 generic_bengal_defconfig + # Gunakan creek_GKI.config dari folder vendor + make ARCH=arm64 vendor/creek_GKI.config # Enable KSU dan SUSFS scripts/config --file .config -e KSU @@ -59,7 +60,7 @@ jobs: git clone --depth=1 https://github.com/osm0sis/AnyKernel3 cp arch/arm64/boot/Image.gz AnyKernel3/ cd AnyKernel3 - echo 'kernel.string=Creek Kernel (Redmi 15) with KSU-Next + SUSFS' > anykernel.sh + echo 'kernel.string=Creek Kernel (Redmi 15) - KSU-Next + SUSFS' > anykernel.sh echo 'do.devicecheck=0' >> anykernel.sh echo 'do.modules=0' >> anykernel.sh echo 'do.systemless=1' >> anykernel.sh From 611534d21a090a746469843b19b567bde46bd2d0 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 03:59:16 +0700 Subject: [PATCH 33/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 46 ++++++++++++++---------------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index e6404815f6a84..8e29ff62d73e8 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -1,4 +1,4 @@ -name: Build Creek Kernel with KSU-Next + SUSFS +name: Build Creek Kernel - Fixed Toolchain on: workflow_dispatch jobs: @@ -8,21 +8,25 @@ jobs: - uses: actions/checkout@v4 - name: Install tools + run: sudo apt update && sudo apt install -y git make bc bison flex libssl-dev build-essential wget zip + + - name: Download Clang run: | - sudo apt update - sudo apt install -y git make bc bison flex libssl-dev build-essential wget zip + mkdir -p ${{ github.workspace }}/toolchain + cd ${{ github.workspace }}/toolchain + wget -q https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz + tar -xf clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz + mv clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04 clang - - name: Download prebuilt Clang + GCC (AOSP) + - name: Download GCC run: | - mkdir -p toolchain - cd toolchain - # Download Clang prebuilt dari AOSP - wget -q https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+archive/refs/heads/main/r522817/clang-r522817.tar.gz - mkdir clang && tar -xf clang-r522817.tar.gz -C clang - # Download GCC aarch64 + cd ${{ github.workspace }}/toolchain git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 gcc - # Set environment - echo "Toolchain ready" + + - name: Set PATH (ini yang bener) + run: | + echo "${{ github.workspace }}/toolchain/clang/bin" >> $GITHUB_PATH + echo "${{ github.workspace }}/toolchain/gcc/bin" >> $GITHUB_PATH - name: Get KernelSU-Next run: git clone --depth=1 https://github.com/KernelSU-Next/KernelSU-Next.git @@ -37,22 +41,14 @@ jobs: patch -p1 -d ${{ github.workspace }} < kernel_patches/5.15/0001-susfs.patch fi - - name: Build kernel with creek_GKI.config + - name: Build kernel run: | - export PATH=${{ github.workspace }}/toolchain/clang/bin:${{ github.workspace }}/toolchain/gcc/bin:$PATH export CROSS_COMPILE=aarch64-linux-android- export ARCH=arm64 export CC=clang - export LD=ld.lld - - # Gunakan creek_GKI.config dari folder vendor make ARCH=arm64 vendor/creek_GKI.config - - # Enable KSU dan SUSFS scripts/config --file .config -e KSU scripts/config --file .config -e KSU_SUSFS - - # Build kernel make -j$(nproc) - name: Create AnyKernel3 zip @@ -60,7 +56,7 @@ jobs: git clone --depth=1 https://github.com/osm0sis/AnyKernel3 cp arch/arm64/boot/Image.gz AnyKernel3/ cd AnyKernel3 - echo 'kernel.string=Creek Kernel (Redmi 15) - KSU-Next + SUSFS' > anykernel.sh + echo 'kernel.string=Creek Kernel - KSU-Next + SUSFS' > anykernel.sh echo 'do.devicecheck=0' >> anykernel.sh echo 'do.modules=0' >> anykernel.sh echo 'do.systemless=1' >> anykernel.sh @@ -72,11 +68,11 @@ jobs: echo '. tools/ak3-core.sh' >> anykernel.sh echo 'dump_boot' >> anykernel.sh echo 'write_boot' >> anykernel.sh - zip -r9 ../Creek-Kernel-Final.zip ./* + zip -r9 ../Creek-Kernel.zip ./* cd .. - name: Upload ZIP uses: actions/upload-artifact@v4 with: - name: Creek-Kernel-Final - path: Creek-Kernel-Final.zip + name: Creek-Kernel + path: Creek-Kernel.zip From 18a47f944397302b19a6b7a69e58235ce58ce123 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 04:06:29 +0700 Subject: [PATCH 34/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 35 +++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 8e29ff62d73e8..11f2d87bdec13 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -1,4 +1,4 @@ -name: Build Creek Kernel - Fixed Toolchain +name: Build Creek Kernel - Merge Config on: workflow_dispatch jobs: @@ -12,22 +12,39 @@ jobs: - name: Download Clang run: | - mkdir -p ${{ github.workspace }}/toolchain - cd ${{ github.workspace }}/toolchain + mkdir -p toolchain && cd toolchain wget -q https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz tar -xf clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz mv clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04 clang - name: Download GCC run: | - cd ${{ github.workspace }}/toolchain + cd toolchain git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 gcc - - name: Set PATH (ini yang bener) + - name: Set PATH run: | echo "${{ github.workspace }}/toolchain/clang/bin" >> $GITHUB_PATH echo "${{ github.workspace }}/toolchain/gcc/bin" >> $GITHUB_PATH + - name: Merge configs + run: | + export CROSS_COMPILE=aarch64-linux-android- + export ARCH=arm64 + export CC=clang + + # Copy base GKI config + cp arch/arm64/configs/gki_defconfig .config + + # Merge fragment vendor/creek_GKI.config + cat arch/arm64/configs/vendor/creek_GKI.config >> .config + + # Clean up duplicates and resolve dependencies + make ARCH=arm64 olddefconfig + + # Save as full defconfig + cp .config arch/arm64/configs/creek_full_defconfig + - name: Get KernelSU-Next run: git clone --depth=1 https://github.com/KernelSU-Next/KernelSU-Next.git @@ -46,9 +63,15 @@ jobs: export CROSS_COMPILE=aarch64-linux-android- export ARCH=arm64 export CC=clang - make ARCH=arm64 vendor/creek_GKI.config + + # Gunakan full config yang sudah digabung + make ARCH=arm64 creek_full_defconfig + + # Enable KSU dan SUSFS scripts/config --file .config -e KSU scripts/config --file .config -e KSU_SUSFS + + # Build make -j$(nproc) - name: Create AnyKernel3 zip From 83eee58dd150f0a66d2428dbe61e6cd74a00fa57 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 04:13:08 +0700 Subject: [PATCH 35/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 74 +++++++++++++----------------- 1 file changed, 31 insertions(+), 43 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 11f2d87bdec13..431908a9b5118 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -1,4 +1,4 @@ -name: Build Creek Kernel - Merge Config +name: Build Creek Kernel - Full (KSU + SUSFS + AK3) on: workflow_dispatch jobs: @@ -7,47 +7,42 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Cache toolchain + id: cache-toolchain + uses: actions/cache@v3 + with: + path: toolchain + key: toolchain-clang17-gcc + - name: Install tools run: sudo apt update && sudo apt install -y git make bc bison flex libssl-dev build-essential wget zip - - name: Download Clang + - name: Download Clang & GCC + if: steps.cache-toolchain.outputs.cache-hit != 'true' run: | mkdir -p toolchain && cd toolchain wget -q https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz tar -xf clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz mv clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04 clang - - - name: Download GCC - run: | - cd toolchain git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 gcc - - name: Set PATH - run: | - echo "${{ github.workspace }}/toolchain/clang/bin" >> $GITHUB_PATH - echo "${{ github.workspace }}/toolchain/gcc/bin" >> $GITHUB_PATH - - - name: Merge configs + - name: Set environment run: | - export CROSS_COMPILE=aarch64-linux-android- - export ARCH=arm64 - export CC=clang - - # Copy base GKI config - cp arch/arm64/configs/gki_defconfig .config - - # Merge fragment vendor/creek_GKI.config - cat arch/arm64/configs/vendor/creek_GKI.config >> .config - - # Clean up duplicates and resolve dependencies - make ARCH=arm64 olddefconfig - - # Save as full defconfig - cp .config arch/arm64/configs/creek_full_defconfig + echo "PATH=${{ github.workspace }}/toolchain/clang/bin:${{ github.workspace }}/toolchain/gcc/bin:$PATH" >> $GITHUB_ENV + echo "CROSS_COMPILE=aarch64-linux-android-" >> $GITHUB_ENV + echo "ARCH=arm64" >> $GITHUB_ENV + echo "CC=clang" >> $GITHUB_ENV - name: Get KernelSU-Next run: git clone --depth=1 https://github.com/KernelSU-Next/KernelSU-Next.git + - name: Copy KernelSU files + run: | + cd KernelSU-Next + if [ -f kernel/Makefile ]; then + cp -r kernel/* ${{ github.workspace }}/ + fi + - name: Get SUSFS run: git clone --depth=1 https://gitlab.com/simonpunk/susfs4ksu.git @@ -58,28 +53,21 @@ jobs: patch -p1 -d ${{ github.workspace }} < kernel_patches/5.15/0001-susfs.patch fi - - name: Build kernel + - name: Configure kernel run: | - export CROSS_COMPILE=aarch64-linux-android- - export ARCH=arm64 - export CC=clang - - # Gunakan full config yang sudah digabung - make ARCH=arm64 creek_full_defconfig - - # Enable KSU dan SUSFS + make gki_defconfig scripts/config --file .config -e KSU scripts/config --file .config -e KSU_SUSFS - - # Build - make -j$(nproc) + + - name: Build kernel + run: make -j$(nproc) - name: Create AnyKernel3 zip run: | git clone --depth=1 https://github.com/osm0sis/AnyKernel3 cp arch/arm64/boot/Image.gz AnyKernel3/ cd AnyKernel3 - echo 'kernel.string=Creek Kernel - KSU-Next + SUSFS' > anykernel.sh + echo 'kernel.string=Creek Kernel for Redmi 15 - KSU-Next + SUSFS' > anykernel.sh echo 'do.devicecheck=0' >> anykernel.sh echo 'do.modules=0' >> anykernel.sh echo 'do.systemless=1' >> anykernel.sh @@ -91,11 +79,11 @@ jobs: echo '. tools/ak3-core.sh' >> anykernel.sh echo 'dump_boot' >> anykernel.sh echo 'write_boot' >> anykernel.sh - zip -r9 ../Creek-Kernel.zip ./* + zip -r9 ../Creek-Kernel-Full.zip ./* cd .. - name: Upload ZIP uses: actions/upload-artifact@v4 with: - name: Creek-Kernel - path: Creek-Kernel.zip + name: Creek-Kernel-Full + path: Creek-Kernel-Full.zip From a47bf3cfa39dfe14f9162a81aea2db959368fdd0 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 04:17:30 +0700 Subject: [PATCH 36/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 431908a9b5118..479cece13f82f 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -33,14 +33,19 @@ jobs: echo "ARCH=arm64" >> $GITHUB_ENV echo "CC=clang" >> $GITHUB_ENV - - name: Get KernelSU-Next - run: git clone --depth=1 https://github.com/KernelSU-Next/KernelSU-Next.git - - - name: Copy KernelSU files + - name: Integrate KernelSU-Next (safe method) run: | + git clone --depth=1 https://github.com/KernelSU-Next/KernelSU-Next.git KernelSU-Next cd KernelSU-Next - if [ -f kernel/Makefile ]; then - cp -r kernel/* ${{ github.workspace }}/ + # Gunakan script resmi jika ada + if [ -f ksu_setup.sh ]; then + bash ksu_setup.sh ${{ github.workspace }} + else + # Method manual yang aman: hanya copy file yang diperlukan + cp -r kernel/fs/* ${{ github.workspace }}/fs/ 2>/dev/null || true + cp -r kernel/security/* ${{ github.workspace }}/security/ 2>/dev/null || true + cp -r kernel/drivers/* ${{ github.workspace }}/drivers/ 2>/dev/null || true + cp -r kernel/ksu/* ${{ github.workspace }}/ksu/ 2>/dev/null || true fi - name: Get SUSFS @@ -50,7 +55,7 @@ jobs: run: | cd susfs4ksu if [ -f kernel_patches/5.15/0001-susfs.patch ]; then - patch -p1 -d ${{ github.workspace }} < kernel_patches/5.15/0001-susfs.patch + patch -p1 -d ${{ github.workspace }} < kernel_patches/5.15/0001-susfs.patch || true fi - name: Configure kernel From 0d68c95026997f01e36a86d3d7857df7c5f927fd Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 04:23:54 +0700 Subject: [PATCH 37/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 80 ++++++++++++++++++++++++++---- 1 file changed, 71 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 479cece13f82f..460bcfcc052c4 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -12,29 +12,91 @@ jobs: uses: actions/cache@v3 with: path: toolchain - key: toolchain-clang17-gcc + key: toolchain-clang17 - name: Install tools run: sudo apt update && sudo apt install -y git make bc bison flex libssl-dev build-essential wget zip - - name: Download Clang & GCC + - name: Download Clang if: steps.cache-toolchain.outputs.cache-hit != 'true' run: | mkdir -p toolchain && cd toolchain wget -q https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz tar -xf clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz mv clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04 clang - git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 gcc - - name: Set environment + - name: Integrate KernelSU-Next run: | - echo "PATH=${{ github.workspace }}/toolchain/clang/bin:${{ github.workspace }}/toolchain/gcc/bin:$PATH" >> $GITHUB_ENV - echo "CROSS_COMPILE=aarch64-linux-android-" >> $GITHUB_ENV - echo "ARCH=arm64" >> $GITHUB_ENV - echo "CC=clang" >> $GITHUB_ENV + git clone --depth=1 https://github.com/KernelSU-Next/KernelSU-Next.git KernelSU-Next + cd KernelSU-Next + if [ -f ksu_setup.sh ]; then + bash ksu_setup.sh ${{ github.workspace }} + else + cp -r kernel/fs/* ${{ github.workspace }}/fs/ 2>/dev/null || true + cp -r kernel/security/* ${{ github.workspace }}/security/ 2>/dev/null || true + cp -r kernel/drivers/* ${{ github.workspace }}/drivers/ 2>/dev/null || true + cp -r kernel/ksu/* ${{ github.workspace }}/ksu/ 2>/dev/null || true + fi + + - name: Get SUSFS + run: git clone --depth=1 https://gitlab.com/simonpunk/susfs4ksu.git + + - name: Apply SUSFS patch + run: | + cd susfs4ksu + if [ -f kernel_patches/5.15/0001-susfs.patch ]; then + patch -p1 -d ${{ github.workspace }} < kernel_patches/5.15/0001-susfs.patch || true + fi + + - name: Configure kernel + run: | + export PATH="${{ github.workspace }}/toolchain/clang/bin:$PATH" + make ARCH=arm64 \ + CC=clang \ + CLANG_TRIPLE=aarch64-linux-gnu- \ + LLVM=1 \ + LLVM_IAS=1 \ + gki_defconfig + scripts/config --file .config -e KSU + scripts/config --file .config -e KSU_SUSFS - - name: Integrate KernelSU-Next (safe method) + - name: Build kernel + run: | + export PATH="${{ github.workspace }}/toolchain/clang/bin:$PATH" + make -j$(nproc) \ + ARCH=arm64 \ + CC=clang \ + CLANG_TRIPLE=aarch64-linux-gnu- \ + LLVM=1 \ + LLVM_IAS=1 + + - name: Create AnyKernel3 zip run: | + git clone --depth=1 https://github.com/osm0sis/AnyKernel3 + cp arch/arm64/boot/Image.gz AnyKernel3/ 2>/dev/null || \ + cp arch/arm64/boot/Image AnyKernel3/ 2>/dev/null || true + cd AnyKernel3 + cat > anykernel.sh << 'EOF' + kernel.string=Creek Kernel for Redmi 15 - KSU-Next + SUSFS + do.devicecheck=0 + do.modules=0 + do.systemless=1 + do.cleanup=1 + device.name1=creek + block=auto + is_slot_device=auto + + . tools/ak3-core.sh + dump_boot + write_boot + EOF + zip -r9 ../Creek-Kernel-Full.zip ./* + + - name: Upload ZIP + uses: actions/upload-artifact@v4 + with: + name: Creek-Kernel-Full + path: Creek-Kernel-Full.zip run: | git clone --depth=1 https://github.com/KernelSU-Next/KernelSU-Next.git KernelSU-Next cd KernelSU-Next # Gunakan script resmi jika ada From 4f08b3fdd4c39517e43e4f78a315d29ce0b0a1fb Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 04:24:41 +0700 Subject: [PATCH 38/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 57 ------------------------------ 1 file changed, 57 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 460bcfcc052c4..570d298ed24a3 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -92,63 +92,6 @@ jobs: EOF zip -r9 ../Creek-Kernel-Full.zip ./* - - name: Upload ZIP - uses: actions/upload-artifact@v4 - with: - name: Creek-Kernel-Full - path: Creek-Kernel-Full.zip run: | - git clone --depth=1 https://github.com/KernelSU-Next/KernelSU-Next.git KernelSU-Next - cd KernelSU-Next - # Gunakan script resmi jika ada - if [ -f ksu_setup.sh ]; then - bash ksu_setup.sh ${{ github.workspace }} - else - # Method manual yang aman: hanya copy file yang diperlukan - cp -r kernel/fs/* ${{ github.workspace }}/fs/ 2>/dev/null || true - cp -r kernel/security/* ${{ github.workspace }}/security/ 2>/dev/null || true - cp -r kernel/drivers/* ${{ github.workspace }}/drivers/ 2>/dev/null || true - cp -r kernel/ksu/* ${{ github.workspace }}/ksu/ 2>/dev/null || true - fi - - - name: Get SUSFS - run: git clone --depth=1 https://gitlab.com/simonpunk/susfs4ksu.git - - - name: Apply SUSFS patch - run: | - cd susfs4ksu - if [ -f kernel_patches/5.15/0001-susfs.patch ]; then - patch -p1 -d ${{ github.workspace }} < kernel_patches/5.15/0001-susfs.patch || true - fi - - - name: Configure kernel - run: | - make gki_defconfig - scripts/config --file .config -e KSU - scripts/config --file .config -e KSU_SUSFS - - - name: Build kernel - run: make -j$(nproc) - - - name: Create AnyKernel3 zip - run: | - git clone --depth=1 https://github.com/osm0sis/AnyKernel3 - cp arch/arm64/boot/Image.gz AnyKernel3/ - cd AnyKernel3 - echo 'kernel.string=Creek Kernel for Redmi 15 - KSU-Next + SUSFS' > anykernel.sh - echo 'do.devicecheck=0' >> anykernel.sh - echo 'do.modules=0' >> anykernel.sh - echo 'do.systemless=1' >> anykernel.sh - echo 'do.cleanup=1' >> anykernel.sh - echo 'device.name1=creek' >> anykernel.sh - echo 'block=auto' >> anykernel.sh - echo 'is_slot_device=auto' >> anykernel.sh - echo '' >> anykernel.sh - echo '. tools/ak3-core.sh' >> anykernel.sh - echo 'dump_boot' >> anykernel.sh - echo 'write_boot' >> anykernel.sh - zip -r9 ../Creek-Kernel-Full.zip ./* - cd .. - - name: Upload ZIP uses: actions/upload-artifact@v4 with: From 346e72e370debdbf8fde9aad649f3e6fbbe2057a Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 04:34:29 +0700 Subject: [PATCH 39/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 570d298ed24a3..d55e4663b88fe 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -63,7 +63,7 @@ jobs: - name: Build kernel run: | export PATH="${{ github.workspace }}/toolchain/clang/bin:$PATH" - make -j$(nproc) \ + make -j1 \ ARCH=arm64 \ CC=clang \ CLANG_TRIPLE=aarch64-linux-gnu- \ From 8fa4cd08388054337dadaf55450263efc61eab34 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 04:40:07 +0700 Subject: [PATCH 40/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 60 +++++++++++++++++++++--------- 1 file changed, 43 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index d55e4663b88fe..a3f4cccddd62d 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -6,6 +6,8 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 + with: + ref: creek-v-oss - name: Cache toolchain id: cache-toolchain @@ -15,7 +17,11 @@ jobs: key: toolchain-clang17 - name: Install tools - run: sudo apt update && sudo apt install -y git make bc bison flex libssl-dev build-essential wget zip + run: | + sudo apt update && sudo apt install -y \ + git make bc bison flex libssl-dev \ + build-essential wget zip python3 \ + libelf-dev libc6-dev binutils - name: Download Clang if: steps.cache-toolchain.outputs.cache-hit != 'true' @@ -35,7 +41,6 @@ jobs: cp -r kernel/fs/* ${{ github.workspace }}/fs/ 2>/dev/null || true cp -r kernel/security/* ${{ github.workspace }}/security/ 2>/dev/null || true cp -r kernel/drivers/* ${{ github.workspace }}/drivers/ 2>/dev/null || true - cp -r kernel/ksu/* ${{ github.workspace }}/ksu/ 2>/dev/null || true fi - name: Get SUSFS @@ -44,21 +49,41 @@ jobs: - name: Apply SUSFS patch run: | cd susfs4ksu - if [ -f kernel_patches/5.15/0001-susfs.patch ]; then - patch -p1 -d ${{ github.workspace }} < kernel_patches/5.15/0001-susfs.patch || true + PATCH="" + [ -f kernel_patches/5.15/0001-susfs.patch ] && PATCH="kernel_patches/5.15/0001-susfs.patch" + [ -f kernel_patches/5.10/0001-susfs.patch ] && PATCH="kernel_patches/5.10/0001-susfs.patch" + if [ -n "$PATCH" ]; then + patch -p1 -d ${{ github.workspace }} < $PATCH || echo "SUSFS patch failed, continuing..." fi - name: Configure kernel run: | export PATH="${{ github.workspace }}/toolchain/clang/bin:$PATH" - make ARCH=arm64 \ - CC=clang \ - CLANG_TRIPLE=aarch64-linux-gnu- \ - LLVM=1 \ - LLVM_IAS=1 \ - gki_defconfig - scripts/config --file .config -e KSU - scripts/config --file .config -e KSU_SUSFS + # Cek defconfig yang tersedia + echo "=== Available defconfigs ===" + ls arch/arm64/configs/ || true + ls arch/arm64/configs/vendor/ 2>/dev/null || true + + # Pakai creek_GKI.config kalau ada, fallback ke gki_defconfig + if [ -f arch/arm64/configs/vendor/creek_GKI.config ]; then + echo "Using creek_GKI.config" + make ARCH=arm64 CC=clang CLANG_TRIPLE=aarch64-linux-gnu- LLVM=1 LLVM_IAS=1 gki_defconfig + cat arch/arm64/configs/vendor/creek_GKI.config >> .config + make ARCH=arm64 CC=clang CLANG_TRIPLE=aarch64-linux-gnu- LLVM=1 LLVM_IAS=1 olddefconfig + elif [ -f arch/arm64/configs/creek_GKI.config ]; then + echo "Using creek_GKI.config (root)" + make ARCH=arm64 CC=clang CLANG_TRIPLE=aarch64-linux-gnu- LLVM=1 LLVM_IAS=1 gki_defconfig + cat arch/arm64/configs/creek_GKI.config >> .config + make ARCH=arm64 CC=clang CLANG_TRIPLE=aarch64-linux-gnu- LLVM=1 LLVM_IAS=1 olddefconfig + else + echo "Fallback: gki_defconfig" + make ARCH=arm64 CC=clang CLANG_TRIPLE=aarch64-linux-gnu- LLVM=1 LLVM_IAS=1 gki_defconfig + fi + + # Enable KSU + SUSFS + scripts/config --file .config -e KSU || true + scripts/config --file .config -e KSU_SUSFS || true + make ARCH=arm64 CC=clang CLANG_TRIPLE=aarch64-linux-gnu- LLVM=1 LLVM_IAS=1 olddefconfig - name: Build kernel run: | @@ -74,10 +99,11 @@ jobs: run: | git clone --depth=1 https://github.com/osm0sis/AnyKernel3 cp arch/arm64/boot/Image.gz AnyKernel3/ 2>/dev/null || \ - cp arch/arm64/boot/Image AnyKernel3/ 2>/dev/null || true + cp arch/arm64/boot/Image AnyKernel3/ 2>/dev/null || \ + echo "WARNING: No kernel image found!" cd AnyKernel3 cat > anykernel.sh << 'EOF' - kernel.string=Creek Kernel for Redmi 15 - KSU-Next + SUSFS + kernel.string=Creek Kernel Neko - KSU-Next + SUSFS do.devicecheck=0 do.modules=0 do.systemless=1 @@ -90,10 +116,10 @@ jobs: dump_boot write_boot EOF - zip -r9 ../Creek-Kernel-Full.zip ./* + zip -r9 ../Creek-Kernel-Neko.zip ./* - name: Upload ZIP uses: actions/upload-artifact@v4 with: - name: Creek-Kernel-Full - path: Creek-Kernel-Full.zip + name: Creek-Kernel-Neko + path: Creek-Kernel-Neko.zip From b49f27b2904baa068d6f7a5d13c6eca76825574c Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 04:50:43 +0700 Subject: [PATCH 41/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 50 ++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index a3f4cccddd62d..7eb4ca5e8647d 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -21,7 +21,7 @@ jobs: sudo apt update && sudo apt install -y \ git make bc bison flex libssl-dev \ build-essential wget zip python3 \ - libelf-dev libc6-dev binutils + libelf-dev libc6-dev binutils perl - name: Download Clang if: steps.cache-toolchain.outputs.cache-hit != 'true' @@ -31,17 +31,9 @@ jobs: tar -xf clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz mv clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04 clang - - name: Integrate KernelSU-Next + - name: Integrate KernelSU-Next (GKI) run: | - git clone --depth=1 https://github.com/KernelSU-Next/KernelSU-Next.git KernelSU-Next - cd KernelSU-Next - if [ -f ksu_setup.sh ]; then - bash ksu_setup.sh ${{ github.workspace }} - else - cp -r kernel/fs/* ${{ github.workspace }}/fs/ 2>/dev/null || true - cp -r kernel/security/* ${{ github.workspace }}/security/ 2>/dev/null || true - cp -r kernel/drivers/* ${{ github.workspace }}/drivers/ 2>/dev/null || true - fi + curl -LSs "https://raw.githubusercontent.com/KernelSU-Next/KernelSU-Next/next/kernel/setup.sh" | bash -s stable - name: Get SUSFS run: git clone --depth=1 https://gitlab.com/simonpunk/susfs4ksu.git @@ -56,15 +48,38 @@ jobs: patch -p1 -d ${{ github.workspace }} < $PATCH || echo "SUSFS patch failed, continuing..." fi + - name: Fix Clang compatibility issues + run: | + echo "=== Fix angled includes di WALT ===" + find kernel/sched/walt/ -name "*.c" -o -name "*.h" | xargs grep -l "#include /dev/null | while read f; do + echo "Fixing: $f" + sed -i 's/#include /#include "walt.h"/g' "$f" + sed -i 's/#include /#include "walt_helpers.h"/g' "$f" + done + + echo "=== Fix angled includes di vendor dirs ===" + for dir in drivers/soc/qcom kernel/sched; do + find $dir -name "*.c" 2>/dev/null | xargs grep -l "#include <[a-z_]*\.h>" 2>/dev/null | while read f; do + grep -o '#include <[a-z_]*\.h>' "$f" | while read inc; do + hdr=$(echo $inc | sed 's/#include //') + dir_of_f=$(dirname "$f") + if [ -f "$dir_of_f/$hdr" ]; then + echo "Fixing local include in $f: $inc" + sed -i "s|#include <$hdr>|#include \"$hdr\"|g" "$f" + fi + done + done + done + + echo "=== Done ===" + - name: Configure kernel run: | export PATH="${{ github.workspace }}/toolchain/clang/bin:$PATH" - # Cek defconfig yang tersedia echo "=== Available defconfigs ===" ls arch/arm64/configs/ || true ls arch/arm64/configs/vendor/ 2>/dev/null || true - # Pakai creek_GKI.config kalau ada, fallback ke gki_defconfig if [ -f arch/arm64/configs/vendor/creek_GKI.config ]; then echo "Using creek_GKI.config" make ARCH=arm64 CC=clang CLANG_TRIPLE=aarch64-linux-gnu- LLVM=1 LLVM_IAS=1 gki_defconfig @@ -80,7 +95,6 @@ jobs: make ARCH=arm64 CC=clang CLANG_TRIPLE=aarch64-linux-gnu- LLVM=1 LLVM_IAS=1 gki_defconfig fi - # Enable KSU + SUSFS scripts/config --file .config -e KSU || true scripts/config --file .config -e KSU_SUSFS || true make ARCH=arm64 CC=clang CLANG_TRIPLE=aarch64-linux-gnu- LLVM=1 LLVM_IAS=1 olddefconfig @@ -88,12 +102,16 @@ jobs: - name: Build kernel run: | export PATH="${{ github.workspace }}/toolchain/clang/bin:$PATH" - make -j1 \ + make -j$(nproc) \ ARCH=arm64 \ CC=clang \ CLANG_TRIPLE=aarch64-linux-gnu- \ LLVM=1 \ - LLVM_IAS=1 + LLVM_IAS=1 \ + KCFLAGS="-Wno-error=implicit-function-declaration \ + -Wno-error=unused-function \ + -Wno-error=misleading-indentation \ + -Wno-error=array-bounds" - name: Create AnyKernel3 zip run: | From 45a127c11c7e5400b25b6b98b57a7ac9f757c20a Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 04:52:42 +0700 Subject: [PATCH 42/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 7eb4ca5e8647d..01e0e5da0515e 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -33,7 +33,7 @@ jobs: - name: Integrate KernelSU-Next (GKI) run: | - curl -LSs "https://raw.githubusercontent.com/KernelSU-Next/KernelSU-Next/next/kernel/setup.sh" | bash -s stable + curl -LSs "https://raw.githubusercontent.com/KernelSU-Next/KernelSU-Next/next/kernel/setup.sh" | bash -s legacy - name: Get SUSFS run: git clone --depth=1 https://gitlab.com/simonpunk/susfs4ksu.git From dae8d1e401a3c08547c0958c747c88a3a5286fa2 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 08:51:26 +0700 Subject: [PATCH 43/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 01e0e5da0515e..483215000b5e8 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -31,7 +31,7 @@ jobs: tar -xf clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz mv clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04 clang - - name: Integrate KernelSU-Next (GKI) + - name: Integrate KernelSU-Next run: | curl -LSs "https://raw.githubusercontent.com/KernelSU-Next/KernelSU-Next/next/kernel/setup.sh" | bash -s legacy @@ -102,7 +102,7 @@ jobs: - name: Build kernel run: | export PATH="${{ github.workspace }}/toolchain/clang/bin:$PATH" - make -j$(nproc) \ + make -j1 \ ARCH=arm64 \ CC=clang \ CLANG_TRIPLE=aarch64-linux-gnu- \ From 18119d90bd83368622ea984dea7338878e157d04 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 09:13:34 +0700 Subject: [PATCH 44/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 483215000b5e8..7ccd59e687ce0 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -50,14 +50,14 @@ jobs: - name: Fix Clang compatibility issues run: | - echo "=== Fix angled includes di WALT ===" + echo "=== Fix 1: WALT angled includes ===" find kernel/sched/walt/ -name "*.c" -o -name "*.h" | xargs grep -l "#include /dev/null | while read f; do echo "Fixing: $f" sed -i 's/#include /#include "walt.h"/g' "$f" sed -i 's/#include /#include "walt_helpers.h"/g' "$f" done - echo "=== Fix angled includes di vendor dirs ===" + echo "=== Fix 2: angled includes di vendor dirs ===" for dir in drivers/soc/qcom kernel/sched; do find $dir -name "*.c" 2>/dev/null | xargs grep -l "#include <[a-z_]*\.h>" 2>/dev/null | while read f; do grep -o '#include <[a-z_]*\.h>' "$f" | while read inc; do @@ -71,6 +71,21 @@ jobs: done done + echo "=== Fix 3: TRACE_INCLUDE_PATH qcom clk ===" + find drivers/clk/qcom/ -name "trace.h" 2>/dev/null | while read f; do + echo "Fixing TRACE_INCLUDE_PATH in $f" + sed -i 's|#define TRACE_INCLUDE_PATH \.\.|#define TRACE_INCLUDE_PATH drivers/clk/qcom|g' "$f" + sed -i 's|#define TRACE_INCLUDE_PATH \.|#define TRACE_INCLUDE_PATH drivers/clk/qcom|g' "$f" + done + + echo "=== Fix 4: TRACE_INCLUDE_PATH semua driver qcom ===" + find drivers/soc/qcom/ drivers/clk/qcom/ drivers/mmc/ -name "trace.h" 2>/dev/null | while read f; do + dir=$(dirname "$f" | sed 's|^\./||') + echo "Fixing TRACE_INCLUDE_PATH in $f -> $dir" + sed -i "s|#define TRACE_INCLUDE_PATH \.\.|#define TRACE_INCLUDE_PATH $dir|g" "$f" + sed -i "s|#define TRACE_INCLUDE_PATH \.|#define TRACE_INCLUDE_PATH $dir|g" "$f" + done + echo "=== Done ===" - name: Configure kernel @@ -111,7 +126,9 @@ jobs: KCFLAGS="-Wno-error=implicit-function-declaration \ -Wno-error=unused-function \ -Wno-error=misleading-indentation \ - -Wno-error=array-bounds" + -Wno-error=array-bounds" \ + KBUILD_EXTRA_CFLAGS="-I$(pwd)/drivers/clk/qcom \ + -I$(pwd)/drivers/soc/qcom" - name: Create AnyKernel3 zip run: | From cfe98a256402ce222709d8b28d0bc9c8156d953b Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 09:38:00 +0700 Subject: [PATCH 45/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 7ccd59e687ce0..978e955e6ce00 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -71,19 +71,11 @@ jobs: done done - echo "=== Fix 3: TRACE_INCLUDE_PATH qcom clk ===" - find drivers/clk/qcom/ -name "trace.h" 2>/dev/null | while read f; do - echo "Fixing TRACE_INCLUDE_PATH in $f" - sed -i 's|#define TRACE_INCLUDE_PATH \.\.|#define TRACE_INCLUDE_PATH drivers/clk/qcom|g' "$f" - sed -i 's|#define TRACE_INCLUDE_PATH \.|#define TRACE_INCLUDE_PATH drivers/clk/qcom|g' "$f" - done - - echo "=== Fix 4: TRACE_INCLUDE_PATH semua driver qcom ===" - find drivers/soc/qcom/ drivers/clk/qcom/ drivers/mmc/ -name "trace.h" 2>/dev/null | while read f; do - dir=$(dirname "$f" | sed 's|^\./||') - echo "Fixing TRACE_INCLUDE_PATH in $f -> $dir" - sed -i "s|#define TRACE_INCLUDE_PATH \.\.|#define TRACE_INCLUDE_PATH $dir|g" "$f" - sed -i "s|#define TRACE_INCLUDE_PATH \.|#define TRACE_INCLUDE_PATH $dir|g" "$f" + echo "=== Fix 3: Restore TRACE_INCLUDE_PATH ke dot ===" + find drivers/ -name "trace.h" 2>/dev/null | while read f; do + # Kembalikan ke dot kalau sudah diubah sebelumnya + sed -i 's|#define TRACE_INCLUDE_PATH drivers/.*|#define TRACE_INCLUDE_PATH .|g' "$f" + grep "TRACE_INCLUDE_PATH" "$f" && echo " -> $f ok" || true done echo "=== Done ===" @@ -127,8 +119,7 @@ jobs: -Wno-error=unused-function \ -Wno-error=misleading-indentation \ -Wno-error=array-bounds" \ - KBUILD_EXTRA_CFLAGS="-I$(pwd)/drivers/clk/qcom \ - -I$(pwd)/drivers/soc/qcom" + KBUILD_CPPFLAGS="-I$(pwd)" - name: Create AnyKernel3 zip run: | From 9196ffdcdcbd372e0f038dc5170bb86b7f6ed1ac Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 09:53:08 +0700 Subject: [PATCH 46/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 55 +++++++++++++++++++++++------- 1 file changed, 42 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 978e955e6ce00..8bb24437fef87 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -31,9 +31,9 @@ jobs: tar -xf clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz mv clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04 clang - - name: Integrate KernelSU-Next + - name: Integrate KernelSU-Next (GKI stable) run: | - curl -LSs "https://raw.githubusercontent.com/KernelSU-Next/KernelSU-Next/next/kernel/setup.sh" | bash -s legacy + curl -LSs "https://raw.githubusercontent.com/KernelSU-Next/KernelSU-Next/next/kernel/setup.sh" | bash -s stable - name: Get SUSFS run: git clone --depth=1 https://gitlab.com/simonpunk/susfs4ksu.git @@ -51,7 +51,8 @@ jobs: - name: Fix Clang compatibility issues run: | echo "=== Fix 1: WALT angled includes ===" - find kernel/sched/walt/ -name "*.c" -o -name "*.h" | xargs grep -l "#include /dev/null | while read f; do + find kernel/sched/walt/ -name "*.c" -o -name "*.h" 2>/dev/null | \ + xargs grep -l "#include /dev/null | while read f; do echo "Fixing: $f" sed -i 's/#include /#include "walt.h"/g' "$f" sed -i 's/#include /#include "walt_helpers.h"/g' "$f" @@ -59,7 +60,8 @@ jobs: echo "=== Fix 2: angled includes di vendor dirs ===" for dir in drivers/soc/qcom kernel/sched; do - find $dir -name "*.c" 2>/dev/null | xargs grep -l "#include <[a-z_]*\.h>" 2>/dev/null | while read f; do + find $dir -name "*.c" 2>/dev/null | \ + xargs grep -l "#include <[a-z_]*\.h>" 2>/dev/null | while read f; do grep -o '#include <[a-z_]*\.h>' "$f" | while read inc; do hdr=$(echo $inc | sed 's/#include //') dir_of_f=$(dirname "$f") @@ -71,13 +73,38 @@ jobs: done done - echo "=== Fix 3: Restore TRACE_INCLUDE_PATH ke dot ===" - find drivers/ -name "trace.h" 2>/dev/null | while read f; do - # Kembalikan ke dot kalau sudah diubah sebelumnya - sed -i 's|#define TRACE_INCLUDE_PATH drivers/.*|#define TRACE_INCLUDE_PATH .|g' "$f" - grep "TRACE_INCLUDE_PATH" "$f" && echo " -> $f ok" || true + echo "=== Fix 3: TRACE_INCLUDE_PATH via ccflags ===" + find drivers/ -name "trace.h" 2>/dev/null | while read traceh; do + dir=$(dirname "$traceh") + makefile="$dir/Makefile" + if [ -f "$makefile" ] && grep -q "TRACE_INCLUDE_PATH" "$traceh"; then + if ! grep -q "ccflags.*srctree.*$dir" "$makefile"; then + echo "Adding ccflags to $makefile" + echo "" >> "$makefile" + echo "# Fix TRACE_INCLUDE_PATH for clang" >> "$makefile" + echo "ccflags-y += -I\$(srctree)/$dir" >> "$makefile" + fi + fi done + echo "=== Fix 4: drivers/clk/qcom trace fix ===" + if [ -f drivers/clk/qcom/Makefile ]; then + if ! grep -q "ccflags.*clk/qcom" drivers/clk/qcom/Makefile; then + echo "" >> drivers/clk/qcom/Makefile + echo "ccflags-y += -I\$(srctree)/drivers/clk/qcom" >> drivers/clk/qcom/Makefile + echo "Fixed drivers/clk/qcom/Makefile" + fi + fi + + echo "=== Fix 5: drivers/soc/qcom trace fix ===" + if [ -f drivers/soc/qcom/Makefile ]; then + if ! grep -q "ccflags.*soc/qcom" drivers/soc/qcom/Makefile; then + echo "" >> drivers/soc/qcom/Makefile + echo "ccflags-y += -I\$(srctree)/drivers/soc/qcom" >> drivers/soc/qcom/Makefile + echo "Fixed drivers/soc/qcom/Makefile" + fi + fi + echo "=== Done ===" - name: Configure kernel @@ -88,12 +115,12 @@ jobs: ls arch/arm64/configs/vendor/ 2>/dev/null || true if [ -f arch/arm64/configs/vendor/creek_GKI.config ]; then - echo "Using creek_GKI.config" + echo "Using vendor/creek_GKI.config" make ARCH=arm64 CC=clang CLANG_TRIPLE=aarch64-linux-gnu- LLVM=1 LLVM_IAS=1 gki_defconfig cat arch/arm64/configs/vendor/creek_GKI.config >> .config make ARCH=arm64 CC=clang CLANG_TRIPLE=aarch64-linux-gnu- LLVM=1 LLVM_IAS=1 olddefconfig elif [ -f arch/arm64/configs/creek_GKI.config ]; then - echo "Using creek_GKI.config (root)" + echo "Using creek_GKI.config" make ARCH=arm64 CC=clang CLANG_TRIPLE=aarch64-linux-gnu- LLVM=1 LLVM_IAS=1 gki_defconfig cat arch/arm64/configs/creek_GKI.config >> .config make ARCH=arm64 CC=clang CLANG_TRIPLE=aarch64-linux-gnu- LLVM=1 LLVM_IAS=1 olddefconfig @@ -118,8 +145,10 @@ jobs: KCFLAGS="-Wno-error=implicit-function-declaration \ -Wno-error=unused-function \ -Wno-error=misleading-indentation \ - -Wno-error=array-bounds" \ - KBUILD_CPPFLAGS="-I$(pwd)" + -Wno-error=array-bounds \ + -Wno-error=unused-variable \ + -Wno-error=unused-but-set-variable \ + -Wno-error=deprecated-declarations" - name: Create AnyKernel3 zip run: | From a84d89ff14b5d8673faa52c9ccc3db9e7ad532df Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 10:52:06 +0700 Subject: [PATCH 47/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 31 ++++++++---------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 8bb24437fef87..b0d5082261c6d 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -73,38 +73,23 @@ jobs: done done - echo "=== Fix 3: TRACE_INCLUDE_PATH via ccflags ===" - find drivers/ -name "trace.h" 2>/dev/null | while read traceh; do + echo "=== Fix 3: TRACE_INCLUDE_PATH universal (semua driver + arch) ===" + find drivers/ arch/ -name "*.h" 2>/dev/null | \ + xargs grep -l "TRACE_INCLUDE_PATH" 2>/dev/null | while read traceh; do dir=$(dirname "$traceh") makefile="$dir/Makefile" - if [ -f "$makefile" ] && grep -q "TRACE_INCLUDE_PATH" "$traceh"; then - if ! grep -q "ccflags.*srctree.*$dir" "$makefile"; then - echo "Adding ccflags to $makefile" + if [ -f "$makefile" ]; then + if ! grep -q "ccflags-y.*srctree.*$dir" "$makefile"; then + echo "Adding ccflags to $makefile for $dir" echo "" >> "$makefile" echo "# Fix TRACE_INCLUDE_PATH for clang" >> "$makefile" echo "ccflags-y += -I\$(srctree)/$dir" >> "$makefile" fi + else + echo "WARNING: No Makefile found for $dir, skipping" fi done - echo "=== Fix 4: drivers/clk/qcom trace fix ===" - if [ -f drivers/clk/qcom/Makefile ]; then - if ! grep -q "ccflags.*clk/qcom" drivers/clk/qcom/Makefile; then - echo "" >> drivers/clk/qcom/Makefile - echo "ccflags-y += -I\$(srctree)/drivers/clk/qcom" >> drivers/clk/qcom/Makefile - echo "Fixed drivers/clk/qcom/Makefile" - fi - fi - - echo "=== Fix 5: drivers/soc/qcom trace fix ===" - if [ -f drivers/soc/qcom/Makefile ]; then - if ! grep -q "ccflags.*soc/qcom" drivers/soc/qcom/Makefile; then - echo "" >> drivers/soc/qcom/Makefile - echo "ccflags-y += -I\$(srctree)/drivers/soc/qcom" >> drivers/soc/qcom/Makefile - echo "Fixed drivers/soc/qcom/Makefile" - fi - fi - echo "=== Done ===" - name: Configure kernel From 81834cd394d4183dee8aebdda30197560c937a30 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 11:17:04 +0700 Subject: [PATCH 48/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index b0d5082261c6d..39ac9ad9fd55e 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -73,7 +73,7 @@ jobs: done done - echo "=== Fix 3: TRACE_INCLUDE_PATH universal (semua driver + arch) ===" + echo "=== Fix 3: TRACE_INCLUDE_PATH universal ===" find drivers/ arch/ -name "*.h" 2>/dev/null | \ xargs grep -l "TRACE_INCLUDE_PATH" 2>/dev/null | while read traceh; do dir=$(dirname "$traceh") @@ -85,11 +85,16 @@ jobs: echo "# Fix TRACE_INCLUDE_PATH for clang" >> "$makefile" echo "ccflags-y += -I\$(srctree)/$dir" >> "$makefile" fi - else - echo "WARNING: No Makefile found for $dir, skipping" fi done + echo "=== Fix 4: minidump_log implicit int ===" + if [ -f drivers/soc/qcom/minidump_log.c ]; then + sed -i 's/^static md_align_offset;/static int md_align_offset;/' \ + drivers/soc/qcom/minidump_log.c + echo "Fixed minidump_log.c" + fi + echo "=== Done ===" - name: Configure kernel @@ -128,6 +133,7 @@ jobs: LLVM=1 \ LLVM_IAS=1 \ KCFLAGS="-Wno-error=implicit-function-declaration \ + -Wno-error=implicit-int \ -Wno-error=unused-function \ -Wno-error=misleading-indentation \ -Wno-error=array-bounds \ From 9389631b1bdc4e2aa3a24caeda896eed8aff6ab3 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 12:05:14 +0700 Subject: [PATCH 49/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 39ac9ad9fd55e..b91ccddb0a484 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -95,6 +95,19 @@ jobs: echo "Fixed minidump_log.c" fi + echo "=== Fix 5: zram_drv strict prototypes ===" + if [ -f drivers/block/zram/zram_drv.c ]; then + sed -i 's/static struct zram_pages_life \*init_pages_life()/static struct zram_pages_life *init_pages_life(void)/' \ + drivers/block/zram/zram_drv.c + echo "Fixed zram_drv.c" + fi + + echo "=== Fix 6: Scan dan fix semua strict-prototypes ===" + find drivers/ -name "*.c" 2>/dev/null | \ + xargs grep -l "^\(static\|extern\) [a-zA-Z_].*()$" 2>/dev/null | while read f; do + sed -i 's/\(\(static\|extern\) [a-zA-Z_][a-zA-Z0-9_ *]*\)()/\1(void)/g' "$f" + done + echo "=== Done ===" - name: Configure kernel @@ -134,12 +147,16 @@ jobs: LLVM_IAS=1 \ KCFLAGS="-Wno-error=implicit-function-declaration \ -Wno-error=implicit-int \ + -Wno-error=strict-prototypes \ -Wno-error=unused-function \ -Wno-error=misleading-indentation \ -Wno-error=array-bounds \ -Wno-error=unused-variable \ -Wno-error=unused-but-set-variable \ - -Wno-error=deprecated-declarations" + -Wno-error=deprecated-declarations \ + -Wno-error=int-conversion \ + -Wno-error=incompatible-pointer-types \ + -Wno-error=return-type" - name: Create AnyKernel3 zip run: | From 1c6311cbb02b8a20549f39e5906315632a5d2ef5 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 13:04:42 +0700 Subject: [PATCH 50/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index b91ccddb0a484..3ce6cc21e30b1 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -102,12 +102,26 @@ jobs: echo "Fixed zram_drv.c" fi - echo "=== Fix 6: Scan dan fix semua strict-prototypes ===" + echo "=== Fix 6: Scan semua strict-prototypes ===" find drivers/ -name "*.c" 2>/dev/null | \ xargs grep -l "^\(static\|extern\) [a-zA-Z_].*()$" 2>/dev/null | while read f; do sed -i 's/\(\(static\|extern\) [a-zA-Z_][a-zA-Z0-9_ *]*\)()/\1(void)/g' "$f" done + echo "=== Fix 7: angled include dengan path relatif ===" + if [ -f drivers/staging/binder_prio/binder_prio.c ]; then + sed -i 's|#include <../../android/binder_internal.h>|#include "../../android/binder_internal.h"|g' \ + drivers/staging/binder_prio/binder_prio.c + echo "Fixed binder_prio.c" + fi + + echo "=== Fix 7b: Scan semua angled include dengan path relatif ===" + find drivers/ -name "*.c" -o -name "*.h" 2>/dev/null | \ + xargs grep -l '#include <\.\.' 2>/dev/null | while read f; do + echo "Fixing relative angled include in $f" + sed -i 's|#include <\(\.\.[^>]*\)>|#include "\1"|g' "$f" + done + echo "=== Done ===" - name: Configure kernel From 4577c4ca90fea7b07cc8305103775a73d0babbd2 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 14:15:01 +0700 Subject: [PATCH 51/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 3ce6cc21e30b1..ddc704c80b319 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -109,13 +109,6 @@ jobs: done echo "=== Fix 7: angled include dengan path relatif ===" - if [ -f drivers/staging/binder_prio/binder_prio.c ]; then - sed -i 's|#include <../../android/binder_internal.h>|#include "../../android/binder_internal.h"|g' \ - drivers/staging/binder_prio/binder_prio.c - echo "Fixed binder_prio.c" - fi - - echo "=== Fix 7b: Scan semua angled include dengan path relatif ===" find drivers/ -name "*.c" -o -name "*.h" 2>/dev/null | \ xargs grep -l '#include <\.\.' 2>/dev/null | while read f; do echo "Fixing relative angled include in $f" @@ -148,12 +141,16 @@ jobs: scripts/config --file .config -e KSU || true scripts/config --file .config -e KSU_SUSFS || true + scripts/config --file .config -d LTO_CLANG || true + scripts/config --file .config -d LTO_CLANG_FULL || true + scripts/config --file .config -d LTO_CLANG_THIN || true + scripts/config --file .config -e LTO_NONE || true make ARCH=arm64 CC=clang CLANG_TRIPLE=aarch64-linux-gnu- LLVM=1 LLVM_IAS=1 olddefconfig - name: Build kernel run: | export PATH="${{ github.workspace }}/toolchain/clang/bin:$PATH" - make -j1 \ + make -j$(nproc) \ ARCH=arm64 \ CC=clang \ CLANG_TRIPLE=aarch64-linux-gnu- \ From 3ab1f8538f40b8243e277275892d0721adf6725b Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 14:54:52 +0700 Subject: [PATCH 52/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index ddc704c80b319..740db79a2798f 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -21,7 +21,8 @@ jobs: sudo apt update && sudo apt install -y \ git make bc bison flex libssl-dev \ build-essential wget zip python3 \ - libelf-dev libc6-dev binutils perl + libelf-dev libc6-dev binutils perl \ + dwarves - name: Download Clang if: steps.cache-toolchain.outputs.cache-hit != 'true' From 9ad3099d717598ffd62120670ecfb346b27769b6 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 16:13:22 +0700 Subject: [PATCH 53/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 95 +++++++++++++++++++++++++++++- 1 file changed, 94 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 740db79a2798f..27dfc61f78dde 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -32,6 +32,19 @@ jobs: tar -xf clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz mv clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04 clang + - name: Sync upstream stable 5.15.194 + run: | + git config user.email "ci@github.com" + git config user.name "GitHub Actions" + git remote add stable https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git + git fetch stable linux-5.15.y --depth=500 + git merge stable/linux-5.15.y \ + --no-edit \ + -X ours \ + --allow-unrelated-histories || true + echo "=== Kernel version after merge ===" + head -5 Makefile + - name: Integrate KernelSU-Next (GKI stable) run: | curl -LSs "https://raw.githubusercontent.com/KernelSU-Next/KernelSU-Next/next/kernel/setup.sh" | bash -s stable @@ -140,12 +153,92 @@ jobs: make ARCH=arm64 CC=clang CLANG_TRIPLE=aarch64-linux-gnu- LLVM=1 LLVM_IAS=1 gki_defconfig fi + # KSU + SUSFS scripts/config --file .config -e KSU || true scripts/config --file .config -e KSU_SUSFS || true + + # Disable LTO (OOM di GitHub Actions) scripts/config --file .config -d LTO_CLANG || true scripts/config --file .config -d LTO_CLANG_FULL || true scripts/config --file .config -d LTO_CLANG_THIN || true scripts/config --file .config -e LTO_NONE || true + + # === SCHEDULER OPTIMIZATION === + # Energy Aware Scheduling + scripts/config --file .config -e ENERGY_MODEL || true + scripts/config --file .config -e CPU_FREQ_GOV_SCHEDUTIL || true + # WALT tuning sudah built-in Qualcomm source + scripts/config --file .config -e SCHED_WALT || true + + # === MEMORY OPTIMIZATION === + # ZRAM + scripts/config --file .config -e ZRAM || true + scripts/config --file .config -e ZRAM_DEF_COMP_ZSTD || true + scripts/config --file .config -e ZSMALLOC || true + # MGLRU (Multi-Gen LRU) - better memory reclaim + scripts/config --file .config -e LRU_GEN || true + scripts/config --file .config -e LRU_GEN_ENABLED || true + # Memory compaction + scripts/config --file .config -e COMPACTION || true + scripts/config --file .config -e MIGRATION || true + # KSM - Kernel Samepage Merging + scripts/config --file .config -e KSM || true + # Transparent Hugepage + scripts/config --file .config -e TRANSPARENT_HUGEPAGE || true + + # === I/O OPTIMIZATION === + # BFQ I/O Scheduler (better for mobile) + scripts/config --file .config -e BFQ_GROUP_IOSCHED || true + scripts/config --file .config -e IOSCHED_BFQ || true + scripts/config --file .config -e MQ_IOSCHED_DEADLINE || true + # F2FS optimizations + scripts/config --file .config -e F2FS_FS || true + scripts/config --file .config -e F2FS_FS_COMPRESSION || true + scripts/config --file .config -e F2FS_FS_ZSTD || true + + # === NETWORK OPTIMIZATION === + # TCP BBR congestion control + scripts/config --file .config -e TCP_CONG_BBR || true + scripts/config --file .config -e NET_SCH_FQ || true + # TCP Fast Open + scripts/config --file .config -e TCP_FASTOPEN || true + + # === BATTERY OPTIMIZATION === + # Power efficient workqueues + scripts/config --file .config -e WQ_POWER_EFFICIENT_DEFAULT || true + # CPU idle + scripts/config --file .config -e CPU_IDLE || true + scripts/config --file .config -e CPU_IDLE_GOV_MENU || true + scripts/config --file .config -e CPU_IDLE_GOV_TEO || true + # Suspend optimizations + scripts/config --file .config -e SUSPEND || true + scripts/config --file .config -e PM_WAKELOCKS || true + scripts/config --file .config -e PM_WAKELOCKS_LIMIT || true + + # === GAMING OPTIMIZATION === + # CPU boost + scripts/config --file .config -e CPU_BOOST || true + scripts/config --file .config -e SCHED_BOOST || true + # GPU + scripts/config --file .config -e QCOM_KGSL || true + # Preemption - Full for smooth UI + scripts/config --file .config -e PREEMPT || true + scripts/config --file .config -d PREEMPT_NONE || true + scripts/config --file .config -d PREEMPT_VOLUNTARY || true + # High res timers + scripts/config --file .config -e HZ_300 || true + scripts/config --file .config -e HIGH_RES_TIMERS || true + + # === MISC OPTIMIZATIONS === + # Zstd compression + scripts/config --file .config -e ZSTD_COMPRESS || true + scripts/config --file .config -e ZSTD_DECOMPRESS || true + # CRC32 hardware acceleration + scripts/config --file .config -e CRC32_ARMV8_CRC32 || true + # Crypto hardware + scripts/config --file .config -e CRYPTO_SHA2_ARM64_CE || true + scripts/config --file .config -e CRYPTO_AES_ARM64_CE_BLK || true + make ARCH=arm64 CC=clang CLANG_TRIPLE=aarch64-linux-gnu- LLVM=1 LLVM_IAS=1 olddefconfig - name: Build kernel @@ -178,7 +271,7 @@ jobs: echo "WARNING: No kernel image found!" cd AnyKernel3 cat > anykernel.sh << 'EOF' - kernel.string=Creek Kernel Neko - KSU-Next + SUSFS + kernel.string=Creek Kernel Neko - KSU-Next + SUSFS | Optimized do.devicecheck=0 do.modules=0 do.systemless=1 From de2dafab1fc1545aa72b23c4b60904cd09ffe0cf Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 16:41:33 +0700 Subject: [PATCH 54/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 32 +++++++++--------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 27dfc61f78dde..60c5d573ee8bb 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -157,85 +157,71 @@ jobs: scripts/config --file .config -e KSU || true scripts/config --file .config -e KSU_SUSFS || true - # Disable LTO (OOM di GitHub Actions) + # Disable LTO scripts/config --file .config -d LTO_CLANG || true scripts/config --file .config -d LTO_CLANG_FULL || true scripts/config --file .config -d LTO_CLANG_THIN || true scripts/config --file .config -e LTO_NONE || true + # Disable BTF - conflict dengan upstream merge + scripts/config --file .config -d DEBUG_INFO_BTF || true + scripts/config --file .config -d DEBUG_INFO_BTF_MODULES || true + scripts/config --file .config -d DEBUG_INFO || true + scripts/config --file .config -e DEBUG_INFO_NONE || true + scripts/config --file .config -d SCHED_WALT_DEBUG || true + # === SCHEDULER OPTIMIZATION === - # Energy Aware Scheduling scripts/config --file .config -e ENERGY_MODEL || true scripts/config --file .config -e CPU_FREQ_GOV_SCHEDUTIL || true - # WALT tuning sudah built-in Qualcomm source scripts/config --file .config -e SCHED_WALT || true - # === MEMORY OPTIMIZATION === - # ZRAM + # === MEMORY OPTIMIZATION === scripts/config --file .config -e ZRAM || true scripts/config --file .config -e ZRAM_DEF_COMP_ZSTD || true scripts/config --file .config -e ZSMALLOC || true - # MGLRU (Multi-Gen LRU) - better memory reclaim scripts/config --file .config -e LRU_GEN || true scripts/config --file .config -e LRU_GEN_ENABLED || true - # Memory compaction scripts/config --file .config -e COMPACTION || true scripts/config --file .config -e MIGRATION || true - # KSM - Kernel Samepage Merging scripts/config --file .config -e KSM || true - # Transparent Hugepage scripts/config --file .config -e TRANSPARENT_HUGEPAGE || true # === I/O OPTIMIZATION === - # BFQ I/O Scheduler (better for mobile) scripts/config --file .config -e BFQ_GROUP_IOSCHED || true scripts/config --file .config -e IOSCHED_BFQ || true scripts/config --file .config -e MQ_IOSCHED_DEADLINE || true - # F2FS optimizations scripts/config --file .config -e F2FS_FS || true scripts/config --file .config -e F2FS_FS_COMPRESSION || true scripts/config --file .config -e F2FS_FS_ZSTD || true # === NETWORK OPTIMIZATION === - # TCP BBR congestion control scripts/config --file .config -e TCP_CONG_BBR || true scripts/config --file .config -e NET_SCH_FQ || true - # TCP Fast Open scripts/config --file .config -e TCP_FASTOPEN || true # === BATTERY OPTIMIZATION === - # Power efficient workqueues scripts/config --file .config -e WQ_POWER_EFFICIENT_DEFAULT || true - # CPU idle scripts/config --file .config -e CPU_IDLE || true scripts/config --file .config -e CPU_IDLE_GOV_MENU || true scripts/config --file .config -e CPU_IDLE_GOV_TEO || true - # Suspend optimizations scripts/config --file .config -e SUSPEND || true scripts/config --file .config -e PM_WAKELOCKS || true scripts/config --file .config -e PM_WAKELOCKS_LIMIT || true # === GAMING OPTIMIZATION === - # CPU boost scripts/config --file .config -e CPU_BOOST || true scripts/config --file .config -e SCHED_BOOST || true - # GPU scripts/config --file .config -e QCOM_KGSL || true - # Preemption - Full for smooth UI scripts/config --file .config -e PREEMPT || true scripts/config --file .config -d PREEMPT_NONE || true scripts/config --file .config -d PREEMPT_VOLUNTARY || true - # High res timers scripts/config --file .config -e HZ_300 || true scripts/config --file .config -e HIGH_RES_TIMERS || true # === MISC OPTIMIZATIONS === - # Zstd compression scripts/config --file .config -e ZSTD_COMPRESS || true scripts/config --file .config -e ZSTD_DECOMPRESS || true - # CRC32 hardware acceleration scripts/config --file .config -e CRC32_ARMV8_CRC32 || true - # Crypto hardware scripts/config --file .config -e CRYPTO_SHA2_ARM64_CE || true scripts/config --file .config -e CRYPTO_AES_ARM64_CE_BLK || true From b51c3b2f11f52c2c74d59135622d67d7f0faaa1b Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 17:15:35 +0700 Subject: [PATCH 55/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 60c5d573ee8bb..b1eeaed998f4e 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -163,7 +163,7 @@ jobs: scripts/config --file .config -d LTO_CLANG_THIN || true scripts/config --file .config -e LTO_NONE || true - # Disable BTF - conflict dengan upstream merge + # Disable BTF scripts/config --file .config -d DEBUG_INFO_BTF || true scripts/config --file .config -d DEBUG_INFO_BTF_MODULES || true scripts/config --file .config -d DEBUG_INFO || true @@ -174,6 +174,9 @@ jobs: scripts/config --file .config -e ENERGY_MODEL || true scripts/config --file .config -e CPU_FREQ_GOV_SCHEDUTIL || true scripts/config --file .config -e SCHED_WALT || true + # Fix WALT undefined symbol - enable Qualcomm cpufreq HW driver + scripts/config --file .config -e QCOM_CPUFREQ_HW || true + scripts/config --file .config -e QCOM_CPUFREQ_NVMEM || true # === MEMORY OPTIMIZATION === scripts/config --file .config -e ZRAM || true From 4789ee63ac4dde6caf1ef27322b44cf2d31ed3e5 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 17:57:54 +0700 Subject: [PATCH 56/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 52 +++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index b1eeaed998f4e..30ee0ab2bc790 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -131,6 +131,57 @@ jobs: echo "=== Done ===" + - name: Fix WALT undefined symbols + run: | + echo "=== Fix qcom_cpufreq_get_cpu_cycle_counter ===" + grep -r "qcom_cpufreq_get_cpu_cycle_counter" drivers/ || true + + if [ -f drivers/cpufreq/qcom-cpufreq-hw.c ]; then + if ! grep -q "qcom_cpufreq_get_cpu_cycle_counter" drivers/cpufreq/qcom-cpufreq-hw.c; then + cat >> drivers/cpufreq/qcom-cpufreq-hw.c << 'EOF' + +/* Stub for WALT compatibility after upstream merge */ +u64 qcom_cpufreq_get_cpu_cycle_counter(int cpu) +{ + return 0; +} +EXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter); +EOF + echo "Added stub to qcom-cpufreq-hw.c" + else + echo "Symbol already exists, skipping" + fi + else + echo "WARNING: qcom-cpufreq-hw.c not found" + # Buat file baru kalau tidak ada + mkdir -p drivers/cpufreq + cat >> drivers/cpufreq/qcom-cpufreq-hw.c << 'EOF' +#include +#include + +/* Stub for WALT compatibility after upstream merge */ +u64 qcom_cpufreq_get_cpu_cycle_counter(int cpu) +{ + return 0; +} +EXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter); +EOF + echo "Created qcom-cpufreq-hw.c with stub" + fi + + echo "=== Scan semua undefined WALT symbols ===" + # Fix semua symbol yang mungkin hilang setelah upstream merge + WALT_HEADER="kernel/sched/walt/walt.h" + if [ -f "$WALT_HEADER" ]; then + # Pastikan deklarasi ada di header + if ! grep -q "qcom_cpufreq_get_cpu_cycle_counter" "$WALT_HEADER"; then + echo "extern u64 qcom_cpufreq_get_cpu_cycle_counter(int cpu);" >> "$WALT_HEADER" + echo "Added extern declaration to walt.h" + fi + fi + + echo "=== Done ===" + - name: Configure kernel run: | export PATH="${{ github.workspace }}/toolchain/clang/bin:$PATH" @@ -174,7 +225,6 @@ jobs: scripts/config --file .config -e ENERGY_MODEL || true scripts/config --file .config -e CPU_FREQ_GOV_SCHEDUTIL || true scripts/config --file .config -e SCHED_WALT || true - # Fix WALT undefined symbol - enable Qualcomm cpufreq HW driver scripts/config --file .config -e QCOM_CPUFREQ_HW || true scripts/config --file .config -e QCOM_CPUFREQ_NVMEM || true From 6c6774840e11826a2ea20d8e10ae280a6047c220 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 17:58:59 +0700 Subject: [PATCH 57/77] Update build-kernel.yml From d708b8df10deb6b9f85a0ff0ebb77b735bbb175c Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 18:10:37 +0700 Subject: [PATCH 58/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 43 +++--------------------------- 1 file changed, 3 insertions(+), 40 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 30ee0ab2bc790..77b5a23334e58 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -138,42 +138,18 @@ jobs: if [ -f drivers/cpufreq/qcom-cpufreq-hw.c ]; then if ! grep -q "qcom_cpufreq_get_cpu_cycle_counter" drivers/cpufreq/qcom-cpufreq-hw.c; then - cat >> drivers/cpufreq/qcom-cpufreq-hw.c << 'EOF' - -/* Stub for WALT compatibility after upstream merge */ -u64 qcom_cpufreq_get_cpu_cycle_counter(int cpu) -{ - return 0; -} -EXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter); -EOF + printf '\nu64 qcom_cpufreq_get_cpu_cycle_counter(int cpu)\n{\n\treturn 0;\n}\nEXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter);\n' >> drivers/cpufreq/qcom-cpufreq-hw.c echo "Added stub to qcom-cpufreq-hw.c" else echo "Symbol already exists, skipping" fi else - echo "WARNING: qcom-cpufreq-hw.c not found" - # Buat file baru kalau tidak ada - mkdir -p drivers/cpufreq - cat >> drivers/cpufreq/qcom-cpufreq-hw.c << 'EOF' -#include -#include - -/* Stub for WALT compatibility after upstream merge */ -u64 qcom_cpufreq_get_cpu_cycle_counter(int cpu) -{ - return 0; -} -EXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter); -EOF + printf '#include \n#include \n\nu64 qcom_cpufreq_get_cpu_cycle_counter(int cpu)\n{\n\treturn 0;\n}\nEXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter);\n' > drivers/cpufreq/qcom-cpufreq-hw.c echo "Created qcom-cpufreq-hw.c with stub" fi - echo "=== Scan semua undefined WALT symbols ===" - # Fix semua symbol yang mungkin hilang setelah upstream merge WALT_HEADER="kernel/sched/walt/walt.h" if [ -f "$WALT_HEADER" ]; then - # Pastikan deklarasi ada di header if ! grep -q "qcom_cpufreq_get_cpu_cycle_counter" "$WALT_HEADER"; then echo "extern u64 qcom_cpufreq_get_cpu_cycle_counter(int cpu);" >> "$WALT_HEADER" echo "Added extern declaration to walt.h" @@ -309,20 +285,7 @@ EOF cp arch/arm64/boot/Image AnyKernel3/ 2>/dev/null || \ echo "WARNING: No kernel image found!" cd AnyKernel3 - cat > anykernel.sh << 'EOF' - kernel.string=Creek Kernel Neko - KSU-Next + SUSFS | Optimized - do.devicecheck=0 - do.modules=0 - do.systemless=1 - do.cleanup=1 - device.name1=creek - block=auto - is_slot_device=auto - - . tools/ak3-core.sh - dump_boot - write_boot - EOF + printf 'kernel.string=Creek Kernel Neko - KSU-Next + SUSFS | Optimized\ndo.devicecheck=0\ndo.modules=0\ndo.systemless=1\ndo.cleanup=1\ndevice.name1=creek\nblock=auto\nis_slot_device=auto\n\n. tools/ak3-core.sh\ndump_boot\nwrite_boot\n' > anykernel.sh zip -r9 ../Creek-Kernel-Neko.zip ./* - name: Upload ZIP From 087231bfdd3784db095236dfb14fb0190265ebf2 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 18:40:03 +0700 Subject: [PATCH 59/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 77b5a23334e58..e6a0418b428a3 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -134,24 +134,29 @@ jobs: - name: Fix WALT undefined symbols run: | echo "=== Fix qcom_cpufreq_get_cpu_cycle_counter ===" - grep -r "qcom_cpufreq_get_cpu_cycle_counter" drivers/ || true if [ -f drivers/cpufreq/qcom-cpufreq-hw.c ]; then if ! grep -q "qcom_cpufreq_get_cpu_cycle_counter" drivers/cpufreq/qcom-cpufreq-hw.c; then printf '\nu64 qcom_cpufreq_get_cpu_cycle_counter(int cpu)\n{\n\treturn 0;\n}\nEXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter);\n' >> drivers/cpufreq/qcom-cpufreq-hw.c echo "Added stub to qcom-cpufreq-hw.c" else - echo "Symbol already exists, skipping" + echo "Symbol already exists in qcom-cpufreq-hw.c" fi else - printf '#include \n#include \n\nu64 qcom_cpufreq_get_cpu_cycle_counter(int cpu)\n{\n\treturn 0;\n}\nEXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter);\n' > drivers/cpufreq/qcom-cpufreq-hw.c - echo "Created qcom-cpufreq-hw.c with stub" + echo "=== qcom-cpufreq-hw.c not found, create stub file ===" + printf '#include \n#include \n\nu64 qcom_cpufreq_get_cpu_cycle_counter(int cpu)\n{\n\treturn 0;\n}\nEXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter);\n' > drivers/cpufreq/qcom-cpufreq-stub.c + # Tambahkan ke Makefile cpufreq + if ! grep -q "qcom-cpufreq-stub" drivers/cpufreq/Makefile; then + echo "obj-y += qcom-cpufreq-stub.o" >> drivers/cpufreq/Makefile + echo "Added stub to Makefile" + fi fi + echo "=== Add extern declaration to walt.h ===" WALT_HEADER="kernel/sched/walt/walt.h" if [ -f "$WALT_HEADER" ]; then if ! grep -q "qcom_cpufreq_get_cpu_cycle_counter" "$WALT_HEADER"; then - echo "extern u64 qcom_cpufreq_get_cpu_cycle_counter(int cpu);" >> "$WALT_HEADER" + printf '\n#ifdef CONFIG_QCOM_CPUFREQ_HW\nextern u64 qcom_cpufreq_get_cpu_cycle_counter(int cpu);\n#else\nstatic inline u64 qcom_cpufreq_get_cpu_cycle_counter(int cpu) { return 0; }\n#endif\n' >> "$WALT_HEADER" echo "Added extern declaration to walt.h" fi fi From b0f4dc6cc4d100d5dc856319998f534687923db5 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 19:07:25 +0700 Subject: [PATCH 60/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 45 ++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index e6a0418b428a3..b290303e0f400 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -133,31 +133,46 @@ jobs: - name: Fix WALT undefined symbols run: | - echo "=== Fix qcom_cpufreq_get_cpu_cycle_counter ===" + CPUFREQ_FILE="drivers/cpufreq/qcom-cpufreq-hw.c" - if [ -f drivers/cpufreq/qcom-cpufreq-hw.c ]; then - if ! grep -q "qcom_cpufreq_get_cpu_cycle_counter" drivers/cpufreq/qcom-cpufreq-hw.c; then - printf '\nu64 qcom_cpufreq_get_cpu_cycle_counter(int cpu)\n{\n\treturn 0;\n}\nEXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter);\n' >> drivers/cpufreq/qcom-cpufreq-hw.c - echo "Added stub to qcom-cpufreq-hw.c" + echo "=== Inject stub qcom_cpufreq_get_cpu_cycle_counter ===" + if [ -f "$CPUFREQ_FILE" ]; then + if ! grep -q "qcom_cpufreq_get_cpu_cycle_counter" "$CPUFREQ_FILE"; then + printf '\n#include \nu64 qcom_cpufreq_get_cpu_cycle_counter(int cpu)\n{\n\treturn 0;\n}\nEXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter);\n' >> "$CPUFREQ_FILE" + echo "Stub injected to existing file" else - echo "Symbol already exists in qcom-cpufreq-hw.c" + echo "Symbol already present" fi else - echo "=== qcom-cpufreq-hw.c not found, create stub file ===" - printf '#include \n#include \n\nu64 qcom_cpufreq_get_cpu_cycle_counter(int cpu)\n{\n\treturn 0;\n}\nEXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter);\n' > drivers/cpufreq/qcom-cpufreq-stub.c - # Tambahkan ke Makefile cpufreq - if ! grep -q "qcom-cpufreq-stub" drivers/cpufreq/Makefile; then - echo "obj-y += qcom-cpufreq-stub.o" >> drivers/cpufreq/Makefile - echo "Added stub to Makefile" - fi + cat > "$CPUFREQ_FILE" << 'EOF' +#include +#include + +u64 qcom_cpufreq_get_cpu_cycle_counter(int cpu) +{ + return 0; +} +EXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter); +EOF + echo "Created new stub file" + fi + + echo "=== Force obj-y so file always compiled ===" + CPUFREQ_MK="drivers/cpufreq/Makefile" + if ! grep -q "qcom-cpufreq-hw" "$CPUFREQ_MK"; then + echo 'obj-y += qcom-cpufreq-hw.o' >> "$CPUFREQ_MK" + echo "Added obj-y to Makefile" + else + sed -i 's/obj-\$(CONFIG_QCOM_CPUFREQ_HW).*qcom-cpufreq-hw/obj-y += qcom-cpufreq-hw/' "$CPUFREQ_MK" + echo "Changed to obj-y in Makefile" fi echo "=== Add extern declaration to walt.h ===" WALT_HEADER="kernel/sched/walt/walt.h" if [ -f "$WALT_HEADER" ]; then if ! grep -q "qcom_cpufreq_get_cpu_cycle_counter" "$WALT_HEADER"; then - printf '\n#ifdef CONFIG_QCOM_CPUFREQ_HW\nextern u64 qcom_cpufreq_get_cpu_cycle_counter(int cpu);\n#else\nstatic inline u64 qcom_cpufreq_get_cpu_cycle_counter(int cpu) { return 0; }\n#endif\n' >> "$WALT_HEADER" - echo "Added extern declaration to walt.h" + echo 'extern u64 qcom_cpufreq_get_cpu_cycle_counter(int cpu);' >> "$WALT_HEADER" + echo "Extern added to walt.h" fi fi From e212b030f46a00ab274db68427742db551055612 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 19:12:06 +0700 Subject: [PATCH 61/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index b290303e0f400..399a900b2a167 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -144,16 +144,7 @@ jobs: echo "Symbol already present" fi else - cat > "$CPUFREQ_FILE" << 'EOF' -#include -#include - -u64 qcom_cpufreq_get_cpu_cycle_counter(int cpu) -{ - return 0; -} -EXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter); -EOF + printf '#include \n#include \n\nu64 qcom_cpufreq_get_cpu_cycle_counter(int cpu)\n{\n\treturn 0;\n}\nEXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter);\n' > "$CPUFREQ_FILE" echo "Created new stub file" fi From 3967819dfba7ef23b83514a46286d28bd526f5b8 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 19:46:15 +0700 Subject: [PATCH 62/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 39 +++++++++--------------------- 1 file changed, 12 insertions(+), 27 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 399a900b2a167..e14580943945f 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -133,41 +133,26 @@ jobs: - name: Fix WALT undefined symbols run: | - CPUFREQ_FILE="drivers/cpufreq/qcom-cpufreq-hw.c" + WALT_FILE="kernel/sched/walt/walt.c" + WALT_HEADER="kernel/sched/walt/walt.h" - echo "=== Inject stub qcom_cpufreq_get_cpu_cycle_counter ===" - if [ -f "$CPUFREQ_FILE" ]; then - if ! grep -q "qcom_cpufreq_get_cpu_cycle_counter" "$CPUFREQ_FILE"; then - printf '\n#include \nu64 qcom_cpufreq_get_cpu_cycle_counter(int cpu)\n{\n\treturn 0;\n}\nEXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter);\n' >> "$CPUFREQ_FILE" - echo "Stub injected to existing file" + echo "=== Inject weak stub langsung ke walt.c ===" + if [ -f "$WALT_FILE" ]; then + if ! grep -q "qcom_cpufreq_get_cpu_cycle_counter" "$WALT_FILE"; then + sed -i '1s/^/#include \n__weak u64 qcom_cpufreq_get_cpu_cycle_counter(int cpu) { return 0; }\n\n/' "$WALT_FILE" + echo "Weak stub berhasil diinjek ke walt.c" else - echo "Symbol already present" + echo "Simbol sudah ada di walt.c" fi - else - printf '#include \n#include \n\nu64 qcom_cpufreq_get_cpu_cycle_counter(int cpu)\n{\n\treturn 0;\n}\nEXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter);\n' > "$CPUFREQ_FILE" - echo "Created new stub file" - fi - - echo "=== Force obj-y so file always compiled ===" - CPUFREQ_MK="drivers/cpufreq/Makefile" - if ! grep -q "qcom-cpufreq-hw" "$CPUFREQ_MK"; then - echo 'obj-y += qcom-cpufreq-hw.o' >> "$CPUFREQ_MK" - echo "Added obj-y to Makefile" - else - sed -i 's/obj-\$(CONFIG_QCOM_CPUFREQ_HW).*qcom-cpufreq-hw/obj-y += qcom-cpufreq-hw/' "$CPUFREQ_MK" - echo "Changed to obj-y in Makefile" fi - echo "=== Add extern declaration to walt.h ===" - WALT_HEADER="kernel/sched/walt/walt.h" + echo "=== Hapus extern declaration di walt.h biar gak konflik ===" if [ -f "$WALT_HEADER" ]; then - if ! grep -q "qcom_cpufreq_get_cpu_cycle_counter" "$WALT_HEADER"; then - echo 'extern u64 qcom_cpufreq_get_cpu_cycle_counter(int cpu);' >> "$WALT_HEADER" - echo "Extern added to walt.h" - fi + sed -i '/qcom_cpufreq_get_cpu_cycle_counter/d' "$WALT_HEADER" + echo "walt.h dibersihkan" fi - echo "=== Done ===" + echo "=== Selesai ===" - name: Configure kernel run: | From 47efcada55fdda503c4b15c0570ded8e6223e365 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 19:54:48 +0700 Subject: [PATCH 63/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 53 +++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index e14580943945f..f960ed7145ccf 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -277,15 +277,60 @@ jobs: - name: Create AnyKernel3 zip run: | git clone --depth=1 https://github.com/osm0sis/AnyKernel3 + + # Kernel image cp arch/arm64/boot/Image.gz AnyKernel3/ 2>/dev/null || \ cp arch/arm64/boot/Image AnyKernel3/ 2>/dev/null || \ echo "WARNING: No kernel image found!" + + # DTB + if [ -f arch/arm64/boot/dts/qcom/sm7325-creek.dtb ]; then + cp arch/arm64/boot/dts/qcom/sm7325-creek.dtb AnyKernel3/dtb + echo "DTB copied" + else + find arch/arm64/boot/dts/qcom/ -name "*.dtb" 2>/dev/null | \ + head -1 | xargs -I{} cp {} AnyKernel3/dtb || \ + echo "WARNING: No DTB found!" + fi + + # DTBO + if [ -f arch/arm64/boot/dtbo.img ]; then + cp arch/arm64/boot/dtbo.img AnyKernel3/ + echo "DTBO copied" + else + echo "WARNING: No DTBO found, skipping" + fi + + # anykernel.sh + cat > AnyKernel3/anykernel.sh << 'EOF' + kernel.string=Creek Kernel Neko - KSU-Next + SUSFS | Optimized + do.devicecheck=1 + do.modules=0 + do.systemless=1 + do.cleanup=1 + do.cleanuponabort=1 + device.name1=creek + device.name2=RE54B + device.name3=RE54BL + supported.versions=12-14 + block=/dev/block/bootdevice/by-name/boot + is_slot_device=1 + ramdisk_compression=auto + + . tools/ak3-core.sh + + dump_boot + write_boot + EOF + + # ZIP dengan timestamp + BUILD_DATE=$(date +%Y%m%d-%H%M) + echo "BUILD_DATE=${BUILD_DATE}" >> $GITHUB_ENV cd AnyKernel3 - printf 'kernel.string=Creek Kernel Neko - KSU-Next + SUSFS | Optimized\ndo.devicecheck=0\ndo.modules=0\ndo.systemless=1\ndo.cleanup=1\ndevice.name1=creek\nblock=auto\nis_slot_device=auto\n\n. tools/ak3-core.sh\ndump_boot\nwrite_boot\n' > anykernel.sh - zip -r9 ../Creek-Kernel-Neko.zip ./* + zip -r9 ../Creek-Kernel-Neko-${BUILD_DATE}.zip ./* - name: Upload ZIP uses: actions/upload-artifact@v4 with: - name: Creek-Kernel-Neko - path: Creek-Kernel-Neko.zip + name: Creek-Kernel-Neko-${{ env.BUILD_DATE }} + path: Creek-Kernel-Neko-*.zip From 2703d106ab110df39d993e6224fe24ada06119f0 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 20:36:24 +0700 Subject: [PATCH 64/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 78 ++++++++++++++++++++++-------- 1 file changed, 58 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index f960ed7145ccf..5e8a5f5f1be92 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -131,28 +131,66 @@ jobs: echo "=== Done ===" - - name: Fix WALT undefined symbols + - name: Fix WALT undefined symbols - Complete implementation run: | - WALT_FILE="kernel/sched/walt/walt.c" - WALT_HEADER="kernel/sched/walt/walt.h" - - echo "=== Inject weak stub langsung ke walt.c ===" - if [ -f "$WALT_FILE" ]; then - if ! grep -q "qcom_cpufreq_get_cpu_cycle_counter" "$WALT_FILE"; then - sed -i '1s/^/#include \n__weak u64 qcom_cpufreq_get_cpu_cycle_counter(int cpu) { return 0; }\n\n/' "$WALT_FILE" - echo "Weak stub berhasil diinjek ke walt.c" - else - echo "Simbol sudah ada di walt.c" + echo "=== Method 1: Create proper weak stub ===" + + # Create stub file + cat > kernel/sched/walt/walt_stub.c << 'EOF' + #include + #include + #include + #include + + /* Weak stub for missing function - used by WALT scheduler */ + u64 __weak qcom_cpufreq_get_cpu_cycle_counter(int cpu) + { + /* Fallback to ktime get nanoseconds */ + return ktime_get_ns(); + } + EXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter); + EOF + + # Add stub to Makefile + if [ -f kernel/sched/walt/Makefile ]; then + if ! grep -q "walt_stub.o" kernel/sched/walt/Makefile; then + echo "obj-y += walt_stub.o" >> kernel/sched/walt/Makefile + echo "Added walt_stub.o to Makefile" fi fi - - echo "=== Hapus extern declaration di walt.h biar gak konflik ===" - if [ -f "$WALT_HEADER" ]; then - sed -i '/qcom_cpufreq_get_cpu_cycle_counter/d' "$WALT_HEADER" - echo "walt.h dibersihkan" + + echo "=== Method 2: Clean headers ===" + find kernel/sched/walt/ -name "*.h" -exec sed -i '/qcom_cpufreq_get_cpu_cycle_counter/d' {} \; + + echo "=== Method 3: Ensure stub is used ===" + cat >> kernel/sched/walt/walt.h << 'EOF' + + /* Declaration with weak attribute */ + u64 qcom_cpufreq_get_cpu_cycle_counter(int cpu) __weak; + EOF + + echo "=== Method 4: Create driver stub if missing ===" + mkdir -p drivers/cpufreq + cat > drivers/cpufreq/qcom-cpufreq-hw-stub.c << 'EOF' + #include + #include + #include + + u64 qcom_cpufreq_get_cpu_cycle_counter(int cpu) + { + return ktime_get_ns(); + } + EXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter); + EOF + + if [ -f drivers/cpufreq/Makefile ]; then + if ! grep -q "qcom-cpufreq-hw-stub" drivers/cpufreq/Makefile; then + echo "obj-y += qcom-cpufreq-hw-stub.o" >> drivers/cpufreq/Makefile + echo "Added stub to cpufreq Makefile" + fi fi - - echo "=== Selesai ===" + + echo "=== WALT undefined symbols fixed ===" - name: Configure kernel run: | @@ -325,9 +363,9 @@ jobs: # ZIP dengan timestamp BUILD_DATE=$(date +%Y%m%d-%H%M) - echo "BUILD_DATE=${BUILD_DATE}" >> $GITHUB_ENV + echo "BUILD_DATE=${BUILD_DATE}" >> "$GITHUB_ENV" cd AnyKernel3 - zip -r9 ../Creek-Kernel-Neko-${BUILD_DATE}.zip ./* + zip -r9 "../Creek-Kernel-Neko-${BUILD_DATE}.zip" ./* - name: Upload ZIP uses: actions/upload-artifact@v4 From a02f4bb70b55a9eb9de49a18033ef2065178ce4d Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 21:08:28 +0700 Subject: [PATCH 65/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 72 +++++++++++------------------- 1 file changed, 26 insertions(+), 46 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 5e8a5f5f1be92..455e86d3c7995 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -131,66 +131,46 @@ jobs: echo "=== Done ===" - - name: Fix WALT undefined symbols - Complete implementation + - name: Fix WALT undefined symbols - Direct fix (NO DUPLICATE) run: | - echo "=== Method 1: Create proper weak stub ===" + echo "=== Hapus semua stub yang sudah ada ===" + rm -f kernel/sched/walt/walt_stub.c + rm -f drivers/cpufreq/qcom-cpufreq-hw-stub.c - # Create stub file - cat > kernel/sched/walt/walt_stub.c << 'EOF' - #include - #include - #include - #include - - /* Weak stub for missing function - used by WALT scheduler */ - u64 __weak qcom_cpufreq_get_cpu_cycle_counter(int cpu) - { - /* Fallback to ktime get nanoseconds */ - return ktime_get_ns(); - } - EXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter); - EOF - - # Add stub to Makefile - if [ -f kernel/sched/walt/Makefile ]; then - if ! grep -q "walt_stub.o" kernel/sched/walt/Makefile; then - echo "obj-y += walt_stub.o" >> kernel/sched/walt/Makefile - echo "Added walt_stub.o to Makefile" - fi - fi - - echo "=== Method 2: Clean headers ===" - find kernel/sched/walt/ -name "*.h" -exec sed -i '/qcom_cpufreq_get_cpu_cycle_counter/d' {} \; + echo "=== Bersihkan Makefiles ===" + sed -i '/walt_stub/d' kernel/sched/walt/Makefile 2>/dev/null || true + sed -i '/qcom-cpufreq-hw-stub/d' drivers/cpufreq/Makefile 2>/dev/null || true - echo "=== Method 3: Ensure stub is used ===" - cat >> kernel/sched/walt/walt.h << 'EOF' + echo "=== Tambahkan implementasi langsung ke walt.c ===" + WALT_C="kernel/sched/walt/walt.c" - /* Declaration with weak attribute */ - u64 qcom_cpufreq_get_cpu_cycle_counter(int cpu) __weak; - EOF - - echo "=== Method 4: Create driver stub if missing ===" - mkdir -p drivers/cpufreq - cat > drivers/cpufreq/qcom-cpufreq-hw-stub.c << 'EOF' - #include - #include + if [ -f "$WALT_C" ]; then + # Hapus jika sudah ada deklarasi lama + sed -i '/qcom_cpufreq_get_cpu_cycle_counter/d' "$WALT_C" + + # Tambahkan implementasi di awal file + cat > /tmp/walt_fix.txt << 'EOF' #include + /* Stub for qcom cycle counter - required by WALT scheduler */ u64 qcom_cpufreq_get_cpu_cycle_counter(int cpu) { return ktime_get_ns(); } EXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter); - EOF - if [ -f drivers/cpufreq/Makefile ]; then - if ! grep -q "qcom-cpufreq-hw-stub" drivers/cpufreq/Makefile; then - echo "obj-y += qcom-cpufreq-hw-stub.o" >> drivers/cpufreq/Makefile - echo "Added stub to cpufreq Makefile" - fi + EOF + cat /tmp/walt_fix.txt "$WALT_C" > /tmp/walt_new.c + mv /tmp/walt_new.c "$WALT_C" + echo "โœ… Fungsi berhasil ditambahkan ke walt.c" + else + echo "โš ๏ธ File walt.c tidak ditemukan!" fi - echo "=== WALT undefined symbols fixed ===" + echo "=== Bersihkan header dari extern declaration ===" + find kernel/sched/walt/ -name "*.h" -exec sed -i '/extern.*qcom_cpufreq_get_cpu_cycle_counter/d' {} \; + + echo "=== Selesai - WALT fix applied ===" - name: Configure kernel run: | From 4ea12dc8bb8b4a93380892b265ea809b91e5cece Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 21:42:19 +0700 Subject: [PATCH 66/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 50 +++++++++++++----------------- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 455e86d3c7995..1a362fd8f6cfb 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -131,46 +131,39 @@ jobs: echo "=== Done ===" - - name: Fix WALT undefined symbols - Direct fix (NO DUPLICATE) + - name: Fix WALT undefined symbols - Dual stub (YANG INI YANG BERHASIL) run: | - echo "=== Hapus semua stub yang sudah ada ===" - rm -f kernel/sched/walt/walt_stub.c - rm -f drivers/cpufreq/qcom-cpufreq-hw-stub.c + echo "=== Buat stub di kernel/sched/walt ===" + cat > kernel/sched/walt/walt_stub.c << 'EOF' + #include + #include + #include - echo "=== Bersihkan Makefiles ===" - sed -i '/walt_stub/d' kernel/sched/walt/Makefile 2>/dev/null || true - sed -i '/qcom-cpufreq-hw-stub/d' drivers/cpufreq/Makefile 2>/dev/null || true + u64 __weak qcom_cpufreq_get_cpu_cycle_counter(int cpu) + { + return ktime_get_ns(); + } + EXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter); + EOF - echo "=== Tambahkan implementasi langsung ke walt.c ===" - WALT_C="kernel/sched/walt/walt.c" + echo "obj-y += walt_stub.o" >> kernel/sched/walt/Makefile - if [ -f "$WALT_C" ]; then - # Hapus jika sudah ada deklarasi lama - sed -i '/qcom_cpufreq_get_cpu_cycle_counter/d' "$WALT_C" - - # Tambahkan implementasi di awal file - cat > /tmp/walt_fix.txt << 'EOF' + echo "=== Buat stub di drivers/cpufreq ===" + cat > drivers/cpufreq/qcom-cpufreq-hw-stub.c << 'EOF' + #include + #include #include - /* Stub for qcom cycle counter - required by WALT scheduler */ - u64 qcom_cpufreq_get_cpu_cycle_counter(int cpu) + u64 __weak qcom_cpufreq_get_cpu_cycle_counter(int cpu) { return ktime_get_ns(); } EXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter); - EOF - cat /tmp/walt_fix.txt "$WALT_C" > /tmp/walt_new.c - mv /tmp/walt_new.c "$WALT_C" - echo "โœ… Fungsi berhasil ditambahkan ke walt.c" - else - echo "โš ๏ธ File walt.c tidak ditemukan!" - fi - echo "=== Bersihkan header dari extern declaration ===" - find kernel/sched/walt/ -name "*.h" -exec sed -i '/extern.*qcom_cpufreq_get_cpu_cycle_counter/d' {} \; + echo "obj-y += qcom-cpufreq-hw-stub.o" >> drivers/cpufreq/Makefile - echo "=== Selesai - WALT fix applied ===" + echo "=== WALT fix applied (dual stub) ===" - name: Configure kernel run: | @@ -290,7 +283,8 @@ jobs: -Wno-error=deprecated-declarations \ -Wno-error=int-conversion \ -Wno-error=incompatible-pointer-types \ - -Wno-error=return-type" + -Wno-error=return-type \ + -Wno-error=duplicate-decl-specifier" - name: Create AnyKernel3 zip run: | From dcb7d48838a79abe7143ac97e7b795e56c08d5c2 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 22:14:40 +0700 Subject: [PATCH 67/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 46 ++++++++++++++++++------------ 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 1a362fd8f6cfb..f193ef14dfe85 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -131,39 +131,48 @@ jobs: echo "=== Done ===" - - name: Fix WALT undefined symbols - Dual stub (YANG INI YANG BERHASIL) + - name: Fix WALT undefined symbols - SINGLE EXPORT ONLY run: | - echo "=== Buat stub di kernel/sched/walt ===" - cat > kernel/sched/walt/walt_stub.c << 'EOF' - #include - #include - #include + echo "=== Hapus SEMUA stub yang ada ===" + rm -f kernel/sched/walt/walt_stub.c + rm -f drivers/cpufreq/qcom-cpufreq-hw-stub.c - u64 __weak qcom_cpufreq_get_cpu_cycle_counter(int cpu) - { - return ktime_get_ns(); - } - EXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter); - EOF + echo "=== Bersihkan Makefiles ===" + sed -i '/walt_stub/d' kernel/sched/walt/Makefile 2>/dev/null || true + sed -i '/qcom-cpufreq-hw-stub/d' drivers/cpufreq/Makefile 2>/dev/null || true - echo "obj-y += walt_stub.o" >> kernel/sched/walt/Makefile + echo "=== Bersihkan semua export dari file yang ada ===" + find kernel/sched/walt/ -name "*.c" -exec sed -i '/EXPORT_SYMBOL.*qcom_cpufreq_get_cpu_cycle_counter/d' {} \; + find kernel/sched/walt/ -name "*.h" -exec sed -i '/qcom_cpufreq_get_cpu_cycle_counter/d' {} \; + find drivers/cpufreq/ -name "*.c" -exec sed -i '/EXPORT_SYMBOL.*qcom_cpufreq_get_cpu_cycle_counter/d' {} \; - echo "=== Buat stub di drivers/cpufreq ===" + echo "=== Buat ONLY ONE stub di drivers/cpufreq ===" + mkdir -p drivers/cpufreq cat > drivers/cpufreq/qcom-cpufreq-hw-stub.c << 'EOF' #include #include #include - u64 __weak qcom_cpufreq_get_cpu_cycle_counter(int cpu) + /* Single implementation - no duplicate export */ + u64 qcom_cpufreq_get_cpu_cycle_counter(int cpu) { return ktime_get_ns(); } EXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter); EOF - echo "obj-y += qcom-cpufreq-hw-stub.o" >> drivers/cpufreq/Makefile + echo "=== Tambah ke Makefile (hanya satu) ===" + if ! grep -q "qcom-cpufreq-hw-stub" drivers/cpufreq/Makefile; then + echo "obj-y += qcom-cpufreq-hw-stub.o" >> drivers/cpufreq/Makefile + fi + + echo "=== Pastikan walt.c tidak ada export ===" + WALT_C="kernel/sched/walt/walt.c" + if [ -f "$WALT_C" ]; then + sed -i '/qcom_cpufreq_get_cpu_cycle_counter/d' "$WALT_C" + fi - echo "=== WALT fix applied (dual stub) ===" + echo "=== Selesai - Hanya satu export di drivers/cpufreq ===" - name: Configure kernel run: | @@ -283,8 +292,7 @@ jobs: -Wno-error=deprecated-declarations \ -Wno-error=int-conversion \ -Wno-error=incompatible-pointer-types \ - -Wno-error=return-type \ - -Wno-error=duplicate-decl-specifier" + -Wno-error=return-type" - name: Create AnyKernel3 zip run: | From 38fe5089c06243b1384589d83dd4aa057ed938a4 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 22:21:59 +0700 Subject: [PATCH 68/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 31 +++++++++++------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index f193ef14dfe85..70921540f6e07 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -131,9 +131,9 @@ jobs: echo "=== Done ===" - - name: Fix WALT undefined symbols - SINGLE EXPORT ONLY + - name: Fix WALT undefined symbols - FIXED (Single stub, no duplicate export) run: | - echo "=== Hapus SEMUA stub yang ada ===" + echo "=== Hapus SEMUA stub yang mungkin sudah ada ===" rm -f kernel/sched/walt/walt_stub.c rm -f drivers/cpufreq/qcom-cpufreq-hw-stub.c @@ -141,38 +141,29 @@ jobs: sed -i '/walt_stub/d' kernel/sched/walt/Makefile 2>/dev/null || true sed -i '/qcom-cpufreq-hw-stub/d' drivers/cpufreq/Makefile 2>/dev/null || true - echo "=== Bersihkan semua export dari file yang ada ===" - find kernel/sched/walt/ -name "*.c" -exec sed -i '/EXPORT_SYMBOL.*qcom_cpufreq_get_cpu_cycle_counter/d' {} \; - find kernel/sched/walt/ -name "*.h" -exec sed -i '/qcom_cpufreq_get_cpu_cycle_counter/d' {} \; - find drivers/cpufreq/ -name "*.c" -exec sed -i '/EXPORT_SYMBOL.*qcom_cpufreq_get_cpu_cycle_counter/d' {} \; - - echo "=== Buat ONLY ONE stub di drivers/cpufreq ===" + echo "=== Buat ONLY ONE stub di drivers/cpufreq (dengan __weak) ===" mkdir -p drivers/cpufreq cat > drivers/cpufreq/qcom-cpufreq-hw-stub.c << 'EOF' #include #include #include - /* Single implementation - no duplicate export */ - u64 qcom_cpufreq_get_cpu_cycle_counter(int cpu) + /* Single implementation - __weak allows override by real driver if exists */ + u64 __weak qcom_cpufreq_get_cpu_cycle_counter(int cpu) { return ktime_get_ns(); } EXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter); EOF - echo "=== Tambah ke Makefile (hanya satu) ===" - if ! grep -q "qcom-cpufreq-hw-stub" drivers/cpufreq/Makefile; then - echo "obj-y += qcom-cpufreq-hw-stub.o" >> drivers/cpufreq/Makefile - fi + echo "=== Tambah ke Makefile ===" + echo "obj-y += qcom-cpufreq-hw-stub.o" >> drivers/cpufreq/Makefile - echo "=== Pastikan walt.c tidak ada export ===" - WALT_C="kernel/sched/walt/walt.c" - if [ -f "$WALT_C" ]; then - sed -i '/qcom_cpufreq_get_cpu_cycle_counter/d' "$WALT_C" - fi + echo "=== Pastikan tidak ada export lain dari walt ===" + find kernel/sched/walt/ -name "*.c" -exec sed -i '/EXPORT_SYMBOL.*qcom_cpufreq_get_cpu_cycle_counter/d' {} \; + find kernel/sched/walt/ -name "*.h" -exec sed -i '/qcom_cpufreq_get_cpu_cycle_counter/d' {} \; - echo "=== Selesai - Hanya satu export di drivers/cpufreq ===" + echo "=== Selesai - Hanya SATU stub dan SATU export ===" - name: Configure kernel run: | From 4be53373313e044cd97b0e2b32a95c2930e6cb74 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 22:49:42 +0700 Subject: [PATCH 69/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 80 +++++++++++++++--------------- 1 file changed, 41 insertions(+), 39 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 70921540f6e07..cca24be59950b 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -131,39 +131,58 @@ jobs: echo "=== Done ===" - - name: Fix WALT undefined symbols - FIXED (Single stub, no duplicate export) + - name: Fix qcom_cpufreq_get_cpu_cycle_counter - Auto detect & resolve double export run: | - echo "=== Hapus SEMUA stub yang mungkin sudah ada ===" - rm -f kernel/sched/walt/walt_stub.c + SYM="qcom_cpufreq_get_cpu_cycle_counter" + + echo "=== Bersihkan stub lama kalau ada ===" rm -f drivers/cpufreq/qcom-cpufreq-hw-stub.c - - echo "=== Bersihkan Makefiles ===" - sed -i '/walt_stub/d' kernel/sched/walt/Makefile 2>/dev/null || true sed -i '/qcom-cpufreq-hw-stub/d' drivers/cpufreq/Makefile 2>/dev/null || true - - echo "=== Buat ONLY ONE stub di drivers/cpufreq (dengan __weak) ===" - mkdir -p drivers/cpufreq - cat > drivers/cpufreq/qcom-cpufreq-hw-stub.c << 'EOF' + rm -f kernel/sched/walt/walt_stub.c + sed -i '/walt_stub/d' kernel/sched/walt/Makefile 2>/dev/null || true + + echo "=== Cari semua file yang export symbol ini ===" + EXPORT_FILES=$(grep -rl "EXPORT_SYMBOL.*${SYM}" drivers/ kernel/ 2>/dev/null || true) + echo "Export ditemukan di:" + echo "${EXPORT_FILES}" + + EXPORT_COUNT=$(echo "${EXPORT_FILES}" | grep -c "\S" || true) + echo "Jumlah export: ${EXPORT_COUNT}" + + if [ "${EXPORT_COUNT}" -gt 1 ]; then + echo "=== Double export terdeteksi! Hapus export dari WALT, biarkan driver asli ===" + find kernel/sched/walt/ -name "*.c" -exec \ + sed -i "/EXPORT_SYMBOL.*${SYM}/d" {} \; 2>/dev/null || true + find kernel/sched/walt/ -name "*.c" | while read f; do + if grep -q "${SYM}" "$f"; then + echo "Hapus definisi dari WALT: $f" + sed -i "/${SYM}/d" "$f" + fi + done + echo "=== Selesai: export diserahkan ke driver asli ===" + + elif [ "${EXPORT_COUNT}" -eq 1 ]; then + echo "=== Hanya 1 export, tidak perlu apa-apa ===" + + else + echo "=== Symbol tidak ditemukan, buat stub ===" + cat > drivers/cpufreq/qcom-cpufreq-hw-stub.c << 'STUBEOF' #include #include #include - - /* Single implementation - __weak allows override by real driver if exists */ + u64 __weak qcom_cpufreq_get_cpu_cycle_counter(int cpu) { return ktime_get_ns(); } EXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter); - EOF - - echo "=== Tambah ke Makefile ===" - echo "obj-y += qcom-cpufreq-hw-stub.o" >> drivers/cpufreq/Makefile - - echo "=== Pastikan tidak ada export lain dari walt ===" - find kernel/sched/walt/ -name "*.c" -exec sed -i '/EXPORT_SYMBOL.*qcom_cpufreq_get_cpu_cycle_counter/d' {} \; - find kernel/sched/walt/ -name "*.h" -exec sed -i '/qcom_cpufreq_get_cpu_cycle_counter/d' {} \; - - echo "=== Selesai - Hanya SATU stub dan SATU export ===" + STUBEOF + echo "obj-y += qcom-cpufreq-hw-stub.o" >> drivers/cpufreq/Makefile + echo "=== Stub dibuat ===" + fi + + echo "=== Verifikasi akhir ===" + grep -rn "EXPORT_SYMBOL.*${SYM}" drivers/ kernel/ 2>/dev/null || echo "Tidak ada export tersisa" - name: Configure kernel run: | @@ -187,31 +206,26 @@ jobs: make ARCH=arm64 CC=clang CLANG_TRIPLE=aarch64-linux-gnu- LLVM=1 LLVM_IAS=1 gki_defconfig fi - # KSU + SUSFS scripts/config --file .config -e KSU || true scripts/config --file .config -e KSU_SUSFS || true - # Disable LTO scripts/config --file .config -d LTO_CLANG || true scripts/config --file .config -d LTO_CLANG_FULL || true scripts/config --file .config -d LTO_CLANG_THIN || true scripts/config --file .config -e LTO_NONE || true - # Disable BTF scripts/config --file .config -d DEBUG_INFO_BTF || true scripts/config --file .config -d DEBUG_INFO_BTF_MODULES || true scripts/config --file .config -d DEBUG_INFO || true scripts/config --file .config -e DEBUG_INFO_NONE || true scripts/config --file .config -d SCHED_WALT_DEBUG || true - # === SCHEDULER OPTIMIZATION === scripts/config --file .config -e ENERGY_MODEL || true scripts/config --file .config -e CPU_FREQ_GOV_SCHEDUTIL || true scripts/config --file .config -e SCHED_WALT || true scripts/config --file .config -e QCOM_CPUFREQ_HW || true scripts/config --file .config -e QCOM_CPUFREQ_NVMEM || true - # === MEMORY OPTIMIZATION === scripts/config --file .config -e ZRAM || true scripts/config --file .config -e ZRAM_DEF_COMP_ZSTD || true scripts/config --file .config -e ZSMALLOC || true @@ -222,7 +236,6 @@ jobs: scripts/config --file .config -e KSM || true scripts/config --file .config -e TRANSPARENT_HUGEPAGE || true - # === I/O OPTIMIZATION === scripts/config --file .config -e BFQ_GROUP_IOSCHED || true scripts/config --file .config -e IOSCHED_BFQ || true scripts/config --file .config -e MQ_IOSCHED_DEADLINE || true @@ -230,12 +243,10 @@ jobs: scripts/config --file .config -e F2FS_FS_COMPRESSION || true scripts/config --file .config -e F2FS_FS_ZSTD || true - # === NETWORK OPTIMIZATION === scripts/config --file .config -e TCP_CONG_BBR || true scripts/config --file .config -e NET_SCH_FQ || true scripts/config --file .config -e TCP_FASTOPEN || true - # === BATTERY OPTIMIZATION === scripts/config --file .config -e WQ_POWER_EFFICIENT_DEFAULT || true scripts/config --file .config -e CPU_IDLE || true scripts/config --file .config -e CPU_IDLE_GOV_MENU || true @@ -244,7 +255,6 @@ jobs: scripts/config --file .config -e PM_WAKELOCKS || true scripts/config --file .config -e PM_WAKELOCKS_LIMIT || true - # === GAMING OPTIMIZATION === scripts/config --file .config -e CPU_BOOST || true scripts/config --file .config -e SCHED_BOOST || true scripts/config --file .config -e QCOM_KGSL || true @@ -254,7 +264,6 @@ jobs: scripts/config --file .config -e HZ_300 || true scripts/config --file .config -e HIGH_RES_TIMERS || true - # === MISC OPTIMIZATIONS === scripts/config --file .config -e ZSTD_COMPRESS || true scripts/config --file .config -e ZSTD_DECOMPRESS || true scripts/config --file .config -e CRC32_ARMV8_CRC32 || true @@ -289,30 +298,24 @@ jobs: run: | git clone --depth=1 https://github.com/osm0sis/AnyKernel3 - # Kernel image cp arch/arm64/boot/Image.gz AnyKernel3/ 2>/dev/null || \ cp arch/arm64/boot/Image AnyKernel3/ 2>/dev/null || \ echo "WARNING: No kernel image found!" - # DTB if [ -f arch/arm64/boot/dts/qcom/sm7325-creek.dtb ]; then cp arch/arm64/boot/dts/qcom/sm7325-creek.dtb AnyKernel3/dtb - echo "DTB copied" else find arch/arm64/boot/dts/qcom/ -name "*.dtb" 2>/dev/null | \ head -1 | xargs -I{} cp {} AnyKernel3/dtb || \ echo "WARNING: No DTB found!" fi - # DTBO if [ -f arch/arm64/boot/dtbo.img ]; then cp arch/arm64/boot/dtbo.img AnyKernel3/ - echo "DTBO copied" else echo "WARNING: No DTBO found, skipping" fi - # anykernel.sh cat > AnyKernel3/anykernel.sh << 'EOF' kernel.string=Creek Kernel Neko - KSU-Next + SUSFS | Optimized do.devicecheck=1 @@ -334,7 +337,6 @@ jobs: write_boot EOF - # ZIP dengan timestamp BUILD_DATE=$(date +%Y%m%d-%H%M) echo "BUILD_DATE=${BUILD_DATE}" >> "$GITHUB_ENV" cd AnyKernel3 From cf38b2a1ee0736642a6ec0fc1cf1f0bdff5cc599 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 23:21:40 +0700 Subject: [PATCH 70/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 51 ++++++++++++------------------ 1 file changed, 21 insertions(+), 30 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index cca24be59950b..0edab46f151e7 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -135,7 +135,7 @@ jobs: run: | SYM="qcom_cpufreq_get_cpu_cycle_counter" - echo "=== Bersihkan stub lama kalau ada ===" + echo "=== Bersihkan stub lama ===" rm -f drivers/cpufreq/qcom-cpufreq-hw-stub.c sed -i '/qcom-cpufreq-hw-stub/d' drivers/cpufreq/Makefile 2>/dev/null || true rm -f kernel/sched/walt/walt_stub.c @@ -143,46 +143,37 @@ jobs: echo "=== Cari semua file yang export symbol ini ===" EXPORT_FILES=$(grep -rl "EXPORT_SYMBOL.*${SYM}" drivers/ kernel/ 2>/dev/null || true) - echo "Export ditemukan di:" - echo "${EXPORT_FILES}" - - EXPORT_COUNT=$(echo "${EXPORT_FILES}" | grep -c "\S" || true) - echo "Jumlah export: ${EXPORT_COUNT}" + EXPORT_COUNT=$(echo "${EXPORT_FILES}" | grep -c "\S" 2>/dev/null || echo 0) + echo "Export ditemukan di: ${EXPORT_FILES}" + echo "Jumlah: ${EXPORT_COUNT}" if [ "${EXPORT_COUNT}" -gt 1 ]; then - echo "=== Double export terdeteksi! Hapus export dari WALT, biarkan driver asli ===" + echo "=== Double export: hapus dari WALT ===" find kernel/sched/walt/ -name "*.c" -exec \ sed -i "/EXPORT_SYMBOL.*${SYM}/d" {} \; 2>/dev/null || true - find kernel/sched/walt/ -name "*.c" | while read f; do - if grep -q "${SYM}" "$f"; then - echo "Hapus definisi dari WALT: $f" - sed -i "/${SYM}/d" "$f" - fi - done - echo "=== Selesai: export diserahkan ke driver asli ===" elif [ "${EXPORT_COUNT}" -eq 1 ]; then - echo "=== Hanya 1 export, tidak perlu apa-apa ===" + echo "=== 1 export, tidak perlu apa-apa ===" else - echo "=== Symbol tidak ditemukan, buat stub ===" - cat > drivers/cpufreq/qcom-cpufreq-hw-stub.c << 'STUBEOF' - #include - #include - #include - - u64 __weak qcom_cpufreq_get_cpu_cycle_counter(int cpu) - { - return ktime_get_ns(); - } - EXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter); - STUBEOF - echo "obj-y += qcom-cpufreq-hw-stub.o" >> drivers/cpufreq/Makefile - echo "=== Stub dibuat ===" + echo "=== 0 export: buat stub di dalam kernel/sched/walt/ supaya built-in ===" + cat > kernel/sched/walt/walt_cpufreq_stub.c << 'STUBEOF' +#include +#include +#include + +u64 qcom_cpufreq_get_cpu_cycle_counter(int cpu) +{ + return ktime_get_ns(); +} +EXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter); +STUBEOF + echo "obj-y += walt_cpufreq_stub.o" >> kernel/sched/walt/Makefile + echo "=== Stub built-in dibuat di kernel/sched/walt/ ===" fi echo "=== Verifikasi akhir ===" - grep -rn "EXPORT_SYMBOL.*${SYM}" drivers/ kernel/ 2>/dev/null || echo "Tidak ada export tersisa" + grep -rn "EXPORT_SYMBOL.*${SYM}" drivers/ kernel/ 2>/dev/null || echo "Tidak ada export" - name: Configure kernel run: | From 9c9ebe89bf5a3038045bc26410d4dabad86e82a3 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 23:23:58 +0700 Subject: [PATCH 71/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 38 +++++++++++++++--------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 0edab46f151e7..e21dff7f2bea4 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -308,25 +308,25 @@ STUBEOF fi cat > AnyKernel3/anykernel.sh << 'EOF' - kernel.string=Creek Kernel Neko - KSU-Next + SUSFS | Optimized - do.devicecheck=1 - do.modules=0 - do.systemless=1 - do.cleanup=1 - do.cleanuponabort=1 - device.name1=creek - device.name2=RE54B - device.name3=RE54BL - supported.versions=12-14 - block=/dev/block/bootdevice/by-name/boot - is_slot_device=1 - ramdisk_compression=auto - - . tools/ak3-core.sh - - dump_boot - write_boot - EOF +kernel.string=Creek Kernel Neko - KSU-Next + SUSFS | Optimized +do.devicecheck=1 +do.modules=0 +do.systemless=1 +do.cleanup=1 +do.cleanuponabort=1 +device.name1=creek +device.name2=RE54B +device.name3=RE54BL +supported.versions=12-14 +block=/dev/block/bootdevice/by-name/boot +is_slot_device=1 +ramdisk_compression=auto + +. tools/ak3-core.sh + +dump_boot +write_boot +EOF BUILD_DATE=$(date +%Y%m%d-%H%M) echo "BUILD_DATE=${BUILD_DATE}" >> "$GITHUB_ENV" From ca7c67dd40e58bdc43eaea38fa43c7a5b1548583 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 23:29:06 +0700 Subject: [PATCH 72/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index e21dff7f2bea4..2294e68603aed 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -157,7 +157,7 @@ jobs: else echo "=== 0 export: buat stub di dalam kernel/sched/walt/ supaya built-in ===" - cat > kernel/sched/walt/walt_cpufreq_stub.c << 'STUBEOF' + cat > kernel/sched/walt/walt_cpufreq_stub.c << 'EOF' #include #include #include @@ -167,7 +167,7 @@ u64 qcom_cpufreq_get_cpu_cycle_counter(int cpu) return ktime_get_ns(); } EXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter); -STUBEOF +EOF echo "obj-y += walt_cpufreq_stub.o" >> kernel/sched/walt/Makefile echo "=== Stub built-in dibuat di kernel/sched/walt/ ===" fi From aa03ecca8527d5e3375e93edaf18f69d78b94723 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 23:31:36 +0700 Subject: [PATCH 73/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 89 ++++++++++++++++-------------- 1 file changed, 49 insertions(+), 40 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 2294e68603aed..cca24be59950b 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -135,7 +135,7 @@ jobs: run: | SYM="qcom_cpufreq_get_cpu_cycle_counter" - echo "=== Bersihkan stub lama ===" + echo "=== Bersihkan stub lama kalau ada ===" rm -f drivers/cpufreq/qcom-cpufreq-hw-stub.c sed -i '/qcom-cpufreq-hw-stub/d' drivers/cpufreq/Makefile 2>/dev/null || true rm -f kernel/sched/walt/walt_stub.c @@ -143,37 +143,46 @@ jobs: echo "=== Cari semua file yang export symbol ini ===" EXPORT_FILES=$(grep -rl "EXPORT_SYMBOL.*${SYM}" drivers/ kernel/ 2>/dev/null || true) - EXPORT_COUNT=$(echo "${EXPORT_FILES}" | grep -c "\S" 2>/dev/null || echo 0) - echo "Export ditemukan di: ${EXPORT_FILES}" - echo "Jumlah: ${EXPORT_COUNT}" + echo "Export ditemukan di:" + echo "${EXPORT_FILES}" + + EXPORT_COUNT=$(echo "${EXPORT_FILES}" | grep -c "\S" || true) + echo "Jumlah export: ${EXPORT_COUNT}" if [ "${EXPORT_COUNT}" -gt 1 ]; then - echo "=== Double export: hapus dari WALT ===" + echo "=== Double export terdeteksi! Hapus export dari WALT, biarkan driver asli ===" find kernel/sched/walt/ -name "*.c" -exec \ sed -i "/EXPORT_SYMBOL.*${SYM}/d" {} \; 2>/dev/null || true + find kernel/sched/walt/ -name "*.c" | while read f; do + if grep -q "${SYM}" "$f"; then + echo "Hapus definisi dari WALT: $f" + sed -i "/${SYM}/d" "$f" + fi + done + echo "=== Selesai: export diserahkan ke driver asli ===" elif [ "${EXPORT_COUNT}" -eq 1 ]; then - echo "=== 1 export, tidak perlu apa-apa ===" + echo "=== Hanya 1 export, tidak perlu apa-apa ===" else - echo "=== 0 export: buat stub di dalam kernel/sched/walt/ supaya built-in ===" - cat > kernel/sched/walt/walt_cpufreq_stub.c << 'EOF' -#include -#include -#include - -u64 qcom_cpufreq_get_cpu_cycle_counter(int cpu) -{ - return ktime_get_ns(); -} -EXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter); -EOF - echo "obj-y += walt_cpufreq_stub.o" >> kernel/sched/walt/Makefile - echo "=== Stub built-in dibuat di kernel/sched/walt/ ===" + echo "=== Symbol tidak ditemukan, buat stub ===" + cat > drivers/cpufreq/qcom-cpufreq-hw-stub.c << 'STUBEOF' + #include + #include + #include + + u64 __weak qcom_cpufreq_get_cpu_cycle_counter(int cpu) + { + return ktime_get_ns(); + } + EXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter); + STUBEOF + echo "obj-y += qcom-cpufreq-hw-stub.o" >> drivers/cpufreq/Makefile + echo "=== Stub dibuat ===" fi echo "=== Verifikasi akhir ===" - grep -rn "EXPORT_SYMBOL.*${SYM}" drivers/ kernel/ 2>/dev/null || echo "Tidak ada export" + grep -rn "EXPORT_SYMBOL.*${SYM}" drivers/ kernel/ 2>/dev/null || echo "Tidak ada export tersisa" - name: Configure kernel run: | @@ -308,25 +317,25 @@ EOF fi cat > AnyKernel3/anykernel.sh << 'EOF' -kernel.string=Creek Kernel Neko - KSU-Next + SUSFS | Optimized -do.devicecheck=1 -do.modules=0 -do.systemless=1 -do.cleanup=1 -do.cleanuponabort=1 -device.name1=creek -device.name2=RE54B -device.name3=RE54BL -supported.versions=12-14 -block=/dev/block/bootdevice/by-name/boot -is_slot_device=1 -ramdisk_compression=auto - -. tools/ak3-core.sh - -dump_boot -write_boot -EOF + kernel.string=Creek Kernel Neko - KSU-Next + SUSFS | Optimized + do.devicecheck=1 + do.modules=0 + do.systemless=1 + do.cleanup=1 + do.cleanuponabort=1 + device.name1=creek + device.name2=RE54B + device.name3=RE54BL + supported.versions=12-14 + block=/dev/block/bootdevice/by-name/boot + is_slot_device=1 + ramdisk_compression=auto + + . tools/ak3-core.sh + + dump_boot + write_boot + EOF BUILD_DATE=$(date +%Y%m%d-%H%M) echo "BUILD_DATE=${BUILD_DATE}" >> "$GITHUB_ENV" From d71a65a833b775cdb4ec240eb9c05bf28f20b9f7 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 23:37:11 +0700 Subject: [PATCH 74/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 63 +++++++++++++----------------- 1 file changed, 28 insertions(+), 35 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index cca24be59950b..512060d7ea03a 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -135,55 +135,48 @@ jobs: run: | SYM="qcom_cpufreq_get_cpu_cycle_counter" - echo "=== Bersihkan stub lama kalau ada ===" + echo "=== Clean up old stubs ===" rm -f drivers/cpufreq/qcom-cpufreq-hw-stub.c sed -i '/qcom-cpufreq-hw-stub/d' drivers/cpufreq/Makefile 2>/dev/null || true rm -f kernel/sched/walt/walt_stub.c sed -i '/walt_stub/d' kernel/sched/walt/Makefile 2>/dev/null || true - echo "=== Cari semua file yang export symbol ini ===" + echo "=== Find all files exporting this symbol ===" EXPORT_FILES=$(grep -rl "EXPORT_SYMBOL.*${SYM}" drivers/ kernel/ 2>/dev/null || true) - echo "Export ditemukan di:" - echo "${EXPORT_FILES}" + EXPORT_COUNT=$(echo "$EXPORT_FILES" | grep -c "[^[:space:]]" 2>/dev/null || echo "0") + echo "Export found in: ${EXPORT_FILES}" + echo "Count: ${EXPORT_COUNT}" - EXPORT_COUNT=$(echo "${EXPORT_FILES}" | grep -c "\S" || true) - echo "Jumlah export: ${EXPORT_COUNT}" - - if [ "${EXPORT_COUNT}" -gt 1 ]; then - echo "=== Double export terdeteksi! Hapus export dari WALT, biarkan driver asli ===" + if [ "$EXPORT_COUNT" -gt 1 ]; then + echo "=== Double export: remove from WALT ===" find kernel/sched/walt/ -name "*.c" -exec \ sed -i "/EXPORT_SYMBOL.*${SYM}/d" {} \; 2>/dev/null || true - find kernel/sched/walt/ -name "*.c" | while read f; do - if grep -q "${SYM}" "$f"; then - echo "Hapus definisi dari WALT: $f" - sed -i "/${SYM}/d" "$f" - fi - done - echo "=== Selesai: export diserahkan ke driver asli ===" - elif [ "${EXPORT_COUNT}" -eq 1 ]; then - echo "=== Hanya 1 export, tidak perlu apa-apa ===" + elif [ "$EXPORT_COUNT" -eq 1 ]; then + echo "=== Single export, no action needed ===" else - echo "=== Symbol tidak ditemukan, buat stub ===" - cat > drivers/cpufreq/qcom-cpufreq-hw-stub.c << 'STUBEOF' - #include - #include - #include - - u64 __weak qcom_cpufreq_get_cpu_cycle_counter(int cpu) - { - return ktime_get_ns(); - } - EXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter); - STUBEOF - echo "obj-y += qcom-cpufreq-hw-stub.o" >> drivers/cpufreq/Makefile - echo "=== Stub dibuat ===" + echo "=== 0 exports: create stub in kernel/sched/walt/ as built-in ===" + mkdir -p kernel/sched/walt + cat > kernel/sched/walt/walt_cpufreq_stub.c << 'STUBEOF' +#include +#include +#include + +u64 qcom_cpufreq_get_cpu_cycle_counter(int cpu) +{ + return ktime_get_ns(); +} +EXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter); +STUBEOF + if ! grep -q "walt_cpufreq_stub.o" kernel/sched/walt/Makefile 2>/dev/null; then + echo "obj-y += walt_cpufreq_stub.o" >> kernel/sched/walt/Makefile + fi + echo "=== Stub built-in created in kernel/sched/walt/ ===" fi - echo "=== Verifikasi akhir ===" - grep -rn "EXPORT_SYMBOL.*${SYM}" drivers/ kernel/ 2>/dev/null || echo "Tidak ada export tersisa" - + echo "=== Final verification ===" + grep -rn "EXPORT_SYMBOL.*${SYM}" drivers/ kernel/ 2>/dev/null || echo "No exports found (this is OK if stub was created)" - name: Configure kernel run: | export PATH="${{ github.workspace }}/toolchain/clang/bin:$PATH" From 4ab21ac4eb5cfb45f85a73c6009ac29c043707d7 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 23:39:37 +0700 Subject: [PATCH 75/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 53 ++++++++++++++++-------------- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 512060d7ea03a..19a2e4588d878 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -1,4 +1,4 @@ -name: Build Creek Kernel - Full (KSU + SUSFS + AK3) +Name: Build Creek Kernel - Full (KSU + SUSFS + AK3) on: workflow_dispatch jobs: @@ -9,9 +9,14 @@ jobs: with: ref: creek-v-oss + - name: Set Build Date + run: | + BUILD_DATE=$(date +%Y%m%d-%H%M) + echo "BUILD_DATE=${BUILD_DATE}" >> "$GITHUB_ENV" + - name: Cache toolchain id: cache-toolchain - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: toolchain key: toolchain-clang17 @@ -177,6 +182,7 @@ STUBEOF echo "=== Final verification ===" grep -rn "EXPORT_SYMBOL.*${SYM}" drivers/ kernel/ 2>/dev/null || echo "No exports found (this is OK if stub was created)" + - name: Configure kernel run: | export PATH="${{ github.workspace }}/toolchain/clang/bin:$PATH" @@ -310,33 +316,32 @@ STUBEOF fi cat > AnyKernel3/anykernel.sh << 'EOF' - kernel.string=Creek Kernel Neko - KSU-Next + SUSFS | Optimized - do.devicecheck=1 - do.modules=0 - do.systemless=1 - do.cleanup=1 - do.cleanuponabort=1 - device.name1=creek - device.name2=RE54B - device.name3=RE54BL - supported.versions=12-14 - block=/dev/block/bootdevice/by-name/boot - is_slot_device=1 - ramdisk_compression=auto - - . tools/ak3-core.sh - - dump_boot - write_boot - EOF +kernel.string=Creek Kernel Neko - KSU-Next + SUSFS | Optimized +do.devicecheck=1 +do.modules=0 +do.systemless=1 +do.cleanup=1 +do.cleanuponabort=1 +device.name1=creek +device.name2=RE54B +device.name3=RE54BL +supported.versions=12-14 +block=/dev/block/bootdevice/by-name/boot +is_slot_device=1 +ramdisk_compression=auto + +. tools/ak3-core.sh + +dump_boot +write_boot +EOF - BUILD_DATE=$(date +%Y%m%d-%H%M) - echo "BUILD_DATE=${BUILD_DATE}" >> "$GITHUB_ENV" cd AnyKernel3 - zip -r9 "../Creek-Kernel-Neko-${BUILD_DATE}.zip" ./* + zip -r9 "../Creek-Kernel-Neko-${{ env.BUILD_DATE }}.zip" ./* - name: Upload ZIP uses: actions/upload-artifact@v4 with: name: Creek-Kernel-Neko-${{ env.BUILD_DATE }} path: Creek-Kernel-Neko-*.zip + From a3a8241339d633d9f0010a947aba88b428912fe0 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 23:41:23 +0700 Subject: [PATCH 76/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 19a2e4588d878..66c3e50c348e0 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -1,4 +1,4 @@ -Name: Build Creek Kernel - Full (KSU + SUSFS + AK3) +name: Build Creek Kernel - Full (KSU + SUSFS + AK3) on: workflow_dispatch jobs: From da6b882b8ece67d011398a111667b88d9c7ef9b4 Mon Sep 17 00:00:00 2001 From: kusonekoworld-max Date: Mon, 8 Jun 2026 23:47:01 +0700 Subject: [PATCH 77/77] Update build-kernel.yml --- .github/workflows/build-kernel.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-kernel.yml b/.github/workflows/build-kernel.yml index 66c3e50c348e0..758e09ec4b365 100644 --- a/.github/workflows/build-kernel.yml +++ b/.github/workflows/build-kernel.yml @@ -170,7 +170,7 @@ jobs: u64 qcom_cpufreq_get_cpu_cycle_counter(int cpu) { - return ktime_get_ns(); + return ktime_get_ns(); } EXPORT_SYMBOL_GPL(qcom_cpufreq_get_cpu_cycle_counter); STUBEOF @@ -344,4 +344,3 @@ EOF with: name: Creek-Kernel-Neko-${{ env.BUILD_DATE }} path: Creek-Kernel-Neko-*.zip -