summaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorJustin Sobota <jsobota@ti.com>2016-06-28 00:31:03 +0000
committerDenys Dmytriyenko <denys@ti.com>2016-06-29 17:10:45 -0400
commitde355a34c41b0fc4700ca43d5b547f0ee0e5abc2 (patch)
tree0bf5cd508bd2985efc4796e9f74ea81775563b9f /classes
parent39493a8a0d21161e4095fe7c462fbda099d27b74 (diff)
downloadmeta-ti-de355a34c41b0fc4700ca43d5b547f0ee0e5abc2.tar.gz
ti-pdk: Add makefile support to ti-pdk.bbclass for RTOS components
Signed-off-by: Justin Sobota <jsobota@ti.com> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Diffstat (limited to 'classes')
-rw-r--r--classes/ti-pdk.bbclass59
1 files changed, 47 insertions, 12 deletions
diff --git a/classes/ti-pdk.bbclass b/classes/ti-pdk.bbclass
index ae76fdfe..fd7c3e7a 100644
--- a/classes/ti-pdk.bbclass
+++ b/classes/ti-pdk.bbclass
@@ -3,14 +3,26 @@ require recipes-ti/includes/ti-staging.inc
3 3
4inherit perlnative 4inherit perlnative
5 5
6DEPENDS = "ti-xdctools ti-cg-xml-native ti-sysbios common-csl-ip-rtos libxml-simple-perl-native gcc-arm-none-eabi-native" 6DEPENDS = "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"
7 7
8DEPENDS_append_omap-a15 = " ti-cgt6x-native ti-ccsv6-native" 8DEPENDS_append_omap-a15 = " ti-ccsv6-native"
9DEPENDS_append_keystone = " ti-cgt6x-native" 9DEPENDS_remove_ti33x = "ti-cgt6x-native"
10DEPENDS_remove_ti43x = "ti-cgt6x-native"
10 11
11S = "${WORKDIR}/git" 12S = "${WORKDIR}/git"
12B = "${WORKDIR}/build" 13B = "${WORKDIR}/build"
13 14
15# HTML hyperlink text
16PDK_COMP_LINK_TEXT ?= ""
17
18DOC_FILE = "API_Documentation_${PN}.html"
19
20create_doc_link () {
21 PDK_COMP_DIR=`get_build_dir_bash`
22
23 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}
24}
25
14get_build_dir_bash() { 26get_build_dir_bash() {
15 if [ -f ${S}/package.xdc ] 27 if [ -f ${S}/package.xdc ]
16 then 28 then
@@ -36,6 +48,10 @@ export PDK_INSTALL_PATH = "${PDK_INSTALL_DIR}/packages"
36export XDCPATH = "${XDC_INSTALL_DIR}/packages;${SYSBIOS_INSTALL_DIR}/packages;${PDK_INSTALL_DIR}/packages" 48export XDCPATH = "${XDC_INSTALL_DIR}/packages;${SYSBIOS_INSTALL_DIR}/packages;${PDK_INSTALL_DIR}/packages"
37export SECTTI="perl ${CG_XML_INSTALL_DIR}/ofd/sectti.pl" 49export SECTTI="perl ${CG_XML_INSTALL_DIR}/ofd/sectti.pl"
38 50
51XDCMAKE ?= "1"
52LIMSOCS ?= ""
53LIMBOARDS ?= ""
54
39PARALLEL_XDC = "--jobs=${BB_NUMBER_THREADS}" 55PARALLEL_XDC = "--jobs=${BB_NUMBER_THREADS}"
40 56
41do_configure() { 57do_configure() {
@@ -43,24 +59,43 @@ do_configure() {
43 59
44 mkdir -p ${BUILD_DIR} 60 mkdir -p ${BUILD_DIR}
45 cp -r ${S}/* ${BUILD_DIR} 61 cp -r ${S}/* ${BUILD_DIR}
46 cd ${BUILD_DIR}
47 62
48 sed -i "s/\ \"\.\\\\\\\\\"\ +//" src/Module.xs 63 if [ "${XDCMAKE}" == "1" ]
49 find -name "*.xs" -exec sed -i "s/ofd6x\.exe/ofd6x/" {} \; 64 then
50 find -name "*.xs" -exec sed -i "s/sectti\.exe/sectti/" {} \; 65 cd ${BUILD_DIR}
51 find -name "*.xs" -exec sed -i "/\.chm/d" {} \; 66
52 find -name "*.xs" -exec sed -i "s/pasm\_dos/pasm\_linux/" {} \; 67 sed -i "s/\ \"\.\\\\\\\\\"\ +//" src/Module.xs
68 find -name "*.xs" -exec sed -i "s/ofd6x\.exe/ofd6x/" {} \;
69 find -name "*.xs" -exec sed -i "s/sectti\.exe/sectti/" {} \;
70 find -name "*.xs" -exec sed -i "/\.chm/d" {} \;
71 find -name "*.xs" -exec sed -i "s/pasm\_dos/pasm\_linux/" {} \;
72 fi
53} 73}
54 74
55do_compile() { 75do_compile() {
56 ${XDC_INSTALL_DIR}/xdc clean ${PARALLEL_XDC} -PR . 76
57 ${XDC_INSTALL_DIR}/xdc all ${PARALLEL_XDC} XDCARGS="${XDCARGS}" ROOTDIR="${ROOTDIR}" -PR . 77 if [ "${XDCMAKE}" == "1" ]
58 ${XDC_INSTALL_DIR}/xdc release XDCARGS="${XDCARGS}" -PR . 78 then
79 ${XDC_INSTALL_DIR}/xdc clean ${PARALLEL_XDC} -PR .
80 ${XDC_INSTALL_DIR}/xdc all ${PARALLEL_XDC} XDCARGS="${XDCARGS}" ROOTDIR="${ROOTDIR}" -PR .
81 ${XDC_INSTALL_DIR}/xdc release XDCARGS="${XDCARGS}" -PR .
82 else
83 BUILD_DIR=${B}/`get_build_dir_bash`
84 cd ${BUILD_DIR}
85
86 make release LIMIT_SOCS="${LIMSOCS}" LIMIT_BOARDS="${LIMBOARDS}"
87 fi
59} 88}
60 89
61do_install () { 90do_install () {
62 install -d ${D}${PDK_INSTALL_DIR_RECIPE}/packages 91 install -d ${D}${PDK_INSTALL_DIR_RECIPE}/packages
63 find -name "*.tar" -exec tar xf {} -C ${D}${PDK_INSTALL_DIR_RECIPE}/packages \; 92 find -name "*.tar" -exec tar xf {} -C ${D}${PDK_INSTALL_DIR_RECIPE}/packages \;
93
94 if [ "${PDK_COMP_LINK_TEXT}" != "" ]
95 then
96 install -d ${D}${PDK_INSTALL_DIR_RECIPE}/packages/.extras/doc
97 create_doc_link
98 fi
64} 99}
65 100
66FILES_${PN} += "${PDK_INSTALL_DIR_RECIPE}/packages" 101FILES_${PN} += "${PDK_INSTALL_DIR_RECIPE}/packages"