From 82974fc559451d52897053314ffa66e2c9ed7cd6 Mon Sep 17 00:00:00 2001 From: zhaoyuxing Date: Wed, 10 Aug 2022 17:12:16 +0800 Subject: [PATCH] modify vmlinux.h and version infos of oe-22.03 LTS SP1 arm --- src/probes/extends/ebpf.probe/build.sh | 20 +++---------------- src/probes/extends/ebpf.probe/src/mk/var.mk | 10 ++++------ 2 files changed, 7 insertions(+), 23 deletions(-) diff --git a/src/probes/extends/ebpf.probe/build.sh b/src/probes/extends/ebpf.probe/build.sh index ab4aa3e..6a33a1b 100755 --- a/src/probes/extends/ebpf.probe/build.sh +++ b/src/probes/extends/ebpf.probe/build.sh @@ -82,23 +82,9 @@ function compile_probe() MATCH_VMLINUX=linux_${LINUX_VER}.h cd ${VMLINUX_DIR} - if [ -f ${MATCH_VMLINUX} ];then - rm -f vmlinux.h - ln -s ${MATCH_VMLINUX} vmlinux.h - echo "debug: match vmlinux :" ${MATCH_VMLINUX} - elif [ -f "vmlinux.h" ];then - echo "debug: vmlinux.h is already here, continue compile." - else - echo "======================================ERROR===============================================" - echo "there no match vmlinux :" ${MATCH_VMLINUX} - echo "please create vmlinux.h manually." - echo "methods:" - echo " 1. generate linux_xxx.h by compile the kernel, refer to gen_vmlinux_h.sh;" - echo " 2. ln -s vmlinux.h linux_xxx.h, (there are some include files in directory src/include)" - echo " if your kernel version is similar to the include files provided, you can use method 2" - echo "==========================================================================================" - exit - fi + rm -rf vmlinux.h + ln -s linux_5.10.0-126.0.0.66.oe2203.aarch64.h vmlinux.h + echo "debug: openEuler 22.03 LTS SP1 vmlinux :" ${MATCH_VMLINUX} cd ${SRC_DIR} echo "=======Begin to compile ebpf-based probes======:" ${EBPF_PROBES} diff --git a/src/probes/extends/ebpf.probe/src/mk/var.mk b/src/probes/extends/ebpf.probe/src/mk/var.mk index 1a1e8db..d61b124 100644 --- a/src/probes/extends/ebpf.probe/src/mk/var.mk +++ b/src/probes/extends/ebpf.probe/src/mk/var.mk @@ -23,12 +23,10 @@ else ifeq ($(ARCH), aarch64) ARCH = arm64 endif -KER_VER = $(shell uname -r | awk -F'-' '{print $$1}') -KER_VER_MAJOR = $(shell echo $(KER_VER) | awk -F'.' '{print $$1}') -KER_VER_MINOR = $(shell echo $(KER_VER) | awk -F'.' '{print $$2}') -KER_VER_PATCH = $(shell echo $(KER_VER) | awk -F'.' '{print $$3}') -RELEASE_INFOS = $(shell uname -r | awk -F'-' '{print $$2}') -KER_RELEASE = $(shell echo $(RELEASE_INFOS) | awk -F'.' '{print $$1}') +KER_VER_MAJOR = 5 +KER_VER_MINOR = 10 +KER_VER_PATCH = 0 +KER_RELEASE = 126 LINK_TARGET ?= -lpthread -lbpf -lelf -llog4cplus -lz -lconfig EXTRA_CFLAGS ?= -g -O2 -Wall -fPIC -- 2.36.1