From b2e9a435343a55ccc7423c3d0b98d85f209e7b34 Mon Sep 17 00:00:00 2001 From: Beleswar Padhi Date: Tue, 19 Aug 2025 15:53:48 +0530 Subject: [PATCH] ti-ipc-examples-linux: Add a recipe to build messageq app_host Add a recipe to build the Application Host (for A15 core) to demonstrate IPC with remote processors through messageq firmware. Also package this in the /usr/bin directory for testing IPC. This recipe only builds the app_host, and the firmwares are available in ti-linux-firmware repository. Signed-off-by: Beleswar Padhi Signed-off-by: Ryan Eatmon --- .../ipc/ti-ipc-examples-linux_git.bb | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 meta-ti-extras/recipes-ti/ipc/ti-ipc-examples-linux_git.bb diff --git a/meta-ti-extras/recipes-ti/ipc/ti-ipc-examples-linux_git.bb b/meta-ti-extras/recipes-ti/ipc/ti-ipc-examples-linux_git.bb new file mode 100644 index 00000000..0b6c01fe --- /dev/null +++ b/meta-ti-extras/recipes-ti/ipc/ti-ipc-examples-linux_git.bb @@ -0,0 +1,65 @@ +DESCRIPTION = "TI Inter Processor Communication (IPC) MessageQ Application for Linux Host" + +require recipes-ti/ipc/ti-ipc-common.inc +require ti-ipc-rtos.inc + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://${S_ipc-examples}/src/makefile;beginline=1;endline=30;md5=a52324bd5033bb49ea07bade1244ac9a" + +IPC_INSTALL_DIR = "${STAGING_DIR_TARGET}/usr/share/ti/ti-ipc-tree" +INHIBIT_PACKAGE_STRIP = "1" + +DEPENDS = "ti-ipc ti-ipc-rtos ti-xdctools-native zip-native" + +EX02_PATH = "examples/DRA7XX_linux_elf/ex02_messageq/host" + +do_compile() { + cd ${S_ipc-examples}/src + oe_runmake .examples \ + IPCTOOLS="${S_ipc-metadata}/src/etc" + + for alt_platform in ${ALT_PLATFORM}; do + oe_runmake .examples "PLATFORM=${alt_platform}" \ + IPCTOOLS="${S_ipc-metadata}/src/etc" + done + + if [ "${PLATFORM}" != "UNKNOWN" ]; then + oe_runmake extract HOSTOS="linux" IPC_INSTALL_DIR="${IPC_INSTALL_DIR}" + + if [ ! -z ${ALT_PLATFORM} ]; then + oe_runmake extract PLATFORM="${ALT_PLATFORM}" HOSTOS="linux" \ + IPC_INSTALL_DIR="${IPC_INSTALL_DIR}" + fi + oe_runmake -C ${EX02_PATH} all HOSTOS="linux" \ + LINUX_SYSROOT_DIR="${STAGING_INCDIR}" \ + IPC_INSTALL_DIR="${IPC_INSTALL_DIR}" + + if [ ! -z ${ALT_PLATFORM} ]; then + oe_runmake -C ${EX02_PATH} all HOSTOS="linux" \ + LINUX_SYSROOT_DIR="${STAGING_INCDIR}" \ + IPC_INSTALL_DIR="${IPC_INSTALL_DIR}" \ + PLATFORM="${ALT_PLATFORM}" + fi + fi +} + +do_install() { + cd ${S_ipc-examples}/src + + if [ "${PLATFORM}" != "UNKNOWN" ]; then + # Install directory for linux examples + install -d ${D}${bindir}/ipc/examples/ex02_messageq + oe_runmake -C ${EX02_PATH} install IPC_INSTALL_DIR="${IPC_INSTALL_DIR}" \ + LINUX_SYSROOT_DIR="${STAGING_INCDIR}" \ + HOSTOS="linux" EXEC_DIR="${D}/${bindir}/ipc/examples/ex02_messageq" + + if [ ! -z ${ALT_PLATFORM} ]; then + oe_runmake -C ${EX02_PATH} install IPC_INSTALL_DIR="${IPC_INSTALL_DIR}" \ + LINUX_SYSROOT_DIR="${STAGING_INCDIR}" \ + HOSTOS="linux" EXEC_DIR="${D}/${bindir}/ipc/examples/ex02_messageq" \ + PLATFORM="${ALT_PLATFORM}" + fi + fi +} + +FILES:${PN} += "${bindir}/*"