diff options
Diffstat (limited to 'meta-ti-bsp/recipes-ti/ipc')
12 files changed, 360 insertions, 0 deletions
diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-ipc-common.inc b/meta-ti-bsp/recipes-ti/ipc/ti-ipc-common.inc new file mode 100644 index 00000000..ec1e71be --- /dev/null +++ b/meta-ti-bsp/recipes-ti/ipc/ti-ipc-common.inc @@ -0,0 +1,12 @@ +PV = "3.51.00.00" +INC_PR = "r0" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_HOST ?= "null" +COMPATIBLE_HOST:ti-soc = "(.*)" + +PLATFORM = "UNKNOWN" +PLATFORM:dra7xx = "DRA7XX" +PLATFORM:omapl138 = "OMAPL138" + +ALT_PLATFORM:am57xx = "AM572X AM571X" diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-ipc.inc b/meta-ti-bsp/recipes-ti/ipc/ti-ipc.inc new file mode 100644 index 00000000..44be2466 --- /dev/null +++ b/meta-ti-bsp/recipes-ti/ipc/ti-ipc.inc @@ -0,0 +1,20 @@ +DESCRIPTION = "TI Inter Process Communication (IPC) Mechanisms (for Uni- and Multi- Processor Configurations)" +HOMEPAGE="http://processors.wiki.ti.com/index.php/Category:IPC" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://${S}/ipc-linux.mak;beginline=1;endline=30;md5=7b327f9b710fd7c95e545b91cec79255" + +TI_IPC_GIT_URI = "git://git.ti.com/git/ipc/ipcdev.git" +TI_IPC_GIT_PROTOCOL = "https" +TI_IPC_GIT_BRANCH = "master" + +#Corresponds to 3.51.00.00A +TI_IPC_SRCREV = "7a6e343a208d2849139b7272a67abc01db806e00" + +BRANCH = "${TI_IPC_GIT_BRANCH}" +SRC_URI = "${TI_IPC_GIT_URI};protocol=${TI_IPC_GIT_PROTOCOL};branch=${BRANCH};name=ipcdev" +SRCREV = "${TI_IPC_SRCREV}" + +CFLAGS += "-fcommon" + +S = "${WORKDIR}/git" diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-ipc/0001-Add-kernel-build-dir.patch b/meta-ti-bsp/recipes-ti/ipc/ti-ipc/0001-Add-kernel-build-dir.patch new file mode 100644 index 00000000..cb178ee6 --- /dev/null +++ b/meta-ti-bsp/recipes-ti/ipc/ti-ipc/0001-Add-kernel-build-dir.patch @@ -0,0 +1,114 @@ +From c3ada6bf49e6fcf7bc49e5bf09754f384838ca6a Mon Sep 17 00:00:00 2001 +From: Denys Dmytriyenko <denys@ti.com> +Date: Mon, 27 Jul 2015 11:51:52 -0400 +Subject: [PATCH] Add kernel build dir + +We build kernel outside of the source directory and the generated version.h +file ends up being in a separate directory from the rest of kernel headers. +Use another variable to point to the kernel build artifacts. + +Upstream-Status: Inappropriate [OE-specific] + +Signed-off-by: Denys Dmytriyenko <denys@ti.com> + +--- + configure.ac | 6 ++++++ + ipc-linux.mak | 3 +++ + linux/src/mm/Makefile.am | 2 +- + packages/ti/ipc/mm/MmRpc.c | 4 ++++ + 4 files changed, 14 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 4d4a559..84ac78b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -71,6 +71,7 @@ AC_SUBST([AM_LDFLAGS]) + AC_ARG_VAR(PLATFORM, Platform to build. Options are: 'OMAPL138' 'OMAP54XX' '66AK2E' 'TCI6630' 'TCI6636' 'TCI6638' '66AK2G' 'DRA7XX' and 'AM65XX'. If not defined all platforms will be built.) + AC_ARG_VAR(CMEM_INSTALL_DIR, Installation path directory to the CMEM libraries) + AC_ARG_VAR(KERNEL_INSTALL_DIR, Installation path to the Linux kernel.) ++AC_ARG_VAR(KERNEL_BUILD_DIR, Path to the Linux kernel build artifacts.) + AC_ARG_VAR(AF_RPMSG, Address Family used by the RPMSG driver) + AC_ARG_VAR(DRM_PREFIX, Installation location to the DRM library.) + +@@ -113,6 +114,7 @@ AS_IF([test "x$PLATFORM" = "x"], [CMEM_INSTALL_DIR=]) + AC_SUBST([PLATFORM]) + AC_SUBST([CMEM_INSTALL_DIR]) + AC_SUBST([KERNEL_INSTALL_DIR]) ++AC_SUBST([KERNEL_BUILD_DIR]) + AC_SUBST([AF_RPMSG]) + AC_SUBST([DRM_PREFIX]) + +@@ -130,6 +132,7 @@ AM_CONDITIONAL([AM65XX], [test "x$PLATFORM" = "xAM65XX"]) + AM_CONDITIONAL([CMEM], [test "x$CMEM_INSTALL_DIR" != "x"]) + AM_CONDITIONAL([KDIR], [test "x$KERNEL_INSTALL_DIR" != "x"]) + AM_CONDITIONAL([KERNEL_INSTALL_DIR], [test -n "$KERNEL_INSTALL_DIR"]) ++AM_CONDITIONAL([KERNEL_BUILD_DIR], [test -n "$KERNEL_BUILD_DIR"]) + AM_CONDITIONAL([DRM], [test "x$DRM_PREFIX" != "x"]) + AM_CONDITIONAL([AF_RPMSG], [test -n "$AF_RPMSG"]) + +@@ -160,6 +163,9 @@ You have configured to build for the '${PLATFORM}' platform + Your KERNEL installation directory is set to: + '${KERNEL_INSTALL_DIR}' + ++Your KERNEL build artifacts directory is set to: ++ '${KERNEL_BUILD_DIR}' ++ + Your DRM installation directory is set to: + '${DRM_PREFIX}' + +diff --git a/ipc-linux.mak b/ipc-linux.mak +index 58a9cea..4e543ff 100644 +--- a/ipc-linux.mak ++++ b/ipc-linux.mak +@@ -60,6 +60,7 @@ config: + PLATFORM=$(PLATFORM) \ + CMEM_INSTALL_DIR=$(CMEM_INSTALL_DIR) \ + KERNEL_INSTALL_DIR=$(KERNEL_INSTALL_DIR) \ ++ KERNEL_BUILD_DIR=$(KERNEL_BUILD_DIR) \ + DRM_PREFIX=$(DRM_PREFIX) \ + AF_RPMSG=$(AF_RPMSG) + +@@ -72,6 +73,7 @@ config-static: + PLATFORM=$(PLATFORM) \ + CMEM_INSTALL_DIR=$(CMEM_INSTALL_DIR) \ + KERNEL_INSTALL_DIR=$(KERNEL_INSTALL_DIR) \ ++ KERNEL_BUILD_DIR=$(KERNEL_BUILD_DIR) \ + DRM_PREFIX=$(DRM_PREFIX) \ + AF_RPMSG=$(AF_RPMSG) + +@@ -84,5 +86,6 @@ config-shared: + PLATFORM=$(PLATFORM) \ + CMEM_INSTALL_DIR=$(CMEM_INSTALL_DIR) \ + KERNEL_INSTALL_DIR=$(KERNEL_INSTALL_DIR) \ ++ KERNEL_BUILD_DIR=$(KERNEL_BUILD_DIR) \ + DRM_PREFIX=$(DRM_PREFIX) \ + AF_RPMSG=$(AF_RPMSG) +diff --git a/linux/src/mm/Makefile.am b/linux/src/mm/Makefile.am +index 59aa312..8fb51a3 100644 +--- a/linux/src/mm/Makefile.am ++++ b/linux/src/mm/Makefile.am +@@ -32,7 +32,7 @@ + ## + + # additional include paths necessary to compile the library +-AM_CFLAGS = -Wall @AM_CFLAGS@ -DKERNEL_INSTALL_DIR="$(KERNEL_INSTALL_DIR)" ++AM_CFLAGS = -Wall @AM_CFLAGS@ -DKERNEL_INSTALL_DIR="$(KERNEL_INSTALL_DIR)" -DKERNEL_BUILD_DIR="$(KERNEL_BUILD_DIR)" + + ############################################################################### + # THE LIBRARIES TO BUILD +diff --git a/packages/ti/ipc/mm/MmRpc.c b/packages/ti/ipc/mm/MmRpc.c +index 2df7420..797e100 100644 +--- a/packages/ti/ipc/mm/MmRpc.c ++++ b/packages/ti/ipc/mm/MmRpc.c +@@ -56,7 +56,11 @@ + #endif + + #define linux_version_include(kd) <kd/include/generated/uapi/linux/version.h> ++#if defined(KERNEL_BUILD_DIR) ++#include linux_version_include(KERNEL_BUILD_DIR) ++#else + #include linux_version_include(KERNEL_INSTALL_DIR) ++#endif + + #if LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0) + #define linux_include(kd,m) <kd/include/linux/m.h> diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-ipc/0001-MmRpc-Stop-looking-for-rpmsg_rpc.h-in-the-kernel.patch b/meta-ti-bsp/recipes-ti/ipc/ti-ipc/0001-MmRpc-Stop-looking-for-rpmsg_rpc.h-in-the-kernel.patch new file mode 100644 index 00000000..522ad5e4 --- /dev/null +++ b/meta-ti-bsp/recipes-ti/ipc/ti-ipc/0001-MmRpc-Stop-looking-for-rpmsg_rpc.h-in-the-kernel.patch @@ -0,0 +1,34 @@ +From 66ca0e732c2e287814d4fc5082b818554ee42398 Mon Sep 17 00:00:00 2001 +From: Ryan Eatmon <reatmon@ti.com> +Date: Fri, 28 Apr 2023 14:30:59 -0500 +Subject: [PATCH] MmRpc: Stop looking for rpmsg_rpc.h in the kernel + +Stop looking for the rpmsg_rpc.h in the kernel. While we are doing the +LTS migration for kirkstone, this file is not going to be in the kernel +for a bit. This patch works in conjunction with a recipe change that +downloads the header and adds a -I to the CFLAGS to pick it up. This +will be removed once the 6.1 kernel has been updated. + +Signed-off-by: Ryan Eatmon <reatmon@ti.com> + +Upstream-Status: Inappropriate [other] + +--- + packages/ti/ipc/mm/MmRpc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/packages/ti/ipc/mm/MmRpc.c b/packages/ti/ipc/mm/MmRpc.c +index 2df7420..10f496b 100644 +--- a/packages/ti/ipc/mm/MmRpc.c ++++ b/packages/ti/ipc/mm/MmRpc.c +@@ -64,7 +64,7 @@ + #define linux_include(kd,m) <kd/include/uapi/linux/m.h> + #endif + +-#include linux_include(KERNEL_INSTALL_DIR,rpmsg_rpc) ++#include "linux/rpmsg_rpc.h" + + #ifdef _linux_ + #define linux _linux +-- +2.17.1 diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-ipc/omap_remoteproc.conf b/meta-ti-bsp/recipes-ti/ipc/ti-ipc/omap_remoteproc.conf new file mode 100644 index 00000000..6b5034cd --- /dev/null +++ b/meta-ti-bsp/recipes-ti/ipc/ti-ipc/omap_remoteproc.conf @@ -0,0 +1 @@ +softdep omap_remoteproc pre: virtio_rpmsg_bus diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-ipc/tiipclad-daemon.service b/meta-ti-bsp/recipes-ti/ipc/ti-ipc/tiipclad-daemon.service new file mode 100644 index 00000000..ea26845e --- /dev/null +++ b/meta-ti-bsp/recipes-ti/ipc/ti-ipc/tiipclad-daemon.service @@ -0,0 +1,9 @@ +[Unit] +Description=TI IPC Daemon + +[Service] +Type=forking +ExecStart=/usr/bin/__LAD_DAEMON__ -g -l lad.txt + +[Install] +WantedBy=basic.target diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-ipc/tiipclad-daemon.sh b/meta-ti-bsp/recipes-ti/ipc/ti-ipc/tiipclad-daemon.sh new file mode 100644 index 00000000..9ebfa35a --- /dev/null +++ b/meta-ti-bsp/recipes-ti/ipc/ti-ipc/tiipclad-daemon.sh @@ -0,0 +1,25 @@ +#! /bin/sh + +tiipclad_daemon=/usr/bin/__LAD_DAEMON__ +tiipclad_params="-g -l lad.txt" + +test -x "$tiipclad_daemon" || exit 0 + +case "$1" in + start) + echo -n "Starting tiipclad daemon" + start-stop-daemon --start --quiet \ + --exec $tiipclad_daemon -- $tiipclad_params + echo "." + ;; + stop) + echo -n "Stopping tiipclad daemon" + start-stop-daemon --stop --quiet --pidfile /var/run/tiipclad.pid + echo "." + ;; + *) + echo "Usage: /etc/init.d/tiipclad-daemon.sh {start|stop}" + exit 1 +esac + +exit 0 diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-ipc_git.bb b/meta-ti-bsp/recipes-ti/ipc/ti-ipc_git.bb new file mode 100644 index 00000000..e2db6efd --- /dev/null +++ b/meta-ti-bsp/recipes-ti/ipc/ti-ipc_git.bb @@ -0,0 +1,69 @@ +DESCRIPTION = "TI Inter Process Communication (IPC) Mechanisms (for Uni- and Multi- Processor Configurations)" +HOMEPAGE="http://processors.wiki.ti.com/index.php/Category:IPC" + +require ti-ipc.inc +require ti-ipc-common.inc + +PR = "${INC_PR}.2" + +DEPENDS += "virtual/kernel" + +SRC_URI:append = " https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/plain/include/uapi/linux/rpmsg_rpc.h?h=ti-linux-5.10.y;name=rpmsg_rpc;subdir=linux;downloadfilename=rpmsg_rpc.h" +SRC_URI[rpmsg_rpc.sha256sum] = "cd237f40a37520a1f2df19fbfeefd00c0a5ad68efeaba9ba0fba60ca16ea09be" + +SRC_URI += "file://tiipclad-daemon.sh \ + file://omap_remoteproc.conf \ + file://tiipclad-daemon.service \ + file://0001-Add-kernel-build-dir.patch \ + file://0001-MmRpc-Stop-looking-for-rpmsg_rpc.h-in-the-kernel.patch \ + " + +CFLAGS += "-I${WORKDIR}" + +DAEMON = "UNKNOWN" +DAEMON:dra7xx = "lad_dra7xx" +DAEMON:omapl138 = "lad_omapl138" + +inherit autotools-brokensep pkgconfig update-rc.d systemd + +INITSCRIPT_NAME = "tiipclad-daemon.sh" +INITSCRIPT_PARAMS = "defaults 10" + +SYSTEMD_SERVICE:${PN} = "tiipclad-daemon.service" + +EXTRA_OECONF += "PLATFORM=${PLATFORM} KERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR} KERNEL_BUILD_DIR=${STAGING_KERNEL_BUILDDIR}" + +do_compile[depends] += "virtual/kernel:do_shared_workdir" + +do_configure() { + ( cd ${S}; autoreconf -f -i -s ) + oe_runconf +} + +do_install:append() { + install -d ${D}${sysconfdir}/init.d/ + + # Modify the startup scripts to point to the right + # lad daemon executable. + sed -i -e "s/__LAD_DAEMON__/${DAEMON}/" ${WORKDIR}/tiipclad-daemon.sh + sed -i -e "s/__LAD_DAEMON__/${DAEMON}/" ${WORKDIR}/tiipclad-daemon.service + + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/tiipclad-daemon.service ${D}${systemd_system_unitdir} + install -d ${D}${sysconfdir}/init.d/ + install -c -m 755 ${WORKDIR}/tiipclad-daemon.sh ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME} +} + +do_install:append:dra7xx() { + install -d ${D}${sysconfdir}/modprobe.d/ + install -c -m 644 ${WORKDIR}/omap_remoteproc.conf ${D}${sysconfdir}/modprobe.d/ +} + +PACKAGES =+ "${PN}-test" +RDEPENDS:${PN}-test += "${PN}" + +FILES:${PN}-test = " \ + ${bindir}/NameServerApp \ + ${bindir}/MessageQApp \ + ${bindir}/MessageQMulti \ + ${bindir}/ping_rpmsg" diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-rpmsg-char-examples/0001-examples-Remove-use-of-includedir-and-libdir.patch b/meta-ti-bsp/recipes-ti/ipc/ti-rpmsg-char-examples/0001-examples-Remove-use-of-includedir-and-libdir.patch new file mode 100644 index 00000000..71fca1b0 --- /dev/null +++ b/meta-ti-bsp/recipes-ti/ipc/ti-rpmsg-char-examples/0001-examples-Remove-use-of-includedir-and-libdir.patch @@ -0,0 +1,38 @@ +From 1a26cb577ba54dd9214eeb94fed0ce3a0f4603b6 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 24 Oct 2020 23:46:39 -0700 +Subject: [PATCH] examples: Remove use of includedir and libdir + +These point to standard include and library paths which already are used +from sysroot relative paths secondly, they use absolute paths which +means we are asking to add -I/usr/include which might be ok in a native +build but not in cross build. This helps mitigate QA errors found with +OE build system since it finds it adding host include and library search +paths to linker/compiler commandline + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + examples/Makefile.am | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/examples/Makefile.am b/examples/Makefile.am +index 5a9bedb..d547e41 100644 +--- a/examples/Makefile.am ++++ b/examples/Makefile.am +@@ -1,6 +1,4 @@ +-INCLUDE = -I${includedir} +- +-AM_CFLAGS = -Wall -g -O2 $(INCLUDE) ++AM_CFLAGS = -Wall -g -O2 + + bin_PROGRAMS = rpmsg_char_simple + +@@ -8,4 +6,3 @@ bin_PROGRAMS = rpmsg_char_simple + rpmsg_char_simple_SOURCES = rpmsg_char_simple.c + rpmsg_char_simple_CPPFLAGS = $(AM_CFLAGS) + rpmsg_char_simple_LDADD = -lpthread -lti_rpmsg_char +-rpmsg_char_simple_LDFLAGS = -L${libdir} +-- +2.29.1 + diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-rpmsg-char-examples_git.bb b/meta-ti-bsp/recipes-ti/ipc/ti-rpmsg-char-examples_git.bb new file mode 100644 index 00000000..cbe4d7fd --- /dev/null +++ b/meta-ti-bsp/recipes-ti/ipc/ti-rpmsg-char-examples_git.bb @@ -0,0 +1,13 @@ +SUMMARY = "TI RPMsg Char Sample Applications and Tests" + +require ti-rpmsg-char.inc + +SRC_URI += "file://0001-examples-Remove-use-of-includedir-and-libdir.patch" + +DEPENDS = "ti-rpmsg-char" + +inherit autotools pkgconfig + +EXTRA_OEMAKE = "-C ${B}/examples" + +PR = "r0" diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-rpmsg-char.inc b/meta-ti-bsp/recipes-ti/ipc/ti-rpmsg-char.inc new file mode 100644 index 00000000..4710be09 --- /dev/null +++ b/meta-ti-bsp/recipes-ti/ipc/ti-rpmsg-char.inc @@ -0,0 +1,18 @@ +SUMMARY = "TI RPMsg Char Utility Library" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://${S}/src/rpmsg_char.c;beginline=1;endline=31;md5=71987db43a2159cff5ea00505c6fce58" + +PROTOCOL = "https" +BRANCH = "master" +SRC_URI = "git://git.ti.com/git/rpmsg/ti-rpmsg-char.git;protocol=${PROTOCOL};branch=${BRANCH};" + +# 0.6.6 release +SRCREV = "55a6f4032246631a309f8608af5e822024664b59" + +PV = "0.6.6+git" + +S = "${WORKDIR}/git" + +COMPATIBLE_HOST ?= "null" +COMPATIBLE_HOST:ti-soc = "(.*)" diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-rpmsg-char_git.bb b/meta-ti-bsp/recipes-ti/ipc/ti-rpmsg-char_git.bb new file mode 100644 index 00000000..63711a3b --- /dev/null +++ b/meta-ti-bsp/recipes-ti/ipc/ti-rpmsg-char_git.bb @@ -0,0 +1,7 @@ +SUMMARY = "TI RPMsg Char Utility Library" + +require ti-rpmsg-char.inc + +inherit autotools pkgconfig + +PR = "r0" |