diff --git a/source/tools/combine/btf/BTF/7za b/source/tools/combine/btf/BTF/7za new file mode 100755 index 0000000000000000000000000000000000000000..e3a36ae68d1f61bdb6b8f2ec165be94926d955f5 Binary files /dev/null and b/source/tools/combine/btf/BTF/7za differ diff --git a/source/tools/combine/btf/BTF/btf.7z b/source/tools/combine/btf/BTF/btf.7z new file mode 100644 index 0000000000000000000000000000000000000000..240a4de6039ffa6131baa018081d7e1af8d0a0d0 Binary files /dev/null and b/source/tools/combine/btf/BTF/btf.7z differ diff --git a/source/tools/combine/btf/Makefile b/source/tools/combine/btf/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..26b6e2fe6c8fe464083ee5fe02efc4a066eed653 --- /dev/null +++ b/source/tools/combine/btf/Makefile @@ -0,0 +1,4 @@ +target := btf +$(target): + cp btf.sh $(OBJPATH)/.sysak_compoents/tools/btf + cp BTF $(OBJPATH)/.sysak_compoents/tools -rf \ No newline at end of file diff --git a/source/tools/combine/btf/btf.sh b/source/tools/combine/btf/btf.sh new file mode 100644 index 0000000000000000000000000000000000000000..8b8a0b960f6aeea9fc8d08043f515059d37922a6 --- /dev/null +++ b/source/tools/combine/btf/btf.sh @@ -0,0 +1,39 @@ +#!/bin/bash +# author: Shuyi Cheng +# email: chengshuyi@linux.alibaba.com + +TOOLS_ROOT=$(dirname "$0") +zip_path=${TOOLS_ROOT}/BTF/btf.7z +btf_dir=${TOOLS_ROOT}/BTF +btf_path=${btf_dir}/vmlinux-$(uname -r) + +usage() { + echo "sysak btf: Extract the btf file to the specified directory" + echo "options: -h, help information" + echo " -d, Specify the path, default directory path: ${btf_dir}" +} + +extract_btf() { + ${TOOLS_ROOT}/BTF/7za e ${zip_path} -o${btf_dir} vmlinux-btf/vmlinux-$(uname -r) +} + +while getopts 'd:h' OPT; do + case $OPT in + "h") + usage + exit 0 + ;; + "d") + btf_dir=$OPTARG + btf_path=${btf_dir}/vmlinux-$(uname -r) + ;; + *) + usage + exit -1 + ;; + esac +done + +if [ ! -f "$btf_path" ]; then + extract_btf +fi diff --git a/source/tools/detect/net_diag/PingTrace/Makefile b/source/tools/detect/net_diag/PingTrace/Makefile index 1b20dbaaf8821addd57de3ce64981744ef5a31c4..7068d9e4eb19c9fd47bc8bf8ec61cb83a4413c6e 100644 --- a/source/tools/detect/net_diag/PingTrace/Makefile +++ b/source/tools/detect/net_diag/PingTrace/Makefile @@ -1,5 +1,5 @@ LDFLAGS += -l:liblog4cpp.a -lncurses -lz -pthread -ltinfo -ldl -CFLAGS += -std=c++11 +CFLAGS += -std=c++11 -static INCLUDES += -Isrc/ -Isrc/bpf -I$(SRC)/lib/internal/ebpf/libbpf/src newdirs := $(shell find src/ -type d)