Supported commands: ls, cd ${PATH}

Linux Kernel Dev Env Configuration For BPF

Oct. 3, 2024

Prerequisite

Linux Kernel Dev Env Configuration

Linux Kernel Dev Env Configuration For BPF

# Ref. https://docs.cilium.io/en/latest/bpf/toolchain/#development-tools

sudo apt-get install -y make gcc libssl-dev bc libelf-dev libcap-dev \
  clang gcc-multilib llvm libncurses5-dev git pkg-config libmnl-dev bison flex \
  graphviz

# CONFIG_CGROUP_BPF=y
# CONFIG_BPF=y
# CONFIG_BPF_SYSCALL=y
# CONFIG_NET_SCH_INGRESS=m
# CONFIG_NET_CLS_BPF=m
# CONFIG_NET_CLS_ACT=y
# CONFIG_BPF_JIT=y
# CONFIG_LWTUNNEL_BPF=y
# CONFIG_HAVE_EBPF_JIT=y
# CONFIG_BPF_EVENTS=y
# CONFIG_TEST_BPF=m
sudo apt-get install dwarves

# CONFIG_DEBUG_INFO_BTF=y

sudo apt-get install lld g++ python3-docutils

Fun Facts

ELF

In computing, the Executable and Linkable Format[2] (ELF, formerly named Extensible Linking Format) is a common standard file format for executable files, object code, shared libraries, and core dumps.

DWARF

DWARF is a widely used, standardized debugging data format. DWARF was originally designed along with Executable and Linkable Format (ELF), although it is independent of object file formats.[1] The name is a medieval fantasy complement to “ELF” that had no official meaning, although the name “Debugging With Arbitrary Record Formats” has since been proposed as a backronym.[1]

Result

https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=0cbfd45fbcf0