diff options
Diffstat (limited to 'classes')
| -rw-r--r-- | classes/ti-pdk.bbclass | 59 |
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 | ||
| 4 | inherit perlnative | 4 | inherit perlnative |
| 5 | 5 | ||
| 6 | DEPENDS = "ti-xdctools ti-cg-xml-native ti-sysbios common-csl-ip-rtos libxml-simple-perl-native gcc-arm-none-eabi-native" | 6 | 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" |
| 7 | 7 | ||
| 8 | DEPENDS_append_omap-a15 = " ti-cgt6x-native ti-ccsv6-native" | 8 | DEPENDS_append_omap-a15 = " ti-ccsv6-native" |
| 9 | DEPENDS_append_keystone = " ti-cgt6x-native" | 9 | DEPENDS_remove_ti33x = "ti-cgt6x-native" |
| 10 | DEPENDS_remove_ti43x = "ti-cgt6x-native" | ||
| 10 | 11 | ||
| 11 | S = "${WORKDIR}/git" | 12 | S = "${WORKDIR}/git" |
| 12 | B = "${WORKDIR}/build" | 13 | B = "${WORKDIR}/build" |
| 13 | 14 | ||
| 15 | # HTML hyperlink text | ||
| 16 | PDK_COMP_LINK_TEXT ?= "" | ||
| 17 | |||
| 18 | DOC_FILE = "API_Documentation_${PN}.html" | ||
| 19 | |||
| 20 | create_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 | |||
| 14 | get_build_dir_bash() { | 26 | get_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" | |||
| 36 | export XDCPATH = "${XDC_INSTALL_DIR}/packages;${SYSBIOS_INSTALL_DIR}/packages;${PDK_INSTALL_DIR}/packages" | 48 | export XDCPATH = "${XDC_INSTALL_DIR}/packages;${SYSBIOS_INSTALL_DIR}/packages;${PDK_INSTALL_DIR}/packages" |
| 37 | export SECTTI="perl ${CG_XML_INSTALL_DIR}/ofd/sectti.pl" | 49 | export SECTTI="perl ${CG_XML_INSTALL_DIR}/ofd/sectti.pl" |
| 38 | 50 | ||
| 51 | XDCMAKE ?= "1" | ||
| 52 | LIMSOCS ?= "" | ||
| 53 | LIMBOARDS ?= "" | ||
| 54 | |||
| 39 | PARALLEL_XDC = "--jobs=${BB_NUMBER_THREADS}" | 55 | PARALLEL_XDC = "--jobs=${BB_NUMBER_THREADS}" |
| 40 | 56 | ||
| 41 | do_configure() { | 57 | do_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 | ||
| 55 | do_compile() { | 75 | do_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 | ||
| 61 | do_install () { | 90 | do_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 | ||
| 66 | FILES_${PN} += "${PDK_INSTALL_DIR_RECIPE}/packages" | 101 | FILES_${PN} += "${PDK_INSTALL_DIR_RECIPE}/packages" |
