146498d13c
bcc is a front-end tool for eBPF: https://github.com/iovisor/bcc/blob/master/README.md eBPF is the most powerful Linux tracer, and bcc allows writing eBPF scripts in C and PYTHON3. bcc can help to troubleshoot issues quickly on embedded systems (as long as Linux kernel version >= 4.1). bcc can also make it easy to create observabilty tools, SDN configuration, ddos mitigation, intrusion detection and secure containers. More information is available at: https://ebpf.io/ BCC can be tested on the target : $ mount -t debugfs none /sys/kernel/debug $ cd /usr/share/bcc/tools $ ./execsnoop Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr> Signed-off-by: Romain Naour <romain.naour@gmail.com> Tested-by: Qais Yousef <qais.yousef@arm.com> Reviewed-by: Qais Yousef <qais.yousef@arm.com> Cc: Qais Yousef <qyousef@layalina.io> Signed-off-by: Mat Martineau <martineau@kernel.org> [Arnout: order dependencies alphabetically, fix Config.in comment] Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
53 lines
1.6 KiB
Makefile
53 lines
1.6 KiB
Makefile
################################################################################
|
|
#
|
|
# bcc
|
|
#
|
|
################################################################################
|
|
|
|
BCC_VERSION = 0.29.1
|
|
BCC_SITE = https://github.com/iovisor/bcc/releases/download/v$(BCC_VERSION)
|
|
BCC_SOURCE = bcc-src-with-submodule.tar.gz
|
|
BCC_LICENSE = Apache-2.0
|
|
BCC_LICENSE_FILES = LICENSE.txt
|
|
BCC_INSTALL_STAGING = YES
|
|
BCC_DEPENDENCIES = \
|
|
clang \
|
|
elfutils \
|
|
flex \
|
|
host-bison \
|
|
host-flex \
|
|
host-python-setuptools \
|
|
host-zip \
|
|
llvm \
|
|
python3
|
|
|
|
# ENABLE_LLVM_SHARED=ON to use llvm.so - we only support shared libs
|
|
# Force REVISION otherwise bcc will use git describe to generate a version number.
|
|
BCC_CONF_OPTS = \
|
|
-DENABLE_LLVM_SHARED:BOOL=ON \
|
|
-DREVISION:STRING=$(BCC_VERSION) \
|
|
-DENABLE_CLANG_JIT:BOOL=ON \
|
|
-DENABLE_MAN:BOOL=OFF \
|
|
-DENABLE_EXAMPLES:BOOL=OFF \
|
|
-DPY_SKIP_DEB_LAYOUT:BOOL=ON
|
|
|
|
define BCC_LINUX_CONFIG_FIXUPS
|
|
# Enable kernel support for eBPF
|
|
$(call KCONFIG_ENABLE_OPT,CONFIG_BPF)
|
|
$(call KCONFIG_ENABLE_OPT,CONFIG_BPF_SYSCALL)
|
|
$(call KCONFIG_ENABLE_OPT,CONFIG_NET_CLS_BPF)
|
|
$(call KCONFIG_ENABLE_OPT,CONFIG_NET_ACT_BPF)
|
|
$(call KCONFIG_ENABLE_OPT,CONFIG_BPF_JIT)
|
|
# [for Linux kernel versions 4.1 through 4.6]
|
|
$(call KCONFIG_ENABLE_OPT,CONFIG_HAVE_BPF_JIT)
|
|
# [for Linux kernel versions 4.7 and later]
|
|
$(call KCONFIG_ENABLE_OPT,CONFIG_HAVE_EBPF_JIT)
|
|
$(call KCONFIG_ENABLE_OPT,CONFIG_BPF_EVENTS)
|
|
# [for Linux kernel versions 5.2 and later]
|
|
$(call KCONFIG_ENABLE_OPT,CONFIG_IKHEADERS)
|
|
# bcc needs debugfs at runtime
|
|
$(call KCONFIG_ENABLE_OPT,CONFIG_DEBUG_FS)
|
|
endef
|
|
|
|
$(eval $(cmake-package))
|