| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- name: Set up KernelSU-Next
- description: download and set up KSUN into the kernel source
- inputs:
- susfs:
- description: 'susfs'
- required: true
- runs:
- using: composite
- steps:
- - name: Setup KSUN with no susfs
- if: inputs.susfs == 'false'
- shell: bash
- run: |
- cd "$COMMON"
- curl -LSs "https://raw.githubusercontent.com/pershoot/KernelSU-Next/dev-susfs/kernel/setup.sh" | bash -s dev
- #cd KernelSU-Next
- #git checkout c2013a15ae1eaca69032fa6016ffefb70adf6146
- cd KernelSU-Next/kernel
- COMMITS_COUNT=$(/usr/bin/git rev-list --count HEAD)
- BASE_VERSION=30000
- KSU_VERSION=$(expr $COMMITS_COUNT "+" $BASE_VERSION)
- sed -i "s/^KSU_VERSION_FALLBACK := 1$/KSU_VERSION_FALLBACK := ${KSU_VERSION}/" Kbuild
- KSU_GIT_TAG="$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.1")"
- sed -i "s/^KSU_VERSION_TAG_FALLBACK := v0.0.1$/KSU_VERSION_TAG_FALLBACK := ${KSU_GIT_TAG}/" Kbuild
- cd "$GITHUB_WORKSPACE"
- cat >> "$GKI_DEFCONFIG" << 'EOF'
- # KernelSU Configuration
- CONFIG_KSU=y
- EOF
- - name: Setup pershoot KSUN with susfs
- if: inputs.susfs == 'true'
- shell: bash
- run: |
- cd "$COMMON"
- curl -LSs "https://raw.githubusercontent.com/pershoot/KernelSU-Next/dev-susfs/kernel/setup.sh" | bash -s dev-susfs
- #cd KernelSU-Next
- #git checkout c2013a15ae1eaca69032fa6016ffefb70adf6146
- cd KernelSU-Next/kernel
- COMMITS_COUNT=$(/usr/bin/git rev-list --count HEAD)
- BASE_VERSION=30000
- KSU_VERSION=$(expr $COMMITS_COUNT "+" $BASE_VERSION)
- sed -i "s/^KSU_VERSION_FALLBACK := 1$/KSU_VERSION_FALLBACK := ${KSU_VERSION}/" Kbuild
- KSU_GIT_TAG="$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.1")"
- sed -i "s/^KSU_VERSION_TAG_FALLBACK := v0.0.1$/KSU_VERSION_TAG_FALLBACK := ${KSU_GIT_TAG}/" Kbuild
- cd "$GITHUB_WORKSPACE"
- cat >> "$GKI_DEFCONFIG" << 'EOF'
- # KernelSU Configuration
- CONFIG_KSU=y
- EOF
- - name: Extract KSU Version Info
- id: ksu-version
- shell: bash
- run: |
- cd "$COMMON/KernelSU-Next"
- # Extract and export KSU version info
- KSU_GIT_VERSION=$(git rev-list --count HEAD 2>/dev/null)
- KSU_GIT_TAG=$(git describe --tags --abbrev=0 2>/dev/null)
- KSU_COMMIT=$(git rev-parse --short HEAD 2>/dev/null)
- KSU_VERSION=$((30000 + KSU_GIT_VERSION))
-
- echo "KSU_GIT_TAG=$KSU_GIT_TAG" >> $GITHUB_ENV
- echo "KSU_VERSION=$KSU_VERSION" >> $GITHUB_ENV
- echo "KSU_COMMIT=$KSU_COMMIT" >> $GITHUB_ENV
- # - name: 'Fix KernelSU-Next'
- # shell: bash
- # run: |
- # set -euo pipefail
- # cd "$COMMON/KernelSU-Next"
- # cp ${{ github.action_path }}/patches/static.patch ./
- # patch -p1 < static.patch
|