Skip to content
This repository was archived by the owner on Oct 12, 2025. It is now read-only.

Commit 2a27d18

Browse files
committed
laurel_sprout: major improvements
* Move to container to build the kernel * Move to the latest kernel version * Move to build script build.sh Signed-off-by: Onelots <onelots@onelots.fr>
1 parent e71d3f2 commit 2a27d18

2 files changed

Lines changed: 54 additions & 68 deletions

File tree

‎.github/workflows/kernel_build_laurel_sprout.yml‎

Lines changed: 17 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ on:
1212
jobs:
1313
build:
1414
runs-on: ubuntu-22.04
15-
15+
container: ghcr.io/tedomi2705/kernel_builder_image:latest
16+
1617
steps:
1718
- name: 📂 Checkout builder's sourcecode and get files
1819
uses: actions/checkout@v4
1920

2021
- name: ⚡ Checkout kernel's sourcecode and clone submodules
2122
run: |
22-
git clone https://github.com/Onelots-Devices-Playground/kernel_laurel_sprout_sm8150 kernel_xiaomi_sm6125 -b vic
23+
git clone --depth=1 https://github.com/Evolution-x-devices/kernel_xiaomi_sm6125 kernel_xiaomi_sm6125 -b vic
2324
2425
- name: 📅 Export date of build
2526
run: |
@@ -29,59 +30,18 @@ jobs:
2930
run: |
3031
cd kernel_xiaomi_sm6125
3132
rm -rf KernelSU-Next
32-
git clone https://github.com/KernelSU-Next/KernelSU-Next
33+
git clone https://github.com/KernelSU-Next/KernelSU-Next -b next-susfs
3334
3435
- name: 📥 Clone AnyKernel3
3536
run: |
3637
cd kernel_xiaomi_sm6125
3738
git clone -b laurel_sprout https://github.com/Oneloutre/AnyKernel3.git anykernel
3839
rm -rf anykernel/.git
3940
40-
- name: 📦 Install dépendencies
41-
run: |
42-
sudo apt-get update -y -qq
43-
sudo apt-get install -y --no-install-recommends \
44-
python3-pip \
45-
git \
46-
zip \
47-
unzip \
48-
gcc \
49-
g++ \
50-
make \
51-
ninja-build \
52-
file \
53-
bc \
54-
bison \
55-
flex \
56-
libfl-dev \
57-
libssl-dev \
58-
libelf-dev \
59-
wget \
60-
build-essential \
61-
python3-dev \
62-
python3-setuptools \
63-
rsync \
64-
ccache \
65-
llvm-dev
66-
sudo apt install flex libncurses6 libncurses5 binutils-aarch64-linux-gnu device-tree-compiler \
67-
android-sdk-libsparse-utils
68-
sudo apt install -y gcc-arm-linux-gnueabi
69-
echo "CROSS_COMPILE_ARM32=arm-linux-gnueabi-" >> $GITHUB_ENV
70-
71-
- name: 🔧 Install Clang from a Github action
72-
uses: KyleMayes/install-llvm-action@v2
73-
with:
74-
version: "18.1.8"
75-
directory: ${{ runner.temp }}/llvm
76-
77-
- name: 🔧 Add Clang to the PATH
78-
run: |
79-
echo "${{ runner.temp }}/llvm/bin" >> $GITHUB_PATH
80-
8141
- name: 🔍 Device's codename and kernel's version
8242
run: |
8343
cd kernel_xiaomi_sm6125
84-
DEVICE_CODENAME=laurel_sprout
44+
DEVICE_CODENAME=Laurel_Sprout
8545
KERNEL_VERSION=$(make kernelversion)
8646
8747
echo "Device Codename: $DEVICE_CODENAME"
@@ -97,26 +57,7 @@ jobs:
9757

9858
- name: 🛠️ Build the kramel
9959
run: |
100-
cd kernel_xiaomi_sm6125
101-
export ARCH=arm64
102-
export SUBARCH=arm64
103-
export KBUILD_COMPILER_STRING=$(clang --version | head -n 1)
104-
export CCACHE_EXEC=$(which ccache)
105-
export KBUILD_BUILD_HOST="Github-actions-Onelots"
106-
107-
echo "CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE=y" >> arch/arm64/configs/vendor/laurel_sprout-perf_defconfig
108-
109-
make O=out ARCH=arm64 vendor/laurel_sprout-perf_defconfig vendor/kernelsu.config V=1
110-
yes "" | make O=out ARCH=arm64 olddefconfig
111-
112-
make -j$(nproc --all) O=out \
113-
ARCH=arm64 \
114-
CC="ccache clang" \
115-
LLVM=1 \
116-
LLVM_IAS=1 \
117-
CLANG_TRIPLE=aarch64-linux-gnu- \
118-
CROSS_COMPILE=aarch64-linux-android- \
119-
CROSS_COMPILE_ARM32=arm-linux-androideabi-
60+
./build.sh laurel_sprout
12061
12162
- name: 🚀 Copy the compiled kernel to AnyKernel3 then create the zip
12263
run: |
@@ -156,11 +97,19 @@ jobs:
15697
draft: false
15798
prerelease: false
15899

100+
notification:
101+
runs-on: ubuntu-22.04
102+
needs: build
103+
steps:
104+
105+
- name: 📂 Checkout builder's sourcecode and get files
106+
uses: actions/checkout@v4
107+
159108
- name: 🚀 Notify people on Discord
160109
env:
161-
DEVICE_CODENAME: ${{ env.DEVICE_CODENAME }}
162-
KERNEL_VERSION: ${{ env.KERNEL_VERSION }}
110+
DEVICE_CODENAME: laurel_sprout
111+
KERNEL_VERSION: 4.14.355
163112
WEBHOOK: ${{ secrets.WEBHOOK }}
164-
NAME: ${{ env.ZIP_NAME }}
113+
NAME: KernelSU-Next-Caelum-miatoll-4.14.355.zip
165114
run: |
166115
python3 .github/webhook.py

‎build.sh‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/bash
2+
3+
# Usage: ./build.sh <device_codename>
4+
5+
DEVICE_CODENAME=$1
6+
7+
if [ -z "$DEVICE_CODENAME" ]; then
8+
echo "Error: Device codename not provided"
9+
echo "Usage: ./build.sh <device_codename>"
10+
exit 1
11+
fi
12+
13+
cd kernel_xiaomi_sm6125
14+
15+
# Export required variables
16+
export ARCH=arm64
17+
export SUBARCH=arm64
18+
export KBUILD_COMPILER_STRING=$(clang --version | head -n 1)
19+
export CCACHE_EXEC=$(which ccache)
20+
export LLVM_IAS=1
21+
export KBUILD_BUILD_HOST="Caelum-Plus-Github-actions-Onelots"
22+
23+
# Configure kernel
24+
echo "CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE=y" >> arch/arm64/configs/vendor/laurel_sprout.config
25+
make O=out ARCH=arm64 vendor/trinket-perf_defconfig vendor/laurel_sprout.config vendor/kernelsu.config
26+
yes "" | make O=out ARCH=arm64 olddefconfig
27+
28+
# Build kernel
29+
make -j$(nproc --all) O=out \
30+
ARCH=arm64 \
31+
CC="ccache clang" \
32+
LLVM=1 \
33+
LLVM_IAS=1 \
34+
CLANG_TRIPLE=aarch64-linux-gnu- \
35+
CROSS_COMPILE=aarch64-linux-android- \
36+
CROSS_COMPILE_ARM32=arm-linux-androideabi-
37+

0 commit comments

Comments
 (0)