diff options
| author | Mark Hatle <mark.hatle@amd.com> | 2023-06-08 12:49:57 -0700 |
|---|---|---|
| committer | Mark Hatle <mark.hatle@amd.com> | 2023-06-09 09:54:12 -0500 |
| commit | 44bdae5e457e248cfce536893a150d5cb9a11f6b (patch) | |
| tree | 012a0e3d8b133c311dbec46ce6dd85f1053696e1 /meta-dpdk | |
| parent | f7a092f2657d783b61e9da2becb03c4a1ef7ef2d (diff) | |
| download | meta-xilinx-44bdae5e457e248cfce536893a150d5cb9a11f6b.tar.gz | |
meta-dpdk: Add langdale meta-dpdk
Add a copy of meta-dpdk, for the langdale branch from
git://git.yoctoproject.org/meta-dpdk as of commit:
bd1b4f10262f12dd66a91383757ccba4eeda0b08
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Diffstat (limited to 'meta-dpdk')
18 files changed, 772 insertions, 0 deletions
diff --git a/meta-dpdk/COPYING.MIT b/meta-dpdk/COPYING.MIT new file mode 100644 index 00000000..fb950dc6 --- /dev/null +++ b/meta-dpdk/COPYING.MIT | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| 2 | of this software and associated documentation files (the "Software"), to deal | ||
| 3 | in the Software without restriction, including without limitation the rights | ||
| 4 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| 5 | copies of the Software, and to permit persons to whom the Software is | ||
| 6 | furnished to do so, subject to the following conditions: | ||
| 7 | |||
| 8 | The above copyright notice and this permission notice shall be included in | ||
| 9 | all copies or substantial portions of the Software. | ||
| 10 | |||
| 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 12 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 13 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| 14 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| 15 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| 16 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| 17 | THE SOFTWARE. | ||
diff --git a/meta-dpdk/LICENSE b/meta-dpdk/LICENSE new file mode 100644 index 00000000..e57d3b90 --- /dev/null +++ b/meta-dpdk/LICENSE | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | All metadata files (including, but not limited to bb, bbappend, | ||
| 2 | bbclass, inc and conf files) are MIT licensed unless otherwise stated. | ||
| 3 | Source code included in tree for individual recipes is under the | ||
| 4 | LICENSE stated in the associated recipe (.bb file) unless otherwise | ||
| 5 | stated. | ||
diff --git a/meta-dpdk/README b/meta-dpdk/README new file mode 100644 index 00000000..81703cfb --- /dev/null +++ b/meta-dpdk/README | |||
| @@ -0,0 +1,72 @@ | |||
| 1 | meta-dpdk | ||
| 2 | ========= | ||
| 3 | |||
| 4 | This README file contains information on building the DPDK package. | ||
| 5 | |||
| 6 | |||
| 7 | Dependencies | ||
| 8 | ============ | ||
| 9 | |||
| 10 | This layer depends on: | ||
| 11 | |||
| 12 | URI: git://git.openembedded.org/bitbake | ||
| 13 | branch: master | ||
| 14 | |||
| 15 | URI: git://git.openembedded.org/openembedded-core | ||
| 16 | layers: meta | ||
| 17 | branch: master | ||
| 18 | |||
| 19 | |||
| 20 | Guidelines for submitting patches | ||
| 21 | ==================================== | ||
| 22 | |||
| 23 | Please submit any patches against meta-dpdk to the meta-intel | ||
| 24 | mailing list (meta-intel@lists.yoctoproject.org). Also, if your patches are | ||
| 25 | available via a public git repository, please also include a URL to | ||
| 26 | the repo and branch containing your patches as that makes it easier | ||
| 27 | for maintainers to grab and test your patches. | ||
| 28 | |||
| 29 | There are patch submission scripts available that will, among other | ||
| 30 | things, automatically include the repo URL and branch as mentioned. | ||
| 31 | Please see the Yocto Project Development Manual sections entitled | ||
| 32 | 'Using Scripts to Push a Change Upstream and Request a Pull' and | ||
| 33 | 'Using Email to Submit a Patch' for details. | ||
| 34 | |||
| 35 | Regardless of how you submit a patch or patchset, the patches should | ||
| 36 | at minimum follow the suggestions outlined in the 'Submitting a Change | ||
| 37 | to the Yocto Project' section in the Yocto Project Development Manual. | ||
| 38 | Specifically, they should: | ||
| 39 | |||
| 40 | - Include a 'Signed-off-by:' line. A commit can't legally be pulled | ||
| 41 | in without this. | ||
| 42 | |||
| 43 | - Provide a single-line, short summary of the change. This short | ||
| 44 | description should be prefixed by the BSP or recipe name, as | ||
| 45 | appropriate, followed by a colon. Capitalize the first character | ||
| 46 | of the summary (following the colon). | ||
| 47 | |||
| 48 | - For the body of the commit message, provide detailed information | ||
| 49 | that describes what you changed, why you made the change, and the | ||
| 50 | approach you used. | ||
| 51 | |||
| 52 | - If the change addresses a specific bug or issue that is associated | ||
| 53 | with a bug-tracking ID, include a reference to that ID in your | ||
| 54 | detailed description in the following format: [YOCTO #<bug-id>]. | ||
| 55 | |||
| 56 | - Pay attention to line length - please don't allow any particular | ||
| 57 | line in the commit message to stretch past 72 characters. | ||
| 58 | |||
| 59 | - For any non-trivial patch, provide information about how you | ||
| 60 | tested the patch, and for any non-trivial or non-obvious testing | ||
| 61 | setup, provide details of that setup. | ||
| 62 | |||
| 63 | Doing a quick 'git log' in meta-dpdk will provide you with many | ||
| 64 | examples of good example commits if you have questions about any | ||
| 65 | aspect of the preferred format. | ||
| 66 | |||
| 67 | The meta-dpdk maintainers will do their best to review and/or pull in | ||
| 68 | a patch or patchset within 24 hours of the time it was posted. For | ||
| 69 | larger and/or more involved patches and patchsets, the review process | ||
| 70 | may take longer. | ||
| 71 | |||
| 72 | Maintainer: Anuj Mittal <anuj.mittal@intel.com> | ||
diff --git a/meta-dpdk/conf/layer.conf b/meta-dpdk/conf/layer.conf new file mode 100644 index 00000000..45e5bd9d --- /dev/null +++ b/meta-dpdk/conf/layer.conf | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | # We have a conf and classes directory, add to BBPATH | ||
| 2 | BBPATH .= ":${LAYERDIR}" | ||
| 3 | |||
| 4 | # We have recipes-* directories, add to BBFILES | ||
| 5 | BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ | ||
| 6 | ${LAYERDIR}/recipes-*/*/*.bbappend" | ||
| 7 | |||
| 8 | BBFILE_COLLECTIONS += "dpdk" | ||
| 9 | BBFILE_PATTERN_dpdk := "^${LAYERDIR}/" | ||
| 10 | BBFILE_PRIORITY_dpdk = "5" | ||
| 11 | |||
| 12 | LAYERDEPENDS_dpdk = "core" | ||
| 13 | |||
| 14 | # This should only be incremented on significant changes that will | ||
| 15 | # cause compatibility issues with other layers | ||
| 16 | LAYERVERSION_dpdk = "1" | ||
| 17 | LAYERSERIES_COMPAT_dpdk = "kirkstone langdale" | ||
| 18 | |||
| 19 | BBFILES_DYNAMIC += " \ | ||
| 20 | clang-layer:${LAYERDIR}/dynamic-layers/clang-layer/*/*/*.bb \ | ||
| 21 | clang-layer:${LAYERDIR}/dynamic-layers/clang-layer/*/*/*.bbappend \ | ||
| 22 | " | ||
diff --git a/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0001-configure-skip-toolchain-checks.patch b/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0001-configure-skip-toolchain-checks.patch new file mode 100644 index 00000000..32a88b20 --- /dev/null +++ b/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0001-configure-skip-toolchain-checks.patch | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | From 53f8a8dffa571de99b50f1a7b757cfd7d8c24d21 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
| 3 | Date: Mon, 17 Oct 2022 15:44:16 +0800 | ||
| 4 | Subject: [PATCH 1/4] configure: skip toolchain checks | ||
| 5 | |||
| 6 | Current logic fetch full command line along with the tool. i.e | ||
| 7 | gcc -m64 -march=skylake -mtune=generic ... | ||
| 8 | |||
| 9 | Which throws ERROR: Cannot find tool -m64 | ||
| 10 | |||
| 11 | So need to re-write for loop, so it can work in cross-compilation | ||
| 12 | environment too. | ||
| 13 | |||
| 14 | Upstream-Status: Inappropriate | ||
| 15 | |||
| 16 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
| 17 | --- | ||
| 18 | configure | 12 ++++++------ | ||
| 19 | 1 file changed, 6 insertions(+), 6 deletions(-) | ||
| 20 | |||
| 21 | diff --git a/configure b/configure | ||
| 22 | index 70fdfdf..48d1ea5 100755 | ||
| 23 | --- a/configure | ||
| 24 | +++ b/configure | ||
| 25 | @@ -38,12 +38,12 @@ check_toolchain() | ||
| 26 | : ${EMACS=emacs} | ||
| 27 | : ${ARCH_INCLUDES=} | ||
| 28 | |||
| 29 | - for TOOL in $PKG_CONFIG $CC $LD $OBJCOPY $CLANG $LLC $M4; do | ||
| 30 | - if [ ! $(command -v ${TOOL} 2>/dev/null) ]; then | ||
| 31 | - echo "*** ERROR: Cannot find tool ${TOOL}" ; | ||
| 32 | - exit 1; | ||
| 33 | - fi; | ||
| 34 | - done | ||
| 35 | + #for TOOL in $PKG_CONFIG $CC $LD $OBJCOPY $CLANG $LLC $M4; do | ||
| 36 | + # if [ ! $(command -v ${TOOL} 2>/dev/null) ]; then | ||
| 37 | + # echo "*** ERROR: Cannot find tool ${TOOL}" ; | ||
| 38 | + # exit 1; | ||
| 39 | + # fi; | ||
| 40 | + #done | ||
| 41 | |||
| 42 | clang_version=$($CLANG --version | grep -Po '(?<=clang version )[[:digit:]]+') | ||
| 43 | echo "Found clang binary '$CLANG' with version $clang_version (from '$($CLANG --version | head -n 1)')" | ||
| 44 | -- | ||
| 45 | 2.25.1 | ||
| 46 | |||
diff --git a/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0002-Makefile-It-does-not-detect-libbpf-header-from-sysro.patch b/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0002-Makefile-It-does-not-detect-libbpf-header-from-sysro.patch new file mode 100644 index 00000000..2e667836 --- /dev/null +++ b/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0002-Makefile-It-does-not-detect-libbpf-header-from-sysro.patch | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | From 2840cf0b89497f545fae2eed7ece3f3c5fc558e3 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
| 3 | Date: Mon, 17 Oct 2022 15:50:34 +0800 | ||
| 4 | Subject: [PATCH 2/4] Makefile: It does not detect libbpf header from sysroot | ||
| 5 | |||
| 6 | So adding sysroot headers path. | ||
| 7 | |||
| 8 | Upstream-Status: OE-Specific | ||
| 9 | |||
| 10 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
| 11 | --- | ||
| 12 | lib/common.mk | 2 +- | ||
| 13 | lib/libxdp/Makefile | 2 +- | ||
| 14 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/lib/common.mk b/lib/common.mk | ||
| 17 | index 56c0406..ab0bad8 100644 | ||
| 18 | --- a/lib/common.mk | ||
| 19 | +++ b/lib/common.mk | ||
| 20 | @@ -55,7 +55,7 @@ LIBXDP_SOURCES := $(wildcard $(LIBXDP_DIR)/*.[ch] $(LIBXDP_DIR)/*.in) | ||
| 21 | KERN_USER_H ?= $(wildcard common_kern_user.h) | ||
| 22 | |||
| 23 | CFLAGS += -I$(HEADER_DIR) -I$(LIB_DIR)/util $(ARCH_INCLUDES) | ||
| 24 | -BPF_CFLAGS += -I$(HEADER_DIR) $(ARCH_INCLUDES) | ||
| 25 | +BPF_CFLAGS += -I$(HEADER_DIR) $(ARCH_INCLUDES) -I${STAGING_INCDIR}/ | ||
| 26 | |||
| 27 | BPF_HEADERS := $(wildcard $(HEADER_DIR)/bpf/*.h) $(wildcard $(HEADER_DIR)/xdp/*.h) | ||
| 28 | |||
| 29 | diff --git a/lib/libxdp/Makefile b/lib/libxdp/Makefile | ||
| 30 | index 358b751..8f459d8 100644 | ||
| 31 | --- a/lib/libxdp/Makefile | ||
| 32 | +++ b/lib/libxdp/Makefile | ||
| 33 | @@ -30,7 +30,7 @@ PC_FILE := $(OBJDIR)/libxdp.pc | ||
| 34 | TEMPLATED_SOURCES := xdp-dispatcher.c | ||
| 35 | |||
| 36 | CFLAGS += -I$(HEADER_DIR) | ||
| 37 | -BPF_CFLAGS += -I$(HEADER_DIR) | ||
| 38 | +BPF_CFLAGS += -I$(HEADER_DIR) -I${STAGING_INCDIR}/ | ||
| 39 | |||
| 40 | |||
| 41 | ifndef BUILD_STATIC_ONLY | ||
| 42 | -- | ||
| 43 | 2.25.1 | ||
| 44 | |||
diff --git a/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0003-Makefile-fix-KeyError-failure.patch b/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0003-Makefile-fix-KeyError-failure.patch new file mode 100644 index 00000000..41c57f6e --- /dev/null +++ b/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0003-Makefile-fix-KeyError-failure.patch | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | From 157546fbc4f18751c52b3c8788879c05cf253331 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
| 3 | Date: Mon, 17 Oct 2022 16:02:46 +0800 | ||
| 4 | Subject: [PATCH 3/4] Makefile: fix KeyError failure | ||
| 5 | |||
| 6 | Error: | ||
| 7 | Exception: KeyError: 'getpwuid(): uid not found: 11857215' | ||
| 8 | |||
| 9 | Upstream-Status: Inappropriate | ||
| 10 | |||
| 11 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
| 12 | --- | ||
| 13 | lib/libxdp/Makefile | 2 +- | ||
| 14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 15 | |||
| 16 | diff --git a/lib/libxdp/Makefile b/lib/libxdp/Makefile | ||
| 17 | index 8f459d8..9a340a3 100644 | ||
| 18 | --- a/lib/libxdp/Makefile | ||
| 19 | +++ b/lib/libxdp/Makefile | ||
| 20 | @@ -55,7 +55,7 @@ install: all | ||
| 21 | $(Q)install -d -m 0755 $(DESTDIR)$(BPF_OBJECT_DIR) | ||
| 22 | $(Q)install -m 0644 $(LIB_HEADERS) $(DESTDIR)$(HDRDIR)/ | ||
| 23 | $(Q)install -m 0644 $(PC_FILE) $(DESTDIR)$(LIBDIR)/pkgconfig/ | ||
| 24 | - $(Q)cp -fpR $(SHARED_LIBS) $(STATIC_LIBS) $(DESTDIR)$(LIBDIR) | ||
| 25 | + $(Q)cp -fpR --no-preserve=ownership $(SHARED_LIBS) $(STATIC_LIBS) $(DESTDIR)$(LIBDIR) | ||
| 26 | $(Q)install -m 0755 $(XDP_OBJS) $(DESTDIR)$(BPF_OBJECT_DIR) | ||
| 27 | $(if $(MAN_FILES),$(Q)install -m 0755 -d $(DESTDIR)$(MANDIR)/man3) | ||
| 28 | $(if $(MAN_FILES),$(Q)install -m 0644 $(MAN_FILES) $(DESTDIR)$(MANDIR)/man3) | ||
| 29 | -- | ||
| 30 | 2.25.1 | ||
| 31 | |||
diff --git a/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0004-Makefile-fix-libxdp.pc-error.patch b/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0004-Makefile-fix-libxdp.pc-error.patch new file mode 100644 index 00000000..b1e15e52 --- /dev/null +++ b/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0004-Makefile-fix-libxdp.pc-error.patch | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | From 46b3ff797135574aa0ee42f633a281d44f48da95 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
| 3 | Date: Mon, 17 Oct 2022 16:05:15 +0800 | ||
| 4 | Subject: [PATCH 4/4] Makefile: fix libxdp.pc error | ||
| 5 | |||
| 6 | Error: | ||
| 7 | do_populate_sysroot: QA Issue: libxdp.pc failed sanity test (tmpdir) in | ||
| 8 | path ... xdp-tools/1.2.8-r0/sysroot-destdir/usr/lib/pkgconfig [pkgconfig] | ||
| 9 | |||
| 10 | Upstream-Status: Inappropriate | ||
| 11 | |||
| 12 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
| 13 | --- | ||
| 14 | lib/libxdp/Makefile | 4 ++-- | ||
| 15 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/lib/libxdp/Makefile b/lib/libxdp/Makefile | ||
| 18 | index 9a340a3..bc39177 100644 | ||
| 19 | --- a/lib/libxdp/Makefile | ||
| 20 | +++ b/lib/libxdp/Makefile | ||
| 21 | @@ -76,8 +76,8 @@ $(OBJDIR)/libxdp.so.$(LIBXDP_VERSION): $(SHARED_OBJS) | ||
| 22 | $^ $(LDFLAGS) $(LDLIBS) -o $@ | ||
| 23 | |||
| 24 | $(OBJDIR)/libxdp.pc: | ||
| 25 | - $(Q)sed -e "s|@PREFIX@|$(PREFIX)|" \ | ||
| 26 | - -e "s|@LIBDIR@|$(LIBDIR)|" \ | ||
| 27 | + $(Q)sed -e "s|@PREFIX@|$(prefix)|" \ | ||
| 28 | + -e "s|@LIBDIR@|$(libdir)|" \ | ||
| 29 | -e "s|@VERSION@|$(TOOLS_VERSION)|" \ | ||
| 30 | < libxdp.pc.template > $@ | ||
| 31 | |||
| 32 | -- | ||
| 33 | 2.25.1 | ||
| 34 | |||
diff --git a/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools_1.2.8.bb b/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools_1.2.8.bb new file mode 100644 index 00000000..7cd49a0b --- /dev/null +++ b/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools_1.2.8.bb | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | SUMMARY = "Utilities and example programs for use with XDP" | ||
| 2 | HOMEPAGE = "https://github.com/xdp-project/xdp-tools" | ||
| 3 | LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & BSD-2-Clause" | ||
| 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=9ee53f8d06bbdb4c11b1557ecc4f8cd5 \ | ||
| 5 | file://LICENSES/GPL-2.0;md5=994331978b428511800bfbd17eea3001 \ | ||
| 6 | file://LICENSES/LGPL-2.1;md5=b370887980db5dd40659b50909238dbd \ | ||
| 7 | file://LICENSES/BSD-2-Clause;md5=5d6306d1b08f8df623178dfd81880927" | ||
| 8 | |||
| 9 | DEPENDS += " libbpf clang-native zlib elfutils libpcap" | ||
| 10 | |||
| 11 | SRC_URI = "git://github.com/xdp-project/xdp-tools.git;branch=v1.2;protocol=https \ | ||
| 12 | file://0001-configure-skip-toolchain-checks.patch \ | ||
| 13 | file://0002-Makefile-It-does-not-detect-libbpf-header-from-sysro.patch \ | ||
| 14 | file://0003-Makefile-fix-KeyError-failure.patch \ | ||
| 15 | file://0004-Makefile-fix-libxdp.pc-error.patch \ | ||
| 16 | " | ||
| 17 | |||
| 18 | SRCREV = "d4ff1f9bcf8b03556b625ab6e16958598482e861" | ||
| 19 | |||
| 20 | S = "${WORKDIR}/git" | ||
| 21 | |||
| 22 | inherit pkgconfig | ||
| 23 | |||
| 24 | EXTRA_OEMAKE += "PREFIX=${D}${prefix} LIBDIR=${D}${libdir} BUILD_STATIC_ONLY=1 PRODUCTION=1" | ||
| 25 | |||
| 26 | CFLAGS += "-fPIC" | ||
| 27 | |||
| 28 | export STAGING_INCDIR | ||
| 29 | |||
| 30 | do_install () { | ||
| 31 | oe_runmake install | ||
| 32 | |||
| 33 | # Remove object files *.o | ||
| 34 | rm -rf ${D}/${libdir}/bpf | ||
| 35 | } | ||
| 36 | |||
| 37 | RDEPENDS:${PN} += "bash" | ||
diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk-kmods_git.bb b/meta-dpdk/recipes-extended/dpdk/dpdk-kmods_git.bb new file mode 100644 index 00000000..e929d5b7 --- /dev/null +++ b/meta-dpdk/recipes-extended/dpdk/dpdk-kmods_git.bb | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | SUMMARY = "DPDK Kernel Module igb_uio" | ||
| 2 | DESCRIPTION = "UIO driver for Intel IGB PCI cards" | ||
| 3 | HOMEPAGE = "http://git.dpdk.org/dpdk-kmods/" | ||
| 4 | |||
| 5 | FILESEXTRAPATHS:prepend := "${THISDIR}/dpdk:" | ||
| 6 | |||
| 7 | LICENSE = "GPL-2.0-only" | ||
| 8 | LIC_FILES_CHKSUM = "file://igb_uio.c;beginline=1;endline=4;md5=a05cd72f85021e22ff6b2632b437450b" | ||
| 9 | |||
| 10 | SRC_URI = "git://dpdk.org/git/dpdk-kmods;protocol=https;branch=main \ | ||
| 11 | file://0001-support-5.18-kernel-ABI.patch;patchdir=../.. \ | ||
| 12 | " | ||
| 13 | SRCREV = "4a589f7bed00fc7009c93d430bd214ac7ad2bb6b" | ||
| 14 | |||
| 15 | S = "${WORKDIR}/git/linux/igb_uio" | ||
| 16 | |||
| 17 | PV = "1.0" | ||
| 18 | |||
| 19 | inherit module | ||
| 20 | |||
| 21 | EXTRA_OEMAKE += "KSRC='${STAGING_KERNEL_DIR}'" | ||
| 22 | |||
| 23 | do_install() { | ||
| 24 | if [ -e "${S}/igb_uio.ko" ] | ||
| 25 | then | ||
| 26 | install -d ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net/ | ||
| 27 | install -m 0644 ${S}/igb_uio.ko ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net/ | ||
| 28 | fi | ||
| 29 | } | ||
diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk-module_21.11.2.bb b/meta-dpdk/recipes-extended/dpdk/dpdk-module_21.11.2.bb new file mode 100644 index 00000000..307ff407 --- /dev/null +++ b/meta-dpdk/recipes-extended/dpdk/dpdk-module_21.11.2.bb | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | include dpdk.inc | ||
| 2 | |||
| 3 | FILESEXTRAPATHS:prepend := "${THISDIR}/dpdk:" | ||
| 4 | |||
| 5 | SRC_URI += " \ | ||
| 6 | file://0001-Makefile-add-makefile.patch \ | ||
| 7 | " | ||
| 8 | STABLE = "-stable" | ||
| 9 | BRANCH = "21.11" | ||
| 10 | SRCREV = "7bcd45ce824d0ea2a9f30d16855613a93521851b" | ||
| 11 | S = "${WORKDIR}/git" | ||
| 12 | |||
| 13 | inherit module | ||
| 14 | |||
| 15 | #kernel module needs 'rte_build_config.h', which is generated at buid time | ||
| 16 | DEPENDS += "dpdk" | ||
| 17 | |||
| 18 | COMPATIBLE_MACHINE = "null" | ||
| 19 | COMPATIBLE_HOST:libc-musl:class-target = "null" | ||
| 20 | COMPATIBLE_HOST:linux-gnux32 = "null" | ||
| 21 | |||
| 22 | export S | ||
| 23 | export STAGING_KERNEL_DIR | ||
| 24 | export STAGING_INCDIR | ||
| 25 | export INSTALL_MOD_DIR="dpdk" | ||
| 26 | |||
| 27 | do_configure[noexec] = "1" | ||
| 28 | |||
| 29 | do_compile() { | ||
| 30 | cd ${S}/kernel/linux/kni | ||
| 31 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS | ||
| 32 | oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \ | ||
| 33 | KERNEL_VERSION=${KERNEL_VERSION} \ | ||
| 34 | CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ | ||
| 35 | AR="${KERNEL_AR}" \ | ||
| 36 | O=${STAGING_KERNEL_BUILDDIR} \ | ||
| 37 | KBUILD_EXTRA_SYMBOLS="${KBUILD_EXTRA_SYMBOLS}" \ | ||
| 38 | ${MAKE_TARGETS} | ||
| 39 | } | ||
| 40 | |||
| 41 | do_install() { | ||
| 42 | cd ${S}/kernel/linux/kni | ||
| 43 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS | ||
| 44 | oe_runmake DEPMOD=echo MODLIB="${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}" \ | ||
| 45 | INSTALL_FW_PATH="${D}${nonarch_base_libdir}/firmware" \ | ||
| 46 | CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ | ||
| 47 | O=${STAGING_KERNEL_BUILDDIR} \ | ||
| 48 | ${MODULES_INSTALL_TARGET} | ||
| 49 | } | ||
| 50 | |||
| 51 | # CVE-2021-3839 has been fixed by commit 4c40d30d2b in 21.11.1 | ||
| 52 | # NVD database is incomplete | ||
| 53 | # CVE-2022-0669 has been fixed by commit 6cb68162e4 in 21.11.1 | ||
| 54 | # NVD database is incomplete | ||
| 55 | CVE_CHECK_IGNORE += "\ | ||
| 56 | CVE-2021-3839 \ | ||
| 57 | CVE-2022-0669 \ | ||
| 58 | " | ||
diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk-module_22.07.0.bb b/meta-dpdk/recipes-extended/dpdk/dpdk-module_22.07.0.bb new file mode 100644 index 00000000..3fcbf1ec --- /dev/null +++ b/meta-dpdk/recipes-extended/dpdk/dpdk-module_22.07.0.bb | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | include dpdk.inc | ||
| 2 | |||
| 3 | FILESEXTRAPATHS:prepend := "${THISDIR}/dpdk:" | ||
| 4 | |||
| 5 | SRC_URI = "git://dpdk.org/git/dpdk;branch=${BRANCH};protocol=https \ | ||
| 6 | file://0001-Makefile-add-makefile.patch \ | ||
| 7 | " | ||
| 8 | |||
| 9 | BRANCH = "releases" | ||
| 10 | SRCREV = "4fceceed5b5e9fbf04acffd66239c79d81e79260" | ||
| 11 | S = "${WORKDIR}/git" | ||
| 12 | |||
| 13 | inherit module | ||
| 14 | |||
| 15 | #kernel module needs 'rte_build_config.h', which is generated at buid time | ||
| 16 | DEPENDS += "dpdk" | ||
| 17 | |||
| 18 | COMPATIBLE_MACHINE = "null" | ||
| 19 | COMPATIBLE_HOST:libc-musl:class-target = "null" | ||
| 20 | COMPATIBLE_HOST:linux-gnux32 = "null" | ||
| 21 | |||
| 22 | export S | ||
| 23 | export STAGING_KERNEL_DIR | ||
| 24 | export STAGING_INCDIR | ||
| 25 | export INSTALL_MOD_DIR="dpdk" | ||
| 26 | |||
| 27 | do_configure[noexec] = "1" | ||
| 28 | |||
| 29 | do_compile() { | ||
| 30 | cd ${S}/kernel/linux/kni | ||
| 31 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS | ||
| 32 | oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \ | ||
| 33 | KERNEL_VERSION=${KERNEL_VERSION} \ | ||
| 34 | CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ | ||
| 35 | AR="${KERNEL_AR}" \ | ||
| 36 | O=${STAGING_KERNEL_BUILDDIR} \ | ||
| 37 | KBUILD_EXTRA_SYMBOLS="${KBUILD_EXTRA_SYMBOLS}" \ | ||
| 38 | ${MAKE_TARGETS} | ||
| 39 | } | ||
| 40 | |||
| 41 | do_install() { | ||
| 42 | cd ${S}/kernel/linux/kni | ||
| 43 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS | ||
| 44 | oe_runmake DEPMOD=echo MODLIB="${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}" \ | ||
| 45 | INSTALL_FW_PATH="${D}${nonarch_base_libdir}/firmware" \ | ||
| 46 | CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ | ||
| 47 | O=${STAGING_KERNEL_BUILDDIR} \ | ||
| 48 | ${MODULES_INSTALL_TARGET} | ||
| 49 | } | ||
| 50 | |||
| 51 | # CVE-2021-3839 has been fixed by commit 4c40d30d2b in 21.11.1 | ||
| 52 | # NVD database is incomplete | ||
| 53 | # CVE-2022-0669 has been fixed by commit 6cb68162e4 in 21.11.1 | ||
| 54 | # NVD database is incomplete | ||
| 55 | CVE_CHECK_IGNORE += "\ | ||
| 56 | CVE-2021-3839 \ | ||
| 57 | CVE-2022-0669 \ | ||
| 58 | " | ||
diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk.inc b/meta-dpdk/recipes-extended/dpdk/dpdk.inc new file mode 100644 index 00000000..b5c14984 --- /dev/null +++ b/meta-dpdk/recipes-extended/dpdk/dpdk.inc | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | DESCRIPTION = "Intel(r) Data Plane Development Kit" | ||
| 2 | HOMEPAGE = "http://dpdk.org" | ||
| 3 | |||
| 4 | LICENSE = "BSD-3-Clause & LGPL-2.1-only & GPL-2.0-only" | ||
| 5 | LIC_FILES_CHKSUM = "file://license/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
| 6 | file://license/lgpl-2.1.txt;md5=4b54a1fd55a448865a0b32d41598759d \ | ||
| 7 | file://license/bsd-3-clause.txt;md5=0f00d99239d922ffd13cabef83b33444" | ||
| 8 | |||
| 9 | SRC_URI = "git://dpdk.org/dpdk${STABLE};branch=${BRANCH} \ | ||
| 10 | " | ||
| 11 | |||
| 12 | CVE_PRODUCT = "data_plane_development_kit" | ||
diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk/0001-Makefile-add-makefile.patch b/meta-dpdk/recipes-extended/dpdk/dpdk/0001-Makefile-add-makefile.patch new file mode 100644 index 00000000..18b75fb6 --- /dev/null +++ b/meta-dpdk/recipes-extended/dpdk/dpdk/0001-Makefile-add-makefile.patch | |||
| @@ -0,0 +1,74 @@ | |||
| 1 | From 768cef60957d5e840071d1d6514d4add3f3c2904 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
| 3 | Date: Wed, 14 Apr 2021 17:25:53 +0800 | ||
| 4 | Subject: [PATCH] Makefile: add makefile | ||
| 5 | |||
| 6 | Current meson build for kernel module build does not fit in Yocto. | ||
| 7 | So added Makefile to build rte_kni.ko | ||
| 8 | |||
| 9 | Upstream-Status: Inappropriate | ||
| 10 | |||
| 11 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
| 12 | --- | ||
| 13 | kernel/linux/kni/Kbuild | 6 ------ | ||
| 14 | kernel/linux/kni/Makefile | 35 +++++++++++++++++++++++++++++++++++ | ||
| 15 | 2 files changed, 35 insertions(+), 6 deletions(-) | ||
| 16 | delete mode 100644 kernel/linux/kni/Kbuild | ||
| 17 | create mode 100644 kernel/linux/kni/Makefile | ||
| 18 | |||
| 19 | diff --git a/kernel/linux/kni/Kbuild b/kernel/linux/kni/Kbuild | ||
| 20 | deleted file mode 100644 | ||
| 21 | index e5452d6c00..0000000000 | ||
| 22 | --- a/kernel/linux/kni/Kbuild | ||
| 23 | +++ /dev/null | ||
| 24 | @@ -1,6 +0,0 @@ | ||
| 25 | -# SPDX-License-Identifier: BSD-3-Clause | ||
| 26 | -# Copyright(c) 2018 Luca Boccassi <bluca@debian.org> | ||
| 27 | - | ||
| 28 | -ccflags-y := $(MODULE_CFLAGS) | ||
| 29 | -obj-m := rte_kni.o | ||
| 30 | -rte_kni-y := $(patsubst $(src)/%.c,%.o,$(wildcard $(src)/*.c)) | ||
| 31 | diff --git a/kernel/linux/kni/Makefile b/kernel/linux/kni/Makefile | ||
| 32 | new file mode 100644 | ||
| 33 | index 0000000000..19897ee06e | ||
| 34 | --- /dev/null | ||
| 35 | +++ b/kernel/linux/kni/Makefile | ||
| 36 | @@ -0,0 +1,35 @@ | ||
| 37 | +# | ||
| 38 | +# Makefile for building rte_kni.ko | ||
| 39 | +# | ||
| 40 | +MODULE_CFLAGS += -include $(S)/config/rte_config.h | ||
| 41 | +MODULE_CFLAGS += -I$(S)/lib/librte_eal/include | ||
| 42 | +MODULE_CFLAGS += -I$(S)/lib/librte_kni | ||
| 43 | +MODULE_CFLAGS += -I$(S)/kernel/linux/kni | ||
| 44 | +MODULE_CFLAGS += -I$(S) | ||
| 45 | +MODULE_CFLAGS += -I$(STAGING_INCDIR) | ||
| 46 | + | ||
| 47 | +rte_kni-objs = kni_misc.o kni_net.o | ||
| 48 | + | ||
| 49 | +ccflags-y := $(MODULE_CFLAGS) | ||
| 50 | +cflags-y := $(MODULE_CFLAGS) | ||
| 51 | +obj-m := rte_kni.o | ||
| 52 | + | ||
| 53 | + | ||
| 54 | +KERNEL_MAKE_OPTS := -C $(STAGING_KERNEL_DIR) M=$(CURDIR) | ||
| 55 | +ifneq ($(ARCH),) | ||
| 56 | +KERNEL_MAKE_OPTS += ARCH=$(ARCH) | ||
| 57 | +endif | ||
| 58 | +ifneq ($(CROSS_COMPILE),) | ||
| 59 | +KERNEL_MAKE_OPTS += CROSS_COMPILE=$(CROSS_COMPILE) | ||
| 60 | +endif | ||
| 61 | + | ||
| 62 | +build: | ||
| 63 | + $(MAKE) $(KERNEL_MAKE_OPTS) modules | ||
| 64 | + | ||
| 65 | +install: modules_install | ||
| 66 | + | ||
| 67 | +modules_install: | ||
| 68 | + $(MAKE) $(KERNEL_MAKE_OPTS) modules_install | ||
| 69 | + | ||
| 70 | +clean: | ||
| 71 | + $(MAKE) $(KERNEL_MAKE_OPTS) clean | ||
| 72 | -- | ||
| 73 | 2.17.1 | ||
| 74 | |||
diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk/0001-meson.build-march-and-mcpu-already-passed-by-Yocto-21.11.patch b/meta-dpdk/recipes-extended/dpdk/dpdk/0001-meson.build-march-and-mcpu-already-passed-by-Yocto-21.11.patch new file mode 100644 index 00000000..a74869de --- /dev/null +++ b/meta-dpdk/recipes-extended/dpdk/dpdk/0001-meson.build-march-and-mcpu-already-passed-by-Yocto-21.11.patch | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | From 9aeb0bedf63f0f8f132194705b63ed0045452354 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
| 3 | Date: Wed, 8 Dec 2021 11:48:27 +0800 | ||
| 4 | Subject: [PATCH] meson.build:-march and -mcpu already passed by Yocto | ||
| 5 | |||
| 6 | Upstream-Status: Inappropriate | ||
| 7 | |||
| 8 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
| 9 | --- | ||
| 10 | config/meson.build | 12 ++++++------ | ||
| 11 | 1 file changed, 6 insertions(+), 6 deletions(-) | ||
| 12 | |||
| 13 | diff --git a/config/meson.build b/config/meson.build | ||
| 14 | index 805d5d51d0..620331a736 100644 | ||
| 15 | --- a/config/meson.build | ||
| 16 | +++ b/config/meson.build | ||
| 17 | @@ -127,12 +127,12 @@ dpdk_conf.set('RTE_MACHINE', cpu_instruction_set) | ||
| 18 | machine_args = [] | ||
| 19 | |||
| 20 | # ppc64 does not support -march= at all, use -mcpu and -mtune for that | ||
| 21 | -if host_machine.cpu_family().startswith('ppc') | ||
| 22 | - machine_args += '-mcpu=' + cpu_instruction_set | ||
| 23 | - machine_args += '-mtune=' + cpu_instruction_set | ||
| 24 | -else | ||
| 25 | - machine_args += '-march=' + cpu_instruction_set | ||
| 26 | -endif | ||
| 27 | +#if host_machine.cpu_family().startswith('ppc') | ||
| 28 | +# machine_args += '-mcpu=' + cpu_instruction_set | ||
| 29 | +# machine_args += '-mtune=' + cpu_instruction_set | ||
| 30 | +#else | ||
| 31 | +# machine_args += '-march=' + cpu_instruction_set | ||
| 32 | +#endif | ||
| 33 | |||
| 34 | toolchain = cc.get_id() | ||
| 35 | dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain) | ||
| 36 | -- | ||
| 37 | 2.17.1 | ||
| 38 | |||
diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk/0001-support-5.18-kernel-ABI.patch b/meta-dpdk/recipes-extended/dpdk/dpdk/0001-support-5.18-kernel-ABI.patch new file mode 100644 index 00000000..bada7bdd --- /dev/null +++ b/meta-dpdk/recipes-extended/dpdk/dpdk/0001-support-5.18-kernel-ABI.patch | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | From 5f2d8db6692e257b16f1c5204efaaac2362f34ab Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Andrea Righi <andrea.righi@canonical.com> | ||
| 3 | Date: Tue, 15 Nov 2022 13:56:45 +0800 | ||
| 4 | Subject: [PATCH] support 5.18+ kernel ABI | ||
| 5 | |||
| 6 | Upstream-Status: Pending [Taken from Ubuntu Source, https://git.launchpad.net/ubuntu/+source/dpdk-kmods/commit/debian/patches?id=9d628c02c169d8190bc2cb6afd81e4d364c382cd] | ||
| 7 | |||
| 8 | Signed-off-by: Andrea Righi <andrea.righi@canonical.com> | ||
| 9 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
| 10 | --- | ||
| 11 | linux/igb_uio/igb_uio.c | 13 ++++++++++++- | ||
| 12 | 1 file changed, 12 insertions(+), 1 deletion(-) | ||
| 13 | |||
| 14 | diff --git a/linux/igb_uio/igb_uio.c b/linux/igb_uio/igb_uio.c | ||
| 15 | index 33e0e02..89b5262 100644 | ||
| 16 | --- a/linux/igb_uio/igb_uio.c | ||
| 17 | +++ b/linux/igb_uio/igb_uio.c | ||
| 18 | @@ -30,9 +30,20 @@ enum rte_intr_mode { | ||
| 19 | #define RTE_INTR_MODE_MSI_NAME "msi" | ||
| 20 | #define RTE_INTR_MODE_MSIX_NAME "msix" | ||
| 21 | |||
| 22 | - | ||
| 23 | #include "compat.h" | ||
| 24 | |||
| 25 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) | ||
| 26 | +static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask) | ||
| 27 | +{ | ||
| 28 | + return dma_set_mask(&dev->dev, mask); | ||
| 29 | +} | ||
| 30 | + | ||
| 31 | +static inline int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask) | ||
| 32 | +{ | ||
| 33 | + return dma_set_coherent_mask(&dev->dev, mask); | ||
| 34 | +} | ||
| 35 | +#endif | ||
| 36 | + | ||
| 37 | /** | ||
| 38 | * A structure describing the private information for a uio device. | ||
| 39 | */ | ||
| 40 | -- | ||
| 41 | 2.25.1 | ||
| 42 | |||
diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk_21.11.2.bb b/meta-dpdk/recipes-extended/dpdk/dpdk_21.11.2.bb new file mode 100644 index 00000000..bb812e12 --- /dev/null +++ b/meta-dpdk/recipes-extended/dpdk/dpdk_21.11.2.bb | |||
| @@ -0,0 +1,77 @@ | |||
| 1 | include dpdk.inc | ||
| 2 | |||
| 3 | SRC_URI += " \ | ||
| 4 | file://0001-meson.build-march-and-mcpu-already-passed-by-Yocto-21.11.patch \ | ||
| 5 | " | ||
| 6 | |||
| 7 | STABLE = "-stable" | ||
| 8 | BRANCH = "21.11" | ||
| 9 | SRCREV = "7bcd45ce824d0ea2a9f30d16855613a93521851b" | ||
| 10 | S = "${WORKDIR}/git" | ||
| 11 | |||
| 12 | # CVE-2021-3839 has been fixed by commit 4c40d30d2b in 21.11.1 | ||
| 13 | # NVD database is incomplete | ||
| 14 | # CVE-2022-0669 has been fixed by commit 6cb68162e4 in 21.11.1 | ||
| 15 | # NVD database is incomplete | ||
| 16 | CVE_CHECK_IGNORE += "\ | ||
| 17 | CVE-2021-3839 \ | ||
| 18 | CVE-2022-0669 \ | ||
| 19 | " | ||
| 20 | |||
| 21 | # kernel module is provide by dpdk-module recipe, so disable here | ||
| 22 | EXTRA_OEMESON = " -Denable_kmods=false \ | ||
| 23 | -Dexamples=all \ | ||
| 24 | " | ||
| 25 | |||
| 26 | COMPATIBLE_MACHINE = "null" | ||
| 27 | COMPATIBLE_HOST:libc-musl:class-target = "null" | ||
| 28 | COMPATIBLE_HOST:linux-gnux32 = "null" | ||
| 29 | |||
| 30 | PACKAGECONFIG ??= " " | ||
| 31 | PACKAGECONFIG[afxdp] = ",,libbpf xdp-tools" | ||
| 32 | PACKAGECONFIG[libvirt] = ",,libvirt" | ||
| 33 | |||
| 34 | RDEPENDS:${PN} += "pciutils python3-core" | ||
| 35 | RDEPENDS:${PN}-examples += "bash" | ||
| 36 | DEPENDS = "numactl python3-pyelftools-native" | ||
| 37 | |||
| 38 | inherit meson pkgconfig | ||
| 39 | |||
| 40 | INSTALL_PATH = "${prefix}/share/dpdk" | ||
| 41 | |||
| 42 | do_install:append(){ | ||
| 43 | # remove source files | ||
| 44 | rm -rf ${D}/${INSTALL_PATH}/examples/* | ||
| 45 | |||
| 46 | # Install examples | ||
| 47 | install -m 0755 -d ${D}/${INSTALL_PATH}/examples/ | ||
| 48 | for dirname in ${B}/examples/dpdk-* | ||
| 49 | do | ||
| 50 | if [ ! -d ${dirname} ] && [ -x ${dirname} ]; then | ||
| 51 | install -m 0755 ${dirname} ${D}/${INSTALL_PATH}/examples/ | ||
| 52 | fi | ||
| 53 | done | ||
| 54 | |||
| 55 | } | ||
| 56 | |||
| 57 | PACKAGES =+ "${PN}-examples ${PN}-tools" | ||
| 58 | |||
| 59 | FILES:${PN} += " ${bindir}/dpdk-testpmd \ | ||
| 60 | ${bindir}/dpdk-proc-info \ | ||
| 61 | ${libdir}/*.so* \ | ||
| 62 | ${libdir}/dpdk/pmds-22.0/*.so* \ | ||
| 63 | " | ||
| 64 | FILES:${PN}-examples = " \ | ||
| 65 | ${prefix}/share/dpdk/examples/* \ | ||
| 66 | " | ||
| 67 | |||
| 68 | FILES:${PN}-tools = " \ | ||
| 69 | ${bindir}/dpdk-pdump \ | ||
| 70 | ${bindir}/dpdk-test \ | ||
| 71 | ${bindir}/dpdk-test-* \ | ||
| 72 | ${bindir}/dpdk-*.py \ | ||
| 73 | " | ||
| 74 | |||
| 75 | CVE_PRODUCT = "data_plane_development_kit" | ||
| 76 | |||
| 77 | INSANE_SKIP:${PN} = "dev-so" | ||
diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk_22.07.0.bb b/meta-dpdk/recipes-extended/dpdk/dpdk_22.07.0.bb new file mode 100644 index 00000000..9f1843bb --- /dev/null +++ b/meta-dpdk/recipes-extended/dpdk/dpdk_22.07.0.bb | |||
| @@ -0,0 +1,76 @@ | |||
| 1 | include dpdk.inc | ||
| 2 | |||
| 3 | SRC_URI = "git://dpdk.org/git/dpdk;branch=${BRANCH};protocol=https \ | ||
| 4 | file://0001-meson.build-march-and-mcpu-already-passed-by-Yocto-21.11.patch \ | ||
| 5 | " | ||
| 6 | |||
| 7 | BRANCH = "releases" | ||
| 8 | SRCREV = "4fceceed5b5e9fbf04acffd66239c79d81e79260" | ||
| 9 | S = "${WORKDIR}/git" | ||
| 10 | |||
| 11 | # CVE-2021-3839 has been fixed by commit 4c40d30d2b in 21.11.1 | ||
| 12 | # NVD database is incomplete | ||
| 13 | # CVE-2022-0669 has been fixed by commit 6cb68162e4 in 21.11.1 | ||
| 14 | # NVD database is incomplete | ||
| 15 | CVE_CHECK_IGNORE += "\ | ||
| 16 | CVE-2021-3839 \ | ||
| 17 | CVE-2022-0669 \ | ||
| 18 | " | ||
| 19 | |||
| 20 | # kernel module is provide by dpdk-module recipe, so disable here | ||
| 21 | EXTRA_OEMESON = " -Denable_kmods=false \ | ||
| 22 | -Dexamples=all \ | ||
| 23 | " | ||
| 24 | |||
| 25 | COMPATIBLE_MACHINE = "null" | ||
| 26 | COMPATIBLE_HOST:libc-musl:class-target = "null" | ||
| 27 | COMPATIBLE_HOST:linux-gnux32 = "null" | ||
| 28 | |||
| 29 | PACKAGECONFIG ??= " " | ||
| 30 | PACKAGECONFIG[afxdp] = ",,libbpf xdp-tools" | ||
| 31 | PACKAGECONFIG[libvirt] = ",,libvirt" | ||
| 32 | |||
| 33 | RDEPENDS:${PN} += "pciutils python3-core" | ||
| 34 | RDEPENDS:${PN}-examples += "bash" | ||
| 35 | DEPENDS = "numactl python3-pyelftools-native" | ||
| 36 | |||
| 37 | inherit meson pkgconfig | ||
| 38 | |||
| 39 | INSTALL_PATH = "${prefix}/share/dpdk" | ||
| 40 | |||
| 41 | do_install:append(){ | ||
| 42 | # remove source files | ||
| 43 | rm -rf ${D}/${INSTALL_PATH}/examples/* | ||
| 44 | |||
| 45 | # Install examples | ||
| 46 | install -m 0755 -d ${D}/${INSTALL_PATH}/examples/ | ||
| 47 | for dirname in ${B}/examples/dpdk-* | ||
| 48 | do | ||
| 49 | if [ ! -d ${dirname} ] && [ -x ${dirname} ]; then | ||
| 50 | install -m 0755 ${dirname} ${D}/${INSTALL_PATH}/examples/ | ||
| 51 | fi | ||
| 52 | done | ||
| 53 | |||
| 54 | } | ||
| 55 | |||
| 56 | PACKAGES =+ "${PN}-examples ${PN}-tools" | ||
| 57 | |||
| 58 | FILES:${PN} += " ${bindir}/dpdk-testpmd \ | ||
| 59 | ${bindir}/dpdk-proc-info \ | ||
| 60 | ${libdir}/*.so* \ | ||
| 61 | ${libdir}/dpdk/pmds-22.0/*.so* \ | ||
| 62 | " | ||
| 63 | FILES:${PN}-examples = " \ | ||
| 64 | ${prefix}/share/dpdk/examples/* \ | ||
| 65 | " | ||
| 66 | |||
| 67 | FILES:${PN}-tools = " \ | ||
| 68 | ${bindir}/dpdk-pdump \ | ||
| 69 | ${bindir}/dpdk-test \ | ||
| 70 | ${bindir}/dpdk-test-* \ | ||
| 71 | ${bindir}/dpdk-*.py \ | ||
| 72 | " | ||
| 73 | |||
| 74 | CVE_PRODUCT = "data_plane_development_kit" | ||
| 75 | |||
| 76 | INSANE_SKIP:${PN} = "dev-so" | ||
