[Buildroot] [PATCHv6 3/5] package/libbpf: new package
Arnout Vandecappelle
arnout at mind.be
Thu May 20 20:47:44 UTC 2021
On 20/12/2020 16:12, Romain Naour wrote:
> 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.
>
> Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem at smile.fr>
> Signed-off-by: Romain Naour <romain.naour at gmail.com>
> Cc: Qais Yousef <qais.yousef at arm.com>
> ---
> I'm not sure if updating the bpf.h provided by the toolchain linux-headers
> is the right things to do.
>
> v6: Update DEVELOPERS file
> ---
> DEVELOPERS | 1 +
> package/Config.in | 1 +
> package/libbpf/Config.in | 20 ++++++++++++++++++++
> package/libbpf/libbpf.mk | 40 ++++++++++++++++++++++++++++++++++++++++
hash file is missing.
> 4 files changed, 62 insertions(+)
> create mode 100644 package/libbpf/Config.in
> create mode 100644 package/libbpf/libbpf.mk
>
[snip]
> +# bpf/bpf.h installed by libbpf use enm bpf_iter_link_info that was added since
I don't know what you meant with "enm", so I just removed it.
Applied to next with those two fixes, thanks.
Regards,
Arnout
> +# 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))
>
More information about the buildroot
mailing list