summaryrefslogtreecommitdiffstats
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
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
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"
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 @@
1DESCRIPTION = "Package containing PDK makefile infrastructure"
2LICENSE = "BSD-3-Clause"
3LIC_FILES_CHKSUM = "file://makerules/env.mk;beginline=1;endline=31;md5=10503e8de09f5475185f3fd56de1e310"
4
5require recipes-ti/includes/ti-paths.inc
6
7PV = "01.00.00.00A"
8PR = "r4"
9
10PDK_BUILD_GIT_URI = "git://git.ti.com/keystone-rtos/processor-pdk-build.git"
11PDK_BUILD_GIT_PROTOCOL = "git"
12PDK_BUILD_GIT_BRANCH = "master"
13
14# Below Commit ID corresponds to "DEV.PDK_BUILD.01.00.00.00A"
15PDK_BUILD_SRCREV = "8a026319765cc125e2daef709841bb3ce1a8d325"
16
17BRANCH = "${PDK_BUILD_GIT_BRANCH}"
18SRC_URI = "${PDK_BUILD_GIT_URI};protocol=${PDK_BUILD_GIT_PROTOCOL};branch=${BRANCH}"
19
20SRCREV = "${PDK_BUILD_SRCREV}"
21
22COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15|keystone"
23
24S = "${WORKDIR}/git/"
25
26CLEANBROKEN = "1"
27
28do_compile() {
29 :
30}
31
32do_install() {
33 install -d ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build
34 install -d ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/makerules
35 install -d ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/am571x
36 install -d ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/am572x
37
38 install -m 0755 Rules.make ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build
39
40 sed -i -e "s|c\:/ti/ccsv5/utils/cygwin|\$(XDC_INSTALL_PATH)/bin|g" \
41 ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/Rules.make
42
43 install -m 0755 makerules/build_config.mk ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/makerules
44 install -m 0755 makerules/common.mk ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/makerules
45 install -m 0755 makerules/component.mk ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/makerules
46 install -m 0755 makerules/env.mk ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/makerules
47 install -m 0755 makerules/platform.mk ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/makerules
48 install -m 0755 makerules/rules_66.mk ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/makerules
49 install -m 0755 makerules/rules_a15.mk ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/makerules
50 install -m 0755 makerules/rules_a8.mk ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/makerules
51 install -m 0755 makerules/rules_a8_extend.mk ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/makerules
52 install -m 0755 makerules/rules_a9.mk ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/makerules
53 install -m 0755 makerules/rules_m4.mk ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/makerules
54 install -m 0755 makerules/rules_ti_cgt_arm.mk ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/makerules
55 install -m 0755 am571x/config_am571x.bld ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/am571x
56 install -m 0755 am571x/config_am571x_c66.bld ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/am571x
57 install -m 0755 am571x/config_am571x_a15.bld ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/am571x
58 install -m 0755 am571x/mem_segment_definition_1024mb_bios.xs ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/am571x
59 install -m 0755 am572x/config_am572x.bld ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/am572x
60 install -m 0755 am572x/config_am572x_c66.bld ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/am572x
61 install -m 0755 am572x/config_am572x_a15.bld ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/am572x
62 install -m 0755 am572x/mem_segment_definition_1024mb_bios.xs ${D}${PDK_INSTALL_DIR_RECIPE}/packages/ti/build/am572x
63}
64
65FILES_${PN} += "${PDK_INSTALL_DIR_RECIPE}/packages/*"