Initial Commit
- initial default booting image
This commit is contained in:
22
package/libbpf/Config.in
Normal file
22
package/libbpf/Config.in
Normal file
@@ -0,0 +1,22 @@
|
||||
config BR2_PACKAGE_LIBBPF
|
||||
bool "libbpf"
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4
|
||||
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
|
||||
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 toolchain w/ wchar, dynamic library, threads, headers >= 4.13"
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4
|
||||
depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS \
|
||||
|| !BR2_TOOLCHAIN_HAS_THREADS \
|
||||
|| !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
|
||||
5
package/libbpf/libbpf.hash
Normal file
5
package/libbpf/libbpf.hash
Normal file
@@ -0,0 +1,5 @@
|
||||
# Locally calculated
|
||||
sha256 16f31349c70764cba8e0fad3725cc9f52f6cf952554326aa0229daaa21ef4fbd libbpf-1.6.2.tar.gz
|
||||
sha256 847f4addbd56e2d5be20c4ea0845e972672fc07b755fadaae5f7abd35d71e349 LICENSE
|
||||
sha256 e1638b9a0c68ca90fad3df1d6b4e430804d2fbdc15e58d02cffddfae38953bbf LICENSE.BSD-2-Clause
|
||||
sha256 0b9a4febcdee6de55872501d5c1a8f5d8b0d1650cd4d5351995ceb22e889f8ca LICENSE.LGPL-2.1
|
||||
52
package/libbpf/libbpf.mk
Normal file
52
package/libbpf/libbpf.mk
Normal file
@@ -0,0 +1,52 @@
|
||||
################################################################################
|
||||
#
|
||||
# libbpf
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LIBBPF_VERSION = 1.6.2
|
||||
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_CPE_ID_VALID = YES
|
||||
LIBBPF_DEPENDENCIES = host-bison host-flex host-pkgconf elfutils zlib
|
||||
HOST_LIBBPF_DEPENDENCIES = host-bison host-flex host-pkgconf host-elfutils host-zlib
|
||||
LIBBPF_INSTALL_STAGING = YES
|
||||
|
||||
define LIBBPF_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) \
|
||||
-C $(@D)/src
|
||||
endef
|
||||
|
||||
# bpftrace uses BPF_TRACE_KPROBE_SESSION that was added since kernel 6.10
|
||||
# so we need to update some uapi headers in STAGING_DIR if the toolchain
|
||||
# is build with linux-headers < 6.1.0
|
||||
# Otherwise bpftrace is broken due to out of date linux/bpf.h installed
|
||||
# by the toolchain.
|
||||
ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_6_10),)
|
||||
LIBBPF_UPDATE_UAPI_HEADERS = install_uapi_headers UAPIDIR=/usr/include/bpf
|
||||
|
||||
define LIBBPF_FIX_STAGING_PC
|
||||
$(SED) 's/-I$${includedir}/-I$${includedir}\/bpf -I$${includedir}/' $(STAGING_DIR)/usr/lib/pkgconfig/libbpf.pc
|
||||
endef
|
||||
LIBBPF_POST_INSTALL_STAGING_HOOKS += LIBBPF_FIX_STAGING_PC
|
||||
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
|
||||
|
||||
define HOST_LIBBPF_INSTALL_CMDS
|
||||
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
|
||||
-C $(@D)/src install install_uapi_headers DESTDIR=$(HOST_DIR)
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
$(eval $(host-generic-package))
|
||||
Reference in New Issue
Block a user