aboutsummaryrefslogtreecommitdiffstats
path: root/meta-ti-bsp/recipes-ti/ipc/ti-ipc
diff options
context:
space:
mode:
Diffstat (limited to 'meta-ti-bsp/recipes-ti/ipc/ti-ipc')
-rw-r--r--meta-ti-bsp/recipes-ti/ipc/ti-ipc/0001-Add-kernel-build-dir.patch114
-rw-r--r--meta-ti-bsp/recipes-ti/ipc/ti-ipc/0001-MmRpc-Stop-looking-for-rpmsg_rpc.h-in-the-kernel.patch34
-rw-r--r--meta-ti-bsp/recipes-ti/ipc/ti-ipc/omap_remoteproc.conf1
-rw-r--r--meta-ti-bsp/recipes-ti/ipc/ti-ipc/tiipclad-daemon.service9
-rw-r--r--meta-ti-bsp/recipes-ti/ipc/ti-ipc/tiipclad-daemon.sh25
5 files changed, 183 insertions, 0 deletions
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