Skip to content

Try again: Support BBR Plus #59

Try again: Support BBR Plus

Try again: Support BBR Plus #59

name: Build Redmi 8 (Based-AOSP A15)
on:
workflow_call:
workflow_dispatch:
push:
branches: [ mirror2 ]
env:
# Device env
DEVICE_NAME : "redmi_8"
DEVICE_CODENAME : "olive"
CUSTOM_CMDS : "CLANG_TRIPLE=aarch64-linux-gnu-"
EXTRA_CMDS : "LD=ld.lld LLVM=1 LLVM_IAS=1"
KERNEL_SOURCE : "https://github.com/yu13140/android_kernel_xiaomi_sdm439-4.19.git"
KERNEL_BRANCH : "more"
CLANG_SOURCE : "https://github.com/kdrag0n/proton-clang.git"
CLANG_BRANCH : "master"
GCC_GNU : false
GCC_64_SOURCE : ""
GCC_64_BRANCH : ""
GCC_32_SOURCE : ""
GCC_32_BRANCH : ""
DEFCONFIG_SOURCE: ""
DEFCONFIG_NAME : "vendor/msm8937-perf_defconfig"
DEFCONFIG_ORIGIN_IMAGE: ""
DEFCONFIG_FROM_BOOT: false
KERNELSU_SOURCE : "https://raw.githubusercontent.com/JJ-coffee/KernelSU-Next/next/kernel/setup.sh"
KERNELSU_BRANCH : "next-susfs"
KERNELSU_AUTO_GET : "false" # if u want easy setting kernelsu, u can true.
KERNELSU_AUTO_FORK : "sukisu" # magic, rsuntk and sukisu
SUSFS_ENABLE : true
SUSFS_FIXED : true
SUSFS_UPDATE : true
AK3_SOURCE : "https://github.com/osm0sis/AnyKernel3.git"
AK3_BRANCH : "master"
BOOT_SOURCE : ""
NEED_DTBO : false
NEED_SAFE_DTBO : false
ROM_TEXT : "4.19_based_aosp_a15"
# Other env
PYTHON_VERSION: "3" # Only 2(Ubuntu 22.04 and Ubuntu 20.04) or 3(Any OS Versions).
PACK_METHOD: "Anykernel3" # Anykernel3 need SOURCE and BRANCH, MKBOOTIMG needn't it.
KERNELSU_METHOD: "shell" # shell, manual and only.
PATCHES_SOURCE: "yu13140/NonGKI_Kernel_Patches" # [your_name]/[your_patch] -> gooder123/NonGKI_Patcher
PATCHES_BRANCH: "mi_kernel" # [your_branch] -> main
SUSFS_FOLDER_FIXED: "redmi_8_419" # Fill in your patch prefix directory here. Leave it blank if there isn't one. -> your_folder
SUSFS_155_FIXED: "susfs_155_fixed" # Fill in your patches here. If there are multiple patches, please separate them with a comma. Leave it blank if there isn't one. -> patch1,patch2 (Only v1.5.5 SuSFS)
SUSFS_LATEST_FIXED: "" # Fill in your patches here. If there are multiple patches, please separate them with a comma. Leave it blank if there isn't one. -> patch1,patch2
REKERNEL_ENABLE: "false" # if u need Re:Kernel.
REKERNEL_FIXED: "" # Fill in your patches here. If there are multiple patches, please separate them with a comma. Leave it blank if there isn't one. -> patch1,patch2 (From SUSFS_FOLDER_FIXED)
BASEBAND_GUARD_ENABLE: "true" #if u want prevent unauthorized writes to critical partitions/device nodes.
BASEBAND_GUARD_BOOT: "false" #if u want to protect boot partition.
HIDE_STUFF: "true" # hide some of the features.
BBR_ENABLE: "true" # If you need TCP BBR algorithm.
HOOK_METHOD: "syscall" # manual hook method,can choice : normal, syscall and tracepoint.
HOOK_OLDER: "false" # contain backport older patch and syscall older patch.
KPM_ENABLE: "false" # Only use it for SukiSU-Ultra.
KPM_PATCH: "false" # Patch KPM during compilation.
KPM_PATCH_SOURCE: "https://raw.githubusercontent.com/SukiSU-Ultra/SukiSU_patch/refs/heads/main/kpm/patch_linux" # patch exec file source -> raw.githubusercontent.com/Test/Test/patch .
GENERATE_DTB: "false" # if u kernel need DTB , but cannot auto generate it. (Only Anykernel3).
GENERATE_CHIP: "xiaomi-sdm439" # only supported for qcom and mediatek.
BUILD_DEBUGGER: "true" # Output build errors.
SKIP_PATCH: "true" # Ignore errors found in Patch Debugger.
BUILD_OTHER_CONFIG: "true" # Merge config files.
MERGE_CONFIG_FILES: "vendor/xiaomi-sdm439.config"
FREE_MORE_SPACE: "false" # if u want get more space, enabled it.
jobs:
build-kernel:
name: Redmi 8 (Based-AOSP A15)
runs-on: ubuntu-latest # u can changed to ubuntu 22.04, and need container set ubuntu-latest
container: ubuntu:focal # if u need use arch linux -> archlinux/archlinux:latest or ubuntu 20.04 -> ubuntu:focal
env:
CCACHE_COMPILERCHECK: "%compiler% -dumpmachine; %compiler% -dumpversion"
CCACHE_NOHASHDIR: "true"
CCACHE_HARDLINK: "true"
steps:
- name: ⏰ Checkout repository
uses: actions/checkout@v4
- name: ⌛️ Compilation environment preparation
uses: ./.github/workflows/build-env
- name: ⚙️ Get neccssary tools
uses: ./.github/workflows/build-ready
- name: 🪝 Patch Kernel of SUSFS
uses: ./.github/workflows/patch-susfs
- name: 🔗 Patch for no-kprobe
uses: ./.github/workflows/patch-no-kprobe
- name: 🪛 Extra Kernel Options
run: |
# Only ${{ env.DEVICE_NAME }} use it.
cd $GITHUB_WORKSPACE/device_kernel
sed -i '/^CONFIG_LOCALVERSION=/ s/="\([^"]*\)"/=yu13140/' arch/arm64/configs/vendor/xiaomi-sdm439.config
echo "MESSAGE_THREAD_ID=23" >> $GITHUB_ENV
- name: 🧰 Patch Kernel of Re:Kernel
uses: ./.github/workflows/patch-rekernel
- name: 🔒 Patch Kernel of Baseband Guard
uses: ./.github/workflows/patch-baseband-guard
- name: 🔧 Patch Hide Stuff
uses: ./.github/workflows/patch-hide-stuff
- name: 🛰️ Patch Kernel of BBR
uses: ./.github/workflows/patch-bbr
- name: Upload Build Artifacts For Packing Error
uses: actions/upload-artifact@v4
with:
name: fs
path: |
device_kernel/fs
- name: 🚀 Build Process
uses: ./.github/workflows/build-process
- name: 🔩 Pack Process
uses: ./.github/workflows/pack-process
- name: ✏️ Upload Artifacts
uses: ./.github/workflows/upload-files
- name: Bot session cache
if: "!contains(github.event.head_commit.message, '[skip ci]')"
id: bot_session_cache
uses: actions/cache@v4
with:
path: scripts/ksubot.session
key: ${{ runner.os }}-bot-session
- name: Upload to telegram
if: "!contains(github.event.head_commit.message, '[skip ci]')"
env:
CHAT_ID: ${{ vars.CHAT_ID }}
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
COMMIT_URL: ${{ github.event.head_commit.url }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
REPOSITORY: ${{ github.repository }}
AUTHOR: ${{ github.event.head_commit.author.name }}
MESSAGE_THREAD_ID: ${{ env.MESSAGE_THREAD_ID }}
shell: bash
run: |
if [ ! -z "${{ secrets.BOT_TOKEN }}" ]; then
pip3 install telethon
export NTIME=$(date '+%Y-%m-%d %H:%M:%S')
python3 $GITHUB_WORKSPACE/scripts/kernelbot.py $GITHUB_WORKSPACE/device_kernel/${{ env.PACK_NAME }}
fi