Skip to content

Commit 9b2b683

Browse files
committed
11.2
1 parent 91df9a7 commit 9b2b683

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+4760
-2500
lines changed

.clang-format

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ BreakConstructorInitializersBeforeComma: false
5151
BreakConstructorInitializers: BeforeComma
5252
BreakAfterJavaFieldAnnotations: false
5353
BreakStringLiterals: false
54-
BreakBeforeSemicolons: None
54+
# BreakBeforeSemicolons: None
5555
ColumnLimit: 120
5656
CommentPragmas: "^ IWYU pragma:"
5757
CompactNamespaces: false

.github/dependabot.yml

-11
This file was deleted.

.github/workflows/build.yml

+29-86
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
contents: write
1212
steps:
1313
- name: Check out
14-
uses: actions/checkout@v4
14+
uses: actions/checkout@v3
1515
with:
1616
submodules: "recursive"
1717
fetch-depth: 0
@@ -38,16 +38,19 @@ jobs:
3838
- name: Build kpimg
3939
run: |
4040
export TARGET_COMPILE=`pwd`/arm-gnu-toolchain-12.2.rel1-x86_64-aarch64-none-elf/bin/aarch64-none-elf-
41-
4241
cd kernel
43-
make
44-
mv kpimg kpimg-linux
45-
mv kpimg.elf kpimg.elf-linux
46-
make clean
42+
4743
export ANDROID=1
4844
make
4945
mv kpimg kpimg-android
5046
mv kpimg.elf kpimg.elf-android
47+
make clean
48+
49+
unset ANDROID
50+
make
51+
mv kpimg kpimg-linux
52+
mv kpimg.elf kpimg.elf-linux
53+
make clean
5154
5255
cd ..
5356
cd kpms
@@ -65,15 +68,15 @@ jobs:
6568
mv syscallhook.kpm demo-syscallhook.kpm
6669
6770
- name: Upload elf
68-
uses: actions/upload-artifact@v4
71+
uses: actions/upload-artifact@v3
6972
with:
7073
path: |
7174
kernel/kpimg.elf-linux
7275
kernel/kpimg.elf-android
7376
name: kpimg.elf
7477

7578
- name: Release
76-
uses: ncipollo/release-action@v1.14.0
79+
uses: ncipollo/release-action@v1.12.0
7780
with:
7881
token: ${{ secrets.GITHUB_TOKEN }}
7982
tag: ${{ steps.parse_version.outputs.VERSION }}
@@ -95,7 +98,7 @@ jobs:
9598
contents: write
9699
steps:
97100
- name: Check out
98-
uses: actions/checkout@v4
101+
uses: actions/checkout@v3
99102
- name: Generate version
100103
id: parse_version
101104
run: |
@@ -115,7 +118,7 @@ jobs:
115118
zip -r kpuser.zip user
116119
117120
- name: Release
118-
uses: ncipollo/release-action@v1.14.0
121+
uses: ncipollo/release-action@v1.12.0
119122
with:
120123
token: ${{ secrets.GITHUB_TOKEN }}
121124
tag: ${{ steps.parse_version.outputs.VERSION }}
@@ -125,13 +128,13 @@ jobs:
125128
replacesArtifacts: true
126129
omitBodyDuringUpdate: true
127130

128-
Build-android-kpatch-kptools:
131+
Build-android-kptools:
129132
runs-on: ubuntu-latest
130133
permissions:
131134
contents: write
132135
steps:
133136
- name: Check out
134-
uses: actions/checkout@v4
137+
uses: actions/checkout@v3
135138
with:
136139
submodules: "recursive"
137140
fetch-depth: 0
@@ -149,7 +152,7 @@ jobs:
149152
uses: nttld/setup-ndk@v1
150153
id: setup-ndk
151154
with:
152-
ndk-version: r26d
155+
ndk-version: r26b
153156
add-to-path: true
154157

