From 4557324dde2becb4d34bd1fac7130f72201fcea0 Mon Sep 17 00:00:00 2001 From: Naveen Saini Date: Tue, 25 Oct 2022 11:33:11 +0800 Subject: dpdk/22.07.0: add recipe https://git.dpdk.org/dpdk/ Signed-off-by: Naveen Saini Signed-off-by: Anuj Mittal --- recipes-extended/dpdk/dpdk-module_22.07.0.bb | 58 +++++++++++++++++++++ recipes-extended/dpdk/dpdk_22.07.0.bb | 76 ++++++++++++++++++++++++++++ 2 files changed, 134 insertions(+) create mode 100644 recipes-extended/dpdk/dpdk-module_22.07.0.bb create mode 100644 recipes-extended/dpdk/dpdk_22.07.0.bb diff --git a/recipes-extended/dpdk/dpdk-module_22.07.0.bb b/recipes-extended/dpdk/dpdk-module_22.07.0.bb new file mode 100644 index 0000000..52d5d4c --- /dev/null +++ b/recipes-extended/dpdk/dpdk-module_22.07.0.bb @@ -0,0 +1,58 @@ +include dpdk.inc + +FILESEXTRAPATHS:prepend := "${THISDIR}/dpdk:" + +SRC_URI = "git://dpdk.org/dpdk;branch=${BRANCH};protocol=https \ + file://0001-Makefile-add-makefile.patch \ +" + +BRANCH = "releases" +SRCREV = "4fceceed5b5e9fbf04acffd66239c79d81e79260" +S = "${WORKDIR}/git" + +inherit module + +#kernel module needs 'rte_build_config.h', which is generated at buid time +DEPENDS += "dpdk" + +COMPATIBLE_MACHINE = "null" +COMPATIBLE_HOST:libc-musl:class-target = "null" +COMPATIBLE_HOST:linux-gnux32 = "null" + +export S +export STAGING_KERNEL_DIR +export STAGING_INCDIR +export INSTALL_MOD_DIR="dpdk" + +do_configure[noexec] = "1" + +do_compile() { + cd ${S}/kernel/linux/kni + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \ + KERNEL_VERSION=${KERNEL_VERSION} \ + CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ + AR="${KERNEL_AR}" \ + O=${STAGING_KERNEL_BUILDDIR} \ + KBUILD_EXTRA_SYMBOLS="${KBUILD_EXTRA_SYMBOLS}" \ + ${MAKE_TARGETS} +} + +do_install() { + cd ${S}/kernel/linux/kni + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + oe_runmake DEPMOD=echo MODLIB="${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}" \ + INSTALL_FW_PATH="${D}${nonarch_base_libdir}/firmware" \ + CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ + O=${STAGING_KERNEL_BUILDDIR} \ + ${MODULES_INSTALL_TARGET} +} + +# CVE-2021-3839 has been fixed by commit 4c40d30d2b in 21.11.1 +# NVD database is incomplete +# CVE-2022-0669 has been fixed by commit 6cb68162e4 in 21.11.1 +# NVD database is incomplete +CVE_CHECK_IGNORE += "\ + CVE-2021-3839 \ + CVE-2022-0669 \ +" diff --git a/recipes-extended/dpdk/dpdk_22.07.0.bb b/recipes-extended/dpdk/dpdk_22.07.0.bb new file mode 100644 index 0000000..bbaa847 --- /dev/null +++ b/recipes-extended/dpdk/dpdk_22.07.0.bb @@ -0,0 +1,76 @@ +include dpdk.inc + +SRC_URI = "git://dpdk.org/dpdk;branch=${BRANCH};protocol=https \ + file://0001-meson.build-march-and-mcpu-already-passed-by-Yocto-21.11.patch \ +" + +BRANCH = "releases" +SRCREV = "4fceceed5b5e9fbf04acffd66239c79d81e79260" +S = "${WORKDIR}/git" + +# CVE-2021-3839 has been fixed by commit 4c40d30d2b in 21.11.1 +# NVD database is incomplete +# CVE-2022-0669 has been fixed by commit 6cb68162e4 in 21.11.1 +# NVD database is incomplete +CVE_CHECK_IGNORE += "\ + CVE-2021-3839 \ + CVE-2022-0669 \ +" + +# kernel module is provide by dpdk-module recipe, so disable here +EXTRA_OEMESON = " -Denable_kmods=false \ + -Dexamples=all \ +" + +COMPATIBLE_MACHINE = "null" +COMPATIBLE_HOST:libc-musl:class-target = "null" +COMPATIBLE_HOST:linux-gnux32 = "null" + +PACKAGECONFIG ??= " " +PACKAGECONFIG[afxdp] = ",,libbpf xdp-tools" +PACKAGECONFIG[libvirt] = ",,libvirt" + +RDEPENDS:${PN} += "pciutils python3-core" +RDEPENDS:${PN}-examples += "bash" +DEPENDS = "numactl python3-pyelftools-native" + +inherit meson pkgconfig + +INSTALL_PATH = "${prefix}/share/dpdk" + +do_install:append(){ + # remove source files + rm -rf ${D}/${INSTALL_PATH}/examples/* + + # Install examples + install -m 0755 -d ${D}/${INSTALL_PATH}/examples/ + for dirname in ${B}/examples/dpdk-* + do + if [ ! -d ${dirname} ] && [ -x ${dirname} ]; then + install -m 0755 ${dirname} ${D}/${INSTALL_PATH}/examples/ + fi + done + +} + +PACKAGES =+ "${PN}-examples ${PN}-tools" + +FILES:${PN} += " ${bindir}/dpdk-testpmd \ + ${bindir}/dpdk-proc-info \ + ${libdir}/*.so* \ + ${libdir}/dpdk/pmds-22.0/*.so* \ + " +FILES:${PN}-examples = " \ + ${prefix}/share/dpdk/examples/* \ + " + +FILES:${PN}-tools = " \ + ${bindir}/dpdk-pdump \ + ${bindir}/dpdk-test \ + ${bindir}/dpdk-test-* \ + ${bindir}/dpdk-*.py \ + " + +CVE_PRODUCT = "data_plane_development_kit" + +INSANE_SKIP:${PN} = "dev-so" -- cgit v1.2.3-54-g00ecf