aboutsummaryrefslogtreecommitdiffstats
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
parent39493a8a0d21161e4095fe7c462fbda099d27b74 (diff)
downloadmeta-ti-de355a34c41b0fc4700ca43d5b547f0ee0e5abc2.tar.gz
meta-ti-de355a34c41b0fc4700ca43d5b547f0ee0e5abc2.tar.bz2
meta-ti-de355a34c41b0fc4700ca43d5b547f0ee0e5abc2.zip
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>
-rw-r--r--classes/ti-pdk.bbclass59
-rw-r--r--recipes-ti/ti-pdk-build/ti-pdk-build-rtos_git.bb65
2 files changed, 112 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
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"
diff --git a/recipes-ti/ti-pdk-build/ti-pdk-build-rtos_git.bb b/recipes-ti/ti-pdk-build/ti-pdk-build-rtos_git.bb
new file mode 100644
index 00000000..3a3ab555
--- /dev/null
+++ b/recipes-ti/ti-pdk-build/ti-pdk-build-rtos_git.bb
@@ -0,0 +1,65 @@
+DESCRIPTION = "Package containing PDK makefile infrastructure"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://makerules/env.mk;beginline=1;endline=31;md5=10503e8de09f5475185f3fd56de1e310"
+
+require recipes-ti/includes/ti-paths.inc
+
+PV = "01.00.00.00A"
+PR = "r4"
+
+PDK_BUILD_GIT_URI = "git://git.ti.com/keystone-rtos/processor-pdk-build.git"
+PDK_BUILD_GIT_PROTOCOL = "git"
+PDK_BUILD_GIT_BRANCH = "master"
+
+# Below Commit ID corresponds to "DEV.PDK_BUILD.01.00.00.00A"
+PDK_BUILD_SRCREV = "8a026319765cc125e2daef709841bb3ce1a8d325"
+
+BRANCH = "${PDK_BUILD_GIT_BRANCH}"
+SRC_URI = "${PDK_BUILD_GIT_URI};protocol=${PDK_BUILD_GIT_PROTOCOL};branch=${BRANCH}"
+
+SRCREV = "${PDK_BUILD_SRCREV}"
+
+COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15|keystone"
+
+S = "${WORKDIR}/git/"
+
+CLEANBROKEN = "1"
+
+do_compile() {
+ :
+}
+
+do_install() {
+ install -d ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build
+ install -d ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/makerules
+ install -d ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/am571x
+ install -d ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/am572x
+
+ install -m 0755 Rules.make ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build
+
+ sed -i -e "s|c\:/ti/ccsv5/utils/cygwin|\$(XDC_INSTALL_PATH)/bin|g" \
+ ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/Rules.make
+
+ install -m 0755 makerules/build_config.mk ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/makerules
+ install -m 0755 makerules/common.mk ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/makerules
+ install -m 0755 makerules/component.mk ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/makerules
+ install -m 0755 makerules/env.mk ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/makerules
+ install -m 0755 makerules/platform.mk ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/makerules
+ install -m 0755 makerules/rules_66.mk ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/makerules
+ install -m 0755 makerules/rules_a15.mk ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/makerules
+ install -m 0755 makerules/rules_a8.mk ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/makerules
+ install -m 0755 makerules/rules_a8_extend.mk ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/makerules
+ install -m 0755 makerules/rules_a9.mk ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/makerules
+ install -m 0755 makerules/rules_m4.mk ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/makerules
+ install -m 0755 makerules/rules_ti_cgt_arm.mk ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/makerules
+ install -m 0755 am571x/config_am571x.bld ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/am571x
+ install -m 0755 am571x/config_am571x_c66.bld ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/am571x
+ install -m 0755 am571x/config_am571x_a15.bld ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/am571x
+ install -m 0755 am571x/mem_segment_definition_1024mb_bios.xs ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/am571x
+ install -m 0755 am572x/config_am572x.bld ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/am572x
+ install -m 0755 am572x/config_am572x_c66.bld ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/am572x
+ install -m 0755 am572x/config_am572x_a15.bld ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/am572x
+ install -m 0755 am572x/mem_segment_definition_1024mb_bios.xs ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/am572x
+}
+
+FILES_${PN} += "${PDK_INSTALL_DIR_RECIPE}/packages/*"