155158
- name: Make hdr
@@ -158,21 +161,6 @@ jobs:
158161
cd kernel
159162
make hdr
160163
161-
- name: Build kpatch-android
162-
run: |
163-
cd user
164-
export ANDROID=1
165-
mkdir -p build/android && cd build/android
166-
echo ${{ steps.setup-ndk.outputs.ndk-path }}
167-
cmake \
168-
-DCMAKE_TOOLCHAIN_FILE=${{ steps.setup-ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake \
169-
-DCMAKE_BUILD_TYPE=Release \
170-
-DANDROID_PLATFORM=android-33 \
171-
-DANDROID_ABI=arm64-v8a ../..
172-
cmake --build .
173-
unset ANDROID
174-
mv kpatch kpatch-android
175-
176164
- name: Build kptools-android
177165
run: |
178166
cd tools
@@ -187,13 +175,11 @@ jobs:
187175
mv kptools kptools-android
188176
189177
- name: Release
190-
uses: ncipollo/release-action@v1.14.0
178+
uses: ncipollo/release-action@v1.12.0
191179
with:
192180
token: ${{ secrets.GITHUB_TOKEN }}
193181
tag: ${{ steps.parse_version.outputs.VERSION }}
194182
artifacts: |
195-
user/build/android/kpatch-android
196-
user/build/android/libapjni.so
197183
tools/build/android/kptools-android
198184
allowUpdates: true
199185
replacesArtifacts: true
@@ -205,7 +191,7 @@ jobs:
205191
contents: write
206192
steps:
207193
- name: Check out
208-
uses: actions/checkout@v4
194+
uses: actions/checkout@v3
209195
- name: Generate version
210196
id: parse_version
211197
run: |
@@ -232,7 +218,7 @@ jobs:
232218
mv kptools kptools-linux
233219
234220
- name: Release
235-
uses: ncipollo/release-action@v1.14.0
221+
uses: ncipollo/release-action@v1.12.0
236222
with:
237223
token: ${{ secrets.GITHUB_TOKEN }}
238224
tag: ${{ steps.parse_version.outputs.VERSION }}
@@ -248,7 +234,7 @@ jobs:
248234
contents: write
249235
steps:
250236
- name: Checkout
251-
uses: actions/checkout@v4
237+
uses: actions/checkout@v3
252238
- name: Generate version
253239
shell: pwsh
254240
run: |
@@ -267,6 +253,7 @@ jobs:
267253
install: >-
268254
msys/make
269255
msys/gcc
256+
msys/zlib-devel
270257
- name: Copyfile
271258
shell: pwsh
272259
run: |
@@ -283,10 +270,13 @@ jobs:
283270
- name: Copyfile2
284271
shell: pwsh
285272
run: |
286-
cp .\tools\kptools.exe .\tools\kptools-msys2.exe
287-
7z a kptools-msys2-win .\tools\kptools-msys2.exe D:\a\_temp\msys64\usr\bin\msys-2.0.dll
273+
mkdir .\win
274+
cp .\tools\kptools.exe .\win\kptools-msys2.exe
275+
cp D:\a\_temp\msys64\usr\bin\msys-2.0.dll .\win
276+
cp D:\a\_temp\msys64\usr\bin\msys-z.dll .\win
277+
7z a kptools-msys2-win .\win
288278
- name: Release
289-
uses: ncipollo/release-action@v1.14.0
279+
uses: ncipollo/release-action@v1.12.0
290280
with:
291281
token: ${{ secrets.GITHUB_TOKEN }}
292282
tag: ${{ env.VERSION }}
@@ -295,60 +285,13 @@ jobs:
295285
allowUpdates: true
296286
replacesArtifacts: true
297287

298-
Build-kptools-windows-llvm:
299-
runs-on: ubuntu-latest
300-
permissions:
301-
contents: write
302-
steps:
303-
- name: Check out
304-
uses: actions/checkout@v4
305-
- name: Install mingw32 cross toolchains
306-
run: |
307-
MINGW_LLVM_URL="https://github.com/mstorsjo/llvm-mingw/releases/download/20231128/llvm-mingw-20231128-msvcrt-ubuntu-20.04-x86_64.tar.xz"
308-
mkdir -p $HOME/mingw-llvm
309-
wget $MINGW_LLVM_URL -O $HOME/mingw-llvm/llvm.tar.xz
310-
cd $HOME/mingw-llvm
311-
tar -xvf llvm.tar.xz --strip-components 1
312-
- name: Generate version
313-
id: parse_version
314-
run: |
315-
MAJOR=$(grep '#define MAJOR' version | awk '{print $3}')
316-
MINOR=$(grep '#define MINOR' version | awk '{print $3}')
317-
PATCH=$(grep '#define PATCH' version | awk '{print $3}')
318-
VERSION="$MAJOR.$MINOR.$PATCH"
319-
echo "Generated Version: $VERSION"
320-
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
321-
- name: Build kptools
322-
run: |
323-
export PATH="$HOME/mingw-llvm/bin:$PATH"
324-
export ANDROID=1
325-
ABIS="x86_64 i686 aarch64 armv7"
326-
for i in $ABIS; do
327-
make -C kernel hdr TARGET_COMPILE=placeholder
328-
echo "- Compiling kptools-$i-win.exe"
329-
make -C tools CC=$i-w64-mingw32-clang
330-
mv tools/kptools.exe kptools-$i-win.exe
331-
make -C tools clean
332-
done
333-
7za a kptools-llvm-win.zip -tZIP *.exe
334-
- name: Release
335-
uses: ncipollo/[email protected]
336-
with:
337-
token: ${{ secrets.GITHUB_TOKEN }}
338-
tag: ${{ steps.parse_version.outputs.VERSION }}
339-
artifacts: |
340-
kptools-llvm-win.zip
341-
allowUpdates: true
342-
replacesArtifacts: true
343-
omitBodyDuringUpdate: true
344-
345288
Build-kptools-mac:
346289
runs-on: macos-latest
347290
permissions:
348291
contents: write
349292
steps:
350293
- name: Check out
351-
uses: actions/checkout@v4
294+
uses: actions/checkout@v3
352295
- name: Generate version
353296
id: parse_version
354297
run: |
@@ -374,7 +317,7 @@ jobs:
374317
make
375318
mv kptools kptools-mac
376319
- name: Release
377-
uses: ncipollo/release-action@v1.14.0
320+
uses: ncipollo/release-action@v1.12.0
378321
with:
379322
token: ${{ secrets.GITHUB_TOKEN }}
380323
tag: ${{ steps.parse_version.outputs.VERSION }}

0 commit comments

Comments
 (0)