Skip to contentSkip to conversation

ti-ipc-rtos: Update to include examples, docs etc.

PATCH In review Sam Nelson 2 participants 2 messages Mar 3, 2016 – Mar 4, 2016

lore
Share & tools
lore

Sam Nelson

author
#0 lore raw

PATCH 1/1 ti-ipc-rtos: Update to include examples, docs etc.

Added procedures and source urls for ipc examples and documentation into src package.
Added dependency on doxygen for document creation
Added big endian c66 targets

---
 recipes-ti/ipc/ti-ipc-rtos_git.bb | 69 +++++++++++++++++++++++++++++++++++----
 1 file changed, 62 insertions(+), 7 deletions(-)
recipes-ti/ipc/ti-ipc-rtos_git.bb +62 -7
index eff1001..ffa4495 100644
@@ -2,9 +2,19 @@ require recipes-ti/includes/ti-paths.inc
 require recipes-ti/includes/ti-staging.inc
 require ti-ipc.inc
 
-PR = "${INC_PR}.3"
+SRC_URI += "git://git.ti.com/ipc/ipc-examples.git;destsuffix=git/ipc-examples;protocol=git;branch=master;name=ipc-examples"
+# Corresponds to tag: 3.42.00.02
+SRCREV_ipc-examples = "d3dc0e0c8da049fd6c76feb222df13c2c944a6aa"
+SRC_URI += "git://git.ti.com/ipc/ipc-metadata.git;destsuffix=git/ipc-metadata;protocol=git;branch=master;name=ipc-metadata"
+# Corresponds to tag: 3.42.00.02
+SRCREV_ipc-metadata = "e9a608608f1e9c0096112d5fcc41bb7af161a97e"
 
-DEPENDS = "ti-xdctools ti-sysbios"
+S_ipc-examples = "${WORKDIR}/git/ipc-examples"
+S_ipc-metadata = "${WORKDIR}/git/ipc-metadata"
+
+PR = "${INC_PR}.0"
+
+DEPENDS = "ti-xdctools ti-sysbios doxygen-native"
 DEPENDS_append_keystone = " ti-cgt6x-native \
                             gcc-arm-none-eabi-native \
 "
@@ -26,6 +36,7 @@ IPC_TARGETS = ""
 IPC_TARGETS_omap-a15 = "\
     gnu.targets.arm.A15F="${GCC_ARM_NONE_TOOLCHAIN}" \
     ti.targets.elf.C66="${STAGING_DIR_NATIVE}/usr/share/ti/cgt-c6x" \
+    ti.targets.elf.C66_big_endian="${STAGING_DIR_NATIVE}/usr/share/ti/cgt-c6x" \
     ti.targets.arm.elf.M4="${M4_TOOLCHAIN_INSTALL_DIR}" \
     ti.targets.arm.elf.M4F="${M4_TOOLCHAIN_INSTALL_DIR}" \
 "
@@ -33,29 +44,73 @@ IPC_TARGETS_omap-a15 = "\
 IPC_TARGETS_keystone = " \
     gnu.targets.arm.A15F="${GCC_ARM_NONE_TOOLCHAIN}" \
     ti.targets.elf.C66="${STAGING_DIR_NATIVE}/usr/share/ti/cgt-c6x" \
+    ti.targets.elf.C66_big_endian="${STAGING_DIR_NATIVE}/usr/share/ti/cgt-c6x" \
+"
+
+IPC_TARGETS_c66x = " \
+    ti.targets.elf.C66="${STAGING_DIR_NATIVE}/usr/share/ti/cgt-c6x" \
+    ti.targets.elf.C66_big_endian="${STAGING_DIR_NATIVE}/usr/share/ti/cgt-c6x" \
 "
 
 EXTRA_OEMAKE = "\
     PLATFORM=${PLATFORM} \
     XDC_INSTALL_DIR="${XDC_INSTALL_DIR}" \
     BIOS_INSTALL_DIR="${SYSBIOS_INSTALL_DIR}" \
-    ${IPC_TARGETS} -f ipc-bios.mak\
+    ${IPC_TARGETS} \
 "
