Skip to contentSkip to conversation

ipc-lld: Adding recipe for IPC low-level driver and examples

PATCH Superseded Santosh Jha 2 participants 2 messages Sep 20, 2019 – Sep 23, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipc-lld: Adding recipe for IPC low-level driver and examples

IPC-LLD provides the low-level RPMSG based
communication interface between various cores

---
 .../ipc-lld/ipc-lld-examples-rtos_git.bb      | 51 +++++++++++++++++++
 recipes-ti/ipc-lld/ipc-lld-rtos_git.bb        | 45 ++++++++++++++++
 recipes-ti/ipc-lld/ipc-lld.inc                | 38 ++++++++++++++
 3 files changed, 134 insertions(+)
 create mode 100644 recipes-ti/ipc-lld/ipc-lld-examples-rtos_git.bb
 create mode 100644 recipes-ti/ipc-lld/ipc-lld-rtos_git.bb
 create mode 100644 recipes-ti/ipc-lld/ipc-lld.inc
recipes-ti/ipc-lld/ipc-lld-examples-rtos_git.bb new file +51 -0
new file mode 100644
index 00000000..cadde4d2
@@ -0,0 +1,51 @@
+SUMMARY = "echo_test for IPC-LLD"
+
+require ipc-lld.inc
+
+DEPENDS_append = " ipc-lld-rtos common-csl-ip-rtos sciclient-rtos board-rtos"
+
+REMOTE_FW_DIR = "${S}/examples/echo_test/yocto_bin"
+REMOTE_FW_BIN_DIR = "${REMOTE_FW_DIR}/ipc_echo_test/bin"
+
+# make sure that lib/firmware, and all its contents are part of the package
+FILES_${PN} += "${base_libdir}/firmware"
+
+DST_BIN_PATH = "${base_libdir}/firmware/pdk-ipc/"
+
+do_configure() {
+    #Nothing to configure
+    :
+}
+
+do_compile() {
+    cd ${S}
+
+    for board in ${TI_PDK_LIMIT_BOARDS}
+    do
+        for core in ${TI_PDK_LIMIT_CORES}
+        do
+            oe_runmake examples BOARD="${board}" CORE="${core}" DEST_ROOT=${REMOTE_FW_DIR}
+        done
+    done
+}
+
+do_install() {
+    install -d ${D}${DST_BIN_PATH}
+
+    for board in ${TI_PDK_LIMIT_BOARDS}
+    do
+        for core in ${TI_PDK_LIMIT_CORES}
+        do
+            install -m 0644 ${REMOTE_FW_BIN_DIR}/${board}/ipc_echo_test_${core}_release.x* ${D}${DST_BIN_PATH}
+
+            #removing map files copied in previous line
+            rm ${D}${DST_BIN_PATH}/*.map
+        done
+    done
+}
+
+FILES_${PN} += "${PDK_INSTALL_DIR_RECIPE}/packages"
+
+INSANE_SKIP_${PN} = "arch ldflags file-rdeps"
+
+INSANE_SKIP_${PN}-dbg = "arch"
recipes-ti/ipc-lld/ipc-lld-rtos_git.bb new file +45 -0

45 lines not on this page · raw message

recipes-ti/ipc-lld/ipc-lld.inc new file +38 -0
new file mode 100644
index 00000000..7a0ebec8
@@ -0,0 +1,38 @@
+SUMMARY = "TI RTOS low level driver for IPC"
+
+inherit ti-pdk
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=7eae093f2b09fd39307f30028a068b91"
+
+COMPATIBLE_MACHINE = "k3"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+IPCLLD_GIT_URI = "git://git.ti.com/keystone-rtos/ipc-lld.git"
+IPCLLD_GIT_PROTOCOL = "git"
+IPCLLD_GIT_BRANCH = "master"
+
+# Below commit ID corresponds to "01.00.00.00"
+IPCLLD_SRCREV = "c695ca99aa4b7242e808889cfeacf848f14112c7"
+
+BRANCH = "${IPCLLD_GIT_BRANCH}"
+SRC_URI = "${IPCLLD_GIT_URI};protocol=${IPCLLD_GIT_PROTOCOL};branch=${BRANCH}"
+
+SRCREV = "${IPCLLD_SRCREV}"
+PV = "01.00.00.00"
+PR = "r0"
+
+# Build with make instead of XDC
+TI_PDK_XDCMAKE = "0"
+
+IPCLLD_PACKAGE_BASE   = "${S}/../ipclld_base"
+IPCLLD_ROOTPATH = "${IPCLLD_PACKAGE_BASE}/package/all/pdk_/packages/ti/drv/ipc"
+
+export PDK_INSTALL_PATH = "${PDK_INSTALL_DIR}/packages"
+export PDK_IPC_ROOT_PATH = "${IPCLLD_PACKAGE_BASE}/package/all/pdk_/packages"
+
+# HTML doc link params
+PDK_COMP_LINK_TEXT = "IPCLLD"
+
+EXTRA_OEMAKE = "PDK_INSTALL_PATH=${PDK_INSTALL_PATH} "
+
Signature · 1 line
2.17.1
#1 lore raw

Why there are 2 identical patches and are there any differences?

Anyway, the patch seems mostly fine, please address few comments below inline. Thanks.

Quoted 4 lines · Santosh Jha

IPC-LLD provides the low-level RPMSG based
communication interface between various cores

Quoted 8 lines
---
 .../ipc-lld/ipc-lld-examples-rtos_git.bb      | 51 +++++++++++++++++++
 recipes-ti/ipc-lld/ipc-lld-rtos_git.bb        | 45 ++++++++++++++++
 recipes-ti/ipc-lld/ipc-lld.inc                | 38 ++++++++++++++
 3 files changed, 134 insertions(+)
 create mode 100644 recipes-ti/ipc-lld/ipc-lld-examples-rtos_git.bb
 create mode 100644 recipes-ti/ipc-lld/ipc-lld-rtos_git.bb
 create mode 100644 recipes-ti/ipc-lld/ipc-lld.inc

Normally all LLDs reside in recipes.bsp. Moreorver, we already have recipes-bsp/ipc-lld/ with ipc-lld-fw.bb pre-built FW recipe.

recipes-ti/ipc-lld/ipc-lld-examples-rtos_git.bb line 5

Quoted 11 lines
recipes-ti/ipc-lld/ipc-lld-examples-rtos_git.bb new file +5 -0
new file mode 100644
index 00000000..cadde4d2
@@ -0,0 +1,51 @@
+SUMMARY = "echo_test for IPC-LLD"
+
+require ipc-lld.inc
+
+DEPENDS_append = " ipc-lld-rtos common-csl-ip-rtos sciclient-rtos board-rtos"

Not critical, but DEPENDS += here would be better

recipes-ti/ipc-lld/ipc-lld-examples-rtos_git.bb line 11

Quoted 5 lines
recipes-ti/ipc-lld/ipc-lld-examples-rtos_git.bb new file +5 -0
+REMOTE_FW_DIR = "${S}/examples/echo_test/yocto_bin"
+REMOTE_FW_BIN_DIR = "${REMOTE_FW_DIR}/ipc_echo_test/bin"
+
+# make sure that lib/firmware, and all its contents are part of the package
+FILES_${PN} += "${base_libdir}/firmware"

There's another FILES_${PN} below

recipes-ti/ipc-lld/ipc-lld-examples-rtos_git.bb line 18

Quoted 6 lines
recipes-ti/ipc-lld/ipc-lld-examples-rtos_git.bb new file +6 -0
+DST_BIN_PATH = "${base_libdir}/firmware/pdk-ipc/"
+
+do_configure() {
+    #Nothing to configure
+    :
+}

This is preferred:
do_configure[noexec] = "1"

recipes-ti/ipc-lld/ipc-lld-examples-rtos_git.bb line 27

Quoted 8 lines
recipes-ti/ipc-lld/ipc-lld-examples-rtos_git.bb new file +8 -0
+do_compile() {
+    cd ${S}
+
+    for board in ${TI_PDK_LIMIT_BOARDS}
+    do
+        for core in ${TI_PDK_LIMIT_CORES}
+        do
+            oe_runmake examples BOARD="${board}" CORE="${core}" DEST_ROOT=${REMOTE_FW_DIR}

Use $board and $core instead for shell vars instead of bitbake vars.

recipes-ti/ipc-lld/ipc-lld-examples-rtos_git.bb line 39

Quoted 12 lines
recipes-ti/ipc-lld/ipc-lld-examples-rtos_git.bb new file +12 -0
+        done
+    done
+}
+
+do_install() {
+    install -d ${D}${DST_BIN_PATH}
+
+    for board in ${TI_PDK_LIMIT_BOARDS}
+    do
+        for core in ${TI_PDK_LIMIT_CORES}
+        do
+            install -m 0644 ${REMOTE_FW_BIN_DIR}/${board}/ipc_echo_test_${core}_release.x* ${D}${DST_BIN_PATH}

Same comment as above

recipes-ti/ipc-lld/ipc-lld-examples-rtos_git.bb line 47

Quoted 7 lines
recipes-ti/ipc-lld/ipc-lld-examples-rtos_git.bb new file +7 -0
+            #removing map files copied in previous line
+            rm ${D}${DST_BIN_PATH}/*.map
+        done
+    done
+}
+
+FILES_${PN} += "${PDK_INSTALL_DIR_RECIPE}/packages"

There's another FILES_${PN} above - please keep them in the same spot

Quoted 9 lines
recipes-ti/ipc-lld/ipc-lld-examples-rtos_git.bb new file +3 -0
+INSANE_SKIP_${PN} = "arch ldflags file-rdeps"
+
+INSANE_SKIP_${PN}-dbg = "arch"
recipes-ti/ipc-lld/ipc-lld-rtos_git.bb new file +0 -0
new file mode 100644
index 00000000..eff3cea1

recipes-ti/ipc-lld/ipc-lld-rtos_git.bb line 5

Quoted 5 lines
recipes-ti/ipc-lld/ipc-lld-rtos_git.bb new file +5 -0
@@ -0,0 +1,45 @@
+SUMMARY = "TI RTOS low level driver for IPC"
+
+require ipc-lld.inc
+
+DEPENDS_append = " osal-rtos common-csl-ip-rtos sciclient-rtos"

Same as above

recipes-ti/ipc-lld/ipc-lld-rtos_git.bb line 17

Quoted 11 lines
recipes-ti/ipc-lld/ipc-lld-rtos_git.bb new file +11 -0
+do_configure() {
+    # remove any previous package
+    rm -rf ${IPCLLD_PACKAGE_BASE}
+    cd ${S}
+
+    mkdir -p ${IPCLLD_ROOTPATH}
+
+    for board in ${TI_PDK_LIMIT_BOARDS}
+    do
+        # make the release package before building it
+        oe_runmake package BOARD=${board} DEST_ROOT=${IPCLLD_PACKAGE_BASE} PDK_IPC_COMP_PATH=${S}

Use shell vars

Quoted 34 lines
recipes-ti/ipc-lld/ipc-lld-rtos_git.bb new file +28 -0
+    done
+
+}
+
+do_compile() {
+    cd ${IPCLLD_ROOTPATH}
+
+    oe_runmake lib LIMIT_BOARDS="${TI_PDK_LIMIT_BOARDS}" PDK_IPC_COMP_PATH=${IPCLLD_ROOTPATH}
+}
+
+do_install() {
+    cd ${IPCLLD_ROOTPATH}
+
+    #remove prebuilt binaries
+    rm -rf examples/echo_test/binaries
+
+    #archive
+    tar -cf ipc-lld.tar --exclude='*.tar' ./*
+
+    install -d ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/drv/ipc
+    find -name "*.tar" -exec tar xf {} --no-same-owner -C ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/drv/ipc \;
+}
+
+FILES_${PN} += "${PDK_INSTALL_DIR_RECIPE}/packages"
+
+INSANE_SKIP_${PN} = "arch ldflags file-rdeps"
+
+INSANE_SKIP_${PN}-dbg = "arch"
recipes-ti/ipc-lld/ipc-lld.inc new file +0 -0
new file mode 100644
index 00000000..7a0ebec8

recipes-ti/ipc-lld/ipc-lld.inc line 1

Quoted 1 line
recipes-ti/ipc-lld/ipc-lld.inc new file +1 -0
@@ -0,0 +1,38 @@
+SUMMARY = "TI RTOS low level driver for IPC"

Both of the recipe that include this .inc overwrite SUMMARY anyway

Quoted 45 lines
recipes-ti/ipc-lld/ipc-lld.inc new file +37 -0
+
+inherit ti-pdk
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=7eae093f2b09fd39307f30028a068b91"
+
+COMPATIBLE_MACHINE = "k3"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+IPCLLD_GIT_URI = "git://git.ti.com/keystone-rtos/ipc-lld.git"
+IPCLLD_GIT_PROTOCOL = "git"
+IPCLLD_GIT_BRANCH = "master"
+
+# Below commit ID corresponds to "01.00.00.00"
+IPCLLD_SRCREV = "c695ca99aa4b7242e808889cfeacf848f14112c7"
+
+BRANCH = "${IPCLLD_GIT_BRANCH}"
+SRC_URI = "${IPCLLD_GIT_URI};protocol=${IPCLLD_GIT_PROTOCOL};branch=${BRANCH}"
+
+SRCREV = "${IPCLLD_SRCREV}"
+PV = "01.00.00.00"
+PR = "r0"
+
+# Build with make instead of XDC
+TI_PDK_XDCMAKE = "0"
+
+IPCLLD_PACKAGE_BASE   = "${S}/../ipclld_base"
+IPCLLD_ROOTPATH = "${IPCLLD_PACKAGE_BASE}/package/all/pdk_/packages/ti/drv/ipc"
+
+export PDK_INSTALL_PATH = "${PDK_INSTALL_DIR}/packages"
+export PDK_IPC_ROOT_PATH = "${IPCLLD_PACKAGE_BASE}/package/all/pdk_/packages"
+
+# HTML doc link params
+PDK_COMP_LINK_TEXT = "IPCLLD"
+
+EXTRA_OEMAKE = "PDK_INSTALL_PATH=${PDK_INSTALL_PATH} "
+
Signature · 7 lines
2.17.1

-- 
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti