Garnet (Poco X6 5G) Kernel #27
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Garnet (Poco X6 5G) Kernel | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 180 | |
| steps: | |
| - name: Free Disk Space | |
| uses: easimon/maximize-build-space@v10 | |
| with: | |
| root-reserve-mb: 8192 | |
| swap-size-mb: 2048 | |
| remove-dotnet: 'true' | |
| remove-android: 'true' | |
| remove-haskell: 'true' | |
| remove-codeql: 'true' | |
| - name: Install Dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential bc flex bison libssl-dev libelf-dev \ | |
| zip git ccache python3 device-tree-compiler libpcap-dev \ | |
| gcc-aarch64-linux-gnu gcc-arm-linux-gnueabi wget curl | |
| - name: Checkout Main Kernel | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: Lafactorial/android_kernel_xiaomi_sm7435 | |
| ref: lineage-23.2-ksun-08.09.2026 | |
| path: workspace/kernel | |
| fetch-depth: 1 | |
| submodules: recursive | |
| - name: Checkout Kernel Modules | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: Lafactorial/android_kernel_xiaomi_sm7435-modules | |
| ref: lineage-23.2 | |
| path: workspace/modules | |
| fetch-depth: 1 | |
| - name: Checkout DeviceTrees | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: Lafactorial/android_kernel_xiaomi_sm7435-devicetrees | |
| ref: lineage-23.2 | |
| path: workspace/devicetrees | |
| fetch-depth: 1 | |
| - name: Download AOSP Clang | |
| run: | | |
| mkdir -p workspace/clang | |
| cd workspace/clang | |
| wget -q https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+archive/refs/heads/main/clang-r522817.tar.gz -O clang.tar.gz | |
| tar -xzf clang.tar.gz | |
| rm clang.tar.gz | |
| echo "=== Clang Version ===" | |
| ./bin/clang --version | |
| ls -la bin/ | head -20 | |
| - name: Build Kernel | |
| run: | | |
| cd workspace/kernel | |
| export PATH="$(pwd)/../clang/bin:$PATH" | |
| export ARCH=arm64 | |
| export SUBARCH=arm64 | |
| export CC=clang | |
| export HOSTCC=gcc | |
| export HOSTCXX=g++ | |
| export HOSTAR=ar | |
| export HOSTLD=ld | |
| export CLANG_TRIPLE=aarch64-linux-gnu- | |
| export CROSS_COMPILE=aarch64-linux-gnu- | |
| export CROSS_COMPILE_ARM32=arm-linux-gnueabi- | |
| export LLVM=1 | |
| export LLVM_IAS=1 | |
| make O=out ARCH=arm64 gki_defconfig | |
| scripts/kconfig/merge_config.sh -m -O out out/.config \ | |
| arch/arm64/configs/vendor/parrot_GKI.config | |
| scripts/kconfig/merge_config.sh -m -O out out/.config \ | |
| arch/arm64/configs/vendor/garnet_GKI.config | |
| scripts/kconfig/merge_config.sh -m -O out out/.config \ | |
| arch/arm64/configs/vendor/debugfs.config | |
| scripts/kconfig/merge_config.sh -m -O out out/.config \ | |
| arch/arm64/configs/vendor/extra.config | |
| scripts/config --file out/.config --disable CONFIG_LTO_CLANG_FULL | |
| scripts/config --file out/.config --enable CONFIG_LTO_CLANG_THIN | |
| scripts/config --file out/.config --enable CONFIG_THINLTO | |
| make O=out ARCH=arm64 olddefconfig | |
| make O=out ARCH=arm64 HOSTCC=gcc HOSTLD=ld -j$(nproc --all) | |
| echo "=== Build completed ===" | |
| ls -lh out/arch/arm64/boot/ | |
| - name: Pack AnyKernel3 | |
| run: | | |
| cd workspace | |
| git clone --depth=1 https://github.com/Lafactorial/AnyKernel31 -b master AnyKernel3 | |
| if [ -f kernel/out/arch/arm64/boot/Image.gz ]; then | |
| cp kernel/out/arch/arm64/boot/Image.gz AnyKernel3/ | |
| echo "Copied Image.gz" | |
| elif [ -f kernel/out/arch/arm64/boot/Image ]; then | |
| cp kernel/out/arch/arm64/boot/Image AnyKernel3/ | |
| echo "Copied Image" | |
| else | |
| echo "ERROR: No kernel Image found!" | |
| ls -la kernel/out/arch/arm64/boot/ | |
| exit 1 | |
| fi | |
| cd AnyKernel3 | |
| zip -r9y ../Garnet-Kernel.zip * -x "*.git*" "README*" "*placeholder*" "LICENSE*" "*.zip" | |
| cd .. | |
| ls -lh Garnet-Kernel.zip | |
| - name: Upload Kernel Zip | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Garnet-Kernel | |
| path: workspace/Garnet-Kernel.zip | |
| retention-days: 30 | |