aboutsummaryrefslogtreecommitdiffstats
path: root/systems
diff options
context:
space:
mode:
Diffstat (limited to 'systems')
-rw-r--r--systems/README.md29
-rwxr-xr-xsystems/debian/build_base_machine.sh6
-rw-r--r--systems/fedora/33/build_base_machine.sh4
-rwxr-xr-xsystems/fedora/36/build_base_machine.sh3
-rwxr-xr-xsystems/ubuntu/build_base_machine.sh6
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