A-Tune-BPF-Collection/README-add-source-code-compilation-description.patch
lvying6 0d37bc9e68 some enhancement for adding testcase and updating README
Signed-off-by: lvying6 <lvying6@huawei.com>
2022-10-17 20:13:05 +08:00

37 lines
1.3 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From 68a48eb30434b822a4827d2b533db6be362d494d Mon Sep 17 00:00:00 2001
From: lvying6 <lvying6@huawei.com>
Date: Thu, 13 Oct 2022 15:55:11 +0800
Subject: [PATCH] README: add source code compilation description
Signed-off-by: lvying6 <lvying6@huawei.com>
---
README.md | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/README.md b/README.md
index 0941b3d..1750627 100644
--- a/README.md
+++ b/README.md
@@ -34,6 +34,18 @@ or
2. 通过`start_readahead_tune`命令启动/加载`readahead_tune.bpf` BPF Program。命令使用方法可以使用`start_readahead_tune -h|--help`帮助命令。
3. 通过`stop_readahead_tune`命令停止/卸载`readahead_tune.bpf` BPF Program。
+#### 源码编译
+1. 安装编译依赖:
+```bash
+sudo dnf install make clang llvm libbpf-devel dwarves kernel-debuginfo bpftool -y
+```
+2. 编译:
+```bash
+make
+```
+
+编译过程中可能遇到`kenrl-debuginfo`rpm包提供vmlinux路径与`uname -r`不一致的情况导致编译失败。这是由于当前运行的内核版本与`kernel-debuginfo`的版本不一致。openEuler yum源的kernel版本较高可以执行`dnf update kernel`升级当前kernel到yum源的kernel版本重启系统kernel版本便与`kernel-debuginfo`版本一致,再重新编译。
+
#### 参与贡献
1. Fork 本仓库
--
2.33.0