From 5c104b7f0bb670274408353c9f35fe2153d6822d Mon Sep 17 00:00:00 2001 From: Maxime Leroy Date: Mon, 22 Dec 2025 22:56:31 +0100 Subject: [PATCH] package/dpdk: make libraries selectable Add BR2_PACKAGE_DPDK_LIBS_LIST to control which DPDK libraries are built: - empty : use DPDK defaults - none : disable all libs (-Ddisable_libs='*') - list : pass to -Denable_libs= (comma-separated) Signed-off-by: Maxime Leroy Signed-off-by: Julien Olivain --- package/dpdk/Config.in | 21 +++++++++++++++++++++ package/dpdk/dpdk.mk | 9 +++++++++ 2 files changed, 30 insertions(+) diff --git a/package/dpdk/Config.in b/package/dpdk/Config.in index 36876e349d..4e83f293ae 100644 --- a/package/dpdk/Config.in +++ b/package/dpdk/Config.in @@ -64,6 +64,27 @@ config BR2_PACKAGE_DPDK_DRIVERS_LIST Buildroot packages for external dependencies. DPDK configuration will fail in case of missing dependencies. +config BR2_PACKAGE_DPDK_LIBS_LIST + string "List of enabled libraries" + help + Controls which DPDK libraries are built. + + Values: + (empty): use DPDK defaults + none : build no libraries + list : e.g. "hash,fib,rib" + + To list all libraries found in the DPDK source tree: + find lib -mindepth 2 -maxdepth 2 -type f -name meson.build \ + -printf '%h\n' | xargs -n1 basename | sort -u + + Note: providing manually a list of dpdk libraries to enable + does not automatically enable its dependencies (internal or + external). It is the user responsiblity to add internal dpdk + dependencies in this list, and/or select the relevant + Buildroot packages for external dependencies. DPDK + configuration will fail in case of missing dependencies. + endif comment "dpdk needs a glibc toolchain w/ threads, gcc >= 4.9, headers >= 4.19" diff --git a/package/dpdk/dpdk.mk b/package/dpdk/dpdk.mk index 829b0cc640..d0c7caaa48 100644 --- a/package/dpdk/dpdk.mk +++ b/package/dpdk/dpdk.mk @@ -56,6 +56,15 @@ ifneq ($(DPDK_DRIVERS),) endif endif +DPDK_LIBS := $(call qstrip,$(BR2_PACKAGE_DPDK_LIBS_LIST)) +ifneq ($(DPDK_LIBS),) + ifeq ($(DPDK_LIBS),none) + DPDK_CONF_OPTS += -Ddisable_libs='*' + else + DPDK_CONF_OPTS += -Denable_libs='$(DPDK_LIBS)' + endif +endif + ifeq ($(BR2_PACKAGE_DPDK_TESTS),y) DPDK_CONF_OPTS += -Dtests=true else