package/dpdk: make apps selectable

Add BR2_PACKAGE_DPDK_APPS_LIST to control which DPDK applications are
built:
  - empty : use DPDK defaults
  - none  : disable all apps (-Ddisable_apps='*')
  - list  : pass to -Denable_apps= (comma-separated)

Signed-off-by: Maxime Leroy <maxime@leroys.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
Maxime Leroy
2025-12-22 22:56:32 +01:00
committed by Julien Olivain
parent 5c104b7f0b
commit 49e7a554f2
2 changed files with 30 additions and 0 deletions

View File

@@ -85,6 +85,27 @@ config BR2_PACKAGE_DPDK_LIBS_LIST
Buildroot packages for external dependencies. DPDK Buildroot packages for external dependencies. DPDK
configuration will fail in case of missing dependencies. configuration will fail in case of missing dependencies.
config BR2_PACKAGE_DPDK_APPS_LIST
string "List of enabled applications"
help
Controls which DPDK applications are built.
Values:
(empty): use DPDK defaults
none : build no apps
list : e.g. "test-cmdline,test-pmd"
To list all applications found in the DPDK source tree:
find app -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 endif
comment "dpdk needs a glibc toolchain w/ threads, gcc >= 4.9, headers >= 4.19" comment "dpdk needs a glibc toolchain w/ threads, gcc >= 4.9, headers >= 4.19"

View File

@@ -65,6 +65,15 @@ ifneq ($(DPDK_LIBS),)
endif endif
endif endif
DPDK_APPS := $(call qstrip,$(BR2_PACKAGE_DPDK_APPS_LIST))
ifneq ($(DPDK_APPS),)
ifeq ($(DPDK_APPS),none)
DPDK_CONF_OPTS += -Ddisable_apps='*'
else
DPDK_CONF_OPTS += -Denable_apps='$(DPDK_APPS)'
endif
endif
ifeq ($(BR2_PACKAGE_DPDK_TESTS),y) ifeq ($(BR2_PACKAGE_DPDK_TESTS),y)
DPDK_CONF_OPTS += -Dtests=true DPDK_CONF_OPTS += -Dtests=true
else else