[meta-ti] [thud/master][PATCH] ipc-lld: Adding recipe for IPC low-level driver and examples
Denys Dmytriyenko
denys at ti.com
Mon Sep 23 14:06:40 PDT 2019
Why there are 2 identical patches and are there any differences?
Anyway, the patch seems mostly fine, please address few comments below inline.
Thanks.
On Fri, Sep 20, 2019 at 12:21:11PM -0500, Santosh Jha wrote:
> IPC-LLD provides the low-level RPMSG based
> communication interface between various cores
>
> Signed-off-by: Santosh Jha <sjha at ti.com>
> ---
> .../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.
> diff --git a/recipes-ti/ipc-lld/ipc-lld-examples-rtos_git.bb b/recipes-ti/ipc-lld/ipc-lld-examples-rtos_git.bb
> new file mode 100644
> index 00000000..cadde4d2
> --- /dev/null
> +++ b/recipes-ti/ipc-lld/ipc-lld-examples-rtos_git.bb
> @@ -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
> +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
> +DST_BIN_PATH = "${base_libdir}/firmware/pdk-ipc/"
> +
> +do_configure() {
> + #Nothing to configure
> + :
> +}
This is preferred:
do_configure[noexec] = "1"
> +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.
> + 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
> + #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
> +INSANE_SKIP_${PN} = "arch ldflags file-rdeps"
> +
> +INSANE_SKIP_${PN}-dbg = "arch"
> diff --git a/recipes-ti/ipc-lld/ipc-lld-rtos_git.bb b/recipes-ti/ipc-lld/ipc-lld-rtos_git.bb
> new file mode 100644
> index 00000000..eff3cea1
> --- /dev/null
> +++ b/recipes-ti/ipc-lld/ipc-lld-rtos_git.bb
> @@ -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
> +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
> + 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"
> diff --git a/recipes-ti/ipc-lld/ipc-lld.inc b/recipes-ti/ipc-lld/ipc-lld.inc
> new file mode 100644
> index 00000000..7a0ebec8
> --- /dev/null
> +++ b/recipes-ti/ipc-lld/ipc-lld.inc
> @@ -0,0 +1,38 @@
> +SUMMARY = "TI RTOS low level driver for IPC"
Both of the recipe that include this .inc overwrite SUMMARY anyway
> +
> +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} "
> +
> --
> 2.17.1
>
> --
> _______________________________________________
> meta-ti mailing list
> meta-ti at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-ti
More information about the meta-ti
mailing list