dpdk: add recipe for 19.11

Introduce recipe to build 19.11 LTS.

This version changes the location of test directory to be under app and
also changes the name of config file to common_linux.

Introduce variables in shared inc to control these two differences.
These are set to values used by earlier versions by default.

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
This commit is contained in:
Anuj Mittal 2020-01-30 15:23:36 +08:00
parent a314567e72
commit 5eba511c5e
2 changed files with 28 additions and 9 deletions

View File

@ -62,6 +62,9 @@ DPDK_RTE_TARGET_x86 = "i686-native-linuxapp-gcc"
DPDK_RTE_TARGET_aarch64 = "arm64-${DPDK_TARGET_MACH}-linuxapp-gcc"
export RTE_TARGET = "${DPDK_RTE_TARGET}"
CONFIG_FILE_NAME = "common_linux"
TEST_DIR = "test"
# The list of intel Comms platforms and their target machine
# process mapping. The supported target machine is listed under
# dpdk/mk/machine
@ -83,14 +86,14 @@ do_configure () {
sed -e "s#CONFIG_RTE_MACHINE=\"native\"#CONFIG_RTE_MACHINE=\"${DPDK_TARGET_MACH}\"#" -i ${S}/config/defconfig_${RTE_TARGET}
# Fix-up vhost configs based on package config
sed -e "s#CONFIG_RTE_KNI_VHOST=n#CONFIG_RTE_KNI_VHOST=${CONFIG_VHOST_ENABLED}#" -i ${S}/config/common_linuxapp
sed -e "s#CONFIG_RTE_KNI_VHOST_VNET_HDR_EN=n#CONFIG_RTE_KNI_VHOST_VNET_HDR_EN=${CONFIG_VHOST_ENABLED}#" -i ${S}/config/common_linuxapp
sed -e "s#CONFIG_RTE_LIBRTE_VHOST=n#CONFIG_RTE_LIBRTE_VHOST=${CONFIG_VHOST_ENABLED}#" -i ${S}/config/common_linuxapp
sed -e "s#CONFIG_RTE_LIBRTE_VHOST_NUMA=.*#CONFIG_RTE_LIBRTE_VHOST_NUMA=${CONFIG_HAVE_NUMA}#" -i ${S}/config/common_linuxapp
sed -e "s#CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=.*#CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=${CONFIG_HAVE_NUMA}#" -i ${S}/config/common_linuxapp
sed -e "s#CONFIG_RTE_KNI_VHOST=n#CONFIG_RTE_KNI_VHOST=${CONFIG_VHOST_ENABLED}#" -i ${S}/config/${CONFIG_NAME}
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}
sed -e "s#CONFIG_RTE_LIBRTE_VHOST=n#CONFIG_RTE_LIBRTE_VHOST=${CONFIG_VHOST_ENABLED}#" -i ${S}/config/${CONFIG_NAME}
sed -e "s#CONFIG_RTE_LIBRTE_VHOST_NUMA=.*#CONFIG_RTE_LIBRTE_VHOST_NUMA=${CONFIG_HAVE_NUMA}#" -i ${S}/config/${CONFIG_NAME}
sed -e "s#CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=.*#CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=${CONFIG_HAVE_NUMA}#" -i ${S}/config/${CONFIG_NAME}
# Fix-up CONFIG_RTE_LIBRTE_POWER based on package config for libvirt
sed -e "s#CONFIG_RTE_LIBRTE_POWER=y#CONFIG_RTE_LIBRTE_POWER=${CONFIG_EXAMPLE_VM_POWER_MANAGER}#" -i ${S}/config/common_linuxapp
sed -e "s#CONFIG_RTE_LIBRTE_POWER=y#CONFIG_RTE_LIBRTE_POWER=${CONFIG_EXAMPLE_VM_POWER_MANAGER}#" -i ${S}/config/${CONFIG_NAME}
make O=$RTE_TARGET T=$RTE_TARGET config
}
@ -109,10 +112,10 @@ do_compile () {
EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -O3 -I${STAGING_INCDIR}" \
CROSS="${TARGET_PREFIX}" O="${S}/examples/$@/"
cd ${S}/test/
cd ${S}/${TEST_DIR}/
oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu -fuse-ld=bfd" \
EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -O3 -I${STAGING_INCDIR}" \
CROSS="${TARGET_PREFIX}" O="${S}/test/$@/"
CROSS="${TARGET_PREFIX}" O="${S}/${TEST_DIR}/$@/"
}
do_install () {
@ -131,7 +134,7 @@ do_install () {
done
done
oe_runmake -C test install DESTDIR=${D}${INSTALL_PATH}/test/
oe_runmake -C ${TEST_DIR} install DESTDIR=${D}${INSTALL_PATH}/test/
cp -r ${S}/mk ${D}${INSTALL_PATH}/

View File

@ -0,0 +1,16 @@
include dpdk.inc
CONFIG_NAME = "common_linux"
TEST_DIR = "app/test"
SRCREV = "7001c8fdb27357c67147c0a13cb3826e48c0f2bf"
LICENSE = "BSD-3-Clause & LGPLv2.1 & GPLv2"
LIC_FILES_CHKSUM = "file://license/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://license/lgpl-2.1.txt;md5=4b54a1fd55a448865a0b32d41598759d \
file://license/bsd-3-clause.txt;md5=0f00d99239d922ffd13cabef83b33444"
do_install_append () {
# Remove the unneeded dir
rm -rf ${D}/${INSTALL_PATH}/${RTE_TARGET}/app
}