Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fuqiuluo committed Jan 24, 2025
1 parent 52400aa commit 90f52af
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/only-build-android14-5.15.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Android14-5.15 Kernel Module Build

on:
workflow_dispatch:

jobs:
build:
name: GKI Kernel Module Build
runs-on: ubuntu-latest
needs: upload-artifact
env:
CCACHE_COMPILERCHECK: "%compiler% -dumpmachine; %compiler% -dumpversion"
CCACHE_NOHASHDIR: "true"
CCACHE_HARDLINK: "true"
strategy:
fail-fast: false
matrix:
tag:
- android14-5.15
arch:
- aarch64

steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 8192
temp-reserve-mb: 2048
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'

- name: Checkout Repository
uses: actions/checkout@v4

- name: Run GKI Kernel Build Action
uses: ./
with:
arch: ${{ matrix.arch }}
tag: ${{ matrix.tag }}
fast_build: false
module-name: ovo
module-path: ovo

upload-artifact:
name: Upload LKM Source Code
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Upload LKM Source Code
uses: actions/upload-artifact@v4
with:
name: ovo
path: ovo
9 changes: 9 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,17 @@ runs:
run: |
pip install ast-grep-cli
sudo apt-get install llvm-15 -y
ast-grep -U -p '$$$ check_exports($$$) {$$$}' -r '' common/scripts/mod/modpost.c
ast-grep -U -p 'check_exports($$$);' -r '' common/scripts/mod/modpost.c
if [[ "${{ inputs.tag }}" == "android14-5.15" ]]; then
if [ "${{ inputs.arch }}" = "aarch64" ]; then
ast-grep -U -r 'static bool module_imports_namespace($$$ARGS) { return $AAA; }' -r 'static __attribute__((unused)) bool module_imports_namespace($$$ARGS) { return $AAA; }' common/scripts/mod/modpost.c
ast-grep -U -r 'static void check_for_gpl_usage($$$ARGS) { switch($A) {$$$B} }' -r 'static __attribute__((unused)) void check_for_gpl_usage($$$ARGS) { switch($A) {$$$B} }' common/scripts/mod/modpost.c
fi
fi
if [ -f common/android/gki_aarch64_modules ]; then
echo "drivers/${{ inputs.module-name }}/${{ inputs.module-name }}.ko" >> common/android/gki_aarch64_modules
fi
Expand Down

0 comments on commit 90f52af

Please sign in to comment.