mirror of
https://github.com/evilsocket/opensnitch.git
synced 2025-03-04 00:24:40 +01:00
utils: updated modules compilation script
Apply a different patch depending on the arquitecture.
This commit is contained in:
parent
ea8b209dd5
commit
7f81e010a3
1 changed files with 7 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# opensnitch - 2022
|
||||
# opensnitch - 2022-2023
|
||||
#
|
||||
echo """
|
||||
|
||||
|
@ -32,7 +32,12 @@ echo -n "[+] Uncompressing kernel sources: "
|
|||
tar -xf v${kernel_version}.tar.gz && echo "OK" || echo "ERROR"
|
||||
|
||||
echo "[+] Patching kernel sources"
|
||||
patch linux-${kernel_version}/tools/lib/bpf/bpf_helpers.h < ebpf_prog/file.patch
|
||||
if [ "${ARCH}" == "arm" -o "${ARCH}" == "arm64" ]; then
|
||||
patch linux-${kernel_version}/arch/arm/include/asm/unified.h < ebpf_prog/arm-clang-asm-fix.patch
|
||||
else
|
||||
patch linux-${kernel_version}/tools/lib/bpf/bpf_helpers.h < ebpf_prog/file.patch
|
||||
fi
|
||||
|
||||
cp ebpf_prog/opensnitch*.c ebpf_prog/common.h ebpf_prog/common_defs.h ebpf_prog/Makefile linux-${kernel_version}/samples/bpf
|
||||
|
||||
echo -n "[+] Preparing kernel sources... (1-2 minutes): "
|
||||
|
|
Loading…
Add table
Reference in a new issue