diff options
author | 2022-12-16 17:24:48 +0530 | |
---|---|---|
committer | 2022-12-19 21:14:08 +0530 | |
commit | 3409364da8fa46eae8ca22a579e219dc74958079 (patch) | |
tree | 83cb1cc72c3c59465d7d3be0f793a896c0ad7a21 /systems | |
parent | 34147ac299351c44d4f7d135892457fba38a132b (diff) |
ebpf: This patch adds ebpf-baremetal test support
Remove object files and binaries
Suggestions in systems/Readme.
Add license headers.
Signed-off-by: Sridhar K. N. Rao <srao@linuxfoundation.org>
Change-Id: I5fd481e3ed3eb51e6b8091cbf6d1ec8e3b00cbf0
Diffstat (limited to 'systems')
-rw-r--r-- | systems/README.md | 29 | ||||
-rwxr-xr-x | systems/debian/build_base_machine.sh | 6 | ||||
-rw-r--r-- | systems/fedora/33/build_base_machine.sh | 4 | ||||
-rwxr-xr-x | systems/fedora/36/build_base_machine.sh | 3 | ||||
-rwxr-xr-x | systems/ubuntu/build_base_machine.sh | 6 |
5 files changed, 47 insertions, 1 deletions
diff --git a/systems/README.md b/systems/README.md index d0812a81..c4148e41 100644 --- a/systems/README.md +++ b/systems/README.md @@ -39,4 +39,31 @@ May need following changes: DPDK_LIB = $(DPDK_DIR)/build/lib64 ``` - +eBPF +---- + +Adding eBPF support may require additional installations. The installation +script already includes tools like llvm, clang, libbpf-dev, etc. +For some programs, you may have to build kernel by downloading the source. +In the folder where you have kernel source, run: +``` +make oldconfig && make prepare && make headers_install && make +``` +While building any program, if you encounter an error with bpf.h in +include/linux/ folder, get the latest of bcc from iovisor project, +using following commands + +``` +apt purge bpfcc-tools libbpfcc python3-bpfcc +wget https://github.com/iovisor/bcc/releases/download/v0.25.0/bcc-src-with-submodule.tar.gz +tar xf bcc-src-with-submodule.tar.gz +cd bcc/ +apt install -y python-is-python3 +apt install -y bison build-essential cmake flex git libedit-dev libllvm11 llvm-11-dev libclang-11-dev zlib1g-dev libelf-dev libfl-dev python3-distutils +apt install -y checkinstall +mkdir build +cd build/ +cmake -DCMAKE_INSTALL_PREFIX=/usr -DPYTHON_CMD=python3 .. +make +checkinstall +``` diff --git a/systems/debian/build_base_machine.sh b/systems/debian/build_base_machine.sh index e41837a2..0c078140 100755 --- a/systems/debian/build_base_machine.sh +++ b/systems/debian/build_base_machine.sh @@ -30,6 +30,8 @@ apt-get -y install python3-venv apt-get -y install python3-pyelftools apt-get -y install meson apt-get -y install ninja-build +apt-get -y install clang +apt-get -y install llvm # Make and Compilers apt-get -y install make @@ -40,3 +42,7 @@ apt-get -y install libssl1.1 apt-get -y install libxml2 apt-get -y install zlib1g-dev apt-get -y install scapy +apt-get -y install libbpf-dev +apt-get -y install libelf-dev +apt-get -y install linux-tools-$(uname -r) +apt-get -y install linux-cloud-tools-$(uname -r) diff --git a/systems/fedora/33/build_base_machine.sh b/systems/fedora/33/build_base_machine.sh index f3a27644..a6a973ce 100644 --- a/systems/fedora/33/build_base_machine.sh +++ b/systems/fedora/33/build_base_machine.sh @@ -51,6 +51,10 @@ cifs-utils socat sysstat sshpass +llvm +clang +libbpf-devel + # install python packages python3-virtualenv diff --git a/systems/fedora/36/build_base_machine.sh b/systems/fedora/36/build_base_machine.sh index f3a27644..a9a7f63b 100755 --- a/systems/fedora/36/build_base_machine.sh +++ b/systems/fedora/36/build_base_machine.sh @@ -51,6 +51,9 @@ cifs-utils socat sysstat sshpass +llvm +clang +libbpf-devel # install python packages python3-virtualenv diff --git a/systems/ubuntu/build_base_machine.sh b/systems/ubuntu/build_base_machine.sh index 910cd173..c66fae43 100755 --- a/systems/ubuntu/build_base_machine.sh +++ b/systems/ubuntu/build_base_machine.sh @@ -34,6 +34,8 @@ apt-get -y install scapy apt-get -y install meson apt-get -y install ninja-build apt-get -y install python3-pyelftools +apt-get -y install clang +apt-get -y install llvm # Linux Kernel Source apt-get -y install linux-source @@ -50,6 +52,10 @@ apt-get -y install libfuse-dev apt-get -y install libnuma1 apt-get -y install libnuma-dev apt-get -y install sshpass +apt-get -y install libelf-dev +apt-get -y install libbpf-dev +apt-get -y install linux-tools-$(uname -r) +apt-get -y install linux-cloud-tools-$(uname -r) # Some useful tools you may optionally install #apt-get -y install ctags |