+SRCIPK_SRC_DIR = "${D}${IPC_INSTALL_DIR_RECIPE}"
+
+RELEASE_TYPE = "GA"
+RELEASE_SUFFIX = ""
 
 do_compile() {
-  oe_runmake clean
-  oe_runmake all
+  oe_runmake -f ipc-bios.mak clean
+  oe_runmake -f ipc-bios.mak release
 }
 
 do_compile_append() {
-  sourceipk_do_create_srcipk
+  cd ${S_ipc-metadata}
+  oe_runmake .all-files IPC_INSTALL_DIR="${S}" \
+    BUILD_HOST_OS="linux" \
+    RELEASE_TYPE="${RELEASE_TYPE}"
+
+  cd ${S_ipc-examples}/src
+  oe_runmake .examples \
+    IPCTOOLS="${S_ipc-metadata}/src/etc"
+
+  if [  "${PLATFORM}" != "UNKNOWN" ]; then
+    oe_runmake extract HOSTOS="bios" IPC_INSTALL_DIR="${S}"
+    oe_runmake extract HOSTOS="linux" IPC_INSTALL_DIR="${S}"
+
+    if [ ! -z ${ALT_PLATFORM} ]; then
+      oe_runmake extract PLATFORM=${ALT_PLATFORM} HOSTOS="bios" IPC_INSTALL_DIR="${S}"
+      oe_runmake extract PLATFORM=${ALT_PLATFORM} HOSTOS="linux" IPC_INSTALL_DIR="${S}"
+    fi
+  fi
 }
 
 do_install() {
+    IPC_VERSION=`echo ${PV}${RELEASE_SUFFIX} | sed -e 's|\.|_|g'`
+    # Copy docs and other meta files
     install -d ${D}${IPC_INSTALL_DIR_RECIPE}
-    cp -pPrf ${S}/* ${D}${IPC_INSTALL_DIR_RECIPE}
+    cp -pPrf  ${S_ipc-metadata}/exports/ipc_${IPC_VERSION}/* -d ${D}${IPC_INSTALL_DIR_RECIPE}
 
+    # Copy example folders corresponding to the platforms
+    if [  "${PLATFORM}" != "UNKNOWN" ]; then
+      install -d ${D}${IPC_INSTALL_DIR_RECIPE}/examples
+      cp -pPf ${S_ipc-examples}/src/examples/*.* ${D}${IPC_INSTALL_DIR_RECIPE}/examples/
+      cp -pPf ${S_ipc-examples}/src/examples/makefile ${D}${IPC_INSTALL_DIR_RECIPE}/examples/
+      cp -pPrf ${S_ipc-examples}/src/examples/${PLATFORM}* ${D}${IPC_INSTALL_DIR_RECIPE}/examples/
+      if [ ! -z ${ALT_PLATFORM} ]; then
+        cp -pPrf ${S_ipc-examples}/src/examples/${ALT_PLATFORM}* ${D}${IPC_INSTALL_DIR_RECIPE}/examples/
+      fi
+      find ${D}${IPC_INSTALL_DIR_RECIPE}/examples/ -name "*zip" -type f | xargs -I {} rm {}
+    fi
+
+    # Install firmware images
     install -d ${D}${base_libdir}/firmware
     find . -name "*.xe66" -type f | xargs -I {} install -m 0644 {} ${D}${base_libdir}/firmware/
     find . -name "*.xem4" -type f | xargs -I {} install -m 0644 {} ${D}${base_libdir}/firmware/
+
+    sourceipk_do_create_srcipk
 }
Signature · 1 line
1.9.1
#1 lore raw
Quoted 15 lines · Sam Nelson

Added procedures and source urls for ipc examples and documentation into src package.
Added dependency on doxygen for document creation
Added big endian c66 targets

---
 recipes-ti/ipc/ti-ipc-rtos_git.bb | 69 +++++++++++++++++++++++++++++++++++----
 1 file changed, 62 insertions(+), 7 deletions(-)
recipes-ti/ipc/ti-ipc-rtos_git.bb +0 -0
index eff1001..ffa4495 100644

recipes-ti/ipc/ti-ipc-rtos_git.bb require recipes-ti/includes/ti-paths.inc · line 10

Quoted 10 lines
recipes-ti/ipc/ti-ipc-rtos_git.bb +6 -1
@@ -2,9 +2,19 @@ require recipes-ti/includes/ti-paths.inc
 require recipes-ti/includes/ti-staging.inc
 require ti-ipc.inc
 
-PR = "${INC_PR}.3"
+SRC_URI += "git://git.ti.com/ipc/ipc-examples.git;destsuffix=git/ipc-examples;protocol=git;branch=master;name=ipc-examples"
+# Corresponds to tag: 3.42.00.02
+SRCREV_ipc-examples = "d3dc0e0c8da049fd6c76feb222df13c2c944a6aa"
+SRC_URI += "git://git.ti.com/ipc/ipc-metadata.git;destsuffix=git/ipc-metadata;protocol=git;branch=master;name=ipc-metadata"
+# Corresponds to tag: 3.42.00.02
+SRCREV_ipc-metadata = "e9a608608f1e9c0096112d5fcc41bb7af161a97e"

Don't you need SRCREV_FORMAT here?

Quoted 86 lines
recipes-ti/ipc/ti-ipc-rtos_git.bb +49 -6
-DEPENDS = "ti-xdctools ti-sysbios"
+S_ipc-examples = "${WORKDIR}/git/ipc-examples"
+S_ipc-metadata = "${WORKDIR}/git/ipc-metadata"
+
+PR = "${INC_PR}.0"
+
+DEPENDS = "ti-xdctools ti-sysbios doxygen-native"
 DEPENDS_append_keystone = " ti-cgt6x-native \
                             gcc-arm-none-eabi-native \
 "
@@ -26,6 +36,7 @@ IPC_TARGETS = ""
 IPC_TARGETS_omap-a15 = "\
     gnu.targets.arm.A15F="${GCC_ARM_NONE_TOOLCHAIN}" \
     ti.targets.elf.C66="${STAGING_DIR_NATIVE}/usr/share/ti/cgt-c6x" \
+    ti.targets.elf.C66_big_endian="${STAGING_DIR_NATIVE}/usr/share/ti/cgt-c6x" \
     ti.targets.arm.elf.M4="${M4_TOOLCHAIN_INSTALL_DIR}" \
     ti.targets.arm.elf.M4F="${M4_TOOLCHAIN_INSTALL_DIR}" \
 "
@@ -33,29 +44,73 @@ IPC_TARGETS_omap-a15 = "\
 IPC_TARGETS_keystone = " \
     gnu.targets.arm.A15F="${GCC_ARM_NONE_TOOLCHAIN}" \
     ti.targets.elf.C66="${STAGING_DIR_NATIVE}/usr/share/ti/cgt-c6x" \
+    ti.targets.elf.C66_big_endian="${STAGING_DIR_NATIVE}/usr/share/ti/cgt-c6x" \
+"
+
+IPC_TARGETS_c66x = " \
+    ti.targets.elf.C66="${STAGING_DIR_NATIVE}/usr/share/ti/cgt-c6x" \
+    ti.targets.elf.C66_big_endian="${STAGING_DIR_NATIVE}/usr/share/ti/cgt-c6x" \
 "
 
 EXTRA_OEMAKE = "\
     PLATFORM=${PLATFORM} \
     XDC_INSTALL_DIR="${XDC_INSTALL_DIR}" \
     BIOS_INSTALL_DIR="${SYSBIOS_INSTALL_DIR}" \
-    ${IPC_TARGETS} -f ipc-bios.mak\
+    ${IPC_TARGETS} \
 "
+SRCIPK_SRC_DIR = "${D}${IPC_INSTALL_DIR_RECIPE}"
+
+RELEASE_TYPE = "GA"
+RELEASE_SUFFIX = ""
 
 do_compile() {
-  oe_runmake clean
-  oe_runmake all
+  oe_runmake -f ipc-bios.mak clean
+  oe_runmake -f ipc-bios.mak release
 }
 
 do_compile_append() {
-  sourceipk_do_create_srcipk
+  cd ${S_ipc-metadata}
+  oe_runmake .all-files IPC_INSTALL_DIR="${S}" \
+    BUILD_HOST_OS="linux" \
+    RELEASE_TYPE="${RELEASE_TYPE}"
+
+  cd ${S_ipc-examples}/src
+  oe_runmake .examples \
+    IPCTOOLS="${S_ipc-metadata}/src/etc"
+
+  if [  "${PLATFORM}" != "UNKNOWN" ]; then
+    oe_runmake extract HOSTOS="bios" IPC_INSTALL_DIR="${S}"
+    oe_runmake extract HOSTOS="linux" IPC_INSTALL_DIR="${S}"
+
+    if [ ! -z ${ALT_PLATFORM} ]; then
+      oe_runmake extract PLATFORM=${ALT_PLATFORM} HOSTOS="bios" IPC_INSTALL_DIR="${S}"
+      oe_runmake extract PLATFORM=${ALT_PLATFORM} HOSTOS="linux" IPC_INSTALL_DIR="${S}"
+    fi
+  fi
 }
 
 do_install() {
+    IPC_VERSION=`echo ${PV}${RELEASE_SUFFIX} | sed -e 's|\.|_|g'`
+    # Copy docs and other meta files
     install -d ${D}${IPC_INSTALL_DIR_RECIPE}
-    cp -pPrf ${S}/* ${D}${IPC_INSTALL_DIR_RECIPE}
+    cp -pPrf  ${S_ipc-metadata}/exports/ipc_${IPC_VERSION}/* -d ${D}${IPC_INSTALL_DIR_RECIPE}
 
+    # Copy example folders corresponding to the platforms
+    if [  "${PLATFORM}" != "UNKNOWN" ]; then
+      install -d ${D}${IPC_INSTALL_DIR_RECIPE}/examples
+      cp -pPf ${S_ipc-examples}/src/examples/*.* ${D}${IPC_INSTALL_DIR_RECIPE}/examples/
+      cp -pPf ${S_ipc-examples}/src/examples/makefile ${D}${IPC_INSTALL_DIR_RECIPE}/examples/
+      cp -pPrf ${S_ipc-examples}/src/examples/${PLATFORM}* ${D}${IPC_INSTALL_DIR_RECIPE}/examples/
+      if [ ! -z ${ALT_PLATFORM} ]; then
+        cp -pPrf ${S_ipc-examples}/src/examples/${ALT_PLATFORM}* ${D}${IPC_INSTALL_DIR_RECIPE}/examples/

recipes-ti/ipc/ti-ipc-rtos_git.bb IPC_TARGETS_omap-a15 = "\ · line 115

Quoted 10 lines
recipes-ti/ipc/ti-ipc-rtos_git.bb +7 -0
+      fi
+      find ${D}${IPC_INSTALL_DIR_RECIPE}/examples/ -name "*zip" -type f | xargs -I {} rm {}
+    fi
+
+    # Install firmware images
     install -d ${D}${base_libdir}/firmware
     find . -name "*.xe66" -type f | xargs -I {} install -m 0644 {} ${D}${base_libdir}/firmware/
     find . -name "*.xem4" -type f | xargs -I {} install -m 0644 {} ${D}${base_libdir}/firmware/
+
+    sourceipk_do_create_srcipk

So, you are creating a source package after the installation and from an install location - rather unorthodox and I can see problems with this. Have you tested it thoroughly and tried to use those sources in the devkit afterwards?

Signature · 1 line
Denys