diff options
author | Justin Sobota <jsobota@ti.com> | 2016-06-28 00:31:03 +0000 |
---|---|---|
committer | Denys Dmytriyenko <denys@ti.com> | 2016-06-29 17:10:45 -0400 |
commit | de355a34c41b0fc4700ca43d5b547f0ee0e5abc2 (patch) | |
tree | 0bf5cd508bd2985efc4796e9f74ea81775563b9f | |
parent | 39493a8a0d21161e4095fe7c462fbda099d27b74 (diff) | |
download | meta-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.bbclass | 59 | ||||
-rw-r--r-- | recipes-ti/ti-pdk-build/ti-pdk-build-rtos_git.bb | 65 |
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 | ||
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" |
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 @@ | |||
1 | DESCRIPTION = "Package containing PDK makefile infrastructure" | ||
2 | LICENSE = "BSD-3-Clause" | ||
3 | LIC_FILES_CHKSUM = "file://makerules/env.mk;beginline=1;endline=31;md5=10503e8de09f5475185f3fd56de1e310" | ||
4 | |||
5 | require recipes-ti/includes/ti-paths.inc | ||
6 | |||
7 | PV = "01.00.00.00A" | ||
8 | PR = "r4" | ||
9 | |||
10 | PDK_BUILD_GIT_URI = "git://git.ti.com/keystone-rtos/processor-pdk-build.git" | ||
11 | PDK_BUILD_GIT_PROTOCOL = "git" | ||
12 | PDK_BUILD_GIT_BRANCH = "master" | ||
13 | |||
14 | # Below Commit ID corresponds to "DEV.PDK_BUILD.01.00.00.00A" | ||
15 | PDK_BUILD_SRCREV = "8a026319765cc125e2daef709841bb3ce1a8d325" | ||
16 | |||
17 | BRANCH = "${PDK_BUILD_GIT_BRANCH}" | ||
18 | SRC_URI = "${PDK_BUILD_GIT_URI};protocol=${PDK_BUILD_GIT_PROTOCOL};branch=${BRANCH}" | ||
19 | |||
20 | SRCREV = "${PDK_BUILD_SRCREV}" | ||
21 | |||
22 | COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15|keystone" | ||
23 | |||
24 | S = "${WORKDIR}/git/" | ||
25 | |||
26 | CLEANBROKEN = "1" | ||
27 | |||
28 | do_compile() { | ||
29 | : | ||
30 | } | ||
31 | |||
32 | do_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 | |||
65 | FILES_${PN} += "${PDK_INSTALL_DIR_RECIPE}/packages/*" | ||