mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
dpdk: add x64 and armv8 64bit support
This commit is contained in:
parent
2a60fb0d17
commit
1eed211889
@ -16,36 +16,26 @@ include $(INCLUDE_DIR)/host-build.mk
|
||||
include $(TOPDIR)/feeds/packages/devel/meson/meson.mk
|
||||
include $(TOPDIR)/feeds/packages/devel/ninja/ninja.mk
|
||||
|
||||
ifeq ($(CONFIG_LIBC),"glibc")
|
||||
PKG_CONFIG := $(PKG_BUILD_DIR)/config/arm/arm_armv7a_linux_glibc_gcc
|
||||
else
|
||||
PKG_CONFIG := $(PKG_BUILD_DIR)/config/arm/arm_armv7a_linux_musl_gcc
|
||||
endif
|
||||
|
||||
TARGET_CFLAGS += -D_GNU_SOURCE -Wno-unused-result -Wno-format-nonliteral
|
||||
|
||||
define Package/dpdk
|
||||
SECTION := net
|
||||
CATEGORY := Network
|
||||
TITLE := Data Plane Development Kit (DPDK)
|
||||
DEPENDS := @(arm) +librt +libpthread +libbpf +libpcap
|
||||
TITLE := Data Plane Development Kit (DPDK)
|
||||
DEPENDS := @(x86_64||arm||aarch64) +librt +libpthread +libbpf +libpcap +libopenssl
|
||||
endef
|
||||
|
||||
define Package/dpdk/description
|
||||
DPDK consists of libraries to accelerate packet processing
|
||||
workloads running on a wide variety of CPU architectures.
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
$(call Build/Configure/Meson) --cross-file $(PKG_CONFIG)
|
||||
DPDK consists of libraries to accelerate packet processing
|
||||
workloads running on a wide variety of CPU architectures.
|
||||
endef
|
||||
|
||||
define Package/dpdk/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/dpdk-testpmd $(1)/usr/bin/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/dpdk-proc-info $(1)/usr/bin/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/dpdk-test-flow-perf $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dpdk-testpmd $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dpdk-proc-info $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dpdk-test-flow-perf $(1)/usr/bin/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
|
@ -1,91 +0,0 @@
|
||||
From e8fa8aa186644e797ca1df457f5bbe146e901bad Mon Sep 17 00:00:00 2001
|
||||
From: Chandrakant Sharpa <s.chandrakant@globaledgesoft.com>
|
||||
Date: Wed, 9 Jun 2021 14:07:10 +0530
|
||||
Subject: [PATCH] Add DPDK support for Armv7
|
||||
|
||||
Signed-off-by: Chandrakant Sharpa <s.chandrakant@globaledgesoft.com>
|
||||
---
|
||||
config/arm/arm_armv7a_linux_glibc_gcc | 17 +++++++++++++++++
|
||||
config/arm/arm_armv7a_linux_musl_gcc | 17 +++++++++++++++++
|
||||
lib/eal/linux/eal_debug.c | 2 ++
|
||||
3 files changed, 36 insertions(+)
|
||||
create mode 100644 config/arm/arm_armv7a_linux_glibc_gcc
|
||||
create mode 100644 config/arm/arm_armv7a_linux_musl_gcc
|
||||
|
||||
diff --git a/config/arm/arm_armv7a_linux_glibc_gcc b/config/arm/arm_armv7a_linux_glibc_gcc
|
||||
new file mode 100644
|
||||
index 000000000..5981a5b9f
|
||||
--- /dev/null
|
||||
+++ b/config/arm/arm_armv7a_linux_glibc_gcc
|
||||
@@ -0,0 +1,17 @@
|
||||
+[binaries]
|
||||
+c = 'arm-openwrt-linux-gnueabi-gcc'
|
||||
+cpp = 'arm-openwrt-linux-gnueabi-cpp'
|
||||
+ar = 'arm-openwrt-linux-gnueabi-ar'
|
||||
+strip = 'arm-openwrt-linux-gnueabi-strip'
|
||||
+pkgconfig = 'arm-openwrt-linux-gnueabi-pkg-config'
|
||||
+pcap-config = ''
|
||||
+
|
||||
+[host_machine]
|
||||
+system = 'linux'
|
||||
+cpu_family = 'arm'
|
||||
+cpu = 'armv7-a'
|
||||
+endian = 'little'
|
||||
+
|
||||
+[properties]
|
||||
+# Generate binaries that are portable across all Armv7 machines
|
||||
+platform = 'generic'
|
||||
diff --git a/config/arm/arm_armv7a_linux_musl_gcc b/config/arm/arm_armv7a_linux_musl_gcc
|
||||
new file mode 100644
|
||||
index 000000000..9b4a5dd1e
|
||||
--- /dev/null
|
||||
+++ b/config/arm/arm_armv7a_linux_musl_gcc
|
||||
@@ -0,0 +1,17 @@
|
||||
+[binaries]
|
||||
+c = 'arm-openwrt-linux-muslgnueabi-gcc'
|
||||
+cpp = 'arm-openwrt-linux-muslgnueabi-cpp'
|
||||
+ar = 'arm-openwrt-linux-muslgnueabi-ar'
|
||||
+strip = 'arm-openwrt-linux-muslgnueabi-strip'
|
||||
+pkgconfig = 'arm-openwrt-linux-muslgnueabi-pkg-config'
|
||||
+pcap-config = ''
|
||||
+
|
||||
+[host_machine]
|
||||
+system = 'linux'
|
||||
+cpu_family = 'arm'
|
||||
+cpu = 'armv7-a'
|
||||
+endian = 'little'
|
||||
+
|
||||
+[properties]
|
||||
+# Generate binaries that are portable across all Armv7 machines
|
||||
+platform = 'generic'
|
||||
diff --git a/lib/eal/linux/eal_debug.c b/lib/eal/linux/eal_debug.c
|
||||
index 64dab4e0d..3dbf42248 100644
|
||||
--- a/lib/eal/linux/eal_debug.c
|
||||
+++ b/lib/eal/linux/eal_debug.c
|
||||
@@ -2,9 +2,12 @@
|
||||
* Copyright(c) 2010-2014 Intel Corporation
|
||||
*/
|
||||
|
||||
+#ifdef __GLIBC__
|
||||
#ifdef RTE_BACKTRACE
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
+#endif
|
||||
+
|
||||
#include <stdarg.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
@@ -26,8 +26,10 @@ void rte_dump_stack(void)
|
||||
char **symb = NULL;
|
||||
int size;
|
||||
|
||||
+#ifdef __GLIBC__
|
||||
size = backtrace(func, BACKTRACE_SIZE);
|
||||
symb = backtrace_symbols(func, size);
|
||||
+#endif
|
||||
|
||||
if (symb == NULL)
|
||||
return;
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,40 @@
|
||||
From afe64bae6d398fc9a194bce2763d6b2ab080f38f Mon Sep 17 00:00:00 2001
|
||||
From: Chandrakant Sharpa <s.chandrakant@globaledgesoft.com>
|
||||
Date: Mon, 14 Jun 2021 17:53:16 +0530
|
||||
Subject: [PATCH] Handling backtrace and execinfo header file
|
||||
|
||||
Signed-off-by: Chandrakant Sharpa <s.chandrakant@globaledgesoft.com>
|
||||
---
|
||||
lib/eal/linux/eal_debug.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/lib/eal/linux/eal_debug.c b/lib/eal/linux/eal_debug.c
|
||||
index 64dab4e0d..24b8b23dd 100644
|
||||
--- a/lib/eal/linux/eal_debug.c
|
||||
+++ b/lib/eal/linux/eal_debug.c
|
||||
@@ -2,9 +2,11 @@
|
||||
* Copyright(c) 2010-2014 Intel Corporation
|
||||
*/
|
||||
|
||||
+#ifdef __GLIBC__
|
||||
#ifdef RTE_BACKTRACE
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
+#endif
|
||||
#include <stdarg.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
@@ -26,8 +28,10 @@ void rte_dump_stack(void)
|
||||
char **symb = NULL;
|
||||
int size;
|
||||
|
||||
+#ifdef __GLIBC__
|
||||
size = backtrace(func, BACKTRACE_SIZE);
|
||||
symb = backtrace_symbols(func, size);
|
||||
+#endif
|
||||
|
||||
if (symb == NULL)
|
||||
return;
|
||||
--
|
||||
2.17.1
|
||||
|
Loading…
Reference in New Issue
Block a user