Skip to content

Build KernelSU For MI8SE(sirius) #56

Build KernelSU For MI8SE(sirius)

Build KernelSU For MI8SE(sirius) #56

Workflow file for this run

name: Build KernelSU For MI8SE(sirius)
on:
workflow_dispatch:
jobs:
KSUForSirius:
runs-on: ubuntu-latest
steps:
- name: Installing 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: Cloning Sources and Toolchain
run: |
git clone https://github.com/liqidecg/android_kernel_xiaomi_sdm710 --depth=1 -b lineage-20 --recurse-submodules android_kernel_xiaomi_sdm710_LineageOS
git clone https://gitlab.com/crdroidandroid/android_prebuilts_clang_host_linux-x86_clang-r445002 --depth=1 --single-branch --no-tags -b 12.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: Applying Kernel Patch(LineageOS)
run: |
cd android_kernel_xiaomi_sdm710_LineageOS/KernelSU
wget https://github.com/liqideqq/KernelSU/commit/eeb2b07d5178a741341dce79eb68cd2052488cb3.patch
patch -p1 < eeb2b07d5178a741341dce79eb68cd2052488cb3.patch
rm -rf *.patch
- name: Compiling Kernel(LineageOS)
run: |
CLANG=~/clang/bin
GCC32=~/arm-linux-androideabi-4.9/bin
GCC64=~/aarch64-linux-android-4.9/bin
PATH=$CLANG:$GCC64:$GCC32:$PATH
export PATH
export ARCH=arm64
export CLANG_TRIPLE=aarch64-linux-gnu
export CROSS_COMPILE=aarch64-linux-android-
export CROSS_COMPILE_ARM32=arm-linux-androideabi-
output_dir=out
pushd android_kernel_xiaomi_sdm710_LineageOS
make O="$output_dir" \
sdm670-perf_defconfig \
xiaomi/sdm710-common.config \
xiaomi/sirius.config
make -j $(nproc) \
O="$output_dir" \
CC=clang
popd
- name: Packaging the Kernel(LineageOS)
run: |
cp -v android_kernel_xiaomi_sdm710_LineageOS/out/arch/arm64/boot/Image.gz \
AnyKernel3/
pushd AnyKernel3
7z a -mx9 ../MI8SE_KernelSU_LineageOS.zip *
popd
- name: Creating Config Info
run: |
echo "Device: MI 8 SE
Code: Sirius/Xmsirius
Build Code: ${{ github.run_number }}
KernelSU For MI8SE" >> INFO.txt
- name: Uploading Kernel Package to GH-Release
uses: ncipollo/[email protected]
with:
artifacts: MI8SE_KernelSU_LineageOS.zip
name: "MI8SE_KernelSU"
tag: " ${{ github.run_number }}_MI8SE_KernelSU"
bodyFile: "INFO.txt"
token: ${{ secrets.GITHUB_TOKEN }}