Skip to content

Build KernelSU For MI8SE (sirius) #1

Build KernelSU For MI8SE (sirius)

Build KernelSU For MI8SE (sirius) #1

Workflow file for this run

name: Build KernelSU For MI8SE (sirius)
on:
workflow_dispatch:
jobs:
KSUForSirius:
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: |
sudo apt update -y
sudo apt-get install -y zip flex bison libncurses-dev gawk libiberty-dev autoconf kmod bc build-essential gcc libc6 curl libstdc++6 git wget libssl-dev cpio p7zip-full
sudo apt clean
- name: Clone Sources and Toolchain
run: |
git clone https://github.com/A-JiuA/sirius_Kernel --depth=1 -b sirius-q-oss --recurse-submodules sirius_Kernel
git clone https://github.com/LineageOS/android_prebuilts_clang_kernel_linux-x86_clang-r416183b --depth=1 --single-branch --no-tags -b lineage-20.0 ~/clang
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 -b android-10.0.0_r47 --depth=1 --single-branch --no-tags ~/aarch64-linux-android-4.9
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9 -b android-10.0.0_r47 --depth=1 --single-branch --no-tags ~/arm-linux-androideabi-4.9
git clone https://github.com/SakuraNotStupid/AnyKernel3
- name: Compile Kernel (MIUI)
run: |
CLANG=~/clang/bin
GCC32=~/arm-linux-androideabi-4.9/bin
GCC64=~/aarch64-linux-android-4.9/bin
export PATH=$CLANG:$GCC64:$GCC32:$PATH
output_dir=out
export args="-j$(nproc --all) ARCH=arm64 SUBARCH=arm64 O=$output_dir CC=clang CROSS_COMPILE=aarch64-linux-android- CROSS_COMPILE_ARM32=arm-linux-androideabi- CLANG_TRIPLE=aarch64-linux-gnu- LLVM=1"
pushd sirius_Kernel
make ${args} sirius_zhong_defconfig
make ${args}
popd
- name: Package the Kernel (MIUI)
run: |
cp -v sirius_Kernel/out/arch/arm64/boot/Image.gz AnyKernel3/
pushd AnyKernel3
7z a -mx9 ../MI8SE_KernelSU_MIUI.zip *
popd
- name: Create Config Info
run: |
echo "Device: MI 8 SE
Code: Sirius/Xmsirius
Build Code: ${{ github.run_number }}
KernelSU For MI8SE" >> INFO.txt
- name: Upload Kernel Package to GH-Release
uses: ncipollo/[email protected]
with:
artifacts: MI8SE_KernelSU_MIUI.zip
name: "MI8SE_KernelSU"
tag: "${{ github.run_number }}_MI8SE_KernelSU"
bodyFile: "INFO.txt"
token: ${{ secrets.GITHUB_TOKEN }}