Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
From 121e5d019f0bb6dec0ace2b361611edd10fc8ff8 Mon Sep 17 00:00:00 2001
|
||||
From: Lee Chee Yang <chee.yang.lee@intel.com>
|
||||
Date: Wed, 6 Dec 2023 16:58:10 +0800
|
||||
Subject: [PATCH] config/meson: get cpu_instruction_set from meson option
|
||||
|
||||
Workaround error:
|
||||
| ../git/config/meson.build:178:8: ERROR: Problem encountered: Compiler
|
||||
does not support "x86_64" arch flag.
|
||||
|
||||
Upstream-Status: Inappropriate [ yocto specific to set cpu_instruction_set ]
|
||||
|
||||
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
|
||||
Links: https://git.yoctoproject.org/meta-dpdk/plain/recipes-extended/dpdk/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch
|
||||
Upstream: Not applicable, see Yocto's status, above
|
||||
Signed-off-by: Vincent Jardin <vjardin@free.fr>
|
||||
---
|
||||
config/meson.build | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/config/meson.build b/config/meson.build
|
||||
index a9ccd56deb..f310c7adf6 100644
|
||||
--- a/config/meson.build
|
||||
+++ b/config/meson.build
|
||||
@@ -105,7 +105,7 @@ platform = get_option('platform')
|
||||
|
||||
# set the cpu_instruction_set and cflags for it
|
||||
if meson.is_cross_build()
|
||||
- cpu_instruction_set = host_machine.cpu()
|
||||
+ cpu_instruction_set = get_option('cpu_instruction_set')
|
||||
else
|
||||
cpu_instruction_set = get_option('cpu_instruction_set')
|
||||
machine = get_option('machine')
|
||||
--
|
||||
2.37.3
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
From 9f6c3191b3178294d698cdca859ce9dac78517ff Mon Sep 17 00:00:00 2001
|
||||
From: Guillaume Gardet <Guillaume.Gardet@arm.com>
|
||||
Date: Thu, 29 Aug 2024 16:33:19 +0200
|
||||
Subject: [PATCH] examples/vm_power_manager: add missing <stdlib.h> header
|
||||
include for strtol
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
strtol is defined in stdlib.h
|
||||
|
||||
Fixes the following build failure:
|
||||
|
||||
../examples/vm_power_manager/guest_cli/vm_power_cli_guest.c: In function ‘cmd_query_freq_list_parsed’:
|
||||
../examples/vm_power_manager/guest_cli/vm_power_cli_guest.c:208:42: error: implicit declaration of function ‘strtol’; did you mean ‘strtok’? [-Wimplicit-function-declaration]
|
||||
208 | lcore_id = (unsigned int)strtol(res->cpu_num, &ep, 10);
|
||||
| ^~~~~~
|
||||
| strtok
|
||||
|
||||
Fixes: 0e8f47491f090f44a4956429cb27f6942b6618b0 ("examples/vm_power: add command to query CPU frequency")
|
||||
Signed-off-by: Guillaume Gardet <guillaume.gardet@arm.com>
|
||||
[Thomas:
|
||||
- retrieve patch from
|
||||
https://build.opensuse.org/projects/openSUSE:42:Factory-Candidates-Check/packages/dpdk/files/0001-examples-vm_power_manager-add-missing-header.patch?expand=1
|
||||
- improve commit message]
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
Upstream: https://mails.dpdk.org/archives/dev/2026-August/344552.html
|
||||
---
|
||||
examples/vm_power_manager/guest_cli/vm_power_cli_guest.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
|
||||
index 4114593cee..63a59c8b10 100644
|
||||
--- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
|
||||
+++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
#include <termios.h>
|
||||
|
||||
#include <cmdline_rdline.h>
|
||||
--
|
||||
2.55.0
|
||||
|
||||
43
package/dpdk/0010-Fix-aarch64-build.patch
Normal file
43
package/dpdk/0010-Fix-aarch64-build.patch
Normal file
@@ -0,0 +1,43 @@
|
||||
From c5ea091a74bbfa5fb095d2c6fe15be3a7b15cacb Mon Sep 17 00:00:00 2001
|
||||
From: Julien Olivain <ju.o@free.fr>
|
||||
Date: Sun, 8 Sep 2024 13:20:14 +0200
|
||||
Subject: [PATCH] Fix aarch64 build
|
||||
|
||||
The condition on which DPDK meson skip the -march detection for Aarch64
|
||||
seems incorrect or incomplete. This patch changes the condition in order
|
||||
to better match the comment (that the options are decided in
|
||||
config/arm/meson.build). It actually test for the architecture name.
|
||||
|
||||
While this patch might need some discussion with DPDK maintainers to
|
||||
cover all situations, it can still be useful here in Buildroot, as it
|
||||
fixes the Aarch64 cross compilation.
|
||||
|
||||
Signed-off-by: Julien Olivain <ju.o@free.fr>
|
||||
Signed-off-by: Vincent Jardin <vjardin@free.fr>
|
||||
Upstream: to be proposed https://patches.dpdk.org/project/dpdk/list/
|
||||
Links: cherry-picked from https://github.com/jolivain/dpdk/commit/c5ea091a74bbfa5fb095d2c6fe15be3a7b15cacb
|
||||
---
|
||||
config/meson.build | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/config/meson.build b/config/meson.build
|
||||
index 8c8b019c25..ea48e55ce3 100644
|
||||
--- a/config/meson.build
|
||||
+++ b/config/meson.build
|
||||
@@ -176,10 +176,10 @@ if not is_ms_compiler
|
||||
else
|
||||
machine_args += '-march=' + cpu_instruction_set
|
||||
# arm manages generic/auto config in config/arm/meson.build
|
||||
- if cpu_instruction_set != 'generic' and cpu_instruction_set != 'auto'
|
||||
- compiler_arch_support = cc.has_argument('-march=' + cpu_instruction_set)
|
||||
- else
|
||||
+ if host_machine.cpu_family().startswith('aarch')
|
||||
compiler_arch_support = true
|
||||
+ else
|
||||
+ compiler_arch_support = cc.has_argument('-march=' + cpu_instruction_set)
|
||||
endif
|
||||
endif
|
||||
if not compiler_arch_support
|
||||
--
|
||||
2.46.0
|
||||
|
||||
117
package/dpdk/Config.in
Normal file
117
package/dpdk/Config.in
Normal file
@@ -0,0 +1,117 @@
|
||||
config BR2_PACKAGE_DPDK_ARCH_SUPPORTS
|
||||
bool
|
||||
# DPDK can be used for the following little endian architecture
|
||||
default y if BR2_aarch64
|
||||
# DPDK requires SSE4.2 for x86_64 since v17.08
|
||||
default y if BR2_x86_64 && BR2_X86_CPU_HAS_SSE42
|
||||
|
||||
config BR2_PACKAGE_DPDK
|
||||
bool "dpdk"
|
||||
depends on BR2_PACKAGE_DPDK_ARCH_SUPPORTS
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # DPDK design
|
||||
depends on BR2_USE_MMU # pthread() memory mappings
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C11/stdatomic.h
|
||||
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19
|
||||
depends on BR2_TOOLCHAIN_USES_GLIBC
|
||||
select BR2_PACKAGE_HOST_PYTHON3 # host-python-pyelftools
|
||||
help
|
||||
DPDK (Data Plane Development Kit) is a set of libraries
|
||||
and drivers for fast packet processing.
|
||||
|
||||
http://dpdk.org/
|
||||
|
||||
Optional but recommended kernel configurations:
|
||||
- CONFIG_VFIO_IOMMU_TYPE1
|
||||
- CONFIG_VFIO_VIRQFD
|
||||
- CONFIG_VFIO
|
||||
- CONFIG_VFIO_NOIOMMU
|
||||
- CONFIG_VFIO_PCI
|
||||
- CONFIG_VFIO_PCI_MMAP
|
||||
- CONFIG_HUGETLBFS
|
||||
- CONFIG_HUGETLB_PAGE
|
||||
- CONFIG_PROC_PAGE_MONITOR
|
||||
|
||||
For x86 only, the following can also be useful:
|
||||
- CONFIG_HPET
|
||||
- CONFIG_HPET_MMAP
|
||||
|
||||
if BR2_PACKAGE_DPDK
|
||||
|
||||
config BR2_PACKAGE_DPDK_EXAMPLES
|
||||
bool "Install examples"
|
||||
|
||||
config BR2_PACKAGE_DPDK_TESTS
|
||||
bool "Install tests"
|
||||
|
||||
config BR2_PACKAGE_DPDK_DRIVERS_LIST
|
||||
string "List of enabled drivers"
|
||||
help
|
||||
Controls which DPDK drivers are built.
|
||||
|
||||
Values:
|
||||
(empty): use DPDK defaults
|
||||
none : build no drivers
|
||||
list : e.g. "net/virtio,net/intel/ixgbe"
|
||||
|
||||
To list possible drivers found in the DPDK source tree:
|
||||
find drivers -mindepth 2 -maxdepth 3 -type d \
|
||||
! -printf '%P\n' | sort
|
||||
|
||||
Note: providing manually a list of dpdk drivers 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.
|
||||
|
||||
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.
|
||||
|
||||
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
|
||||
|
||||
comment "dpdk needs a glibc toolchain w/ threads, gcc >= 4.9, headers >= 4.19"
|
||||
depends on BR2_USE_MMU # pthread() memory mappings
|
||||
depends on BR2_PACKAGE_DPDK_ARCH_SUPPORTS
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS || \
|
||||
!BR2_TOOLCHAIN_USES_GLIBC || \
|
||||
!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \
|
||||
!BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_19
|
||||
6
package/dpdk/dpdk.hash
Normal file
6
package/dpdk/dpdk.hash
Normal file
@@ -0,0 +1,6 @@
|
||||
# Locally computed
|
||||
sha256 418bfe3212640ee95a1cb10af6ed360cad2387686fe2721f8a3a9cd02d5ef4f2 dpdk-25.11.2.tar.xz
|
||||
sha256 9acc4bc871a4742550158e3696dcb381953172ef808d04ca248184f9f6322712 license/bsd-3-clause.txt
|
||||
sha256 ec514554f1b9e90c4f55167267c22da9d511f884877c32a5b18bee6b7c8b18cd license/exceptions.txt
|
||||
sha256 6c54c4d44faf3cba829b3d0c21c6955953e758767018fd7244f809b01d4f4845 license/mit.txt
|
||||
sha256 cae178052c96959741acb7f00634a09a8294e6cafb5ad53e158d63e3510875ab license/README
|
||||
128
package/dpdk/dpdk.mk
Normal file
128
package/dpdk/dpdk.mk
Normal file
@@ -0,0 +1,128 @@
|
||||
################################################################################
|
||||
#
|
||||
# dpdk
|
||||
#
|
||||
################################################################################
|
||||
|
||||
DPDK_VERSION = 25.11.2
|
||||
DPDK_SOURCE = dpdk-$(DPDK_VERSION).tar.xz
|
||||
DPDK_SITE = https://fast.dpdk.org/rel
|
||||
DPDK_LICENSE = \
|
||||
BSD-3-Clause, \
|
||||
MIT
|
||||
|
||||
# Only the Windows target has the 2 following licenses:
|
||||
# - license/bsd-2-clause.txt
|
||||
# - license/isc.txt
|
||||
# which is related to a Windows getopt.[ch] compatibility layer.
|
||||
# Since Buildroot is not used for Windows target, it is not listed
|
||||
# here.
|
||||
#
|
||||
# All the userland files of DPDK have dual licences BSD or GPL/LGPL
|
||||
# Since the Linux kernel modules had been removed from the DPDK, there
|
||||
# is no GPL only code into the DPDK anymore.
|
||||
# The usage of DPDK with Buildroot is for userland only, it means
|
||||
# that for the dual licenced files, BSD clause is used but not the
|
||||
# following ones:
|
||||
# - license/gpl-2.0.txt
|
||||
# - license/lgpl-2.1.txt
|
||||
# See the DPDK's license/README for more details.
|
||||
#
|
||||
# The legacy and historical license of the DPDK is BSD-3-clause.
|
||||
DPDK_LICENSE_FILES = \
|
||||
license/README \
|
||||
license/bsd-3-clause.txt \
|
||||
license/exceptions.txt \
|
||||
license/mit.txt
|
||||
|
||||
DPDK_INSTALL_STAGING = YES
|
||||
|
||||
DPDK_DEPENDENCIES = \
|
||||
host-pkgconf \
|
||||
host-python-pyelftools
|
||||
|
||||
ifeq ($(BR2_PACKAGE_DPDK_EXAMPLES),y)
|
||||
DPDK_CONF_OPTS += -Dexamples=all
|
||||
else
|
||||
DPDK_CONF_OPTS += -Dexamples=
|
||||
endif
|
||||
|
||||
DPDK_DRIVERS := $(call qstrip,$(BR2_PACKAGE_DPDK_DRIVERS_LIST))
|
||||
ifneq ($(DPDK_DRIVERS),)
|
||||
ifeq ($(DPDK_DRIVERS),none)
|
||||
DPDK_CONF_OPTS += -Ddisable_drivers='*/*'
|
||||
else
|
||||
DPDK_CONF_OPTS += -Denable_drivers='$(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
|
||||
|
||||
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)
|
||||
DPDK_CONF_OPTS += -Dtests=true
|
||||
else
|
||||
DPDK_CONF_OPTS += -Dtests=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBBSD),y)
|
||||
DPDK_DEPENDENCIES += libbsd
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_JANSSON),y)
|
||||
DPDK_DEPENDENCIES += jansson
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBPCAP),y)
|
||||
DPDK_DEPENDENCIES += libpcap
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
||||
DPDK_DEPENDENCIES += zlib
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBEXECINFO),y)
|
||||
DPDK_DEPENDENCIES += libexecinfo
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_NUMACTL),y)
|
||||
DPDK_DEPENDENCIES += numactl
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBARCHIVE),y)
|
||||
DPDK_DEPENDENCIES += libarchive
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBBPF),y)
|
||||
DPDK_DEPENDENCIES += libbpf
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBVIRT),y)
|
||||
DPDK_DEPENDENCIES += libvirt
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_RDMA_CORE),y)
|
||||
DPDK_DEPENDENCIES += rdma-core
|
||||
endif
|
||||
|
||||
# DPDK's meson shall need to be clean'd, hack here along the enclosed patch
|
||||
DPDK_CONF_OPTS += -Dcpu_instruction_set=$(BR2_GCC_TARGET_ARCH)
|
||||
# Keep the following, even if not mandatory, until the removal of the patch
|
||||
DPDK_MESON_EXTRA_PROPERTIES += platform='generic'
|
||||
|
||||
$(eval $(meson-package))
|
||||
Reference in New Issue
Block a user