Skip to contentSkip to conversation

Justin Sobota : ti-pdk: Add makefile support to ti-pdk. bbclass for RTOS components

PATCH Arago Project git 1 participant 1 message Jun 29, 2016

lore
Share & tools
lore
#0 lore raw
Module: meta-ti
Branch: master
Commit: de355a34c41b0fc4700ca43d5b547f0ee0e5abc2
URL:    http://arago-project.org/git/meta-ti.git?a=commit;h=de355a34c41b0fc4700ca43d5b547f0ee0e5abc2
Author: Justin Sobota <[email protected]>
Date:   Tue Jun 28 00:31:03 2016 +0000

ti-pdk: Add makefile support to ti-pdk.bbclass for RTOS components

---

 classes/ti-pdk.bbclass                           |   59 ++++++++++++++++----
 recipes-ti/ti-pdk-build/ti-pdk-build-rtos_git.bb |   65 ++++++++++++++++++++++
 2 files changed, 112 insertions(+), 12 deletions(-)
classes/ti-pdk.bbclass +47 -12
index ae76fdf..fd7c3e7 100644
@@ -3,14 +3,26 @@ require recipes-ti/includes/ti-staging.inc
 
 inherit perlnative
 
-DEPENDS = "ti-xdctools ti-cg-xml-native ti-sysbios common-csl-ip-rtos libxml-simple-perl-native gcc-arm-none-eabi-native"
+DEPENDS = "ti-xdctools ti-cg-xml-native ti-sysbios common-csl-ip-rtos libxml-simple-perl-native gcc-arm-none-eabi-native ti-cgt6x-native ti-pdk-build-rtos"
 
-DEPENDS_append_omap-a15 = " ti-cgt6x-native ti-ccsv6-native"
-DEPENDS_append_keystone = " ti-cgt6x-native"
+DEPENDS_append_omap-a15 = " ti-ccsv6-native"
+DEPENDS_remove_ti33x = "ti-cgt6x-native"
+DEPENDS_remove_ti43x = "ti-cgt6x-native"
 
 S = "${WORKDIR}/git"
 B = "${WORKDIR}/build"
 
+# HTML hyperlink text
+PDK_COMP_LINK_TEXT ?= ""
+
+DOC_FILE = "API_Documentation_${PN}.html"
+
+create_doc_link () {
+    PDK_COMP_DIR=`get_build_dir_bash`
+
+    echo "<a href=\"${PDK_COMP_DIR}/docs/doxygen/html/index.html\">${PDK_COMP_LINK_TEXT}</a>" >> ${D}${PDK_INSTALL_DIR_RECIPE}/packages/.extras/doc/${DOC_FILE}
+}
+
 get_build_dir_bash() {
   if [ -f ${S}/package.xdc ]
   then
@@ -36,6 +48,10 @@ export PDK_INSTALL_PATH = "${PDK_INSTALL_DIR}/packages"
 export XDCPATH = "${XDC_INSTALL_DIR}/packages;${SYSBIOS_INSTALL_DIR}/packages;${PDK_INSTALL_DIR}/packages"
 export SECTTI="perl ${CG_XML_INSTALL_DIR}/ofd/sectti.pl"
 
+XDCMAKE ?= "1"
+LIMSOCS ?= ""
+LIMBOARDS ?= ""
+
 PARALLEL_XDC = "--jobs=${BB_NUMBER_THREADS}"
 
 do_configure() {
@@ -43,24 +59,43 @@ do_configure() {
 
     mkdir -p ${BUILD_DIR}
     cp -r ${S}/* ${BUILD_DIR}
-    cd ${BUILD_DIR}
 
-    sed -i "s/\ \"\.\\\\\\\\\"\ +//" src/Module.xs
-    find -name "*.xs" -exec sed -i "s/ofd6x\.exe/ofd6x/" {} \;
-    find -name "*.xs" -exec sed -i "s/sectti\.exe/sectti/" {} \;
-    find -name "*.xs" -exec sed -i "/\.chm/d" {} \;
-    find -name "*.xs" -exec sed -i "s/pasm\_dos/pasm\_linux/" {} \;
+    if [ "${XDCMAKE}" == "1" ]
+    then
+        cd ${BUILD_DIR}
+
+        sed -i "s/\ \"\.\\\\\\\\\"\ +//" src/Module.xs
+        find -name "*.xs" -exec sed -i "s/ofd6x\.exe/ofd6x/" {} \;
+        find -name "*.xs" -exec sed -i "s/sectti\.exe/sectti/" {} \;
+        find -name "*.xs" -exec sed -i "/\.chm/d" {} \;
+        find -name "*.xs" -exec sed -i "s/pasm\_dos/pasm\_linux/" {} \;
+    fi
 }
 
 do_compile() {
-    ${XDC_INSTALL_DIR}/xdc clean ${PARALLEL_XDC} -PR .
-    ${XDC_INSTALL_DIR}/xdc all ${PARALLEL_XDC} XDCARGS="${XDCARGS}" ROOTDIR="${ROOTDIR}" -PR .
-    ${XDC_INSTALL_DIR}/xdc release XDCARGS="${XDCARGS}" -PR .
+
+    if [ "${XDCMAKE}" == "1" ]
+    then
+        ${XDC_INSTALL_DIR}/xdc clean ${PARALLEL_XDC} -PR .
+        ${XDC_INSTALL_DIR}/xdc all ${PARALLEL_XDC} XDCARGS="${XDCARGS}" ROOTDIR="${ROOTDIR}" -PR .
+        ${XDC_INSTALL_DIR}/xdc release XDCARGS="${XDCARGS}" -PR .
+    else
+        BUILD_DIR=${B}/`get_build_dir_bash`
+        cd ${BUILD_DIR}
+
+        make release LIMIT_SOCS="${LIMSOCS}" LIMIT_BOARDS="${LIMBOARDS}"
+    fi
 }
 
 do_install () {
     install -d ${D}${PDK_INSTALL_DIR_RECIPE}/packages
     find -name "*.tar" -exec tar xf {} -C ${D}${PDK_INSTALL_DIR_RECIPE}/packages \;
+    
+    if [ "${PDK_COMP_LINK_TEXT}" != "" ]
+    then
+        install -d ${D}${PDK_INSTALL_DIR_RECIPE}/packages/.extras/doc
+        create_doc_link
+    fi
 }
 
 FILES_${PN} += "${PDK_INSTALL_DIR_RECIPE}/packages"
recipes-ti/ti-pdk-build/ti-pdk-build-rtos_git.bb new file +65 -0

65 lines not on this page · raw message