gala-gopher/modify-to-adapt-to-oe2203-LTS-SP1-x86.patch
wo_cow 2ed87b8aa9 resolve patch conflict
(cherry picked from commit 5ecce6ef2d3c0295259d6a1d4fde9fe46fabeeb9)
2022-11-19 15:48:31 +08:00

66 lines
2.8 KiB
Diff

From 5c1507c880fb8c80bfe6e1809cc03195e9fd9c7f Mon Sep 17 00:00:00 2001
From: zhaoyuxing <zhaoyuxing2@huawei.com>
Date: Wed, 10 Aug 2022 17:12:16 +0800
Subject: [PATCH] modify vmlinux.h and version infos of oe-22.03 LTS SP1 x86
---
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..00f9bd8 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.x86_64.h vmlinux.h
+ echo "debug: openEuler 22.03 LTS SP1 match 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 2522a6f..16a14d0 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
LIBBPF_VER = $(shell rpm -qa | grep libbpf-devel | awk -F'-' '{print $$3}')
LIBBPF_VER_MAJOR = $(shell echo $(LIBBPF_VER) | awk -F'.' '{print $$1}')
--
2.27.0