From c238ef2a698010af0f0d99008cb56a12854006cb Mon Sep 17 00:00:00 2001 From: systemnb Date: Wed, 16 Jul 2025 22:27:56 +0800 Subject: [PATCH 1/7] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ca5dffd..7e61ef5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -74,7 +74,7 @@ jobs: } { print } ' common/modules.bzl - + continue-on-error: true - name: Increase stack frame size limit run: | cd android-kernel From b724d6683c63bfc856ccd94bfa1d3c645c425c28 Mon Sep 17 00:00:00 2001 From: systemnb Date: Wed, 16 Jul 2025 23:02:22 +0800 Subject: [PATCH 2/7] Update main.yml --- .github/workflows/main.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7e61ef5..35e2f54 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -52,6 +52,7 @@ jobs: echo "obj-y += kerneldriver/" >> common/drivers/Makefile - name: Add module to GKI modules list + if: ${{ github.event.inputs.android_version > 12 }} run: | cd android-kernel MODULE_NAME="drivers/kerneldriver/${{ github.event.inputs.driver_name }}" @@ -74,7 +75,7 @@ jobs: } { print } ' common/modules.bzl - continue-on-error: true + - name: Increase stack frame size limit run: | cd android-kernel @@ -90,9 +91,15 @@ jobs: run: | cd android-kernel - if [ ${{ github.event.inputs.android_version }} -lt 12 ]; then - echo "Using legacy build system for Android ${{ github.event.inputs.android_version }}" - build/build.sh + if [ ${{ github.event.inputs.android_version }} -le 12 ]; then + echo "Using non-GKI build for Android ${{ github.event.inputs.android_version }}" + if [ "${{ github.event.inputs.target_arch }}" = "aarch64" ]; then + BUILD_CONFIG=common/build.config.gki.arm64 LTO=thin build/build.sh -j32 + elif [ "${{ github.event.inputs.target_arch }}" = "x86_64" ]; then + BUILD_CONFIG=common/build.config.gki.x86_64 LTO=thin build/build.sh -j32 + else + BUILD_CONFIG=common/build.config.gki.aarch64 LTO=thin build/build.sh -j32 + fi else echo "Using Bazel build system for Android ${{ github.event.inputs.android_version }}" tools/bazel run //common:kernel_${{ github.event.inputs.target_arch }}_dist From 58a16c972379f1640ca249e964755f39748c3cde Mon Sep 17 00:00:00 2001 From: systemnb Date: Wed, 16 Jul 2025 23:24:30 +0800 Subject: [PATCH 3/7] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 35e2f54..75486f0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -94,7 +94,7 @@ jobs: if [ ${{ github.event.inputs.android_version }} -le 12 ]; then echo "Using non-GKI build for Android ${{ github.event.inputs.android_version }}" if [ "${{ github.event.inputs.target_arch }}" = "aarch64" ]; then - BUILD_CONFIG=common/build.config.gki.arm64 LTO=thin build/build.sh -j32 + BUILD_CONFIG=common/build.config.gki.aarch64 LTO=thin build/build.sh -j32 elif [ "${{ github.event.inputs.target_arch }}" = "x86_64" ]; then BUILD_CONFIG=common/build.config.gki.x86_64 LTO=thin build/build.sh -j32 else From da132db0a08b02c4a46c18149ad46041ba96b4ee Mon Sep 17 00:00:00 2001 From: systemnb Date: Thu, 17 Jul 2025 06:46:30 +0800 Subject: [PATCH 4/7] Update main.yml --- .github/workflows/main.yml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 75486f0..b47b123 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -75,7 +75,14 @@ jobs: } { print } ' common/modules.bzl - + + - name: Prepare module list for legacy builds + if: ${{ github.event.inputs.android_version <= 12 }} + run: | + cd android-kernel + mkdir -p common/android + touch common/android/gki_${ARCH}_modules + echo "drivers/kerneldriver/${{ github.event.inputs.driver_name }}" > common/android/gki_${ARCH}_modules - name: Increase stack frame size limit run: | cd android-kernel @@ -90,21 +97,17 @@ jobs: - name: Build kernel module run: | cd android-kernel - if [ ${{ github.event.inputs.android_version }} -le 12 ]; then - echo "Using non-GKI build for Android ${{ github.event.inputs.android_version }}" - if [ "${{ github.event.inputs.target_arch }}" = "aarch64" ]; then - BUILD_CONFIG=common/build.config.gki.aarch64 LTO=thin build/build.sh -j32 - elif [ "${{ github.event.inputs.target_arch }}" = "x86_64" ]; then - BUILD_CONFIG=common/build.config.gki.x86_64 LTO=thin build/build.sh -j32 - else - BUILD_CONFIG=common/build.config.gki.aarch64 LTO=thin build/build.sh -j32 + export SKIP_MODULE_LIST_CHECK=1 + if [ -f "out/android${{ github.event.inputs.android_version }}-${{ github.event.inputs.kernel_version }}/common/modules.order" ]; then + cp out/android${{ github.event.inputs.android_version }}-${{ github.event.inputs.kernel_version }}/common/modules.order common/android/gki_${ARCH}_modules fi + BUILD_CONFIG=common/build.config.gki.${{ github.event.inputs.target_arch }} LTO=thin build/build.sh -j32 else echo "Using Bazel build system for Android ${{ github.event.inputs.android_version }}" tools/bazel run //common:kernel_${{ github.event.inputs.target_arch }}_dist fi - continue-on-error: false + continue-on-error: true - name: Upload artifacts uses: actions/upload-artifact@v4.6.2 From ec8b466eb9cbec50af8f6bf445c45f00b24ad8b7 Mon Sep 17 00:00:00 2001 From: systemnb Date: Thu, 17 Jul 2025 07:23:10 +0800 Subject: [PATCH 5/7] Update main.yml --- .github/workflows/main.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b47b123..07ea6a8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -98,15 +98,14 @@ jobs: run: | cd android-kernel if [ ${{ github.event.inputs.android_version }} -le 12 ]; then - export SKIP_MODULE_LIST_CHECK=1 - if [ -f "out/android${{ github.event.inputs.android_version }}-${{ github.event.inputs.kernel_version }}/common/modules.order" ]; then - cp out/android${{ github.event.inputs.android_version }}-${{ github.event.inputs.kernel_version }}/common/modules.order common/android/gki_${ARCH}_modules - fi BUILD_CONFIG=common/build.config.gki.${{ github.event.inputs.target_arch }} LTO=thin build/build.sh -j32 + OUTPUT_PATH="out/android${{ github.event.inputs.android_version }}-${{ github.event.inputs.kernel_version }}" else echo "Using Bazel build system for Android ${{ github.event.inputs.android_version }}" tools/bazel run //common:kernel_${{ github.event.inputs.target_arch }}_dist + OUTPUT_PATH="out/kernel_${{ github.event.inputs.target_arch }}" fi + echo "OUTPUT_PATH=$OUTPUT_PATH" >> $GITHUB_ENV continue-on-error: true - name: Upload artifacts @@ -114,4 +113,4 @@ jobs: with: name: kernel-driver-${{ github.event.inputs.target_arch }} path: | - android-kernel/out/kernel_${{ github.event.inputs.target_arch }} + android-kernel/${{ env.OUTPUT_PATH }} From 5ab076364f352ed8a7441c3dbe63dbd3bd0817c6 Mon Sep 17 00:00:00 2001 From: systemnb Date: Thu, 17 Jul 2025 07:29:49 +0800 Subject: [PATCH 6/7] Update main.yml From c7b97f462559ab447d33223a4adaca58271821e7 Mon Sep 17 00:00:00 2001 From: systemnb Date: Thu, 17 Jul 2025 21:21:44 +0800 Subject: [PATCH 7/7] Update main.yml --- .github/workflows/main.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 07ea6a8..8cc7c9c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -80,9 +80,8 @@ jobs: if: ${{ github.event.inputs.android_version <= 12 }} run: | cd android-kernel - mkdir -p common/android - touch common/android/gki_${ARCH}_modules - echo "drivers/kerneldriver/${{ github.event.inputs.driver_name }}" > common/android/gki_${ARCH}_modules + echo "drivers/kerneldriver/${{ github.event.inputs.driver_name }}" >> common/android/gki_aarch64_modules + - name: Increase stack frame size limit run: | cd android-kernel @@ -99,7 +98,7 @@ jobs: cd android-kernel if [ ${{ github.event.inputs.android_version }} -le 12 ]; then BUILD_CONFIG=common/build.config.gki.${{ github.event.inputs.target_arch }} LTO=thin build/build.sh -j32 - OUTPUT_PATH="out/android${{ github.event.inputs.android_version }}-${{ github.event.inputs.kernel_version }}" + OUTPUT_PATH="out/android${{ github.event.inputs.android_version }}-${{ github.event.inputs.kernel_version }}/dist" else echo "Using Bazel build system for Android ${{ github.event.inputs.android_version }}" tools/bazel run //common:kernel_${{ github.event.inputs.target_arch }}_dist