This repository has been archived by the owner on May 12, 2024. It is now read-only.
Build Nekko Kernel #19
This file contains 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: Build Nekko Kernel | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
env: | |
TZ: Asia/Shanghai | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
- name: Free Disk Space (Ubuntu) | |
uses: jlumbroso/free-disk-space@main | |
with: | |
# this might remove tools that are actually needed, | |
# if set to "true" but frees about 6 GB | |
tool-cache: ture | |
# all of these default to true, but feel free to set to | |
# "false" if necessary for your workflow | |
android: false | |
dotnet: true | |
haskell: true | |
large-packages: true | |
docker-images: true | |
swap-storage: true | |
# Runs a single command using the runners shell | |
- name: Setup build kernel environment & Sync kernel | |
run: | | |
sudo timedatectl set-timezone "$TZ" | |
cd /home/runner | |
echo 'Preparing packages' | |
sudo apt-get update -y | |
sudo apt-get install -y repo git | |
mkdir android-kernel && cd android-kernel | |
repo init -u https://android.googlesource.com/kernel/manifest -b android-msm-redbull-4.19-android14-qpr1 | |
repo sync | |
cd private/msm-google | |
echo "CONFIG_MODULES=y" >> arch/arm64/configs/redbull-gki_defconfig | |
echo "CONFIG_KPROBES=y" >> arch/arm64/configs/redbull-gki_defconfig | |
echo "CONFIG_HAVE_KPROBES=y" >> arch/arm64/configs/redbull-gki_defconfig | |
echo "CONFIG_KPROBE_EVENTS=y" >> arch/arm64/configs/redbull-gki_defconfig | |
echo "CONFIG_OVERLAY_FS=y" >> arch/arm64/configs/redbull-gki_defconfig | |
make ARCH=arm64 redbull-gki_defconfig | |
make ARCH=arm64 savedefconfig | |
cp defconfig arch/arm64/configs/redbull-gki_defconfig | |
make mrproper | |
curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash - | |
- name: Setup ccache | |
uses: hendrikmuhs/[email protected] | |
with: | |
key: build-kernel-${{ env.DEVICE }}${{ env.LOCALVERSION }}${{ env.UPLOADNAME }} | |
max-size: 2G | |
- name: Build Kernel | |
run: | | |
cd /home/runner/android-kernel | |
./build_redbull-gki.sh | |
- name: Setting up AnyKenrel3 | |
run: | | |
cd /home/runner/android-kernel | |
git clone https://github.com/osm0sis/AnyKernel3.git | |
sed -i 's/do.devicecheck=1/do.devicecheck=0/g' AnyKernel3/anykernel.sh | |
sed -i 's!block=/dev/block/platform/omap/omap_hsmmc.0/by-name/boot;!block=auto;!g' AnyKernel3/anykernel.sh | |
sed -i 's/is_slot_device=0;/is_slot_device=auto;/g' AnyKernel3/anykernel.sh | |
cp /home/runner/android-kernel/out/android-msm-pixel-4.19/dist/Image.lz4-dtb AnyKernel3/ | |
cd ./AnyKernel3/ | |
zip -r AnyKernel3 . -x ".git*" -x "README.md" -x "*.zip" | |
- name: Upload AK3 | |
if: success() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: AnyKernel3.zip | |
path: "/home/runner/android-kernel/AnyKernel3/AnyKernel3.zip" | |
- name: Upload Image.lz4-dtb | |
if: success() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Image.lz4-dtb | |
path: "/home/runner/android-kernel/out/android-msm-pixel-4.19/dist/Image.lz4-dtb" | |
- name: Generate release tag | |
id: tag | |
if: success() | |
run: | | |
echo "release_tag=Nekko-$(date +"%Y.%m.%d-%H%M")" >> $GITHUB_OUTPUT | |
echo "status=success" >> $GITHUB_OUTPUT | |
- name: Upload kernel and AK3 to Releases | |
uses: softprops/action-gh-release@master | |
if: success() | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
body: 'THIS IS A AUTO BUILD FROM GITHUB ACTIONS.THIS BUILD ONLY FOR TEST.BACKUP YOUR DATA BEFORE YOU FLASH IT!!!!!' | |
tag_name: ${{ steps.tag.outputs.release_tag }} | |
files: | | |
/home/runner/android-kernel/out/android-msm-pixel-4.19/dist/Image.lz4-dtb | |
/home/runner/android-kernel/AnyKernel3/AnyKernel3.zip |