initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
config BR2_PACKAGE_LIBBPF_ARCH_SUPPORTS
|
||||
bool
|
||||
# see src/bpf.c
|
||||
default y if BR2_arc
|
||||
default y if BR2_aarch64 || BR2_aarch64_be
|
||||
default y if BR2_i386 || BR2_x86_64
|
||||
default y if BR2_sparc || BR2_sparc64
|
||||
default y if BR2_s390x
|
||||
|
||||
config BR2_PACKAGE_LIBBPF
|
||||
bool "libbpf"
|
||||
depends on BR2_PACKAGE_LIBBPF_ARCH_SUPPORTS
|
||||
depends on BR2_USE_WCHAR # elfutils
|
||||
depends on !BR2_STATIC_LIBS # elfutils
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # elfutils
|
||||
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
|
||||
depends on BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC # elfutils
|
||||
select BR2_PACKAGE_ELFUTILS
|
||||
select BR2_PACKAGE_ZLIB
|
||||
help
|
||||
libbpf library.
|
||||
A mirror of bpf-next linux tree bpf-next/tools/lib/bpf
|
||||
directory plus its supporting header files. The version
|
||||
of the package reflects the version of ABI.
|
||||
|
||||
https://github.com/libbpf/libbpf
|
||||
|
||||
comment "libbpf needs a uClibc or glibc toolchain w/ wchar, dynamic library, threads, headers >= 4.13"
|
||||
depends on BR2_PACKAGE_LIBBPF_ARCH_SUPPORTS
|
||||
depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS \
|
||||
|| !BR2_TOOLCHAIN_HAS_THREADS \
|
||||
|| !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13 \
|
||||
|| !(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC)
|
||||
@@ -0,0 +1,5 @@
|
||||
# Locally calculated
|
||||
sha256 21cbee4df093e7fd29e76ed429650d3f3abe3a893f35e346ab9bc3484f6e68c0 libbpf-0.4.0.tar.gz
|
||||
sha256 847f4addbd56e2d5be20c4ea0845e972672fc07b755fadaae5f7abd35d71e349 LICENSE
|
||||
sha256 6313108c23efffa36948f8b2cff1560a5935373b527b0e1a837cc77e6ed1bacd LICENSE.BSD-2-Clause
|
||||
sha256 0b9a4febcdee6de55872501d5c1a8f5d8b0d1650cd4d5351995ceb22e889f8ca LICENSE.LGPL-2.1
|
||||
@@ -0,0 +1,40 @@
|
||||
################################################################################
|
||||
#
|
||||
# libbpf
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LIBBPF_VERSION = 0.4.0
|
||||
LIBBPF_SITE = $(call github,libbpf,libbpf,v$(LIBBPF_VERSION))
|
||||
LIBBPF_LICENSE = GPL-2.0, LGPL-2.1, BSD-2-Clause
|
||||
LIBBPF_LICENSE_FILES = LICENSE LICENSE.BSD-2-Clause LICENSE.LGPL-2.1
|
||||
LIBBPF_DEPENDENCIES = host-bison host-flex host-pkgconf elfutils zlib
|
||||
LIBBPF_INSTALL_STAGING = YES
|
||||
|
||||
define LIBBPF_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) \
|
||||
-C $(@D)/src
|
||||
endef
|
||||
|
||||
# bpf/bpf.h installed by libbpf uses bpf_iter_link_info that was added since
|
||||
# kernel 5.9, so we need to update some uapi headers in STAGING_DIR if the
|
||||
# toolchain is build with linux-headers < 5.9.
|
||||
# Otherwise bpf/bpf.h is broken due to out of date linux/bpf.h installed by the
|
||||
# toolchain.
|
||||
# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a5cbe05a6673b85bed2a63ffcfea6a96c6410cff
|
||||
ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_9),)
|
||||
LIBBPF_UPDATE_UAPI_HEADERS = install_uapi_headers
|
||||
endif
|
||||
|
||||
define LIBBPF_INSTALL_STAGING_CMDS
|
||||
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) \
|
||||
-C $(@D)/src install $(LIBBPF_UPDATE_UAPI_HEADERS) \
|
||||
DESTDIR=$(STAGING_DIR)
|
||||
endef
|
||||
|
||||
define LIBBPF_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) \
|
||||
-C $(@D)/src install DESTDIR=$(TARGET_DIR)
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
Reference in New Issue
Block a user