标签:头文件 工具 下载源码 file source x86 boot targe git
1 一. 安装cmake
cmake是一种跨平台的编译工具,安装过程如下:
2 二. 安装llvm7.0
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr/local -DLLVM_TARGETS_TO_BUILD="BPF;AArch64" -DCMAKE_BUILD_TYPE=Release ../llvm-7.0.0.src/
3 三. 安装其他库
4 四. 安装bcc-tools
编译挺快的。
安装完成时候就可以到 /usr/share/bcc/tools 目下体验bbc-tools的强大了。
参考:https://blog.csdn.net/didi8206050/article/details/72621499
Llvm和clang(cfe)下载:http://releases.llvm.org/
还有/lib/modules/`uname -r`/build,没有该目录需要安装(那只是因为系统缺少内核头文件),或者/usr/src/下有对应版本,建立软连接。
root@ubuntu31:~# ls -l /lib/modules/4.16.2-rc1/
total 5156
lrwxrwxrwx 1 root root 49 Oct 24 16:21 build -> /home/kernel/linux-4.16.2-devm.1.2.aarch64.dongbo
bcc-tools的功能参见:https://github.com/iovisor/bcc
https://zhuanlan.zhihu.com/p/32027979
标签:头文件 工具 下载源码 file source x86 boot targe git
原文地址:https://www.cnblogs.com/shihuvini/p/10011052.html