👷 [CI] Use checkout instead of mainline setup.sh (#17)
This commit is contained in:
14
.github/workflows/build-kernel.yml
vendored
14
.github/workflows/build-kernel.yml
vendored
@@ -34,13 +34,25 @@ jobs:
|
|||||||
name: Build aarch64-${{ matrix.version }}
|
name: Build aarch64-${{ matrix.version }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
path: KernelSU
|
||||||
- name: Download kernel source
|
- name: Download kernel source
|
||||||
run: |
|
run: |
|
||||||
|
cd $GITHUB_WORKSPACE
|
||||||
git clone https://gerrit.googlesource.com/git-repo
|
git clone https://gerrit.googlesource.com/git-repo
|
||||||
mkdir android-kernel && cd android-kernel
|
mkdir android-kernel && cd android-kernel
|
||||||
../git-repo/repo init -u https://android.googlesource.com/kernel/manifest -b common-${{ matrix.tag }}
|
../git-repo/repo init -u https://android.googlesource.com/kernel/manifest -b common-${{ matrix.tag }}
|
||||||
../git-repo/repo sync
|
../git-repo/repo sync
|
||||||
curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -
|
echo "[+] KernelSU setup"
|
||||||
|
GKI_ROOT=$(pwd)
|
||||||
|
echo "[+] GKI_ROOT: $GKI_ROOT"
|
||||||
|
echo "[+] Copy kernel su driver to $GKI_ROOT/common/drivers"
|
||||||
|
ln -sf $GITHUB_WORKSPACE/KernelSU/kernel $GKI_ROOT/common/drivers/kernelsu
|
||||||
|
echo "[+] Add kernel su driver to Makefile"
|
||||||
|
DRIVER_MAKEFILE=$GKI_ROOT/common/drivers/Makefile
|
||||||
|
grep -q "kernelsu" $DRIVER_MAKEFILE || echo "obj-y += kernelsu/" >> $DRIVER_MAKEFILE
|
||||||
|
echo "[+] KernelSU setup Done."
|
||||||
curl -Lo gki-kernel.zip https://dl.google.com/android/gki/gki-certified-boot-${{ matrix.tag }}_r1.zip
|
curl -Lo gki-kernel.zip https://dl.google.com/android/gki/gki-certified-boot-${{ matrix.tag }}_r1.zip
|
||||||
unzip gki-kernel.zip
|
unzip gki-kernel.zip
|
||||||
tools/mkbootimg/unpack_bootimg.py --boot_img=$(find . -maxdepth 1 -name "*.img")
|
tools/mkbootimg/unpack_bootimg.py --boot_img=$(find . -maxdepth 1 -name "*.img")
|
||||||
|
|||||||
Reference in New Issue
Block a user