summaryrefslogtreecommitdiffstats
path: root/recipes-extended
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-extended')
-rw-r--r--recipes-extended/dpdk/dpdk/dpdk-16.04-add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch50
-rw-r--r--recipes-extended/dpdk/dpdk/dpdk-16.07-add-sysroot-option-within-app-makefile.patch30
-rw-r--r--recipes-extended/dpdk/dpdk_19.11.9.bb194
3 files changed, 0 insertions, 274 deletions
diff --git a/recipes-extended/dpdk/dpdk/dpdk-16.04-add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch b/recipes-extended/dpdk/dpdk/dpdk-16.04-add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch
deleted file mode 100644
index 603bd32..0000000
--- a/recipes-extended/dpdk/dpdk/dpdk-16.04-add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch
+++ /dev/null
@@ -1,50 +0,0 @@
1From 0808b30cd00f307f182007d21a8be3a0866ccf83 Mon Sep 17 00:00:00 2001
2From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
3Date: Fri, 18 Dec 2015 18:30:47 +0800
4Subject: [PATCH] dpdk v2.2.0: add RTE_KERNELDIR_OUT to split kernel build
5 artifact
6
7Introduce RTE_KERNELDIR_OUT to be the path to which kernel build
8artifacts are located. This is for matching the workflow change
9since Yocto Project v1.8 onwards whereby tmp/work-shared contains
10separate directories for kernel source and kernel artifacts.
11
12Upstream-Status: Inappropriate [configuration]
13
14Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
15
16---
17 mk/rte.module.mk | 6 +++---
18 1 file changed, 3 insertions(+), 3 deletions(-)
19
20diff --git a/mk/rte.module.mk b/mk/rte.module.mk
21index 1ada528a00b1..da0538cd5321 100644
22--- a/mk/rte.module.mk
23+++ b/mk/rte.module.mk
24@@ -48,7 +48,7 @@ build: _postbuild
25 # build module
26 $(MODULE).ko: $(SRCS_LINKS)
27 @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi
28- @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \
29+ @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \
30 CC="$(KERNELCC)" CROSS_COMPILE=$(CROSS) V=$(if $V,1,0)
31
32 # install module in $(RTE_OUTPUT)/kmod
33@@ -59,7 +59,7 @@ $(RTE_OUTPUT)/kmod/$(MODULE).ko: $(MODULE).ko
34
35 # install module
36 modules_install:
37- @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \
38+ @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \
39 modules_install
40
41 .PHONY: clean
42@@ -69,7 +69,7 @@ clean: _postclean
43 .PHONY: doclean
44 doclean:
45 @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi
46- $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) clean
47+ $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) clean
48 @$(foreach FILE,$(SRCS-y) $(SRCS-n) $(SRCS-),\
49 if [ -h $(notdir $(FILE)) ]; then rm -f $(notdir $(FILE)) ; fi ;)
50 @if [ -h $(notdir Makefile) ]; then rm -f $(notdir Makefile) ; fi
diff --git a/recipes-extended/dpdk/dpdk/dpdk-16.07-add-sysroot-option-within-app-makefile.patch b/recipes-extended/dpdk/dpdk/dpdk-16.07-add-sysroot-option-within-app-makefile.patch
deleted file mode 100644
index 18b761c..0000000
--- a/recipes-extended/dpdk/dpdk/dpdk-16.07-add-sysroot-option-within-app-makefile.patch
+++ /dev/null
@@ -1,30 +0,0 @@
1From d08d11c8b6fdfe73884d67a94d907000afd136ed Mon Sep 17 00:00:00 2001
2From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
3Date: Fri, 19 Aug 2016 11:57:49 +0800
4Subject: [PATCH] dpdk: add --sysroot option within app makefile
5
6Upstream-Status: Inappropriate [configuration]
7
8rte.app.mk has been changed to add -Wl, to all items listed
9under EXTRA_LDFLAGS. It causes --sysroot=<path> to not setup
10correctly when we depends on gcc to setup for GNU ld.
11
12Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
13
14---
15 mk/rte.app.mk | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/mk/rte.app.mk b/mk/rte.app.mk
19index 3eb41d176d21..9ab6688718db 100644
20--- a/mk/rte.app.mk
21+++ b/mk/rte.app.mk
22@@ -300,7 +300,7 @@ exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1))))
23 ifeq ($(LINK_USING_CC),1)
24 O_TO_EXE = $(CC) -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $(OBJS-y) $(call linkerprefix, \
25 $(LDLIBS) $(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) \
26- $(MAPFLAGS))
27+ $(MAPFLAGS)) $(SYSROOTPATH)
28 else
29 O_TO_EXE = $(LD) -o $@ $(OBJS-y) \
30 $(LDLIBS) $(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) \
diff --git a/recipes-extended/dpdk/dpdk_19.11.9.bb b/recipes-extended/dpdk/dpdk_19.11.9.bb
deleted file mode 100644
index 3c3f035..0000000
--- a/recipes-extended/dpdk/dpdk_19.11.9.bb
+++ /dev/null
@@ -1,194 +0,0 @@
1include dpdk.inc
2
3SRC_URI += " \
4 file://dpdk-16.04-add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch \
5 file://dpdk-16.07-add-sysroot-option-within-app-makefile.patch \
6 "
7
8STABLE = "-stable"
9BRANCH = "19.11"
10SRCREV = "a3d97ddaead03cb19b5160bc78e724659795aea7"
11S = "${WORKDIR}/git"
12
13COMPATIBLE_MACHINE = "null"
14COMPATIBLE_HOST:libc-musl:class-target = "null"
15COMPATIBLE_HOST:linux-gnux32 = "null"
16
17# dpdk example apps dpdk_qat and vhost have dependancy on fuse and qat.
18# fuse is in meta-filesystems and qat is not yet upstreamed.
19# So adding mechanism to explicitly disable the use of fuse and qat.
20# To enable, uncomment the below line or include in .bbappend.
21# PACKAGECONFIG ?= " dpdk_qat vhost libvirt"
22
23PACKAGECONFIG[dpdk_qat] = ",,virtual/qat"
24PACKAGECONFIG[vhost] = ",,fuse"
25PACKAGECONFIG[libvirt] = ",,libvirt"
26PACKAGECONFIG[numa] = ",,numactl"
27
28export CONFIG_EXAMPLE_DPDK_QAT = "${@bb.utils.contains('PACKAGECONFIG', 'dpdk_qat', 'y', 'n', d)}"
29export CONFIG_EXAMPLE_VM_POWER_MANAGER = "${@bb.utils.contains('PACKAGECONFIG', 'libvirt', 'y', 'n', d)}"
30export CONFIG_VHOST_ENABLED = "${@bb.utils.contains('PACKAGECONFIG', 'vhost', 'y', 'n', d)}"
31export CONFIG_HAVE_NUMA = "${@bb.utils.contains('PACKAGECONFIG', 'numa', 'y', 'n', d)}"
32
33# Don't use the default value of datadir and let the dpdk set it to a dpdk
34# specific directory
35datadir[unexport] = "1"
36
37RDEPENDS:${PN} += "pciutils python3-core"
38DEPENDS = "virtual/kernel"
39do_configure[depends] += "virtual/kernel:do_shared_workdir"
40
41inherit module
42
43export MODULE_DIR="${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net"
44export RTE_SDK = "${S}"
45
46export ICP_ROOT = "${PKG_CONFIG_SYSROOT_DIR}/usr/include"
47export ICP_LIB_ROOT= "${PKG_CONFIG_SYSROOT_DIR}/usr/lib"
48export RTE_KERNELDIR = "${STAGING_KERNEL_DIR}"
49export RTE_KERNELDIR_OUT = "${STAGING_KERNEL_BUILDDIR}"
50export INSTALL_PATH = "${prefix}/share/dpdk"
51export RTE_OUTPUT = "${S}/${RTE_TARGET}"
52export ETHTOOL_LIB_PATH = "${S}/examples/ethtool/lib/${RTE_TARGET}/"
53export SYSROOTPATH = "--sysroot=${STAGING_DIR_HOST}"
54export DPDK_TARGET_MACH = "${@get_dpdk_target_mach(bb,d)}"
55export ICP_LAC_API_DIR = "${STAGING_DIR_TARGET}${includedir}/lac"
56
57export EXAMPLES_BUILD_DIR = "${RTE_TARGET}"
58export ARCHDIR = "generic"
59
60DPDK_RTE_TARGET:x86-64 = "x86_64-native-linuxapp-gcc"
61DPDK_RTE_TARGET:x86 = "i686-native-linuxapp-gcc"
62DPDK_RTE_TARGET:aarch64 = "arm64-${DPDK_TARGET_MACH}-linuxapp-gcc"
63export RTE_TARGET = "${DPDK_RTE_TARGET}"
64
65# Workaround failure on gcc10
66TOOLCHAIN_OPTIONS += "-Wno-error=maybe-uninitialized"
67
68CONFIG_NAME = "common_linux"
69TEST_DIR = "app/test"
70
71# The list of intel Comms platforms and their target machine
72# process mapping. The supported target machine is listed under
73# dpdk/mk/machine
74def get_dpdk_target_mach(bb, d):
75 target_arch = d.getVar('DPDK_TARGET_MACHINE', True)
76 if target_arch:
77 return target_arch
78 return "default"
79
80do_configure () {
81 #############################################################
82 ### default value for prefix is "usr", unsetting it, so it
83 ### will not be concatenated in ${RTE_TARGET}/Makefile
84 ### which will cause compilation failure
85 #############################################################
86 unset prefix
87
88 # Fix-up CONFIG_RTE_MACHINE based on target machine
89 sed -e "s#CONFIG_RTE_MACHINE=\"native\"#CONFIG_RTE_MACHINE=\"${DPDK_TARGET_MACH}\"#" -i ${S}/config/defconfig_${RTE_TARGET}
90
91 # Fix-up vhost configs based on package config
92 sed -e "s#CONFIG_RTE_KNI_VHOST=n#CONFIG_RTE_KNI_VHOST=${CONFIG_VHOST_ENABLED}#" -i ${S}/config/${CONFIG_NAME}
93 sed -e "s#CONFIG_RTE_KNI_VHOST_VNET_HDR_EN=n#CONFIG_RTE_KNI_VHOST_VNET_HDR_EN=${CONFIG_VHOST_ENABLED}#" -i ${S}/config/${CONFIG_NAME}
94 sed -e "s#CONFIG_RTE_LIBRTE_VHOST=n#CONFIG_RTE_LIBRTE_VHOST=${CONFIG_VHOST_ENABLED}#" -i ${S}/config/${CONFIG_NAME}
95 sed -e "s#CONFIG_RTE_LIBRTE_VHOST_NUMA=.*#CONFIG_RTE_LIBRTE_VHOST_NUMA=${CONFIG_HAVE_NUMA}#" -i ${S}/config/${CONFIG_NAME}
96 sed -e "s#CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=.*#CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=${CONFIG_HAVE_NUMA}#" -i ${S}/config/${CONFIG_NAME}
97
98 # Fix-up CONFIG_RTE_LIBRTE_POWER based on package config for libvirt
99 sed -e "s#CONFIG_RTE_LIBRTE_POWER=y#CONFIG_RTE_LIBRTE_POWER=${CONFIG_EXAMPLE_VM_POWER_MANAGER}#" -i ${S}/config/${CONFIG_NAME}
100
101 make O=$RTE_TARGET T=$RTE_TARGET config
102}
103
104do_compile () {
105 unset LDFLAGS TARGET_LDFLAGS BUILD_LDFLAGS
106
107 cd ${S}/${RTE_TARGET}
108 oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu" \
109 EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR}" \
110 CROSS="${TARGET_PREFIX}" \
111 prefix="" LDFLAGS="${TUNE_LDARGS}" WERROR_FLAGS="-w" V=1
112
113 cd ${S}/examples/
114 oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu -fuse-ld=bfd" \
115 EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -O3 -I${STAGING_INCDIR}" \
116 CROSS="${TARGET_PREFIX}" O="${S}/examples/$@/"
117
118 cd ${S}/${TEST_DIR}/
119 oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu -fuse-ld=bfd" \
120 EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -O3 -I${STAGING_INCDIR}" \
121 CROSS="${TARGET_PREFIX}" O="${S}/${TEST_DIR}/$@/"
122}
123
124do_install () {
125 oe_runmake O=${RTE_OUTPUT} T= install-runtime DESTDIR=${D}
126 oe_runmake O=${RTE_OUTPUT} T= install-kmod DESTDIR=${D} kerneldir=${MODULE_DIR}
127 oe_runmake O=${RTE_OUTPUT} T= install-sdk DESTDIR=${D}
128
129 # Install examples
130 for dirname in ${S}/examples/*
131 do
132 install -m 0755 -d ${D}/${INSTALL_PATH}/examples/`basename ${dirname}`
133
134 for appname in `find ${dirname} -regex ".*${EXAMPLES_BUILD_DIR}\/app\/[-0-9a-zA-Z0-9/_]*$"`
135 do
136 install -m 755 ${appname} ${D}/${INSTALL_PATH}/examples/`basename ${dirname}`/
137 done
138 done
139
140 # Install test
141 for dirname in ${S}/${TEST_DIR}/app/*
142 do
143 install -m 0755 -d ${D}/${INSTALL_PATH}/test
144
145 for appname in `find ${dirname} -regex ".*test\/app\/[-0-9a-zA-Z0-9/_]*$"`
146 do
147 install -m 755 ${appname} ${D}/${INSTALL_PATH}/test
148 done
149 done
150
151 cp -r ${S}/mk ${D}${INSTALL_PATH}/
152
153 for ss in $(find ${D} -type f -name "*.py"); do
154 sed -i -e "1s,#!.*python.*,#!${USRBINPATH}/env python3," ${ss}
155 done
156
157 # Remove the unneeded dir
158 rm -rf ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
159}
160
161PACKAGES += "${PN}-examples ${PN}-test"
162
163FILES:${PN}-dbg += " \
164 ${INSTALL_PATH}/.debug \
165 ${INSTALL_PATH}/examples/*/.debug \
166 "
167
168FILES:${PN}-doc += "\
169 ${INSTALL_PATH}/doc \
170 "
171
172FILES:${PN}-dev += " \
173 ${INSTALL_PATH}/${RTE_TARGET}/.config \
174 ${includedir} \
175 ${includedir}/${ARCHDIR} \
176 ${includedir}/exec-env \
177 ${INSTALL_PATH}/buildtools/ \
178 ${INSTALL_PATH}/${RTE_TARGET}/include \
179 ${INSTALL_PATH}/${RTE_TARGET}/lib \
180 ${INSTALL_PATH}/mk \
181 "
182
183FILES:${PN} += " ${INSTALL_PATH}/usertools/ \
184 ${prefix}/sbin/ \
185 ${prefix}/bin/ \
186 ${libdir}/ \
187 "
188FILES:${PN}-examples += " \
189 ${INSTALL_PATH}/examples/* \
190 "
191
192FILES:${PN}-test += " \
193 ${INSTALL_PATH}/test \
194 "