forked from Yxiguan/kernel_manifests
-
Notifications
You must be signed in to change notification settings - Fork 0
116 lines (95 loc) · 4.03 KB
/
Copy pathsm7675-ace3v.yml
File metadata and controls
116 lines (95 loc) · 4.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: 构建SM7675-Ace3V内核
on:
workflow_call:
inputs:
upload_alist:
required: false
type: boolean
default: false
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 24576
temp-reserve-mb: 8192
swap-size-mb: 16384
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
- name: Configure Git
run: |
git config --global user.name "Yxiguan"
git config --global user.email "2501608779@qq.com"
- name: 安装repo
run: |
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/repo
chmod a+x ~/repo
sudo mv ~/repo /usr/local/bin/repo
- name: 安装编译环境
run: |
sudo apt update && sudo apt upgrade -y
sudo apt install curl git python3 python3-pip -y
pip3 install requests_toolbelt requests
- name: 拉取oneplus ace3v内核清单
run: |
mkdir kernel && cd kernel
repo init -u https://github.com/OnePlusOSS/kernel_manifest.git -b oneplus/sm7675 -m oneplus_ace_3v_v.xml --depth=1
repo sync -j$(nproc --all)
rm kernel_platform/common/android/abi_gki_protected_exports_* || echo "No protected exports!"
rm kernel_platform/msm-kernel/android/abi_gki_protected_exports_* || echo "No protected exports!"
sed -i 's/export REPACK_IMG=true/export REPACK_IMG=false/Ig' kernel_platform/oplus/build/oplus_setup.sh
sed -i 's/ -dirty$//' kernel_platform/common/scripts/setlocalversion
sed -i 's/ -dirty$//' kernel_platform/common/scripts/Makefile.modpost
sed -i 's/EXTRAVERSION =/EXTRAVERSION =-XiGuan/I' kernel_platform/common/Makefile
- name: 添加KernelSU Next
run: |
cd kernel/kernel_platform/common
curl -LSs "https://raw.githubusercontent.com/rifsxd/KernelSU-Next/next/kernel/setup.sh" | bash -s next-susfs
cd ./KernelSU-Next/
KSU_VERSION=$(expr $(/usr/bin/git rev-list --count HEAD) "+" 10200)
sed -i "s/DKSU_VERSION=11998/DKSU_VERSION=${KSU_VERSION}/" kernel/Makefile
- name: 添加SUSFS
run: |
cd kernel
git clone https://gitlab.com/simonpunk/susfs4ksu.git -b gki-android14-6.1
# git clone https://github.com/TheWildJames/kernel_patches.git
cd kernel_platform
cp ../susfs4ksu/kernel_patches/KernelSU/10_enable_susfs_for_ksu.patch ./common/KernelSU-Next/
cp ../susfs4ksu/kernel_patches/50_add_susfs_in_gki-android14-6.1.patch ./common/
cp ../susfs4ksu/kernel_patches/fs/* ./common/fs/
cp ../susfs4ksu/kernel_patches/include/linux/* ./common/include/linux/
cd ./common/
patch -p1 < 50_add_susfs_in_gki-android14-6.1.patch || true
- name: 编译内核
run: |
cd kernel
# export LTO=thin
./kernel_platform/oplus/build/oplus_build_kernel.sh pineapple gki
- name: 打包 AnyKernel3
if: always()
run: |
git clone https://github.com/Yxiguan/AnyKernel3.git --depth=1
rm -rf ./AnyKernel3/.git
sudo chmod 777 ./AnyKernel3/ksu.sh
cd ./AnyKernel3/
./ksu.sh
cd ..
cp kernel/kernel_platform/out/msm-kernel-pineapple-gki/dist/Image ./AnyKernel3/
cd ./AnyKernel3/
zip -r ../AnyKernel3-KernelSU_Next-SUSFS-For-Ace3V.zip META-INF tools KernelSU_Next.apk ksu_module_susfs_1.5.2+.zip Image anykernel.sh LICENSE
zip -r ../Image-KernelSU_Next-SUSFS-Ace3V.zip Image
- name: 上传 AnyKernel3
uses: actions/upload-artifact@v4
with:
name: AnyKernel3-KernelSU_Next-SUSFS-For-Ace3V
path: ./AnyKernel3/*
- name: 上传 Image
uses: actions/upload-artifact@v4
with:
name: Image-KernelSU_Next-SUSFS-Ace3V
path: kernel/kernel_platform/out/msm-kernel-pineapple-gki/dist/Image