Skip to content

Commit

Permalink
KSU-wide: add armeabi-v7a
Browse files Browse the repository at this point in the history
Signed-off-by: rsuntk <rsuntkorgs@proton.me>
  • Loading branch information
rsuntk committed Nov 9, 2024
1 parent fcbc05a commit a1940b1
Show file tree
Hide file tree
Showing 29 changed files with 5,572 additions and 4 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/build-manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
include:
- target: aarch64-linux-android
os: ubuntu-latest
- target: armv7-linux-androideabi
os: ubuntu-latest
- target: x86_64-linux-android
os: ubuntu-latest
- target: x86_64-pc-windows-gnu # windows pc
Expand Down Expand Up @@ -91,6 +93,12 @@ jobs:
with:
name: ksud-aarch64-linux-android
path: .

- name: Download arm32 ksud
uses: actions/download-artifact@v4
with:
name: ksud-armv7-linux-androideabi
path: .

- name: Download x86_64 ksud
uses: actions/download-artifact@v4
Expand All @@ -101,8 +109,10 @@ jobs:
- name: Copy ksud to app jniLibs
run: |
mkdir -p app/src/main/jniLibs/arm64-v8a
mkdir -p app/src/main/jniLibs/armeabi-v7a
mkdir -p app/src/main/jniLibs/x86_64
cp -f ../aarch64-linux-android/release/ksud ../manager/app/src/main/jniLibs/arm64-v8a/libksud.so
cp -f ../armv7-linux-androideabi/release/ksud ../manager/app/src/main/jniLibs/armeabi-v7a/libksud.so
cp -f ../x86_64-linux-android/release/ksud ../manager/app/src/main/jniLibs/x86_64/libksud.so
- name: Build with Gradle
Expand Down Expand Up @@ -135,7 +145,6 @@ jobs:
env:
CHAT_ID: ${{ secrets.CHAT_ID }}
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
MESSAGE_THREAD_ID: ${{ secrets.MESSAGE_THREAD_ID }}
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
COMMIT_URL: ${{ github.event.head_commit.url }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/ksud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,23 @@ jobs:
cargo install cross --git https://github.com/cross-rs/cross --rev 66845c1
- name: Build ksud
run: CROSS_NO_WARNINGS=0 cross build --target ${{ inputs.target }} --release --manifest-path ./userspace/ksud/Cargo.toml
run: |
if [[ "${{ inputs.target }}" = "armv7-linux-androideabi" ]]; then
CROSS_NO_WARNINGS=0 cross build --target ${{ inputs.target }} --release --manifest-path ./userspace/ksud32/Cargo.toml
else
CROSS_NO_WARNINGS=0 cross build --target ${{ inputs.target }} --release --manifest-path ./userspace/ksud/Cargo.toml
fi
- name: Upload ksud artifact
if: inputs.target != "armv7-linux-androideabi"
uses: actions/upload-artifact@v4
with:
name: ksud-${{ inputs.target }}
path: userspace/ksud/target/**/release/ksud*

- name: Upload ksud32 artifact
if: inputs.target == "armv7-linux-androideabi"
uses: actions/upload-artifact@v4
with:
name: ksud-${{ inputs.target }}
path: userspace/ksud32/target/**/release/ksud*
4 changes: 4 additions & 0 deletions kernel/arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
#define SYS_EXECVE_SYMBOL "sys_execve"
#endif

#elif defined(__arm__)
#ifdef CONFIG_KPROBES
#error "KPROBE is not supported in this arch!"
#endif
#elif defined(__x86_64__)

#define __PT_PARM1_REG di
Expand Down
2 changes: 1 addition & 1 deletion manager/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ cmaker {
"-DANDROID_STL=none",
)
)
abiFilters("arm64-v8a", "x86_64", "riscv64")
abiFilters("arm64-v8a", "x86_64", "armeabi-v7a", "riscv64")
}
buildTypes {
if (it.name == "release") {
Expand Down
2 changes: 2 additions & 0 deletions userspace/ksud32/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/target
.cargo/
Loading

0 comments on commit a1940b1

Please sign in to comment.