Complete Yocto mirror with license table for TQMa6UL (2038-compliance)
- 264 license table entries with exact download URLs (224/264 resolved) - Complete sources/ directory with all BitBake recipes - Build configuration: tqma6ul-multi-mba6ulx, spaetzle (musl) - Full traceability for Softwarefreigabeantrag - GCC 13.4.0, Linux 6.6.102, U-Boot 2023.04, musl 1.2.4 - License distribution: GPL-2.0 (24), MIT (23), GPL-2.0+ (18), BSD-3 (16)
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
From 2c260c8c437c7f72f093b6c157a38b93443bde1d Mon Sep 17 00:00:00 2001
|
||||
From: Chunrong Guo <chunrong.guo@nxp.com>
|
||||
Date: Mon, 11 Dec 2017 15:45:05 +0800
|
||||
Subject: [PATCH] Modify the Makefile for cross compile
|
||||
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
|
||||
Signed-off-by: Chunrong Guo <chunrong.guo@nxp.com>
|
||||
---
|
||||
Makefile | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index c7bfee2..d6421f3 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -4,8 +4,8 @@ LIBDIR=/usr/lib
|
||||
SBINDIR=/sbin
|
||||
MANDIR=/share/man
|
||||
|
||||
-CC = gcc
|
||||
-HOSTCC = gcc
|
||||
+CC ?= gcc
|
||||
+HOSTCC ?= gcc
|
||||
CCOPTS = -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall
|
||||
CFLAGS = $(CCOPTS) -I../include
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
||||
15
sources/meta-freescale/recipes-extended/crconf/crconf_git.bb
Normal file
15
sources/meta-freescale/recipes-extended/crconf/crconf_git.bb
Normal file
@@ -0,0 +1,15 @@
|
||||
SUMMARY = "crconf -Linux crypto layer configuraton tool"
|
||||
SECTION = "base"
|
||||
LICENSE = "GPL-2.0-only"
|
||||
LIC_FILES_CHKSUM = "file://Makefile;beginline=1;endline=5;md5=0f77fc44eb5911007ae4ac9f6736e111"
|
||||
|
||||
EXTRA_OEMAKE = "'CC=${CC}' 'HOSTCC=${CC}' SBINDIR='${sbindir}' MANDIR='${mandir}'"
|
||||
|
||||
SRC_URI = "git://git.code.sf.net/p/crconf/code;protocol=https;nobranch=1"
|
||||
SRCREV = "c2b9595d739a9515a86ff3b1980b5cfdfcc42d68"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
do_install () {
|
||||
oe_runmake install DESTDIR=${D}
|
||||
}
|
||||
15
sources/meta-freescale/recipes-extended/dpdk/dpdk-20.11.inc
Normal file
15
sources/meta-freescale/recipes-extended/dpdk/dpdk-20.11.inc
Normal file
@@ -0,0 +1,15 @@
|
||||
DESCRIPTION = "Data Plane Development Kit"
|
||||
HOMEPAGE = "http://dpdk.org"
|
||||
LICENSE = "BSD-3-Clause & LGPL-2.1-only & GPL-2.0-only"
|
||||
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"
|
||||
|
||||
SRC_URI = "git://github.com/nxp-qoriq/dpdk;protocol=https;nobranch=1"
|
||||
SRCREV = "f74b8bd5ab1c6ff76e956fc202a56aea2d200270"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
COMPATIBLE_MACHINE = "(qoriq-arm64)"
|
||||
|
||||
CVE_PRODUCT = "data_plane_development_kit"
|
||||
@@ -0,0 +1,74 @@
|
||||
From 768cef60957d5e840071d1d6514d4add3f3c2904 Mon Sep 17 00:00:00 2001
|
||||
From: Naveen Saini <naveen.kumar.saini@intel.com>
|
||||
Date: Wed, 14 Apr 2021 17:25:53 +0800
|
||||
Subject: [PATCH] Makefile: add makefile
|
||||
|
||||
Current meson build for kernel module build does not fit in Yocto.
|
||||
So added Makefile to build rte_kni.ko
|
||||
|
||||
Upstream-Status: Inappropriate
|
||||
|
||||
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
|
||||
---
|
||||
kernel/linux/kni/Kbuild | 6 ------
|
||||
kernel/linux/kni/Makefile | 35 +++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 35 insertions(+), 6 deletions(-)
|
||||
delete mode 100644 kernel/linux/kni/Kbuild
|
||||
create mode 100644 kernel/linux/kni/Makefile
|
||||
|
||||
diff --git a/kernel/linux/kni/Kbuild b/kernel/linux/kni/Kbuild
|
||||
deleted file mode 100644
|
||||
index e5452d6c00..0000000000
|
||||
--- a/kernel/linux/kni/Kbuild
|
||||
+++ /dev/null
|
||||
@@ -1,6 +0,0 @@
|
||||
-# SPDX-License-Identifier: BSD-3-Clause
|
||||
-# Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
|
||||
-
|
||||
-ccflags-y := $(MODULE_CFLAGS)
|
||||
-obj-m := rte_kni.o
|
||||
-rte_kni-y := $(patsubst $(src)/%.c,%.o,$(wildcard $(src)/*.c))
|
||||
diff --git a/kernel/linux/kni/Makefile b/kernel/linux/kni/Makefile
|
||||
new file mode 100644
|
||||
index 0000000000..19897ee06e
|
||||
--- /dev/null
|
||||
+++ b/kernel/linux/kni/Makefile
|
||||
@@ -0,0 +1,35 @@
|
||||
+#
|
||||
+# Makefile for building rte_kni.ko
|
||||
+#
|
||||
+MODULE_CFLAGS += -include $(S)/config/rte_config.h
|
||||
+MODULE_CFLAGS += -I$(S)/lib/librte_eal/include
|
||||
+MODULE_CFLAGS += -I$(S)/lib/librte_kni
|
||||
+MODULE_CFLAGS += -I$(S)/kernel/linux/kni
|
||||
+MODULE_CFLAGS += -I$(S)
|
||||
+MODULE_CFLAGS += -I$(STAGING_INCDIR)
|
||||
+
|
||||
+rte_kni-objs = kni_misc.o kni_net.o
|
||||
+
|
||||
+ccflags-y := $(MODULE_CFLAGS)
|
||||
+cflags-y := $(MODULE_CFLAGS)
|
||||
+obj-m := rte_kni.o
|
||||
+
|
||||
+
|
||||
+KERNEL_MAKE_OPTS := -C $(STAGING_KERNEL_DIR) M=$(CURDIR)
|
||||
+ifneq ($(ARCH),)
|
||||
+KERNEL_MAKE_OPTS += ARCH=$(ARCH)
|
||||
+endif
|
||||
+ifneq ($(CROSS_COMPILE),)
|
||||
+KERNEL_MAKE_OPTS += CROSS_COMPILE=$(CROSS_COMPILE)
|
||||
+endif
|
||||
+
|
||||
+build:
|
||||
+ $(MAKE) $(KERNEL_MAKE_OPTS) modules
|
||||
+
|
||||
+install: modules_install
|
||||
+
|
||||
+modules_install:
|
||||
+ $(MAKE) $(KERNEL_MAKE_OPTS) modules_install
|
||||
+
|
||||
+clean:
|
||||
+ $(MAKE) $(KERNEL_MAKE_OPTS) clean
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
From 6fe85f3a12d15e25345ef0547035a929351a179c Mon Sep 17 00:00:00 2001
|
||||
From: Ting Liu <ting.liu@nxp.com>
|
||||
Date: Fri, 17 Sep 2021 12:53:53 +0530
|
||||
Subject: [PATCH] drivers/net/enetfec/enet_uio.c: fix multiple definition
|
||||
|
||||
.../drivers/net/enetfec/enet_uio.c:22: multiple definition of `count';
|
||||
.../examples/flow_classify/flow_classify.c:170: first defined here
|
||||
collect2: error: ld returned 1 exit status
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Ting Liu <ting.liu@nxp.com>
|
||||
---
|
||||
drivers/net/enetfec/enet_uio.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/net/enetfec/enet_uio.c b/drivers/net/enetfec/enet_uio.c
|
||||
index b64dc522e8..9e09f9beb6 100644
|
||||
--- a/drivers/net/enetfec/enet_uio.c
|
||||
+++ b/drivers/net/enetfec/enet_uio.c
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "enet_uio.h"
|
||||
|
||||
static struct uio_job enetfec_uio_job;
|
||||
-int count;
|
||||
+static int count;
|
||||
|
||||
/** @brief Reads first line from a file.
|
||||
* Composes file name as: root/subdir/filename
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
From 308409d72671b7978b20d40748ad985a235b6c86 Mon Sep 17 00:00:00 2001
|
||||
From: Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com>
|
||||
Date: Thu, 24 Jun 2021 11:30:09 +0800
|
||||
Subject: [PATCH] ifpga/meson: Fix finding librt using find_library()
|
||||
|
||||
Finding with "librt" keyword would give the output
|
||||
with full path of librt such as /usr/lib/librt.so
|
||||
instead of -lrt.
|
||||
|
||||
Assume find_library() will prepend "lib", thus remove
|
||||
"lib" from "librt" keyword. The output will shows as
|
||||
-lrt.
|
||||
|
||||
Upstream-Status: Submitted [https://mails.dpdk.org/archives/stable/2021-June/031840.html]
|
||||
|
||||
Signed-off-by: Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com>
|
||||
---
|
||||
drivers/raw/ifpga/base/meson.build | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/raw/ifpga/base/meson.build b/drivers/raw/ifpga/base/meson.build
|
||||
index da2d6e33c..949f7f127 100644
|
||||
--- a/drivers/raw/ifpga/base/meson.build
|
||||
+++ b/drivers/raw/ifpga/base/meson.build
|
||||
@@ -25,7 +25,7 @@ sources = [
|
||||
|
||||
rtdep = dependency('librt', required: false)
|
||||
if not rtdep.found()
|
||||
- rtdep = cc.find_library('librt', required: false)
|
||||
+ rtdep = cc.find_library('rt', required: false)
|
||||
endif
|
||||
if not rtdep.found()
|
||||
build = false
|
||||
--
|
||||
2.32.0
|
||||
@@ -0,0 +1,38 @@
|
||||
From cf8f15824dc2dd306d9c7e111641bef045d623c2 Mon Sep 17 00:00:00 2001
|
||||
From: Naveen Saini <naveen.kumar.saini@intel.com>
|
||||
Date: Wed, 14 Apr 2021 16:03:10 +0800
|
||||
Subject: [PATCH] meson.build:-march and -mcpu already passed by Yocto
|
||||
|
||||
Upstream-Status: Inappropriate
|
||||
|
||||
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
|
||||
---
|
||||
config/meson.build | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/config/meson.build b/config/meson.build
|
||||
index 2f150de3b8..41bb3e9ec4 100644
|
||||
--- a/config/meson.build
|
||||
+++ b/config/meson.build
|
||||
@@ -94,12 +94,12 @@ dpdk_conf.set('RTE_MACHINE', machine)
|
||||
machine_args = []
|
||||
|
||||
# ppc64 does not support -march= at all, use -mcpu and -mtune for that
|
||||
-if host_machine.cpu_family().startswith('ppc')
|
||||
- machine_args += '-mcpu=' + machine
|
||||
- machine_args += '-mtune=' + machine
|
||||
-else
|
||||
- machine_args += '-march=' + machine
|
||||
-endif
|
||||
+#if host_machine.cpu_family().startswith('ppc')
|
||||
+# machine_args += '-mcpu=' + machine
|
||||
+# machine_args += '-mtune=' + machine
|
||||
+#else
|
||||
+# machine_args += '-march=' + machine
|
||||
+#endif
|
||||
|
||||
toolchain = cc.get_id()
|
||||
dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain)
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
include dpdk-20.11.inc
|
||||
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/dpdk-${PV}:"
|
||||
|
||||
SRC_URI += " \
|
||||
file://0001-Makefile-add-makefile.patch \
|
||||
"
|
||||
|
||||
inherit module
|
||||
|
||||
#kernel module needs 'rte_build_config.h', which is generated at buid time
|
||||
DEPENDS += "dpdk"
|
||||
|
||||
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}
|
||||
}
|
||||
122
sources/meta-freescale/recipes-extended/dpdk/dpdk.inc
Normal file
122
sources/meta-freescale/recipes-extended/dpdk/dpdk.inc
Normal file
@@ -0,0 +1,122 @@
|
||||
DESCRIPTION = "Data Plane Development Kit"
|
||||
HOMEPAGE = "http://dpdk.org"
|
||||
|
||||
RDEPENDS:${PN} += "python3-core"
|
||||
DEPENDS = "virtual/kernel openssl"
|
||||
DEPENDS:append:x86-64 = " numactl"
|
||||
do_configure[depends] += "virtual/kernel:do_shared_workdir"
|
||||
|
||||
inherit module
|
||||
|
||||
COMPATIBLE_HOST = '(aarch64|arm|i.86|x86_64).*-linux'
|
||||
COMPATIBLE_HOST:libc-musl = 'null'
|
||||
COMPATIBLE_HOST:armv4 = 'null'
|
||||
COMPATIBLE_HOST:armv5 = 'null'
|
||||
COMPATIBLE_HOST:armv6 = 'null'
|
||||
|
||||
COMPATIBLE_MACHINE = "(imx-nxp-bsp|qoriq)"
|
||||
|
||||
DPDK_RTE_TARGET:x86-64 = "x86_64-native-linuxapp-gcc"
|
||||
DPDK_RTE_TARGET:x86 = "i686-native-linuxapp-gcc"
|
||||
DPDK_RTE_TARGET:armv7a = "${ARCH}-armv7a-linuxapp-gcc"
|
||||
DPDK_RTE_TARGET:armv7ve = "${ARCH}-armv7a-linuxapp-gcc"
|
||||
DPDK_RTE_TARGET ?= "${ARCH}-dpaa-linuxapp-gcc"
|
||||
|
||||
export RTE_TARGET = "${DPDK_RTE_TARGET}"
|
||||
export RTE_OUTPUT = "${S}/${RTE_TARGET}"
|
||||
export MODULE_DIR = "${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
EXTRA_OEMAKE += 'ETHTOOL_LIB_PATH="${S}/examples/ethtool/lib/${RTE_TARGET}" RTE_SDK="${S}" \
|
||||
OPENSSL_PATH="${STAGING_DIR_HOST}" RTE_KERNELDIR="${STAGING_KERNEL_DIR}" \
|
||||
RTE_KERNELDIR_OUT="${STAGING_KERNEL_BUILDDIR}" EXAMPLES_BUILD_DIR="${RTE_TARGET}" \
|
||||
'
|
||||
do_configure () {
|
||||
#############################################################
|
||||
### default value for prefix is "usr", unsetting it, so it
|
||||
### will not be concatenated in ${RTE_TARGET}/Makefile
|
||||
### which will cause compilation failure
|
||||
#############################################################
|
||||
unset prefix
|
||||
oe_runmake O=$RTE_TARGET T=$RTE_TARGET config
|
||||
}
|
||||
|
||||
do_compile () {
|
||||
unset LDFLAGS TARGET_LDFLAGS BUILD_LDFLAGS
|
||||
|
||||
cd ${S}/${RTE_TARGET}
|
||||
oe_runmake CONFIG_RTE_EAL_IGB_UIO=n CONFIG_RTE_KNI_KMOD=y \
|
||||
CONFIG_RTE_LIBRTE_PMD_OPENSSL=y \
|
||||
EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu" \
|
||||
EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR}" \
|
||||
CROSS="${TARGET_PREFIX}" \
|
||||
prefix="" LDFLAGS="${TUNE_LDARGS}" WERROR_FLAGS="-w" V=1
|
||||
|
||||
cd ${S}/examples/
|
||||
for APP in l2fwd l3fwd cmdif l2fwd-qdma l2fwd-crypto ipsec-secgw vhost kni ip_fragmentation ip_reassembly; do
|
||||
temp=`basename ${APP}`
|
||||
if [ ${temp} = "ipsec-secgw" ] || [ ${temp} = "l2fwd-crypto" ]; then
|
||||
oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu -fuse-ld=bfd" \
|
||||
EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR}" \
|
||||
CROSS="${TARGET_PREFIX}" -C ${APP} CONFIG_RTE_LIBRTE_PMD_OPENSSL=y O="${S}/examples/${temp}"
|
||||
else
|
||||
oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu -fuse-ld=bfd" \
|
||||
EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR}" \
|
||||
CROSS="${TARGET_PREFIX}" -C ${APP} CONFIG_RTE_LIBRTE_PMD_OPENSSL=y O="${S}/examples/${temp}/"
|
||||
fi
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
do_install () {
|
||||
oe_runmake O=${RTE_OUTPUT} T= install-runtime DESTDIR=${D}
|
||||
oe_runmake O=${RTE_OUTPUT} T= install-kmod DESTDIR=${D} kerneldir=${MODULE_DIR}
|
||||
oe_runmake O=${RTE_OUTPUT} T= install-sdk DESTDIR=${D}
|
||||
|
||||
# Install examples
|
||||
install -d 0644 ${D}/${datadir}/dpdk/cmdif/include
|
||||
install -d 0644 ${D}/${datadir}/dpdk/cmdif/lib
|
||||
install -d 0644 ${D}/${datadir}/dpdk/examples
|
||||
cp examples/cmdif/lib/client/fsl_cmdif_client.h examples/cmdif/lib/server/fsl_cmdif_server.h \
|
||||
examples/cmdif/lib/shbp/fsl_shbp.h ${D}/${datadir}/dpdk/cmdif/include
|
||||
cp examples/cmdif/lib/${RTE_TARGET}/librte_cmdif.a ${D}/${datadir}/dpdk/cmdif/lib
|
||||
install -d 0644 ${D}/${datadir}/dpdk/examples/ipsec_secgw
|
||||
cp -r ${S}/examples/ipsec-secgw/*.cfg ${D}/${datadir}/dpdk/examples/ipsec_secgw
|
||||
cp -rf ${S}/nxp/* ${D}/${datadir}/dpdk
|
||||
cp -r ${S}/examples/cmdif/cmdif_demo/${DPDK_RTE_TARGET}/cmdif_demo ${D}/${datadir}/dpdk/examples
|
||||
cp -r ${S}/examples/vhost/vhost-switch ${D}/${datadir}/dpdk/examples
|
||||
for APP in l2fwd l3fwd l2fwd-qdma l2fwd-crypto ipsec-secgw kni ip_fragmentation ip_reassembly; do
|
||||
cp -r ${S}/examples/${APP}/${APP} ${D}/${datadir}/dpdk/examples
|
||||
done
|
||||
}
|
||||
|
||||
PACKAGES += "${PN}-examples"
|
||||
|
||||
FILES:${PN}-dbg += " \
|
||||
${datadir}/dpdk/.debug \
|
||||
${datadir}/dpdk/examples/*/.debug \
|
||||
"
|
||||
FILES:${PN}-staticdev += "${datadir}/dpdk/cmdif/lib/*.a \
|
||||
"
|
||||
FILES:${PN}-dev += " \
|
||||
${datadir}/dpdk/${RTE_TARGET}/.config \
|
||||
${includedir} \
|
||||
${includedir}/exec-env \
|
||||
${datadir}/dpdk/buildtools/ \
|
||||
${datadir}/dpdk/${RTE_TARGET}/include \
|
||||
${datadir}/dpdk/${RTE_TARGET}/lib \
|
||||
${datadir}/dpdk/mk \
|
||||
"
|
||||
|
||||
FILES:${PN} += " ${datadir}/ \
|
||||
${prefix}/sbin/ \
|
||||
${prefix}/bin/ \
|
||||
${libdir}/ \
|
||||
"
|
||||
FILES:${PN}-examples += " \
|
||||
${datadir}/examples/* \
|
||||
"
|
||||
|
||||
TOOLCHAIN = "gcc"
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
From 9c2b840a1c8ac0fbb638b5cd481909a3f832eed4 Mon Sep 17 00:00:00 2001
|
||||
From: Chunrong Guo <chunrong.guo@nxp.com>
|
||||
Date: Wed, 3 Jul 2019 08:50:45 +0200
|
||||
Subject: [PATCH] Add RTE_KERNELDIR_OUT
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: C.r. Guo <nxa13725@lsv07004.swis.us-cdc01.nxp.com>
|
||||
---
|
||||
kernel/linux/kni/Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/kernel/linux/kni/Makefile b/kernel/linux/kni/Makefile
|
||||
index 595bac261..28a31f36a 100644
|
||||
--- a/kernel/linux/kni/Makefile
|
||||
+++ b/kernel/linux/kni/Makefile
|
||||
@@ -20,7 +20,7 @@ MODULE_CFLAGS += -Wall -Werror
|
||||
|
||||
ifeq ($(DISTRIB_ID),Ubuntu)
|
||||
MODULE_CFLAGS += -DUBUNTU_RELEASE_CODE=$(subst .,,$(DISTRIB_RELEASE))
|
||||
-UBUNTU_KERNEL_CODE := $(shell echo `grep UTS_RELEASE $(RTE_KERNELDIR)/include/generated/utsrelease.h \
|
||||
+UBUNTU_KERNEL_CODE := $(shell echo `grep UTS_RELEASE $(RTE_KERNELDIR_OUT)/include/generated/utsrelease.h \
|
||||
| cut -d '"' -f2 | cut -d- -f1,2 | tr .- ,`,1)
|
||||
MODULE_CFLAGS += -D"UBUNTU_KERNEL_CODE=UBUNTU_KERNEL_VERSION($(UBUNTU_KERNEL_CODE))"
|
||||
endif
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
From 354c2d1570ddf83a99c4ac711c884644c6dd1cef Mon Sep 17 00:00:00 2001
|
||||
From: "C.r. Guo" <nxa13725@lsv07005.swis.us-cdc01.nxp.com>
|
||||
Date: Wed, 27 Mar 2019 09:35:43 +0100
|
||||
Subject: [PATCH] add -Wno-cast-function-type
|
||||
|
||||
Upstream-Status: Inappropriate [configuration]
|
||||
Signed-off-by: "C.r. Guo" <nxa13725@lsv07005.swis.us-cdc01.nxp.com>
|
||||
---
|
||||
examples/cmdif/lib/Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/examples/cmdif/lib/Makefile b/examples/cmdif/lib/Makefile
|
||||
index 235c3adbf..230f17b0a 100644
|
||||
--- a/examples/cmdif/lib/Makefile
|
||||
+++ b/examples/cmdif/lib/Makefile
|
||||
@@ -28,7 +28,7 @@ SRCS-y += server/cmdif_srv_gpp.c
|
||||
SRCS-y += shbp/shbp.c
|
||||
|
||||
CFLAGS += -O3
|
||||
-CFLAGS += $(WERROR_FLAGS)
|
||||
+CFLAGS += $(WERROR_FLAGS) -Wno-cast-function-type -Wno-missing-attributes
|
||||
CFLAGS += -I$(RTE_SDK)/examples/cmdif/lib
|
||||
CFLAGS += -I$(RTE_SDK)/examples/cmdif/lib/client
|
||||
CFLAGS += -I$(RTE_SDK)/examples/cmdif/lib/server
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
From 229fc129be85a4d2d2c4efddae7bb97c3d87d416 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 13 Mar 2023 22:02:01 -0700
|
||||
Subject: [PATCH] examples: fix Arm build with GCC 12
|
||||
|
||||
GCC-12 warns when a pointer of type union points to an array of same
|
||||
defined size, as union internally gets paded with pad bytes.
|
||||
|
||||
../examples/common/neon/port_group.h:42:21: error: array subscript
|
||||
'union <anonymous>[0]' is partly outside array bounds of
|
||||
'uint16_t[5]' {aka 'short unsigned int[5]'}
|
||||
[-Werror=array-bounds]
|
||||
42 | pnum->u64 = gptbl[v].pnum;
|
||||
| ^~
|
||||
../examples/common/neon/port_group.h:21:23: note: object 'pn' of
|
||||
size [0, 10]
|
||||
21 | port_groupx4(uint16_t pn[FWDSTEP + 1], uint16_t *lp, uint16x8_t dp1
|
||||
| ~~~~~~~~~^~~~~~~~~~~~~~~
|
||||
../examples/common/neon/port_group.h:43:21: error: array subscript
|
||||
'union <anonymous>[0]' is partly outside array bounds of
|
||||
'uint16_t[5]' {aka 'short unsigned int[5]'} [-Werror=array-bounds]
|
||||
43 | pnum->u16[FWDSTEP] = 1;
|
||||
| ^~
|
||||
|
||||
Fixes: 732115ce38c6 ("examples/l3fwd: move packet group function in common")
|
||||
|
||||
Upstream-Status: Backport [https://github.com/DPDK/dpdk/commit/b269bd630e96b276a69d698e13ad9ebfbbb67512]
|
||||
Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com>
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
examples/l3fwd/l3fwd_neon.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/examples/l3fwd/l3fwd_neon.h b/examples/l3fwd/l3fwd_neon.h
|
||||
index 86ac5971d7..dc73e9fef7 100644
|
||||
--- a/examples/l3fwd/l3fwd_neon.h
|
||||
+++ b/examples/l3fwd/l3fwd_neon.h
|
||||
@@ -77,7 +77,7 @@ port_groupx4(uint16_t pn[FWDSTEP + 1], uint16_t *lp, uint16x8_t dp1,
|
||||
union {
|
||||
uint16_t u16[FWDSTEP + 1];
|
||||
uint64_t u64;
|
||||
- } *pnum = (void *)pn;
|
||||
+ } __rte_packed *pnum = (void *)pn;
|
||||
|
||||
int32_t v;
|
||||
uint16x8_t mask = {1, 2, 4, 8, 0, 0, 0, 0};
|
||||
--
|
||||
2.39.2
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
Explicitly use python3
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Ting Liu <ting.liu@nxp.com>
|
||||
|
||||
diff --git a/app/test-bbdev/test-bbdev.py b/app/test-bbdev/test-bbdev.py
|
||||
index 0194be046..86fe3a89d 100755
|
||||
--- a/app/test-bbdev/test-bbdev.py
|
||||
+++ b/app/test-bbdev/test-bbdev.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# Copyright(c) 2017 Intel Corporation
|
||||
diff --git a/app/test-cmdline/cmdline_test.py b/app/test-cmdline/cmdline_test.py
|
||||
index 3a8fac426..231fe6032 100755
|
||||
--- a/app/test-cmdline/cmdline_test.py
|
||||
+++ b/app/test-cmdline/cmdline_test.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# Copyright(c) 2010-2014 Intel Corporation
|
||||
|
||||
diff --git a/app/test/autotest.py b/app/test/autotest.py
|
||||
index b42f48879..30541d102 100644
|
||||
--- a/app/test/autotest.py
|
||||
+++ b/app/test/autotest.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# Copyright(c) 2010-2014 Intel Corporation
|
||||
|
||||
diff --git a/buildtools/map_to_def.py b/buildtools/map_to_def.py
|
||||
index 6775b54a9..ff67f0a35 100644
|
||||
--- a/buildtools/map_to_def.py
|
||||
+++ b/buildtools/map_to_def.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# Copyright(c) 2019 Intel Corporation
|
||||
|
||||
diff --git a/config/arm/armv8_machine.py b/config/arm/armv8_machine.py
|
||||
index 404866d2f..1f689d9a8 100755
|
||||
--- a/config/arm/armv8_machine.py
|
||||
+++ b/config/arm/armv8_machine.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python
|
||||
+#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# Copyright(c) 2017 Cavium, Inc
|
||||
|
||||
diff --git a/devtools/update_version_map_abi.py b/devtools/update_version_map_abi.py
|
||||
index 616412a1c..3244b0984 100755
|
||||
--- a/devtools/update_version_map_abi.py
|
||||
+++ b/devtools/update_version_map_abi.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# Copyright(c) 2019 Intel Corporation
|
||||
|
||||
diff --git a/usertools/cpu_layout.py b/usertools/cpu_layout.py
|
||||
index 6f129b1db..e86bf6b92 100755
|
||||
--- a/usertools/cpu_layout.py
|
||||
+++ b/usertools/cpu_layout.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# Copyright(c) 2010-2014 Intel Corporation
|
||||
# Copyright(c) 2017 Cavium, Inc. All rights reserved.
|
||||
diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py
|
||||
index b1d149876..3f8175338 100755
|
||||
--- a/usertools/dpdk-devbind.py
|
||||
+++ b/usertools/dpdk-devbind.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# Copyright(c) 2010-2014 Intel Corporation
|
||||
#
|
||||
diff --git a/usertools/dpdk-pmdinfo.py b/usertools/dpdk-pmdinfo.py
|
||||
index 069a3bf12..1d5c99c2a 100755
|
||||
--- a/usertools/dpdk-pmdinfo.py
|
||||
+++ b/usertools/dpdk-pmdinfo.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# Copyright(c) 2016 Neil Horman <nhorman@tuxdriver.com>
|
||||
|
||||
diff --git a/usertools/dpdk-telemetry-client.py b/usertools/dpdk-telemetry-client.py
|
||||
index 290345dcc..279067450 100755
|
||||
--- a/usertools/dpdk-telemetry-client.py
|
||||
+++ b/usertools/dpdk-telemetry-client.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# Copyright(c) 2018 Intel Corporation
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
From 6c8d348190a8cf6c35111913cbf117ca98137e84 Mon Sep 17 00:00:00 2001
|
||||
From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
|
||||
Date: Fri, 18 Dec 2015 18:30:47 +0800
|
||||
Subject: [PATCH] dpdk v2.2.0: add RTE_KERNELDIR_OUT to split kernel build
|
||||
artifact
|
||||
|
||||
Introduce RTE_KERNELDIR_OUT to be the path to which kernel build
|
||||
artifacts are located. This is for matching the workflow change
|
||||
since Yocto Project v1.8 onwards whereby tmp/work-shared contains
|
||||
separate directories for kernel source and kernel artifacts.
|
||||
|
||||
Upstream-Status: Inappropriate [configuration]
|
||||
|
||||
Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
|
||||
---
|
||||
mk/rte.module.mk | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/mk/rte.module.mk b/mk/rte.module.mk
|
||||
index 53ed4fe..b7a014b 100644
|
||||
--- a/mk/rte.module.mk
|
||||
+++ b/mk/rte.module.mk
|
||||
@@ -77,7 +77,7 @@ build: _postbuild
|
||||
# build module
|
||||
$(MODULE).ko: $(SRCS_LINKS)
|
||||
@if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi
|
||||
- @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \
|
||||
+ @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \
|
||||
CC="$(KERNELCC)" CROSS_COMPILE=$(CROSS) V=$(if $V,1,0)
|
||||
|
||||
# install module in $(RTE_OUTPUT)/kmod
|
||||
@@ -88,7 +88,7 @@ $(RTE_OUTPUT)/kmod/$(MODULE).ko: $(MODULE).ko
|
||||
|
||||
# install module
|
||||
modules_install:
|
||||
- @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \
|
||||
+ @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \
|
||||
modules_install
|
||||
|
||||
.PHONY: clean
|
||||
@@ -98,7 +98,7 @@ clean: _postclean
|
||||
.PHONY: doclean
|
||||
doclean:
|
||||
@if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi
|
||||
- $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) clean
|
||||
+ $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) clean
|
||||
@$(foreach FILE,$(SRCS-y) $(SRCS-n) $(SRCS-),\
|
||||
if [ -h $(notdir $(FILE)) ]; then rm -f $(notdir $(FILE)) ; fi ;)
|
||||
@if [ -h $(notdir Makefile) ]; then rm -f $(notdir Makefile) ; fi
|
||||
--
|
||||
1.9.1
|
||||
@@ -0,0 +1,21 @@
|
||||
LICENSE = "BSD-3-Clause & LGPL-2.1-only & GPL-2.0-only"
|
||||
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"
|
||||
|
||||
SRC_URI = "git://github.com/nxp-qoriq/dpdk;protocol=https;nobranch=1 \
|
||||
file://add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch \
|
||||
file://0001-add-Wno-cast-function-type.patch \
|
||||
file://0001-Add-RTE_KERNELDIR_OUT.patch \
|
||||
file://0005-use-python3-instead-of-python.patch \
|
||||
file://0001-examples-fix-Arm-build-with-GCC-12.patch \
|
||||
"
|
||||
SRCREV = "7071c27f6f5aefb57de1cffab3484707b1e82e2b"
|
||||
|
||||
include dpdk.inc
|
||||
|
||||
do_install:append () {
|
||||
# Remove the unneeded dir
|
||||
rm -rf ${D}/${datadir}/${RTE_TARGET}/app
|
||||
}
|
||||
|
||||
93
sources/meta-freescale/recipes-extended/dpdk/dpdk_20.11.bb
Normal file
93
sources/meta-freescale/recipes-extended/dpdk/dpdk_20.11.bb
Normal file
@@ -0,0 +1,93 @@
|
||||
include dpdk-20.11.inc
|
||||
|
||||
SRC_URI += " \
|
||||
file://0001-meson.build-march-and-mcpu-already-passed-by-Yocto.patch \
|
||||
file://0001-ifpga-meson-Fix-finding-librt-using-find_library.patch \
|
||||
file://0001-drivers-net-enetfec-enet_uio.c-fix-multiple-definiti.patch \
|
||||
"
|
||||
|
||||
MESON_BUILDTYPE = "release"
|
||||
|
||||
# kernel module is provide by dpdk-module recipe, so disable here
|
||||
EXTRA_OEMESON = " -Denable_kmods=false \
|
||||
-Dexamples=all \
|
||||
-Doptimization=3 \
|
||||
"
|
||||
|
||||
PACKAGECONFIG ??= "openssl"
|
||||
PACKAGECONFIG[afxdp] = ",,libbpf"
|
||||
PACKAGECONFIG[libvirt] = ",,libvirt"
|
||||
PACKAGECONFIG[openssl] = ",,openssl"
|
||||
|
||||
RDEPENDS:${PN} += "bash pciutils python3-core"
|
||||
RDEPENDS:${PN}-examples += "bash"
|
||||
DEPENDS = "numactl"
|
||||
|
||||
inherit meson
|
||||
|
||||
INSTALL_PATH = "${prefix}/share/dpdk"
|
||||
|
||||
do_configure:prepend() {
|
||||
sed -i "/implementor_/d" ${WORKDIR}/meson.cross
|
||||
sed -i "/\[properties]/aimplementor_id = 'dpaa'" ${WORKDIR}/meson.cross
|
||||
sed -i "/\[properties]/aimplementor_pn = 'default'" ${WORKDIR}/meson.cross
|
||||
sed -i "s/cpu =.*/cpu = 'armv8-a'/" ${WORKDIR}/meson.cross
|
||||
}
|
||||
|
||||
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
|
||||
cp -rf ${S}/nxp/* ${D}/${INSTALL_PATH}/
|
||||
}
|
||||
|
||||
PACKAGES =+ "${PN}-tools ${PN}-examples ${PN}-misc"
|
||||
|
||||
FILES:${PN}-tools = " \
|
||||
${bindir}/dpdk-testpmd \
|
||||
${INSTALL_PATH}/examples/dpdk-l2fwd \
|
||||
${INSTALL_PATH}/examples/dpdk-l2fwd-crypto \
|
||||
${INSTALL_PATH}/examples/dpdk-l3fwd \
|
||||
${INSTALL_PATH}/examples/dpdk-ipsec-secgw \
|
||||
"
|
||||
|
||||
FILES:${PN}-examples = " \
|
||||
${bindir}/dpdk-proc-info \
|
||||
${bindir}/dpdk-test \
|
||||
${bindir}/dpdk-test-crypto-perf \
|
||||
${bindir}/dpdk-*.py \
|
||||
${INSTALL_PATH}/examples/dpdk-cmdif \
|
||||
${INSTALL_PATH}/examples/dpdk-cmdline \
|
||||
${INSTALL_PATH}/examples/dpdk-ethtool \
|
||||
${INSTALL_PATH}/examples/dpdk-ip_fragmentation \
|
||||
${INSTALL_PATH}/examples/dpdk-ip_reassembly \
|
||||
${INSTALL_PATH}/examples/dpdk-kni \
|
||||
${INSTALL_PATH}/examples/dpdk-l2fwd-keepalive \
|
||||
${INSTALL_PATH}/examples/dpdk-l2fwd-qdma \
|
||||
${INSTALL_PATH}/examples/dpdk-l3fwd-acl \
|
||||
${INSTALL_PATH}/examples/dpdk-link_status_interrupt \
|
||||
${INSTALL_PATH}/examples/dpdk-mp_client \
|
||||
${INSTALL_PATH}/examples/dpdk-mp_server \
|
||||
${INSTALL_PATH}/examples/dpdk-qdma_demo \
|
||||
${INSTALL_PATH}/examples/dpdk-simple_mp \
|
||||
${INSTALL_PATH}/examples/dpdk-symmetric_mp \
|
||||
${INSTALL_PATH}/examples/dpdk-symmetric_mp_qdma \
|
||||
${INSTALL_PATH}/examples/dpdk-timer \
|
||||
"
|
||||
|
||||
FILES:${PN}-misc = " \
|
||||
${bindir}/dpdk-pdump \
|
||||
${bindir}/dpdk-test-* \
|
||||
${bindir}/dpdk-*.py \
|
||||
${INSTALL_PATH}/examples/* \
|
||||
"
|
||||
|
||||
INSANE_SKIP:${PN} = "dev-so"
|
||||
@@ -0,0 +1,87 @@
|
||||
From 4c0accfce78610e21f5d9b75725a0b9fa2c6cfb9 Mon Sep 17 00:00:00 2001
|
||||
From: Ting Liu <ting.liu@nxp.com>
|
||||
Date: Fri, 12 Aug 2016 10:41:51 +0800
|
||||
Subject: [PATCH] Makefile: use LDFLAGS if set
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Ting Liu <ting.liu@nxp.com>
|
||||
---
|
||||
dsp_boot/Makefile | 6 +++---
|
||||
fsl_shm/Makefile | 4 ++--
|
||||
ipc/Makefile | 14 +++++++-------
|
||||
3 files changed, 12 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/dsp_boot/Makefile b/dsp_boot/Makefile
|
||||
index 8f30076..59eb648 100644
|
||||
--- a/dsp_boot/Makefile
|
||||
+++ b/dsp_boot/Makefile
|
||||
@@ -20,12 +20,12 @@ endif
|
||||
all: fsl_shm lib_dsp_boot dsp_bt
|
||||
lib_dsp_boot:
|
||||
$(CC) -c ./libdspboot.c $(CFLAGS) -o ./libdspboot.o
|
||||
- $(CC) -shared -fPIC ./libdspboot.o -o libdspboot.so
|
||||
+ $(CC) -shared -fPIC $(LDFLAGS) ./libdspboot.o -o libdspboot.so
|
||||
$(AR) rcs libdspboot.a ./libdspboot.o ../fsl_shm/lib/lg_shm.o
|
||||
fsl_shm:
|
||||
- $(CC) -c $(CFLAGS) $(SOURCES_FSL_SHM)
|
||||
+ $(CC) -c $(CFLAGS) $(LDFLAGS) $(SOURCES_FSL_SHM)
|
||||
dsp_bt:
|
||||
- $(CC) $(CFLAGS) $(SOURCES) $(SOURCES_FSL_SHM) -L. -ldspboot -L../ipc -lipc -o $@
|
||||
+ $(CC) $(CFLAGS) $(LDFLAGS) $(SOURCES) $(SOURCES_FSL_SHM) -L. -ldspboot -L../ipc -lipc -o $@
|
||||
cp libdspboot.so ../ipc/ -v
|
||||
clean:
|
||||
rm -rf *.o dsp_bt libdspboot.so *.a
|
||||
diff --git a/fsl_shm/Makefile b/fsl_shm/Makefile
|
||||
index 0042055..0b9f581 100644
|
||||
--- a/fsl_shm/Makefile
|
||||
+++ b/fsl_shm/Makefile
|
||||
@@ -4,11 +4,11 @@ CFLAGS=-fPIC -I ./lib -I ./include -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -W
|
||||
|
||||
all: lg_shm_lib lg_shm_test
|
||||
lg_shm_lib:
|
||||
- $(CC) -c ./lib/lg_shm.c $(CFLAGS) -o ./lib/lg_shm.o
|
||||
+ $(CC) -c ./lib/lg_shm.c $(CFLAGS) $(LDFLAGS) -o ./lib/lg_shm.o
|
||||
$(AR) rcs liblg_shm.a ./lib/lg_shm.o
|
||||
|
||||
lg_shm_test:
|
||||
- $(CC) ./test/app.c $(CFLAGS) -L. -llg_shm -o app
|
||||
+ $(CC) ./test/app.c $(CFLAGS) $(LDFLAGS) -L. -llg_shm -o app
|
||||
|
||||
clean:
|
||||
rm -rf app ./lib/*.o *.a
|
||||
diff --git a/ipc/Makefile b/ipc/Makefile
|
||||
index 06599f6..cbb63d6 100644
|
||||
--- a/ipc/Makefile
|
||||
+++ b/ipc/Makefile
|
||||
@@ -29,21 +29,21 @@ ipc_lib:
|
||||
$(CC) -c ./lib/fsl_user_dma.c $(CFLAGS) -o ./lib/fsl_user_dma.o
|
||||
$(CC) -c ./lib/fsl_ipc_lock.c $(CFLAGS) -o ./lib/fsl_ipc_lock.o
|
||||
$(CC) -c ../dsp_boot/libdspboot.c $(CFLAGS2) -o ../dsp_boot/libdspboot.o
|
||||
- $(CC) -shared -fPIC -lpthread ./lib/fsl_user_dma.o ./lib/fsl_ipc_channel.o ./lib/fsl_ipc_lock.o ../dsp_boot/libdspboot.o -L../fsl_shm -llg_shm -o libipc.so
|
||||
+ $(CC) -shared -fPIC -lpthread $(LDFLAGS) ./lib/fsl_user_dma.o ./lib/fsl_ipc_channel.o ./lib/fsl_ipc_lock.o ../dsp_boot/libdspboot.o -L../fsl_shm -llg_shm -o libipc.so
|
||||
$(AR) rcs libipc.a ./lib/fsl_ipc_channel.o ./lib/fsl_ipc_lock.o ../dsp_boot/libdspboot.o ./lib/fsl_user_dma.o ../fsl_shm/lib/lg_shm.o
|
||||
|
||||
mem_lib:
|
||||
$(CC) -c ./lib/fsl_usmmgr.c $(CFLAGS) -o ./lib/fsl_usmmgr.o
|
||||
$(CC) -c ./lib/fsl_ipc_lock.c $(CFLAGS) -o ./lib/fsl_ipc_lock.o
|
||||
- $(CC) -shared -fPIC ./lib/fsl_usmmgr.o ./lib/fsl_ipc_lock.o -L../fsl_shm -llg_shm -o libmem.so
|
||||
+ $(CC) -shared -fPIC $(LDFLAGS) ./lib/fsl_usmmgr.o ./lib/fsl_ipc_lock.o -L../fsl_shm -llg_shm -o libmem.so
|
||||
$(AR) rcs libmem.a ./lib/fsl_usmmgr.o ./lib/fsl_ipc_lock.o ../fsl_shm/lib/lg_shm.o
|
||||
|
||||
ipc_test:
|
||||
- $(CC) ./test/ipc_test.c $(CFLAGS) -L. -lipc -lmem -o ipc_test
|
||||
- $(CC) ./test/ipc_test67.c $(CFLAGS) -L. -lipc -lmem -o ipc_test67
|
||||
- $(CC) ./test/dsp_recover.c $(CFLAGS) -L. -lipc -lmem -o dsp_recover
|
||||
- $(CC) ./test/l1_defense_app.c $(CFLAGS) -L. -lipc -lmem -o l1d_app
|
||||
- $(CC) ./test/fsl_dump_memory.c $(CFLAGS) -L. -lipc -lmem -o dump_mem
|
||||
+ $(CC) ./test/ipc_test.c $(CFLAGS) $(LDFLAGS) -L. -lipc -lmem -o ipc_test
|
||||
+ $(CC) ./test/ipc_test67.c $(CFLAGS) $(LDFLAGS) -L. -lipc -lmem -o ipc_test67
|
||||
+ $(CC) ./test/dsp_recover.c $(CFLAGS) $(LDFLAGS) -L. -lipc -lmem -o dsp_recover
|
||||
+ $(CC) ./test/l1_defense_app.c $(CFLAGS) $(LDFLAGS) -L. -lipc -lmem -o l1d_app
|
||||
+ $(CC) ./test/fsl_dump_memory.c $(CFLAGS) $(LDFLAGS) -L. -lipc -lmem -o dump_mem
|
||||
|
||||
clean:
|
||||
rm -rf dump_mem ipc_test ipc_test67 dsp_recover l1d_app ./lib/*.o *.a *.so
|
||||
--
|
||||
1.9.2
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
From 7117c1fe979053e4b1071968b444c03fbffe55bb Mon Sep 17 00:00:00 2001
|
||||
From: Daiane Angolini <daiane.angolini@foundries.io>
|
||||
Date: Tue, 6 Feb 2024 18:01:07 -0300
|
||||
Subject: [PATCH] arm:arm64: Makefile: Remove -march option from Makefile
|
||||
|
||||
It let the recipe to decide which are the compilation flags to be used.
|
||||
|
||||
It acomodates to [1].
|
||||
|
||||
[1] https://git.yoctoproject.org/poky/commit/?id=04eac1f2b67eac5f892a9e0f8fcfe54849923af5
|
||||
|
||||
Upstream-Status: Inappropriate [See above]
|
||||
|
||||
Signed-off-by: Daiane Angolini <daiane.angolini@foundries.io>
|
||||
---
|
||||
hypervisor/arch/arm/Makefile | 2 --
|
||||
hypervisor/arch/arm64/Makefile | 1 -
|
||||
2 files changed, 3 deletions(-)
|
||||
|
||||
diff --git a/hypervisor/arch/arm/Makefile b/hypervisor/arch/arm/Makefile
|
||||
index a54370fc..cddb6cd3 100644
|
||||
--- a/hypervisor/arch/arm/Makefile
|
||||
+++ b/hypervisor/arch/arm/Makefile
|
||||
@@ -12,5 +12,3 @@
|
||||
|
||||
LINUXINCLUDE += -I$(src)/arch/arm-common/include
|
||||
|
||||
-KBUILD_CFLAGS += -marm -march=armv7ve -msoft-float
|
||||
-KBUILD_AFLAGS += -march=armv7ve -msoft-float
|
||||
diff --git a/hypervisor/arch/arm64/Makefile b/hypervisor/arch/arm64/Makefile
|
||||
index 0718994d..5d7a80c6 100644
|
||||
--- a/hypervisor/arch/arm64/Makefile
|
||||
+++ b/hypervisor/arch/arm64/Makefile
|
||||
@@ -12,4 +12,3 @@
|
||||
|
||||
LINUXINCLUDE += -I$(src)/arch/arm-common/include
|
||||
|
||||
-KBUILD_CFLAGS += -march=armv8-a+nofp
|
||||
--
|
||||
2.34.1
|
||||
@@ -0,0 +1,112 @@
|
||||
SUMMARY = "Jailhouse, i.MX fork"
|
||||
HOMEPAGE = "https://github.com/siemens/jailhouse"
|
||||
SECTION = "jailhouse"
|
||||
LICENSE = "GPL-2.0-only"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=9fa7f895f96bde2d47fd5b7d95b6ba4d \
|
||||
file://tools/root-cell-config.c.tmpl;beginline=6;endline=33;md5=2825581c1666c44a17955dc574cfbfb3 \
|
||||
file://include/jailhouse/hypercall.h;beginline=9;endline=36;md5=2825581c1666c44a17955dc574cfbfb3 \
|
||||
file://include/jailhouse/cell-config.h;beginline=9;endline=36;md5=2825581c1666c44a17955dc574cfbfb3 \
|
||||
file://include/arch/arm/asm/jailhouse_hypercall.h;beginline=9;endline=36;md5=2825581c1666c44a17955dc574cfbfb3 \
|
||||
file://include/arch/arm64/asm/jailhouse_hypercall.h;beginline=9;endline=36;md5=2825581c1666c44a17955dc574cfbfb3 \
|
||||
file://include/arch/x86/asm/jailhouse_hypercall.h;beginline=9;endline=36;md5=2825581c1666c44a17955dc574cfbfb3 \
|
||||
file://driver/jailhouse.h;beginline=9;endline=36;md5=2825581c1666c44a17955dc574cfbfb3 \
|
||||
"
|
||||
|
||||
PROVIDES = "jailhouse"
|
||||
RPROVIDES:${PN} += "jailhouse"
|
||||
|
||||
SRCBRANCH = "lf-6.6.52_2.2.0"
|
||||
SRCREV = "44dd492a745cd8b8313fb6c7c03fb45a36d70e8a"
|
||||
|
||||
IMX_JAILHOUSE_SRC ?= "git://github.com/nxp-imx/imx-jailhouse.git;protocol=https"
|
||||
SRC_URI = "${IMX_JAILHOUSE_SRC};branch=${SRCBRANCH} \
|
||||
file://arm-arm64-Makefile-Remove-march-option-from-Makefile.patch \
|
||||
"
|
||||
|
||||
DEPENDS = " \
|
||||
make-native \
|
||||
python3-mako-native \
|
||||
python3-mako \
|
||||
dtc-native \
|
||||
"
|
||||
|
||||
inherit module bash-completion deploy setuptools3
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
B = "${S}"
|
||||
|
||||
JH_ARCH = "arm64"
|
||||
JH_DATADIR ?= "${datadir}/jailhouse"
|
||||
CELL_DIR ?= "${JH_DATADIR}/cells"
|
||||
CELLCONF_DIR ?= "${JH_DATADIR}/configs"
|
||||
INMATES_DIR ?= "${JH_DATADIR}/inmates"
|
||||
|
||||
TUNE_CCARGS:remove:mx93-nxp-bsp = "-mcpu=cortex-a55"
|
||||
|
||||
EXTRA_OEMAKE += 'V=1'
|
||||
EXTRA_OEMAKE += 'PYTHON=python3'
|
||||
EXTRA_OEMAKE += 'LDFLAGS=""'
|
||||
EXTRA_OEMAKE += 'CC="${CC}"'
|
||||
EXTRA_OEMAKE += 'ARCH=${JH_ARCH}'
|
||||
EXTRA_OEMAKE += 'CROSS_COMPILE=${TARGET_PREFIX}'
|
||||
EXTRA_OEMAKE += 'KDIR=${STAGING_KERNEL_BUILDDIR}'
|
||||
EXTRA_OEMAKE += 'MODLIB="${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}"'
|
||||
EXTRA_OEMAKE += 'INSTALL_MOD_PATH=${D}${root_prefix}'
|
||||
EXTRA_OEMAKE += 'firmwaredir=${nonarch_base_libdir}/firmware'
|
||||
|
||||
do_configure:prepend() {
|
||||
if [ -d ${STAGING_DIR_HOST}/${CELLCONF_DIR} ];
|
||||
then
|
||||
cp "${STAGING_DIR_HOST}/${CELLCONF_DIR}/"*.c ${S}/configs/${ARCH}/
|
||||
fi
|
||||
}
|
||||
|
||||
do_compile:prepend() {
|
||||
# explicity call make to build the kernel module and tools
|
||||
oe_runmake
|
||||
}
|
||||
|
||||
do_install:append() {
|
||||
oe_runmake DESTDIR=${D} install
|
||||
|
||||
install -d ${D}${CELL_DIR}
|
||||
install ${B}/configs/${JH_ARCH}/*.cell ${D}${CELL_DIR}/
|
||||
|
||||
install -d ${D}${INMATES_DIR}/tools/${JH_ARCH}
|
||||
install ${B}/inmates/demos/${JH_ARCH}/*.bin ${D}${INMATES_DIR}
|
||||
|
||||
install -d ${D}${JH_DATADIR}/tools
|
||||
install ${B}/tools/jailhouse-cell-linux ${D}${JH_DATADIR}/tools
|
||||
install ${B}/tools/jailhouse-cell-stats ${D}${JH_DATADIR}/tools
|
||||
install ${B}/tools/jailhouse-config-collect ${D}${JH_DATADIR}/tools
|
||||
install ${B}/tools/jailhouse-config-create ${D}${JH_DATADIR}/tools
|
||||
install ${B}/tools/jailhouse-gcov-extract ${D}${JH_DATADIR}/tools
|
||||
install ${B}/tools/jailhouse-hardware-check ${D}${JH_DATADIR}/tools
|
||||
install ${B}/inmates/tools/${JH_ARCH}/linux-loader.bin ${D}${INMATES_DIR}/tools/${JH_ARCH}
|
||||
}
|
||||
|
||||
PACKAGE_BEFORE_PN = "pyjailhouse"
|
||||
|
||||
FILES:${PN} += "${nonarch_base_libdir}/firmware ${libexecdir} ${sbindir} ${JH_DATADIR}"
|
||||
# Remove libdir/* appended by setuptools3-base.bbclass for module split to work correctly
|
||||
FILES:${PN}:remove = "${libdir}/*"
|
||||
FILES:pyjailhouse = "${PYTHON_SITEPACKAGES_DIR}"
|
||||
|
||||
RDEPENDS:${PN} += " \
|
||||
pyjailhouse \
|
||||
python3-curses \
|
||||
python3-datetime \
|
||||
python3-mmap \
|
||||
"
|
||||
|
||||
RDEPENDS:pyjailhouse = " \
|
||||
python3-core \
|
||||
python3-ctypes \
|
||||
python3-fcntl \
|
||||
python3-shell \
|
||||
"
|
||||
|
||||
INSANE_SKIP:${PN} = "ldflags"
|
||||
|
||||
COMPATIBLE_MACHINE = "(mx8m-nxp-bsp|mx8ulp-nxp-bsp|mx9-nxp-bsp)"
|
||||
@@ -0,0 +1,90 @@
|
||||
From e8e566a4b4d589cbdf2613c78cac75ecbea86d3b Mon Sep 17 00:00:00 2001
|
||||
From: Ting Liu <ting.liu@nxp.com>
|
||||
Date: Wed, 30 Sep 2020 10:24:14 +0530
|
||||
Subject: [PATCH] fix multiple definition error
|
||||
|
||||
gcc10 default to -fno-common, which results in error:
|
||||
| ../aarch64-fsl-linux/10.2.0/ld: /tmp/ccaL5AXA.o:.../libpkcs11/git-r0/git/app/pkcs11_app.c:23: multiple definition of `funcs'; /tmp/ccvGV0xB.o:.../app/utils.c:18: first defined here
|
||||
| collect2: error: ld returned 1 exit status
|
||||
| Makefile:66: recipe for target 'app' failed
|
||||
| make: *** [app] Error 1
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Ting Liu <ting.liu@nxp.com>
|
||||
---
|
||||
app/gen_test.c | 2 +-
|
||||
app/pkcs11_app.c | 2 +-
|
||||
app/sign_digest_update_final.c | 2 +-
|
||||
app/thread_test.c | 2 +-
|
||||
app/utils.c | 2 +-
|
||||
5 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/app/gen_test.c b/app/gen_test.c
|
||||
index fbd3429..2476e18 100644
|
||||
--- a/app/gen_test.c
|
||||
+++ b/app/gen_test.c
|
||||
@@ -17,7 +17,7 @@
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/md5.h>
|
||||
|
||||
-CK_FUNCTION_LIST *funcs;
|
||||
+static CK_FUNCTION_LIST *funcs;
|
||||
|
||||
#define err2str(X) case X: return #X
|
||||
|
||||
diff --git a/app/pkcs11_app.c b/app/pkcs11_app.c
|
||||
index 2b4a70d..3883dab 100644
|
||||
--- a/app/pkcs11_app.c
|
||||
+++ b/app/pkcs11_app.c
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <openssl/pem.h>
|
||||
#include "utils.h"
|
||||
|
||||
-CK_FUNCTION_LIST *funcs;
|
||||
+static CK_FUNCTION_LIST *funcs;
|
||||
|
||||
struct getOptValue_t {
|
||||
uint32_t main_option;
|
||||
diff --git a/app/sign_digest_update_final.c b/app/sign_digest_update_final.c
|
||||
index b3367ed..49fee20 100644
|
||||
--- a/app/sign_digest_update_final.c
|
||||
+++ b/app/sign_digest_update_final.c
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <openssl/pem.h>
|
||||
#include "utils.h"
|
||||
|
||||
-CK_FUNCTION_LIST *funcs;
|
||||
+static CK_FUNCTION_LIST *funcs;
|
||||
|
||||
struct getOptValue_t {
|
||||
uint32_t main_option;
|
||||
diff --git a/app/thread_test.c b/app/thread_test.c
|
||||
index 19d03ee..a574074 100644
|
||||
--- a/app/thread_test.c
|
||||
+++ b/app/thread_test.c
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <sched.h>
|
||||
#include <pthread.h>
|
||||
|
||||
-CK_FUNCTION_LIST *funcs;
|
||||
+static CK_FUNCTION_LIST *funcs;
|
||||
|
||||
#define err2str(X) case X: return #X
|
||||
#define MAX_THREADS 10
|
||||
diff --git a/app/utils.c b/app/utils.c
|
||||
index 7afad95..9f9e143 100644
|
||||
--- a/app/utils.c
|
||||
+++ b/app/utils.c
|
||||
@@ -15,7 +15,7 @@
|
||||
#include <tee_slot.h>
|
||||
#include "utils.h"
|
||||
|
||||
-CK_FUNCTION_LIST *funcs;
|
||||
+static CK_FUNCTION_LIST *funcs;
|
||||
|
||||
#define err2str(X) case X: return #X
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
DESCRIPTION = "PKCS library"
|
||||
LICENSE = "GPL-2.0-only"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=803852533e29eb1d6d5e55ad3078b625"
|
||||
|
||||
SRC_URI = "git://github.com/nxp-qoriq/libpkcs11;protocol=https;nobranch=1 \
|
||||
file://0001-fix-multiple-definition-error.patch \
|
||||
"
|
||||
SRCREV = "8d85182b7a7cd393ab6dd72930f8d1b69468f741"
|
||||
|
||||
DEPENDS = "openssl secure-obj"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
WRAP_TARGET_PREFIX ?= "${TARGET_PREFIX}"
|
||||
export CROSS_COMPILE_HOST = "${CROSS_COMPILE}"
|
||||
export CROSS_COMPILE_TA = "${CROSS_COMPILE}"
|
||||
|
||||
CFLAGS += "-fPIC"
|
||||
|
||||
EXTRA_OEMAKE = 'CC="${CC}" LD="${CC}" CFLAGS="${CFLAGS}"'
|
||||
|
||||
do_compile() {
|
||||
export OPENSSL_PATH="${RECIPE_SYSROOT}/usr"
|
||||
export CROSS_COMPILE="${WRAP_TARGET_PREFIX}"
|
||||
oe_runmake all
|
||||
}
|
||||
|
||||
do_install(){
|
||||
mkdir -p ${D}/${libdir}
|
||||
mkdir -p ${D}/${includedir} ${D}/${bindir}
|
||||
cp ${S}/out/export/lib/libpkcs11.so ${D}/${libdir}
|
||||
cp ${S}/out/export/include/*.h ${D}/${includedir}
|
||||
rm -f ${D}${includedir}/pkcs11.h
|
||||
cp ${S}/out/export/app/* ${D}/${bindir}
|
||||
}
|
||||
|
||||
PARALLEL_MAKE = ""
|
||||
INSANE_SKIP:${PN} = "ldflags dev-deps"
|
||||
INSANE_SKIP:${PN}-dev = "ldflags dev-elf"
|
||||
COMPATIBLE_MACHINE = "(qoriq-arm64)"
|
||||
@@ -0,0 +1,7 @@
|
||||
This package is used to merge specified files into rootfs.
|
||||
|
||||
Steps:
|
||||
1> copy files to recipes-*/merge-files/merge-files/merge/
|
||||
2> add 'IMAGE_INSTALL += "merge-files"' into rootfs recipe
|
||||
3> bitbake <rootfs_image_type>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
DESCRIPTION = "Merge prebuilt/extra files into rootfs"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
|
||||
|
||||
inherit allarch
|
||||
|
||||
SRC_URI = "file://merge"
|
||||
S = "${WORKDIR}"
|
||||
|
||||
MERGED_DST ?= "${ROOT_HOME}"
|
||||
do_install () {
|
||||
install -d ${D}/${MERGED_DST}
|
||||
find ${WORKDIR}/merge/ -maxdepth 1 -mindepth 1 -not -name README \
|
||||
-exec cp -fr '{}' ${D}/${MERGED_DST}/ \;
|
||||
find ${WORKDIR}/merge/ -maxdepth 1 -mindepth 1 -exec rm -fr '{}' \;
|
||||
}
|
||||
do_configure[noexec] = "1"
|
||||
do_compile[noexec] = "1"
|
||||
|
||||
FILES:${PN} = "/*"
|
||||
ALLOW_EMPTY:${PN} = "1"
|
||||
INSANE_SKIP:${PN} = "debug-files dev-so"
|
||||
@@ -0,0 +1,14 @@
|
||||
require odp.inc
|
||||
|
||||
inherit module
|
||||
|
||||
do_compile:prepend () {
|
||||
export KERNEL_PATH="${STAGING_KERNEL_DIR}"
|
||||
export KERNEL_CFG_PATH="${STAGING_KERNEL_BUILDDIR}"
|
||||
cd ${S}/test/debug/perf_counters
|
||||
}
|
||||
|
||||
do_install () {
|
||||
install -d ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/odp
|
||||
install -m 755 ${S}/test/debug/perf_counters/odpfsl_perfcounters.ko ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/odp
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
require odp.inc
|
||||
|
||||
inherit module
|
||||
|
||||
do_compile:prepend () {
|
||||
export KERNEL_PATH="${STAGING_KERNEL_DIR}"
|
||||
export KERNEL_CFG_PATH="${STAGING_KERNEL_BUILDDIR}"
|
||||
cd ${S}/kern
|
||||
}
|
||||
|
||||
do_install () {
|
||||
install -d ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/odp
|
||||
install -m 755 ${S}/kern/odpfsl_kni.ko ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/odp
|
||||
}
|
||||
|
||||
PKG:${PN} = "kernel-module-${PN}"
|
||||
27
sources/meta-freescale/recipes-extended/odp/odp.inc
Normal file
27
sources/meta-freescale/recipes-extended/odp/odp.inc
Normal file
@@ -0,0 +1,27 @@
|
||||
SUMMARY = "Open Data Plane Interface Implementation"
|
||||
DESCRIPTION = "OpenDataPlane (ODP) provides a data plane application programming \
|
||||
environment that is easy to use, high performance, and portable between networking SoCs."
|
||||
HOMEPAGE = "http://www.opendataplane.org"
|
||||
SECTION = "console/network"
|
||||
LICENSE = "BSD-3-Clause"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=ca6103dc75397fb6bec596187d6b7829"
|
||||
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/odp:"
|
||||
|
||||
SRC_URI = " \
|
||||
git://github.com/nxp-qoriq/odp;protocol=https;nobranch=1 \
|
||||
git://github.com/nxp-qoriq/qbman_userspace;protocol=https;nobranch=1;name=qbman;destsuffix=git/platform/linux-dpaa2/flib/qbman \
|
||||
git://github.com/nxp-qoriq/flib;protocol=https;nobranch=1;name=rta;destsuffix=git/platform/linux-dpaa2/flib/rta \
|
||||
"
|
||||
|
||||
SRC_URI += "file://0001-Fix-this-build-error.patch"
|
||||
|
||||
SRCREV = "0bda2c9736a72ef41a411e193bc31487ecce6731"
|
||||
|
||||
SRCREV_qbman = "75ff61a7ca6acdbdbb780161b053cbcbc990f1be"
|
||||
SRCREV_rta = "bbab28b03ae21c52ce913f8b052acf53bd24ff5d"
|
||||
|
||||
SRCREV_FORMAT = "default_qbman_rta"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
COMPATIBLE_MACHINE = "(ls1043a|ls1046a|ls2088a|ls1088a)"
|
||||
@@ -0,0 +1,29 @@
|
||||
From 9fb1642b38053de6e8098f6b608ad86ff45bf7f7 Mon Sep 17 00:00:00 2001
|
||||
From: Chunrong Guo <chunrong.guo@nxp.com>
|
||||
Date: Fri, 28 Jul 2017 14:59:22 +0800
|
||||
Subject: [PATCH] Fix this build error
|
||||
|
||||
fix the below error:
|
||||
|error: 'SIGEV_THREAD' undeclared (first use in this function); did you mean 'CLONE_THREAD'?
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Chunrong Guo <B40290@freescale.com>
|
||||
---
|
||||
example/lpm-ipfwd/app/odp_lpmfwd.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/example/lpm-ipfwd/app/odp_lpmfwd.c b/example/lpm-ipfwd/app/odp_lpmfwd.c
|
||||
index 57c5e82..f8507be 100644
|
||||
--- a/example/lpm-ipfwd/app/odp_lpmfwd.c
|
||||
+++ b/example/lpm-ipfwd/app/odp_lpmfwd.c
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <errno.h>
|
||||
#include <error.h>
|
||||
#include <mqueue.h>
|
||||
+#include <signal.h>
|
||||
|
||||
#include <example_debug.h>
|
||||
|
||||
--
|
||||
1.8.3.2
|
||||
|
||||
62
sources/meta-freescale/recipes-extended/odp/odp_git.bb
Normal file
62
sources/meta-freescale/recipes-extended/odp/odp_git.bb
Normal file
@@ -0,0 +1,62 @@
|
||||
require odp.inc
|
||||
|
||||
inherit autotools-brokensep
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
|
||||
DEPENDS = "openssl cunit libxml2"
|
||||
|
||||
RDEPENDS:${PN} = "bash libcrypto libssl odp-module odp-counters"
|
||||
|
||||
ODP_SOC ?= ""
|
||||
ODP_SOC:ls1043ardb = "LS1043"
|
||||
ODP_SOC:ls1046ardb = "LS1046"
|
||||
ODP_PLATFORM ?= "linux-dpaa2"
|
||||
ODP_BUILD_TYPE ?= "ls2088"
|
||||
ODP_BUILD_TYPE:ls1043ardb = "ls1043"
|
||||
ODP_BUILD_TYPE:ls1046ardb = "ls1046"
|
||||
ODP_BUILD_TYPE:ls1088ardb = "ls1088"
|
||||
|
||||
EXTRA_OECONF = "--with-platform=${ODP_PLATFORM} \
|
||||
--enable-test-vald \
|
||||
--enable-test-perf \
|
||||
--enable-test-cpp \
|
||||
"
|
||||
|
||||
EXTRA_OEMAKE = "CROSS_COMPILE="${TARGET_PREFIX}" \
|
||||
SYSROOT="${STAGING_DIR_TARGET}" \
|
||||
"
|
||||
|
||||
CFLAGS += "-Wno-format-truncation -Wno-maybe-uninitialized -Wno-implicit-fallthrough -Wno-cpp -Wno-cast-function-type \
|
||||
-Wno-stringop-truncation \
|
||||
"
|
||||
|
||||
PACKAGECONFIG[perf] = "--enable-test-perf,,,"
|
||||
|
||||
do_configure:prepend () {
|
||||
export SOC=${ODP_SOC}
|
||||
${S}/bootstrap
|
||||
}
|
||||
|
||||
do_compile:prepend () {
|
||||
export SOC=${ODP_SOC}
|
||||
export ARCH=${TUNE_ARCH}
|
||||
}
|
||||
|
||||
do_install:append () {
|
||||
install -d ${D}${includedir}/odp/kni
|
||||
install -d ${D}${includedir}/odp/kern
|
||||
install -d ${D}${includedir}/odp/flib/mc
|
||||
install -d ${D}${includedir}/odp/flib/qbman/include/drivers
|
||||
|
||||
cp -rf ${S}/platform/linux-dpaa2/include/* ${D}${includedir}/odp/
|
||||
cp -rf ${S}/platform/linux-dpaa2/kni/*.h ${D}${includedir}/odp/kni/
|
||||
cp -rf ${S}/kern/*.h ${D}${includedir}/odp/kern/
|
||||
cp -rf ${S}/platform/linux-dpaa2/flib/mc/*.h ${D}${includedir}/odp/flib/mc/
|
||||
|
||||
sed -i -e 's#platform/linux-dpaa2/##g' ${D}${includedir}/odp/kern/*.h
|
||||
}
|
||||
|
||||
FILES:${PN}-staticdev += "${datadir}/opendataplane/*.la"
|
||||
FILES:${PN} += "/usr/odp/bin /usr/odp/scripts /usr/odp/debug /usr/odp/test/validation /usr/odp/test/performance /usr/odp/test/miscellaneous /usr/odp/test/api_test"
|
||||
FILES:${PN}-dbg += "/usr/odp/bin/.debug /usr/odp/debug/.debug /usr/odp/test/validation/.debug /usr/odp/test/performance/.debug /usr/odp/test/miscellaneous/.debug /usr/odp/test/api_test/.debug"
|
||||
37
sources/meta-freescale/recipes-extended/ofp/ofp_git.bb
Normal file
37
sources/meta-freescale/recipes-extended/ofp/ofp_git.bb
Normal file
@@ -0,0 +1,37 @@
|
||||
SUMMARY = "An open source user space fast path TCP/IP stack"
|
||||
DESCRIPTION = "openfastpath is used to enable accelerated routing/forwarding for IPv4 and IPv6, \
|
||||
tunneling and termination for a variety of protocols."
|
||||
HOMEPAGE = "http://www.openfastpath.org"
|
||||
SECTION = "console/network"
|
||||
LICENSE = "BSD-3-Clause"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=fbe4957c430eed6cc20521d4eb429fae"
|
||||
|
||||
SRC_URI = "git://github.com/nxp-qoriq/ofp;protocol=https;nobranch=1"
|
||||
|
||||
SRCREV = "fe66f4659f7d356f7aa73a8fb32fcf67c6cf1108"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit autotools-brokensep pkgconfig
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
|
||||
DEPENDS = "odp"
|
||||
|
||||
EXTRA_OECONF = " \
|
||||
--prefix=/usr \
|
||||
--libdir=${libdir} \
|
||||
--host=${SIMPLE_TARGET_SYS} \
|
||||
--with-odp=${STAGING_DIR_TARGET} \
|
||||
"
|
||||
|
||||
do_configure () {
|
||||
export SIMPLE_TARGET_SYS="$(echo ${TARGET_SYS} | sed s:${TARGET_VENDOR}::g)"
|
||||
|
||||
${S}/bootstrap
|
||||
${S}/configure ${EXTRA_OECONF}
|
||||
}
|
||||
|
||||
FILES:${PN} += "/usr/ofp/bin"
|
||||
FILES:${PN}-dbg += "/usr/ofp/bin/.debug"
|
||||
COMPATIBLE_MACHINE = "(ls2088a|ls1088a)"
|
||||
@@ -0,0 +1,36 @@
|
||||
DESCRIPTION = "OVS DPDK"
|
||||
LICENSE = "BSD"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=1ce5d23a6429dff345518758f13aaeab"
|
||||
|
||||
DEPENDS = "dpdk python3-six-native coreutils-native autoconf-native automake-native"
|
||||
RDEPENDS:${PN} = "bash libcrypto libssl python3"
|
||||
|
||||
inherit python3native pkgconfig
|
||||
|
||||
SRC_URI = "git://github.com/nxp-qoriq/ovs-dpdk;protocol=https;nobranch=1"
|
||||
SRCREV = "f2c0744d2f68c4cd2840d6e409d7b0520e4caf99"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
do_configure() {
|
||||
export SYSROOT_DPDK=${PKG_CONFIG_SYSROOT_DIR}
|
||||
${S}/boot.sh
|
||||
${S}/configure --host aarch64-fsl-linux --with-dpdk=static --with-openssl=${SYSROOT_DPDK}/usr CFLAGS="-g -Wno-cast-align -Ofast"
|
||||
}
|
||||
|
||||
do_install:append() {
|
||||
install -d ${D}${bindir}/ovs-dpdk
|
||||
cp -rf ${S}/ovsdb/ovsdb-tool ${D}${bindir}/ovs-dpdk
|
||||
cp -rf ${S}/ovsdb/ovsdb-server ${D}${bindir}/ovs-dpdk
|
||||
cp -rf ${S}/ovsdb/ovsdb-client ${D}${bindir}/ovs-dpdk
|
||||
cp -rf ${S}/vswitchd/vswitch.ovsschema ${D}${bindir}/ovs-dpdk
|
||||
cp -rf ${S}/vswitchd/ovs-vswitchd ${D}${bindir}/ovs-dpdk
|
||||
cp -rf ${S}/utilities/ovs-vsctl ${D}${bindir}/ovs-dpdk
|
||||
cp -rf ${S}/utilities/ovs-ofctl ${D}${bindir}/ovs-dpdk
|
||||
chmod 777 -R ${D}${bindir}/ovs-dpdk/*
|
||||
}
|
||||
|
||||
ALLOW_EMPTY:${PN} = "1"
|
||||
INHIBIT_PACKAGE_STRIP = "1"
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
COMPATIBLE_MACHINE = "(qoriq-arm64)"
|
||||
@@ -0,0 +1,73 @@
|
||||
From 530fbb2e2deb6b9214466933df221910c2c50b7c Mon Sep 17 00:00:00 2001
|
||||
From: Ting Liu <ting.liu@nxp.com>
|
||||
Date: Fri, 15 Oct 2021 08:01:15 +0530
|
||||
Subject: [PATCH] fix gcc11 mismatched-dealloc error
|
||||
|
||||
Fix build error with gcc 11:
|
||||
| FAILED: lib/common/libcommon.a.p/lscpu.c.o
|
||||
| aarch64-poky-linux-gcc -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Wdate-time --sysroot=/opt/ci/yocto/honister/build-lx2162aqds/tmp/work/lx2162aqds-poky-linux/pktgen-dpdk/21.05.0-r0/recipe-sysroot -Ilib/common/libcommon.a.p -Ilib/common -I../git/lib/common -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -DRTE_FORCE_INTRINSICS -fPIC -include rte_config.h -march=armv8-a+crc -moutline-atomics -MD -MQ lib/common/libcommon.a.p/lscpu.c.o -MF lib/common/libcommon.a.p/lscpu.c.o.d -o lib/common/libcommon.a.p/lscpu.c.o -c ../git/lib/common/lscpu.c
|
||||
| In function 'lscpu_info_get',
|
||||
| inlined from 'lscpu_info' at ../git/lib/common/lscpu.c:210:2:
|
||||
| ../git/lib/common/lscpu.c:167:9: error: 'fclose' called on pointer returned from a mismatched allocation function [-Werror=mismatched-dealloc]
|
||||
| 167 | fclose(f);
|
||||
| | ^~~~~~~~~
|
||||
| ../git/lib/common/lscpu.c: In function 'lscpu_info':
|
||||
| ../git/lib/common/lscpu.c:146:22: note: returned from 'popen'
|
||||
| 146 | FILE *f = popen(lscpu_path, "r");
|
||||
| | ^~~~~~~~~~~~~~~~~~~~~~
|
||||
| In function 'cpu_proc_info',
|
||||
| inlined from 'lscpu_info' at ../git/lib/common/lscpu.c:211:2:
|
||||
| ../git/lib/common/lscpu.c:195:9: error: 'fclose' called on pointer returned from a mismatched allocation function [-Werror=mismatched-dealloc]
|
||||
| 195 | fclose(f);
|
||||
| | ^~~~~~~~~
|
||||
| ../git/lib/common/lscpu.c: In function 'lscpu_info':
|
||||
| ../git/lib/common/lscpu.c:174:22: note: returned from 'popen'
|
||||
| 174 | FILE *f = popen(proc_path, "r");
|
||||
| | ^~~~~~~~~~~~~~~~~~~~~
|
||||
| cc1: all warnings being treated as errors
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Ting Liu <ting.liu@nxp.com>
|
||||
---
|
||||
app/pktgen.h | 2 +-
|
||||
lib/common/lscpu.c | 4 ++--
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/app/pktgen.h b/app/pktgen.h
|
||||
index 7c61fc8..2f24c65 100644
|
||||
--- a/app/pktgen.h
|
||||
+++ b/app/pktgen.h
|
||||
@@ -531,7 +531,7 @@ do_command(const char *cmd, int (*display)(char *, int)) {
|
||||
i = display(line, i);
|
||||
|
||||
if (f)
|
||||
- fclose(f);
|
||||
+ pclose(f);
|
||||
if (line)
|
||||
free(line);
|
||||
|
||||
diff --git a/lib/common/lscpu.c b/lib/common/lscpu.c
|
||||
index 8b56ccd..912c601 100644
|
||||
--- a/lib/common/lscpu.c
|
||||
+++ b/lib/common/lscpu.c
|
||||
@@ -164,7 +164,7 @@ lscpu_info_get(const char *lscpu_path)
|
||||
}
|
||||
}
|
||||
|
||||
- fclose(f);
|
||||
+ pclose(f);
|
||||
free(line);
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ cpu_proc_info(const char *proc_path)
|
||||
}
|
||||
}
|
||||
|
||||
- fclose(f);
|
||||
+ pclose(f);
|
||||
free(line);
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
DESCRIPTION = "PKTGEN DPDK"
|
||||
LICENSE = "BSD"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=0245ceedaef59ae0129500b0ce1e8a45"
|
||||
|
||||
DEPENDS += "libpcap dpdk lua lua-native"
|
||||
|
||||
SRC_URI = "git://dpdk.org/git/apps/pktgen-dpdk;protocol=https;nobranch=1 \
|
||||
file://fix-gcc11-mismatched-dealloc-error.patch \
|
||||
"
|
||||
SRCREV = "3a09aa916597fb9a97ee8eec50044cbdb9c4abde"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
DPAA_VER ?= "dpaa"
|
||||
export RTE_TARGET = "arm64-${DPAA_VER}-linuxapp-gcc"
|
||||
export RTE_SDK = "${RECIPE_SYSROOT}/usr/share/dpdk"
|
||||
|
||||
inherit meson pkgconfig
|
||||
|
||||
MESON_BUILDTYPE = "release"
|
||||
EXTRA_OEMESON += '-Dc_args="-DRTE_FORCE_INTRINSICS"'
|
||||
|
||||
do_configure:prepend() {
|
||||
sed -i "/^add_project_arguments('-march=native'/s/^/#&/" ${S}/meson.build
|
||||
}
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${bindir}/
|
||||
install -m 0755 app/pktgen ${D}${bindir}/
|
||||
install -m 0644 ${S}/Pktgen.lua ${D}${bindir}/
|
||||
}
|
||||
|
||||
INSANE_SKIP:${PN} = "ldflags"
|
||||
INHIBIT_PACKAGE_STRIP = "1"
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
PARALLEL_MAKE = ""
|
||||
COMPATIBLE_MACHINE = "(qoriq-arm64)"
|
||||
@@ -0,0 +1,9 @@
|
||||
do_install:append:qoriq-ppc() {
|
||||
for keyword in \
|
||||
net.ipv4.conf.default.rp_filter \
|
||||
net.ipv4.conf.all.rp_filter \
|
||||
; do
|
||||
sed -i 's,'"$keyword"'=.*,'"$keyword"'=0,' ${D}${sysconfdir}/sysctl.conf
|
||||
done
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
require secure-obj.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://../LICENSE;md5=751419260aa954499f7abaabaa882bbe"
|
||||
|
||||
DEPENDS += "virtual/kernel"
|
||||
|
||||
inherit module
|
||||
|
||||
S = "${WORKDIR}/git/securekeydev"
|
||||
|
||||
EXTRA_OEMAKE += 'KERNEL_SRC="${STAGING_KERNEL_DIR}"'
|
||||
@@ -0,0 +1,27 @@
|
||||
DESCRIPTION = "Secure Object"
|
||||
LICENSE = "BSD-3-Clause"
|
||||
|
||||
DEPENDS = "openssl optee-os-qoriq optee-client-qoriq"
|
||||
RDEPENDS:${PN} = "bash libcrypto libssl"
|
||||
|
||||
DEPENDS += "python3-pycryptodomex-native"
|
||||
|
||||
inherit python3native
|
||||
|
||||
LDFLAGS += "${TOOLCHAIN_OPTIONS}"
|
||||
|
||||
SRC_URI = "git://github.com/nxp-qoriq/secure_obj;protocol=https;nobranch=1"
|
||||
SRCREV = "4706a6534ec09f9a46bfe305c5e49badca32b4c6"
|
||||
|
||||
WRAP_TARGET_PREFIX ?= "${TARGET_PREFIX}"
|
||||
export SECURE_STORAGE_PATH = "${S}/secure_storage_ta/ta/"
|
||||
export OPTEE_CLIENT_EXPORT = "${RECIPE_SYSROOT}/usr"
|
||||
|
||||
EXTRA_OEMAKE = 'CC="${CC}" LD="${CC}"'
|
||||
|
||||
ALLOW_EMPTY:${PN} = "1"
|
||||
INHIBIT_PACKAGE_STRIP = "1"
|
||||
PARALLEL_MAKE = ""
|
||||
INSANE_SKIP:${PN} = "ldflags"
|
||||
COMPATIBLE_MACHINE = "(qoriq-arm64)"
|
||||
DEBUG_BUILD = "1"
|
||||
@@ -0,0 +1,50 @@
|
||||
require secure-obj.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
DEPENDS:remove = " python3-pycryptodomex-native"
|
||||
DEPENDS:append = " python3-cryptography-native optee-os-qoriq-tadevkit"
|
||||
RDEPENDS:{PN} += "secure-obj-module"
|
||||
|
||||
WRAP_TARGET_PREFIX ?= "${TARGET_PREFIX}"
|
||||
export SECURE_STORAGE_PATH = "${S}/secure_storage_ta/ta/"
|
||||
export OPTEE_CLIENT_EXPORT = "${RECIPE_SYSROOT}/usr"
|
||||
export CROSS_COMPILE_HOST = "${CROSS_COMPILE}"
|
||||
export CROSS_COMPILE_TA = "${CROSS_COMPILE}"
|
||||
ARCH:qoriq-arm64 = "aarch64"
|
||||
ARCH:qoriq-arm = "arm"
|
||||
CFLAGS += "${TOOLCHAIN_OPTIONS}"
|
||||
|
||||
do_compile() {
|
||||
unset LDFLAGS
|
||||
export TA_DEV_KIT_DIR=${STAGING_INCDIR}/optee/export-user_ta/
|
||||
export CROSS_COMPILE="${WRAP_TARGET_PREFIX}"
|
||||
export OPENSSL_PATH="${RECIPE_SYSROOT}/usr"
|
||||
export OPENSSL_MODULES=${STAGING_LIBDIR_NATIVE}/ossl-modules
|
||||
for APP in secure_storage_ta securekey_lib secure_obj-openssl-engine; do
|
||||
cd ${APP}
|
||||
oe_runmake
|
||||
cd ..
|
||||
done
|
||||
}
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${bindir}
|
||||
install -d ${D}${includedir}
|
||||
install -d ${D}${base_libdir}/optee_armtz
|
||||
install -d ${D}${libdir}/${ARCH}-linux-gnu/openssl-1.0.0/engines
|
||||
cp ${S}/secure_storage_ta/ta/b05bcf48-9732-4efa-a9e0-141c7c888c34.ta ${D}${base_libdir}/optee_armtz
|
||||
cp ${S}/securekey_lib/out/export/lib/libsecure_obj.so ${D}${libdir}
|
||||
cp ${S}/secure_obj-openssl-engine/libeng_secure_obj.so ${D}${libdir}/${ARCH}-linux-gnu/openssl-1.0.0/engines
|
||||
cp ${S}/securekey_lib/out/export/app/*_app ${D}${bindir}
|
||||
cp ${S}/securekey_lib/out/export/app/mp_verify ${D}${bindir}
|
||||
cp ${S}/secure_obj-openssl-engine/app/sobj_eng_app ${D}${bindir}
|
||||
cp ${S}/securekey_lib/out/export/include/* ${D}${includedir}
|
||||
rm -rf ${D}${bindir}/test
|
||||
}
|
||||
|
||||
FILES:${PN} += "${base_libdir}/optee_armtz ${libdir}/${ARCH}-linux-gnu/openssl-1.0.0/engines"
|
||||
INSANE_SKIP:${PN} = "dev-deps ldflags"
|
||||
INSANE_SKIP:${PN}-dev = "ldflags dev-elf"
|
||||
@@ -0,0 +1,661 @@
|
||||
add two missing header files
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
include/linux/fsl_pci_ep_vfio.h | 79 ++++++
|
||||
include/linux/vfio.h | 555 ++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 634 insertions(+)
|
||||
create mode 100644 include/linux/fsl_pci_ep_vfio.h
|
||||
create mode 100644 include/linux/vfio.h
|
||||
|
||||
diff --git a/include/linux/fsl_pci_ep_vfio.h b/include/linux/fsl_pci_ep_vfio.h
|
||||
new file mode 100644
|
||||
index 0000000..8960157
|
||||
--- /dev/null
|
||||
+++ b/include/linux/fsl_pci_ep_vfio.h
|
||||
@@ -0,0 +1,79 @@
|
||||
+/*
|
||||
+ * Copyright 2013 Freescale Semiconductor, Inc.
|
||||
+ *
|
||||
+ * Author: Minghuan Lian <Minghuan.Lian@freescale.com>
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License, version 2, as
|
||||
+ * published by the Free Software Foundation.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program; if not, write to the Free Software
|
||||
+ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#ifndef _FSL_PCI_EP_VFIO_H
|
||||
+#define _FSL_PCI_EP_VFIO_H
|
||||
+
|
||||
+#include <linux/vfio.h>
|
||||
+
|
||||
+enum {
|
||||
+ PCI_EP_TYPE_PF,
|
||||
+ PCI_EP_TYPE_VF,
|
||||
+};
|
||||
+
|
||||
+enum PCI_EP_REGION_TYPE {
|
||||
+ PCI_EP_REGION_IBWIN,
|
||||
+ PCI_EP_REGION_OBWIN,
|
||||
+ PCI_EP_REGION_VF_IBWIN,
|
||||
+ PCI_EP_REGION_VF_OBWIN,
|
||||
+ PCI_EP_REGION_REGS,
|
||||
+ PCI_EP_REGION_CONFIG,
|
||||
+ PCI_EP_REGION_MEM,
|
||||
+ PCI_EP_REGION_MSIX_OBWIN
|
||||
+};
|
||||
+
|
||||
+enum PCI_EP_REGION_INDEX {
|
||||
+ PCI_EP_WIN0_INDEX,
|
||||
+ PCI_EP_WIN1_INDEX,
|
||||
+ PCI_EP_WIN2_INDEX,
|
||||
+ PCI_EP_WIN3_INDEX,
|
||||
+ PCI_EP_WIN4_INDEX,
|
||||
+ PCI_EP_WIN5_INDEX,
|
||||
+};
|
||||
+
|
||||
+#define PCI_EP_MSI_WIN_INDEX PCI_EP_WIN1_INDEX
|
||||
+#define PCI_EP_CCSR_WIN_INDEX PCI_EP_WIN0_INDEX
|
||||
+#define PCI_EP_DEFAULT_OW_INDEX PCI_EP_WIN0_INDEX
|
||||
+
|
||||
+struct pci_ep_win {
|
||||
+ uint64_t pci_addr;
|
||||
+ uint64_t cpu_addr;
|
||||
+ uint64_t size;
|
||||
+ uint64_t offset;
|
||||
+ uint32_t attr;
|
||||
+ uint32_t type;
|
||||
+ uint32_t idx;
|
||||
+};
|
||||
+
|
||||
+#define VFIO_DEVICE_SET_WIN_INFO _IO(VFIO_TYPE, VFIO_BASE + 20)
|
||||
+#define VFIO_DEVICE_GET_WIN_INFO _IO(VFIO_TYPE, VFIO_BASE + 21)
|
||||
+
|
||||
+struct pci_ep_info {
|
||||
+ uint32_t type;
|
||||
+ uint32_t pf_idx;
|
||||
+ uint32_t vf_idx;
|
||||
+ uint32_t iw_num;
|
||||
+ uint32_t ow_num;
|
||||
+ uint32_t vf_iw_num;
|
||||
+ uint32_t vf_ow_num;
|
||||
+ bool msix_enable;
|
||||
+};
|
||||
+
|
||||
+#endif
|
||||
diff --git a/include/linux/vfio.h b/include/linux/vfio.h
|
||||
new file mode 100644
|
||||
index 0000000..44578d2
|
||||
--- /dev/null
|
||||
+++ b/include/linux/vfio.h
|
||||
@@ -0,0 +1,555 @@
|
||||
+/*
|
||||
+ * VFIO API definition
|
||||
+ *
|
||||
+ * Copyright (C) 2012 Red Hat, Inc. All rights reserved.
|
||||
+ * Author: Alex Williamson <alex.williamson@redhat.com>
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License version 2 as
|
||||
+ * published by the Free Software Foundation.
|
||||
+ */
|
||||
+#ifndef _UAPIVFIO_H
|
||||
+#define _UAPIVFIO_H
|
||||
+
|
||||
+#include <linux/types.h>
|
||||
+#include <linux/ioctl.h>
|
||||
+
|
||||
+#define VFIO_API_VERSION 0
|
||||
+
|
||||
+
|
||||
+/* Kernel & User level defines for VFIO IOCTLs. */
|
||||
+
|
||||
+/* Extensions */
|
||||
+
|
||||
+#define VFIO_TYPE1_IOMMU 1
|
||||
+#define VFIO_SPAPR_TCE_IOMMU 2
|
||||
+#define VFIO_FSL_PAMU_IOMMU 1000
|
||||
+#define VFIO_IOMMU_DUMMY 1001
|
||||
+
|
||||
+/*
|
||||
+ * The IOCTL interface is designed for extensibility by embedding the
|
||||
+ * structure length (argsz) and flags into structures passed between
|
||||
+ * kernel and userspace. We therefore use the _IO() macro for these
|
||||
+ * defines to avoid implicitly embedding a size into the ioctl request.
|
||||
+ * As structure fields are added, argsz will increase to match and flag
|
||||
+ * bits will be defined to indicate additional fields with valid data.
|
||||
+ * It's *always* the caller's responsibility to indicate the size of
|
||||
+ * the structure passed by setting argsz appropriately.
|
||||
+ */
|
||||
+
|
||||
+#define VFIO_TYPE (';')
|
||||
+#define VFIO_BASE 100
|
||||
+
|
||||
+/* -------- IOCTLs for VFIO file descriptor (/dev/vfio/vfio) -------- */
|
||||
+
|
||||
+/**
|
||||
+ * VFIO_GET_API_VERSION - _IO(VFIO_TYPE, VFIO_BASE + 0)
|
||||
+ *
|
||||
+ * Report the version of the VFIO API. This allows us to bump the entire
|
||||
+ * API version should we later need to add or change features in incompatible
|
||||
+ * ways.
|
||||
+ * Return: VFIO_API_VERSION
|
||||
+ * Availability: Always
|
||||
+ */
|
||||
+#define VFIO_GET_API_VERSION _IO(VFIO_TYPE, VFIO_BASE + 0)
|
||||
+
|
||||
+/**
|
||||
+ * VFIO_CHECK_EXTENSION - _IOW(VFIO_TYPE, VFIO_BASE + 1, __u32)
|
||||
+ *
|
||||
+ * Check whether an extension is supported.
|
||||
+ * Return: 0 if not supported, 1 (or some other positive integer) if supported.
|
||||
+ * Availability: Always
|
||||
+ */
|
||||
+#define VFIO_CHECK_EXTENSION _IO(VFIO_TYPE, VFIO_BASE + 1)
|
||||
+
|
||||
+/**
|
||||
+ * VFIO_SET_IOMMU - _IOW(VFIO_TYPE, VFIO_BASE + 2, __s32)
|
||||
+ *
|
||||
+ * Set the iommu to the given type. The type must be supported by an
|
||||
+ * iommu driver as verified by calling CHECK_EXTENSION using the same
|
||||
+ * type. A group must be set to this file descriptor before this
|
||||
+ * ioctl is available. The IOMMU interfaces enabled by this call are
|
||||
+ * specific to the value set.
|
||||
+ * Return: 0 on success, -errno on failure
|
||||
+ * Availability: When VFIO group attached
|
||||
+ */
|
||||
+#define VFIO_SET_IOMMU _IO(VFIO_TYPE, VFIO_BASE + 2)
|
||||
+
|
||||
+/* -------- IOCTLs for GROUP file descriptors (/dev/vfio/$GROUP) -------- */
|
||||
+
|
||||
+/**
|
||||
+ * VFIO_GROUP_GET_STATUS - _IOR(VFIO_TYPE, VFIO_BASE + 3,
|
||||
+ * struct vfio_group_status)
|
||||
+ *
|
||||
+ * Retrieve information about the group. Fills in provided
|
||||
+ * struct vfio_group_info. Caller sets argsz.
|
||||
+ * Return: 0 on succes, -errno on failure.
|
||||
+ * Availability: Always
|
||||
+ */
|
||||
+struct vfio_group_status {
|
||||
+ __u32 argsz;
|
||||
+ __u32 flags;
|
||||
+#define VFIO_GROUP_FLAGS_VIABLE (1 << 0)
|
||||
+#define VFIO_GROUP_FLAGS_CONTAINER_SET (1 << 1)
|
||||
+};
|
||||
+#define VFIO_GROUP_GET_STATUS _IO(VFIO_TYPE, VFIO_BASE + 3)
|
||||
+
|
||||
+/**
|
||||
+ * VFIO_GROUP_SET_CONTAINER - _IOW(VFIO_TYPE, VFIO_BASE + 4, __s32)
|
||||
+ *
|
||||
+ * Set the container for the VFIO group to the open VFIO file
|
||||
+ * descriptor provided. Groups may only belong to a single
|
||||
+ * container. Containers may, at their discretion, support multiple
|
||||
+ * groups. Only when a container is set are all of the interfaces
|
||||
+ * of the VFIO file descriptor and the VFIO group file descriptor
|
||||
+ * available to the user.
|
||||
+ * Return: 0 on success, -errno on failure.
|
||||
+ * Availability: Always
|
||||
+ */
|
||||
+#define VFIO_GROUP_SET_CONTAINER _IO(VFIO_TYPE, VFIO_BASE + 4)
|
||||
+
|
||||
+/**
|
||||
+ * VFIO_GROUP_UNSET_CONTAINER - _IO(VFIO_TYPE, VFIO_BASE + 5)
|
||||
+ *
|
||||
+ * Remove the group from the attached container. This is the
|
||||
+ * opposite of the SET_CONTAINER call and returns the group to
|
||||
+ * an initial state. All device file descriptors must be released
|
||||
+ * prior to calling this interface. When removing the last group
|
||||
+ * from a container, the IOMMU will be disabled and all state lost,
|
||||
+ * effectively also returning the VFIO file descriptor to an initial
|
||||
+ * state.
|
||||
+ * Return: 0 on success, -errno on failure.
|
||||
+ * Availability: When attached to container
|
||||
+ */
|
||||
+#define VFIO_GROUP_UNSET_CONTAINER _IO(VFIO_TYPE, VFIO_BASE + 5)
|
||||
+
|
||||
+/**
|
||||
+ * VFIO_GROUP_GET_DEVICE_FD - _IOW(VFIO_TYPE, VFIO_BASE + 6, char)
|
||||
+ *
|
||||
+ * Return a new file descriptor for the device object described by
|
||||
+ * the provided string. The string should match a device listed in
|
||||
+ * the devices subdirectory of the IOMMU group sysfs entry. The
|
||||
+ * group containing the device must already be added to this context.
|
||||
+ * Return: new file descriptor on success, -errno on failure.
|
||||
+ * Availability: When attached to container
|
||||
+ */
|
||||
+#define VFIO_GROUP_GET_DEVICE_FD _IO(VFIO_TYPE, VFIO_BASE + 6)
|
||||
+
|
||||
+/* --------------- IOCTLs for DEVICE file descriptors --------------- */
|
||||
+
|
||||
+/**
|
||||
+ * VFIO_DEVICE_GET_INFO - _IOR(VFIO_TYPE, VFIO_BASE + 7,
|
||||
+ * struct vfio_device_info)
|
||||
+ *
|
||||
+ * Retrieve information about the device. Fills in provided
|
||||
+ * struct vfio_device_info. Caller sets argsz.
|
||||
+ * Return: 0 on success, -errno on failure.
|
||||
+ */
|
||||
+struct vfio_device_info {
|
||||
+ __u32 argsz;
|
||||
+ __u32 flags;
|
||||
+#define VFIO_DEVICE_FLAGS_RESET (1 << 0) /* Device supports reset */
|
||||
+#define VFIO_DEVICE_FLAGS_PCI (1 << 1) /* vfio-pci device */
|
||||
+ __u32 num_regions; /* Max region index + 1 */
|
||||
+ __u32 num_irqs; /* Max IRQ index + 1 */
|
||||
+};
|
||||
+#define VFIO_DEVICE_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 7)
|
||||
+
|
||||
+/**
|
||||
+ * VFIO_DEVICE_GET_REGION_INFO - _IOWR(VFIO_TYPE, VFIO_BASE + 8,
|
||||
+ * struct vfio_region_info)
|
||||
+ *
|
||||
+ * Retrieve information about a device region. Caller provides
|
||||
+ * struct vfio_region_info with index value set. Caller sets argsz.
|
||||
+ * Implementation of region mapping is bus driver specific. This is
|
||||
+ * intended to describe MMIO, I/O port, as well as bus specific
|
||||
+ * regions (ex. PCI config space). Zero sized regions may be used
|
||||
+ * to describe unimplemented regions (ex. unimplemented PCI BARs).
|
||||
+ * Return: 0 on success, -errno on failure.
|
||||
+ */
|
||||
+struct vfio_region_info {
|
||||
+ __u32 argsz;
|
||||
+ __u32 flags;
|
||||
+#define VFIO_REGION_INFO_FLAG_READ (1 << 0) /* Region supports read */
|
||||
+#define VFIO_REGION_INFO_FLAG_WRITE (1 << 1) /* Region supports write */
|
||||
+#define VFIO_REGION_INFO_FLAG_MMAP (1 << 2) /* Region supports mmap */
|
||||
+ __u32 index; /* Region index */
|
||||
+ __u32 resv; /* Reserved for alignment */
|
||||
+ __u64 size; /* Region size (bytes) */
|
||||
+ __u64 offset; /* Region offset from start of device fd */
|
||||
+};
|
||||
+#define VFIO_DEVICE_GET_REGION_INFO _IO(VFIO_TYPE, VFIO_BASE + 8)
|
||||
+
|
||||
+/**
|
||||
+ * VFIO_DEVICE_GET_IRQ_INFO - _IOWR(VFIO_TYPE, VFIO_BASE + 9,
|
||||
+ * struct vfio_irq_info)
|
||||
+ *
|
||||
+ * Retrieve information about a device IRQ. Caller provides
|
||||
+ * struct vfio_irq_info with index value set. Caller sets argsz.
|
||||
+ * Implementation of IRQ mapping is bus driver specific. Indexes
|
||||
+ * using multiple IRQs are primarily intended to support MSI-like
|
||||
+ * interrupt blocks. Zero count irq blocks may be used to describe
|
||||
+ * unimplemented interrupt types.
|
||||
+ *
|
||||
+ * The EVENTFD flag indicates the interrupt index supports eventfd based
|
||||
+ * signaling.
|
||||
+ *
|
||||
+ * The MASKABLE flags indicates the index supports MASK and UNMASK
|
||||
+ * actions described below.
|
||||
+ *
|
||||
+ * AUTOMASKED indicates that after signaling, the interrupt line is
|
||||
+ * automatically masked by VFIO and the user needs to unmask the line
|
||||
+ * to receive new interrupts. This is primarily intended to distinguish
|
||||
+ * level triggered interrupts.
|
||||
+ *
|
||||
+ * The NORESIZE flag indicates that the interrupt lines within the index
|
||||
+ * are setup as a set and new subindexes cannot be enabled without first
|
||||
+ * disabling the entire index. This is used for interrupts like PCI MSI
|
||||
+ * and MSI-X where the driver may only use a subset of the available
|
||||
+ * indexes, but VFIO needs to enable a specific number of vectors
|
||||
+ * upfront. In the case of MSI-X, where the user can enable MSI-X and
|
||||
+ * then add and unmask vectors, it's up to userspace to make the decision
|
||||
+ * whether to allocate the maximum supported number of vectors or tear
|
||||
+ * down setup and incrementally increase the vectors as each is enabled.
|
||||
+ */
|
||||
+struct vfio_irq_info {
|
||||
+ __u32 argsz;
|
||||
+ __u32 flags;
|
||||
+#define VFIO_IRQ_INFO_EVENTFD (1 << 0)
|
||||
+#define VFIO_IRQ_INFO_MASKABLE (1 << 1)
|
||||
+#define VFIO_IRQ_INFO_AUTOMASKED (1 << 2)
|
||||
+#define VFIO_IRQ_INFO_NORESIZE (1 << 3)
|
||||
+ __u32 index; /* IRQ index */
|
||||
+ __u32 count; /* Number of IRQs within this index */
|
||||
+};
|
||||
+#define VFIO_DEVICE_GET_IRQ_INFO _IO(VFIO_TYPE, VFIO_BASE + 9)
|
||||
+
|
||||
+/**
|
||||
+ * VFIO_DEVICE_SET_IRQS - _IOW(VFIO_TYPE, VFIO_BASE + 10, struct vfio_irq_set)
|
||||
+ *
|
||||
+ * Set signaling, masking, and unmasking of interrupts. Caller provides
|
||||
+ * struct vfio_irq_set with all fields set. 'start' and 'count' indicate
|
||||
+ * the range of subindexes being specified.
|
||||
+ *
|
||||
+ * The DATA flags specify the type of data provided. If DATA_NONE, the
|
||||
+ * operation performs the specified action immediately on the specified
|
||||
+ * interrupt(s). For example, to unmask AUTOMASKED interrupt [0,0]:
|
||||
+ * flags = (DATA_NONE|ACTION_UNMASK), index = 0, start = 0, count = 1.
|
||||
+ *
|
||||
+ * DATA_BOOL allows sparse support for the same on arrays of interrupts.
|
||||
+ * For example, to mask interrupts [0,1] and [0,3] (but not [0,2]):
|
||||
+ * flags = (DATA_BOOL|ACTION_MASK), index = 0, start = 1, count = 3,
|
||||
+ * data = {1,0,1}
|
||||
+ *
|
||||
+ * DATA_EVENTFD binds the specified ACTION to the provided __s32 eventfd.
|
||||
+ * A value of -1 can be used to either de-assign interrupts if already
|
||||
+ * assigned or skip un-assigned interrupts. For example, to set an eventfd
|
||||
+ * to be trigger for interrupts [0,0] and [0,2]:
|
||||
+ * flags = (DATA_EVENTFD|ACTION_TRIGGER), index = 0, start = 0, count = 3,
|
||||
+ * data = {fd1, -1, fd2}
|
||||
+ * If index [0,1] is previously set, two count = 1 ioctls calls would be
|
||||
+ * required to set [0,0] and [0,2] without changing [0,1].
|
||||
+ *
|
||||
+ * Once a signaling mechanism is set, DATA_BOOL or DATA_NONE can be used
|
||||
+ * with ACTION_TRIGGER to perform kernel level interrupt loopback testing
|
||||
+ * from userspace (ie. simulate hardware triggering).
|
||||
+ *
|
||||
+ * Setting of an event triggering mechanism to userspace for ACTION_TRIGGER
|
||||
+ * enables the interrupt index for the device. Individual subindex interrupts
|
||||
+ * can be disabled using the -1 value for DATA_EVENTFD or the index can be
|
||||
+ * disabled as a whole with: flags = (DATA_NONE|ACTION_TRIGGER), count = 0.
|
||||
+ *
|
||||
+ * Note that ACTION_[UN]MASK specify user->kernel signaling (irqfds) while
|
||||
+ * ACTION_TRIGGER specifies kernel->user signaling.
|
||||
+ */
|
||||
+struct vfio_irq_set {
|
||||
+ __u32 argsz;
|
||||
+ __u32 flags;
|
||||
+#define VFIO_IRQ_SET_DATA_NONE (1 << 0) /* Data not present */
|
||||
+#define VFIO_IRQ_SET_DATA_BOOL (1 << 1) /* Data is bool (u8) */
|
||||
+#define VFIO_IRQ_SET_DATA_EVENTFD (1 << 2) /* Data is eventfd (s32) */
|
||||
+#define VFIO_IRQ_SET_ACTION_MASK (1 << 3) /* Mask interrupt */
|
||||
+#define VFIO_IRQ_SET_ACTION_UNMASK (1 << 4) /* Unmask interrupt */
|
||||
+#define VFIO_IRQ_SET_ACTION_TRIGGER (1 << 5) /* Trigger interrupt */
|
||||
+ __u32 index;
|
||||
+ __u32 start;
|
||||
+ __u32 count;
|
||||
+ __u8 data[];
|
||||
+};
|
||||
+#define VFIO_DEVICE_SET_IRQS _IO(VFIO_TYPE, VFIO_BASE + 10)
|
||||
+
|
||||
+#define VFIO_IRQ_SET_DATA_TYPE_MASK (VFIO_IRQ_SET_DATA_NONE | \
|
||||
+ VFIO_IRQ_SET_DATA_BOOL | \
|
||||
+ VFIO_IRQ_SET_DATA_EVENTFD)
|
||||
+#define VFIO_IRQ_SET_ACTION_TYPE_MASK (VFIO_IRQ_SET_ACTION_MASK | \
|
||||
+ VFIO_IRQ_SET_ACTION_UNMASK | \
|
||||
+ VFIO_IRQ_SET_ACTION_TRIGGER)
|
||||
+/**
|
||||
+ * VFIO_DEVICE_RESET - _IO(VFIO_TYPE, VFIO_BASE + 11)
|
||||
+ *
|
||||
+ * Reset a device.
|
||||
+ */
|
||||
+#define VFIO_DEVICE_RESET _IO(VFIO_TYPE, VFIO_BASE + 11)
|
||||
+
|
||||
+/*
|
||||
+ * The VFIO-PCI bus driver makes use of the following fixed region and
|
||||
+ * IRQ index mapping. Unimplemented regions return a size of zero.
|
||||
+ * Unimplemented IRQ types return a count of zero.
|
||||
+ */
|
||||
+
|
||||
+enum {
|
||||
+ VFIO_PCI_BAR0_REGION_INDEX,
|
||||
+ VFIO_PCI_BAR1_REGION_INDEX,
|
||||
+ VFIO_PCI_BAR2_REGION_INDEX,
|
||||
+ VFIO_PCI_BAR3_REGION_INDEX,
|
||||
+ VFIO_PCI_BAR4_REGION_INDEX,
|
||||
+ VFIO_PCI_BAR5_REGION_INDEX,
|
||||
+ VFIO_PCI_ROM_REGION_INDEX,
|
||||
+ VFIO_PCI_CONFIG_REGION_INDEX,
|
||||
+ /*
|
||||
+ * Expose VGA regions defined for PCI base class 03, subclass 00.
|
||||
+ * This includes I/O port ranges 0x3b0 to 0x3bb and 0x3c0 to 0x3df
|
||||
+ * as well as the MMIO range 0xa0000 to 0xbffff. Each implemented
|
||||
+ * range is found at it's identity mapped offset from the region
|
||||
+ * offset, for example 0x3b0 is region_info.offset + 0x3b0. Areas
|
||||
+ * between described ranges are unimplemented.
|
||||
+ */
|
||||
+ VFIO_PCI_VGA_REGION_INDEX,
|
||||
+ VFIO_PCI_NUM_REGIONS
|
||||
+};
|
||||
+
|
||||
+enum {
|
||||
+ VFIO_PCI_INTX_IRQ_INDEX,
|
||||
+ VFIO_PCI_MSI_IRQ_INDEX,
|
||||
+ VFIO_PCI_MSIX_IRQ_INDEX,
|
||||
+ VFIO_PCI_ERR_IRQ_INDEX,
|
||||
+ VFIO_PCI_NUM_IRQS
|
||||
+};
|
||||
+
|
||||
+/**
|
||||
+ * VFIO_DEVICE_GET_PCI_HOT_RESET_INFO - _IORW(VFIO_TYPE, VFIO_BASE + 12,
|
||||
+ * struct vfio_pci_hot_reset_info)
|
||||
+ *
|
||||
+ * Return: 0 on success, -errno on failure:
|
||||
+ * -enospc = insufficient buffer, -enodev = unsupported for device.
|
||||
+ */
|
||||
+struct vfio_pci_dependent_device {
|
||||
+ __u32 group_id;
|
||||
+ __u16 segment;
|
||||
+ __u8 bus;
|
||||
+ __u8 devfn; /* Use PCI_SLOT/PCI_FUNC */
|
||||
+};
|
||||
+
|
||||
+struct vfio_pci_hot_reset_info {
|
||||
+ __u32 argsz;
|
||||
+ __u32 flags;
|
||||
+ __u32 count;
|
||||
+ struct vfio_pci_dependent_device devices[];
|
||||
+};
|
||||
+
|
||||
+#define VFIO_DEVICE_GET_PCI_HOT_RESET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12)
|
||||
+
|
||||
+/**
|
||||
+ * VFIO_DEVICE_PCI_HOT_RESET - _IOW(VFIO_TYPE, VFIO_BASE + 13,
|
||||
+ * struct vfio_pci_hot_reset)
|
||||
+ *
|
||||
+ * Return: 0 on success, -errno on failure.
|
||||
+ */
|
||||
+struct vfio_pci_hot_reset {
|
||||
+ __u32 argsz;
|
||||
+ __u32 flags;
|
||||
+ __u32 count;
|
||||
+ __s32 group_fds[];
|
||||
+};
|
||||
+
|
||||
+#define VFIO_DEVICE_PCI_HOT_RESET _IO(VFIO_TYPE, VFIO_BASE + 13)
|
||||
+
|
||||
+/* -------- API for Type1 VFIO IOMMU -------- */
|
||||
+
|
||||
+/**
|
||||
+ * VFIO_IOMMU_GET_INFO - _IOR(VFIO_TYPE, VFIO_BASE + 12, struct vfio_iommu_info)
|
||||
+ *
|
||||
+ * Retrieve information about the IOMMU object. Fills in provided
|
||||
+ * struct vfio_iommu_info. Caller sets argsz.
|
||||
+ *
|
||||
+ * XXX Should we do these by CHECK_EXTENSION too?
|
||||
+ */
|
||||
+struct vfio_iommu_type1_info {
|
||||
+ __u32 argsz;
|
||||
+ __u32 flags;
|
||||
+#define VFIO_IOMMU_INFO_PGSIZES (1 << 0) /* supported page sizes info */
|
||||
+ __u64 iova_pgsizes; /* Bitmap of supported page sizes */
|
||||
+};
|
||||
+
|
||||
+#define VFIO_IOMMU_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12)
|
||||
+
|
||||
+/**
|
||||
+ * VFIO_IOMMU_MAP_DMA - _IOW(VFIO_TYPE, VFIO_BASE + 13, struct vfio_dma_map)
|
||||
+ *
|
||||
+ * Map process virtual addresses to IO virtual addresses using the
|
||||
+ * provided struct vfio_dma_map. Caller sets argsz. READ &/ WRITE required.
|
||||
+ */
|
||||
+struct vfio_iommu_type1_dma_map {
|
||||
+ __u32 argsz;
|
||||
+ __u32 flags;
|
||||
+#define VFIO_DMA_MAP_FLAG_READ (1 << 0) /* readable from device */
|
||||
+#define VFIO_DMA_MAP_FLAG_WRITE (1 << 1) /* writable from device */
|
||||
+ __u64 vaddr; /* Process virtual address */
|
||||
+ __u64 iova; /* IO virtual address */
|
||||
+ __u64 size; /* Size of mapping (bytes) */
|
||||
+};
|
||||
+
|
||||
+#define VFIO_IOMMU_MAP_DMA _IO(VFIO_TYPE, VFIO_BASE + 13)
|
||||
+
|
||||
+/**
|
||||
+ * VFIO_IOMMU_UNMAP_DMA - _IOWR(VFIO_TYPE, VFIO_BASE + 14,
|
||||
+ * struct vfio_dma_unmap)
|
||||
+ *
|
||||
+ * Unmap IO virtual addresses using the provided struct vfio_dma_unmap.
|
||||
+ * Caller sets argsz. The actual unmapped size is returned in the size
|
||||
+ * field. No guarantee is made to the user that arbitrary unmaps of iova
|
||||
+ * or size different from those used in the original mapping call will
|
||||
+ * succeed.
|
||||
+ */
|
||||
+struct vfio_iommu_type1_dma_unmap {
|
||||
+ __u32 argsz;
|
||||
+ __u32 flags;
|
||||
+ __u64 iova; /* IO virtual address */
|
||||
+ __u64 size; /* Size of mapping (bytes) */
|
||||
+};
|
||||
+
|
||||
+#define VFIO_IOMMU_UNMAP_DMA _IO(VFIO_TYPE, VFIO_BASE + 14)
|
||||
+
|
||||
+/*********** APIs for VFIO_PAMU type only ****************/
|
||||
+/*
|
||||
+ * VFIO_IOMMU_PAMU_GET_ATTR - _IO(VFIO_TYPE, VFIO_BASE + 15,
|
||||
+ * struct vfio_pamu_attr)
|
||||
+ *
|
||||
+ * Gets the iommu attributes for the current vfio container.
|
||||
+ * Caller sets argsz and attribute. The ioctl fills in
|
||||
+ * the provided struct vfio_pamu_attr based on the attribute
|
||||
+ * value that was set.
|
||||
+ * Return: 0 on success, -errno on failure
|
||||
+ */
|
||||
+struct vfio_pamu_attr {
|
||||
+ __u32 argsz;
|
||||
+ __u32 flags; /* no flags currently */
|
||||
+#define VFIO_ATTR_GEOMETRY 0
|
||||
+#define VFIO_ATTR_WINDOWS 1
|
||||
+#define VFIO_ATTR_PAMU_STASH 2
|
||||
+ __u32 attribute;
|
||||
+
|
||||
+ union {
|
||||
+ /* VFIO_ATTR_GEOMETRY */
|
||||
+ struct {
|
||||
+ /* first addr that can be mapped */
|
||||
+ __u64 aperture_start;
|
||||
+ /* last addr that can be mapped */
|
||||
+ __u64 aperture_end;
|
||||
+ } attr;
|
||||
+
|
||||
+ /* VFIO_ATTR_WINDOWS */
|
||||
+ __u32 windows; /* number of windows in the aperture
|
||||
+ * initially this will be the max number
|
||||
+ * of windows that can be set
|
||||
+ */
|
||||
+ /* VFIO_ATTR_PAMU_STASH */
|
||||
+ struct {
|
||||
+ __u32 cpu; /* CPU number for stashing */
|
||||
+ __u32 cache; /* cache ID for stashing */
|
||||
+ } stash;
|
||||
+ } attr_info;
|
||||
+};
|
||||
+#define VFIO_IOMMU_PAMU_GET_ATTR _IO(VFIO_TYPE, VFIO_BASE + 15)
|
||||
+
|
||||
+/*
|
||||
+ * VFIO_IOMMU_PAMU_SET_ATTR - _IO(VFIO_TYPE, VFIO_BASE + 16,
|
||||
+ * struct vfio_pamu_attr)
|
||||
+ *
|
||||
+ * Sets the iommu attributes for the current vfio container.
|
||||
+ * Caller sets struct vfio_pamu attr, including argsz and attribute and
|
||||
+ * setting any fields that are valid for the attribute.
|
||||
+ * Return: 0 on success, -errno on failure
|
||||
+ */
|
||||
+#define VFIO_IOMMU_PAMU_SET_ATTR _IO(VFIO_TYPE, VFIO_BASE + 16)
|
||||
+
|
||||
+/*
|
||||
+ * VFIO_IOMMU_PAMU_GET_MSI_BANK_COUNT - _IO(VFIO_TYPE, VFIO_BASE + 17, __u32)
|
||||
+ *
|
||||
+ * Returns the number of MSI banks for this platform. This tells user space
|
||||
+ * how many aperture windows should be reserved for MSI banks when setting
|
||||
+ * the PAMU geometry and window count.
|
||||
+ * Return: __u32 bank count on success, -errno on failure
|
||||
+ */
|
||||
+#define VFIO_IOMMU_PAMU_GET_MSI_BANK_COUNT _IO(VFIO_TYPE, VFIO_BASE + 17)
|
||||
+
|
||||
+/*
|
||||
+ * VFIO_IOMMU_PAMU_MAP_MSI_BANK - _IO(VFIO_TYPE, VFIO_BASE + 18,
|
||||
+ * struct vfio_pamu_msi_bank_map)
|
||||
+ *
|
||||
+ * Maps the MSI bank at the specified index and iova. User space must
|
||||
+ * call this ioctl once for each MSI bank (count of banks is returned by
|
||||
+ * VFIO_IOMMU_PAMU_GET_MSI_BANK_COUNT).
|
||||
+ * Caller provides struct vfio_pamu_msi_bank_map with all fields set.
|
||||
+ * Return: 0 on success, -errno on failure
|
||||
+ */
|
||||
+
|
||||
+struct vfio_pamu_msi_bank_map {
|
||||
+ __u32 argsz;
|
||||
+ __u32 flags; /* no flags currently */
|
||||
+ __u32 msi_bank_index; /* the index of the MSI bank */
|
||||
+ __u64 iova; /* the iova the bank is to be mapped to */
|
||||
+};
|
||||
+#define VFIO_IOMMU_PAMU_MAP_MSI_BANK _IO(VFIO_TYPE, VFIO_BASE + 18)
|
||||
+
|
||||
+/*
|
||||
+ * VFIO_IOMMU_PAMU_UNMAP_MSI_BANK - _IO(VFIO_TYPE, VFIO_BASE + 19,
|
||||
+ * struct vfio_pamu_msi_bank_unmap)
|
||||
+ *
|
||||
+ * Unmaps the MSI bank at the specified iova.
|
||||
+ * Caller provides struct vfio_pamu_msi_bank_unmap with all fields set.
|
||||
+ * Operates on VFIO file descriptor (/dev/vfio/vfio).
|
||||
+ * Return: 0 on success, -errno on failure
|
||||
+ */
|
||||
+
|
||||
+struct vfio_pamu_msi_bank_unmap {
|
||||
+ __u32 argsz;
|
||||
+ __u32 flags; /* no flags currently */
|
||||
+ __u64 iova; /* the iova to be unmapped to */
|
||||
+};
|
||||
+#define VFIO_IOMMU_PAMU_UNMAP_MSI_BANK _IO(VFIO_TYPE, VFIO_BASE + 19)
|
||||
+
|
||||
+/*
|
||||
+ * IOCTLs to enable/disable IOMMU container usage.
|
||||
+ * No parameters are supported.
|
||||
+ */
|
||||
+#define VFIO_IOMMU_ENABLE _IO(VFIO_TYPE, VFIO_BASE + 15)
|
||||
+#define VFIO_IOMMU_DISABLE _IO(VFIO_TYPE, VFIO_BASE + 16)
|
||||
+
|
||||
+/* -------- Additional API for SPAPR TCE (Server POWERPC) IOMMU -------- */
|
||||
+
|
||||
+/*
|
||||
+ * The SPAPR TCE info struct provides the information about the PCI bus
|
||||
+ * address ranges available for DMA, these values are programmed into
|
||||
+ * the hardware so the guest has to know that information.
|
||||
+ *
|
||||
+ * The DMA 32 bit window start is an absolute PCI bus address.
|
||||
+ * The IOVA address passed via map/unmap ioctls are absolute PCI bus
|
||||
+ * addresses too so the window works as a filter rather than an offset
|
||||
+ * for IOVA addresses.
|
||||
+ *
|
||||
+ * A flag will need to be added if other page sizes are supported,
|
||||
+ * so as defined here, it is always 4k.
|
||||
+ */
|
||||
+struct vfio_iommu_spapr_tce_info {
|
||||
+ __u32 argsz;
|
||||
+ __u32 flags; /* reserved for future use */
|
||||
+ __u32 dma32_window_start; /* 32 bit window start (bytes) */
|
||||
+ __u32 dma32_window_size; /* 32 bit window size (bytes) */
|
||||
+};
|
||||
+
|
||||
+#define VFIO_IOMMU_SPAPR_TCE_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12)
|
||||
+
|
||||
+/* ***************************************************************** */
|
||||
+
|
||||
+#endif /* _UAPIVFIO_H */
|
||||
--
|
||||
1.8.3.2
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
DESCRIPTION = "SKMM application for PCIe endpoint"
|
||||
SECTION = "skmm-ep"
|
||||
LICENSE = "BSD & GPL-2.0-only"
|
||||
LIC_FILES_CHKSUM = "file://Makefile;endline=30;md5=39e58bedc879163c9338596e52df5b1f"
|
||||
|
||||
DEPENDS = "libedit openssl virtual/kernel"
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
|
||||
SRC_URI = "git://github.com/nxp-qoriq-yocto-sdk/skmm-ep;protocol=https;nobranch=1 \
|
||||
file://add-two-missing-header-files.patch \
|
||||
"
|
||||
SRCREV = "de6816c7d66129683bc62229b482ac3cf585d896"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
EXTRA_OEMAKE = 'ARCH=${TARGET_ARCH} MACHINE=${MACHINE} EXTRA_LDFLAGS="${LDFLAGS}"'
|
||||
|
||||
export LIBEDIT_CFLAGS = "`pkg-config --cflags libedit`"
|
||||
export LIBEDIT_LDFLAGS = "`pkg-config --libs --static libedit`"
|
||||
|
||||
do_compile () {
|
||||
oe_runmake
|
||||
}
|
||||
|
||||
do_install () {
|
||||
oe_runmake install DESTDIR=${D}
|
||||
}
|
||||
|
||||
COMPATIBLE_MACHINE = "(p4080ds|t4240qds|c293pcie)"
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,68 @@
|
||||
From 6c7567e05c28b8cb6c7dc68c278950a32feb6f64 Mon Sep 17 00:00:00 2001
|
||||
From: Ting Liu <b28495@freescale.com>
|
||||
Date: Wed, 9 May 2012 02:42:57 -0500
|
||||
Subject: [PATCH] Yocto: replace $(COMPILE_PREFIX)gcc with $(CC) and remove -te500v2 flags
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Ting Liu <b28495@freescale.com>
|
||||
---
|
||||
SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile | 4 ++--
|
||||
SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile | 4 ++--
|
||||
testfloat/powerpc-linux-gcc/Makefile | 8 ++++----
|
||||
3 files changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile
|
||||
index 28f1e33..4098048 100644
|
||||
--- a/SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile
|
||||
+++ b/SoftFloat-2b/softfloat/bits32/powerpc-GCC/Makefile
|
||||
@@ -5,8 +5,8 @@ SOFTFLOAT_MACROS = ../softfloat-macros
|
||||
OBJ = .o
|
||||
EXE =
|
||||
INCLUDES = -I. -I..
|
||||
-COMPILE_C = $(COMPILE_PREFIX)gcc -msoft-float -c -o $@ $(INCLUDES) -I- -O2
|
||||
-LINK = $(COMPILE_PREFIX)gcc -o $@
|
||||
+COMPILE_C = $(CC) -msoft-float -c -o $@ $(INCLUDES) -I- -O2
|
||||
+LINK = $(CC) -o $@
|
||||
|
||||
ALL: softfloat$(OBJ) timesoftfloat$(EXE)
|
||||
|
||||
diff --git a/SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile
|
||||
index a5e2cc7..c34e16e 100644
|
||||
--- a/SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile
|
||||
+++ b/SoftFloat-2b/softfloat/bits64/powerpc-GCC/Makefile
|
||||
@@ -5,8 +5,8 @@ SOFTFLOAT_MACROS = ../softfloat-macros
|
||||
OBJ = .o
|
||||
EXE =
|
||||
INCLUDES = -I. -I..
|
||||
-COMPILE_C = $(COMPILE_PREFIX) -mcpu=8548 -mhard-float -mfloat-gprs=double -o $@ $(INCLUDES) -I- -O2
|
||||
-LINK = $(COMPILE_PREFIX) -o $@
|
||||
+COMPILE_C = $(CC) -mcpu=8548 -mhard-float -mfloat-gprs=double -o $@ $(INCLUDES) -I- -O2
|
||||
+LINK = $(CC) -o $@
|
||||
|
||||
ALL: softfloat$(OBJ) timesoftfloat$(EXE)
|
||||
|
||||
diff --git a/testfloat/powerpc-linux-gcc/Makefile b/testfloat/powerpc-linux-gcc/Makefile
|
||||
index de50aad..1a8b5f7 100644
|
||||
--- a/testfloat/powerpc-linux-gcc/Makefile
|
||||
+++ b/testfloat/powerpc-linux-gcc/Makefile
|
||||
@@ -8,13 +8,13 @@ OBJ = .o
|
||||
EXE =
|
||||
INCLUDES = -I. -I.. -I$(SOFTFLOAT_DIR)
|
||||
|
||||
-COMPILE_C = $(COMPILE_PREFIX)gcc -c -o $@ $(INCLUDES) -I- -O $(EXTRA_CFLAGS)
|
||||
+COMPILE_C = $(CC) -c -o $@ $(INCLUDES) -I- -O $(EXTRA_CFLAGS)
|
||||
|
||||
-COMPILE_C_HARD = $(COMPILE_PREFIX)gcc -c -te500v2 -o $@ $(INCLUDES)
|
||||
+COMPILE_C_HARD = $(CC) -c -o $@ $(INCLUDES)
|
||||
|
||||
-COMPILE_SLOWFLOAT_C = $(COMPILE_PREFIX)gcc -c -o $@ $(INCLUDES) -I- -O
|
||||
+COMPILE_SLOWFLOAT_C = $(CC) -c -o $@ $(INCLUDES) -I- -O
|
||||
|
||||
-LINK = $(COMPILE_PREFIX)gcc -lm -o $@
|
||||
+LINK = $(CC) -lm -o $@ ${LDFLAGS}
|
||||
|
||||
SOFTFLOAT_H = $(SOFTFLOAT_DIR)/softfloat.h
|
||||
SOFTFLOAT_OBJ = $(SOFTFLOAT_DIR)/softfloat$(OBJ)
|
||||
--
|
||||
1.7.3.4
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
DESCRIPTION = "A program for testing floating-point implementation"
|
||||
LICENSE = "TestFloat"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://testfloat/testfloat.txt;beginline=87;endline=95;md5=bdb2e8111838a48015c29bd97f5b6145"
|
||||
|
||||
SRC_URI = " http://www.jhauser.us/arithmetic/TestFloat-2a.tar.Z;name=TestFloat \
|
||||
http://www.jhauser.us/arithmetic/SoftFloat-2b.tar.Z;name=SoftFloat \
|
||||
"
|
||||
SRC_URI:append:qoriq-ppc = " file://SoftFloat-powerpc-1.patch \
|
||||
file://TestFloat-powerpc-E500v2-SPE-1.patch \
|
||||
file://Yocto-replace-COMPILE_PREFIX-gcc.patch \
|
||||
"
|
||||
SRC_URI[TestFloat.sha256sum] = "84d14aa42adefbda2ec9708b42946f7fa59f93689b042684bd027863481f8e4e"
|
||||
SRC_URI[SoftFloat.sha256sum] = "89d14b55113a2ba8cbda7011443ba1d298d381c89d939515d56c5f18f2febf81"
|
||||
|
||||
S = "${WORKDIR}/TestFloat-2a"
|
||||
|
||||
do_unpack2(){
|
||||
mv ${WORKDIR}/SoftFloat-2b ${S}/SoftFloat-2b
|
||||
cd ${S}
|
||||
if [ -n "$(which fromdos)" ];then
|
||||
find -type f -exec fromdos {} \;
|
||||
elif [ -n "$(which dos2unix)" ];then
|
||||
find -type f -exec dos2unix {} \;
|
||||
else
|
||||
echo -e "\nERROR: command dos2unix or fromdos not found\n" && return 1
|
||||
fi
|
||||
}
|
||||
addtask do_unpack2 after do_unpack before do_patch
|
||||
|
||||
do_compile(){
|
||||
oe_runmake -C testfloat/powerpc-linux-gcc/ CC="${CC}" EXTRA_CFLAGS="-DTEST_KERNEL_EMU"
|
||||
}
|
||||
|
||||
do_install(){
|
||||
install -d ${D}/${bindir}
|
||||
install testfloat/powerpc-linux-gcc/testfloat ${D}/${bindir}
|
||||
install testfloat/powerpc-linux-gcc/testsoftfloat ${D}/${bindir}
|
||||
}
|
||||
|
||||
COMPATIBLE_HOST:e500v2 = ".*"
|
||||
COMPATIBLE_HOST ?= "(none)"
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
From 2cf9a3f919317784e7cecdff6b632cdb2665c580 Mon Sep 17 00:00:00 2001
|
||||
From: Meng Li <Meng.Li@windriver.com>
|
||||
Date: Mon, 12 Jun 2023 15:17:21 +0800
|
||||
Subject: [PATCH] tsntool: remove redundant parameters from BIN_LDFLAGS
|
||||
|
||||
The recipe file has pass the same parameter(-Wl,-rpath-link,<lib path>)
|
||||
to Makefile, so remove redundant parameters from BIN_LDFLAGS.
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Meng Li <Meng.Li@windriver.com>
|
||||
---
|
||||
Makefile | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 0ba88b4..39a98c0 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -16,7 +16,6 @@ BIN_CFLAGS += -Wall -Wextra -Wno-error=unused-parameter -Wno-error=sign-compare
|
||||
BIN_CFLAGS += $(shell $(PKG_CONFIG) --cflags libnl-3.0 libnl-genl-3.0 libcjson) -Iinclude
|
||||
BIN_LDFLAGS += -ltsn $(shell $(PKG_CONFIG) --libs libnl-3.0 libnl-genl-3.0 libcjson) -lpthread -lm -lrt
|
||||
BIN_LDFLAGS += -lreadline -ltermcap -L.
|
||||
-BIN_LDFLAGS += -Wl,-rpath,$(shell pwd) # Compiled lib at local folder
|
||||
|
||||
BIN_SRC =
|
||||
LIB_SRC =
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
SUMMARY = "Configure TSN funtionalitie"
|
||||
DESCRIPTION = "A tool to configure TSN funtionalities in user space"
|
||||
LICENSE = "GPL-2.0-only"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=ef58f855337069acd375717db0dbbb6d"
|
||||
|
||||
DEPENDS = "cjson libnl readline"
|
||||
|
||||
inherit pkgconfig
|
||||
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
SRC_URI = "git://github.com/nxp-qoriq/tsntool;protocol=https;nobranch=1"
|
||||
SRCREV = "a0769e23304957a22f0cbeee6d1f547b20c3c21e"
|
||||
|
||||
SRC_URI:append = " \
|
||||
file://0001-tsntool-remove-redundant-parameters-from-BIN_LDFLAGS.patch \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
do_configure[depends] += "virtual/kernel:do_shared_workdir"
|
||||
|
||||
do_compile:prepend() {
|
||||
mkdir -p ${S}/include/linux
|
||||
cp -r ${STAGING_KERNEL_DIR}/include/uapi/linux/tsn.h ${S}/include/linux
|
||||
}
|
||||
do_install() {
|
||||
install -d ${D}${bindir} ${D}${libdir}
|
||||
install -m 0755 ${S}/tsntool ${D}${bindir}
|
||||
install -m 0755 ${S}/libtsn.so ${D}${libdir}
|
||||
}
|
||||
|
||||
PACKAGES = "${PN}-dbg ${PN}"
|
||||
FILES:${PN} = "${libdir}/libtsn.so ${bindir}/*"
|
||||
INSANE_SKIP:${PN} += "file-rdeps rpaths dev-so"
|
||||
COMPATIBLE_MACHINE = "(qoriq)"
|
||||
PARALLEL_MAKE = ""
|
||||
Reference in New Issue
Block a user