diff --git a/recipes-extended/dpdk/dpdk-module_23.07.bb b/recipes-extended/dpdk/dpdk-module_23.07.bb deleted file mode 100644 index c76ed87..0000000 --- a/recipes-extended/dpdk/dpdk-module_23.07.bb +++ /dev/null @@ -1,50 +0,0 @@ -include dpdk.inc - -FILESEXTRAPATHS:prepend := "${THISDIR}/dpdk:" - -SRC_URI = "git://dpdk.org/git/dpdk;branch=${BRANCH};protocol=https \ - file://0001-Makefile-add-makefile.patch \ -" - -BRANCH = "releases" -SRCREV = "12fcafcd62286933e6b167b14856d21f642efa5f" -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} -} - diff --git a/recipes-extended/dpdk/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch b/recipes-extended/dpdk/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch new file mode 100644 index 0000000..92e3523 --- /dev/null +++ b/recipes-extended/dpdk/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch @@ -0,0 +1,32 @@ +From 121e5d019f0bb6dec0ace2b361611edd10fc8ff8 Mon Sep 17 00:00:00 2001 +From: Lee Chee Yang +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 +--- + 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 + diff --git a/recipes-extended/dpdk/dpdk_23.07.bb b/recipes-extended/dpdk/dpdk_23.11.bb similarity index 75% rename from recipes-extended/dpdk/dpdk_23.07.bb rename to recipes-extended/dpdk/dpdk_23.11.bb index 3a1b0a8..5f0f9ec 100644 --- a/recipes-extended/dpdk/dpdk_23.07.bb +++ b/recipes-extended/dpdk/dpdk_23.11.bb @@ -1,17 +1,18 @@ include dpdk.inc -SRC_URI = "git://dpdk.org/git/dpdk;branch=${BRANCH};protocol=https \ - file://0001-meson.build-march-and-mcpu-already-passed-by-Yocto-21.11.patch \ -" +SRC_URI += " file://0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch " -BRANCH = "releases" -SRCREV = "12fcafcd62286933e6b167b14856d21f642efa5f" +STABLE = "-stable" +BRANCH = "23.11" +SRCREV = "eeb0605f118dae66e80faa44f7b3e88748032353" S = "${WORKDIR}/git" -# kernel module is provide by dpdk-module recipe, so disable here -EXTRA_OEMESON = " -Denable_kmods=false \ - -Dexamples=all \ -" +def get_cpu_instruction_set(bb, d): + import re + march = re.search(r'-march=([^\s]*)', d.getVar('CC')).group(1) + return march + +EXTRA_OEMESON = " -Dexamples=all -Dcpu_instruction_set=${@get_cpu_instruction_set(bb, d)} " COMPATIBLE_MACHINE = "null" COMPATIBLE_HOST:libc-musl:class-target = "null"