summaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorJacob Stiffler <j-stiffler@ti.com>2016-01-27 03:16:41 +0000
committerDenys Dmytriyenko <denys@ti.com>2016-01-27 15:53:49 -0500
commita83eb9039edea25386d320e7a1403d732930c2fa (patch)
treebd248797803a4bbaf57937d1f64792b93a8fc481 /classes
parent183b1828ed831a9e3d0f817a513cfbcc33186a0d (diff)
downloadmeta-ti-a83eb9039edea25386d320e7a1403d732930c2fa.tar.gz
ti-pdk.bbclass: Add class for creating RTOS PDK components
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Diffstat (limited to 'classes')
-rw-r--r--classes/ti-pdk.bbclass66
1 files changed, 66 insertions, 0 deletions
diff --git a/classes/ti-pdk.bbclass b/classes/ti-pdk.bbclass
new file mode 100644
index 00000000..ae76fdfe
--- /dev/null
+++ b/classes/ti-pdk.bbclass
@@ -0,0 +1,66 @@
1require recipes-ti/includes/ti-paths.inc
2require recipes-ti/includes/ti-staging.inc
3
4inherit perlnative
5
6DEPENDS = "ti-xdctools ti-cg-xml-native ti-sysbios common-csl-ip-rtos libxml-simple-perl-native gcc-arm-none-eabi-native"
7
8DEPENDS_append_omap-a15 = " ti-cgt6x-native ti-ccsv6-native"
9DEPENDS_append_keystone = " ti-cgt6x-native"
10
11S = "${WORKDIR}/git"
12B = "${WORKDIR}/build"
13
14get_build_dir_bash() {
15 if [ -f ${S}/package.xdc ]
16 then
17 grep '^package' ${S}/package.xdc | sed -e 's|\[.*$||' | awk '{ print $2 }' | sed -e 's|\.|/|g'
18 else
19 echo ${S}
20 return 1
21 fi
22}
23
24export CROSS_TOOL_PRFX="arm-none-eabi-"
25export TOOLCHAIN_PATH_A8 = "${GCC_ARM_NONE_TOOLCHAIN}"
26export TOOLCHAIN_PATH_A9 = "${GCC_ARM_NONE_TOOLCHAIN}"
27export TOOLCHAIN_PATH_A15 = "${GCC_ARM_NONE_TOOLCHAIN}"
28export TOOLCHAIN_PATH_M4 = "${M4_TOOLCHAIN_INSTALL_DIR}"
29export C6X_GEN_INSTALL_PATH = "${STAGING_DIR_NATIVE}/usr/share/ti/cgt-c6x"
30
31export ROOTDIR = "${B}"
32export BIOS_INSTALL_PATH = "${SYSBIOS_INSTALL_DIR}"
33export XDC_INSTALL_PATH = "${XDC_INSTALL_DIR}"
34export PDK_INSTALL_PATH = "${PDK_INSTALL_DIR}/packages"
35
36export XDCPATH = "${XDC_INSTALL_DIR}/packages;${SYSBIOS_INSTALL_DIR}/packages;${PDK_INSTALL_DIR}/packages"
37export SECTTI="perl ${CG_XML_INSTALL_DIR}/ofd/sectti.pl"
38
39PARALLEL_XDC = "--jobs=${BB_NUMBER_THREADS}"
40
41do_configure() {
42 BUILD_DIR=${B}/`get_build_dir_bash`
43
44 mkdir -p ${BUILD_DIR}
45 cp -r ${S}/* ${BUILD_DIR}
46 cd ${BUILD_DIR}
47
48 sed -i "s/\ \"\.\\\\\\\\\"\ +//" src/Module.xs
49 find -name "*.xs" -exec sed -i "s/ofd6x\.exe/ofd6x/" {} \;
50 find -name "*.xs" -exec sed -i "s/sectti\.exe/sectti/" {} \;
51 find -name "*.xs" -exec sed -i "/\.chm/d" {} \;
52 find -name "*.xs" -exec sed -i "s/pasm\_dos/pasm\_linux/" {} \;
53}
54
55do_compile() {
56 ${XDC_INSTALL_DIR}/xdc clean ${PARALLEL_XDC} -PR .
57 ${XDC_INSTALL_DIR}/xdc all ${PARALLEL_XDC} XDCARGS="${XDCARGS}" ROOTDIR="${ROOTDIR}" -PR .
58 ${XDC_INSTALL_DIR}/xdc release XDCARGS="${XDCARGS}" -PR .
59}
60
61do_install () {
62 install -d ${D}${PDK_INSTALL_DIR_RECIPE}/packages
63 find -name "*.tar" -exec tar xf {} -C ${D}${PDK_INSTALL_DIR_RECIPE}/packages \;
64}
65
66FILES_${PN} += "${PDK_INSTALL_DIR_RECIPE}/packages"