diff options
author | Jianzhong Xu <xuj@ti.com> | 2018-09-24 20:59:34 +0000 |
---|---|---|
committer | Denys Dmytriyenko <denys@ti.com> | 2018-09-25 15:28:46 +0000 |
commit | 817446ec897cd490262005b7f3804e60b0cd2513 (patch) | |
tree | 0a55d72accbeb6422732c488b39f50d1c9e60f00 /recipes-ti/mathlib/mathlib.inc | |
parent | 13dc5b1e28b7c59bedd9db7f70ca2cd5bb1f8b97 (diff) | |
download | meta-ti-817446ec897cd490262005b7f3804e60b0cd2513.tar.gz |
mathlib: build MATHLIB C66x/C674x from source
Remove MATHLIB recipe that downloads pre-built MATHLIB from ti.com.
Add new recipe to build MATHLIB for C66x or C674x from source code.
Signed-off-by: Jianzhong Xu <xuj@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Diffstat (limited to 'recipes-ti/mathlib/mathlib.inc')
-rw-r--r-- | recipes-ti/mathlib/mathlib.inc | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/recipes-ti/mathlib/mathlib.inc b/recipes-ti/mathlib/mathlib.inc new file mode 100644 index 00000000..3e981e4e --- /dev/null +++ b/recipes-ti/mathlib/mathlib.inc | |||
@@ -0,0 +1,72 @@ | |||
1 | SUMMARY = "MATHLIB contains optimized floating-point math functions for TI DSPs" | ||
2 | HOMEPAGE = "http://git.ti.com/ep-processor-libraries/mathlib" | ||
3 | LICENSE = "BSD-3-Clause" | ||
4 | |||
5 | require ../includes/ti-paths.inc | ||
6 | |||
7 | PV = "3_1_2_2" | ||
8 | PR = "r0" | ||
9 | |||
10 | DEPENDS = "ti-cgt6x-native \ | ||
11 | ti-xdctools-native \ | ||
12 | ti-sysbios \ | ||
13 | doxygen-native \ | ||
14 | zip-native \ | ||
15 | swtools" | ||
16 | |||
17 | S = "${WORKDIR}/git" | ||
18 | |||
19 | SRC_URI = "git://git.ti.com/ep-processor-libraries/mathlib.git;protocol=git;branch=master" | ||
20 | SRCREV = "195355db20f53295cfeef0bcfba0a8d8fdb0a753" | ||
21 | |||
22 | LIC_FILES_CHKSUM = "file://ti/mathlib/src/acosdp/acosdp.h;beginline=1;endline=35;md5=c133f7e139b46385906c861dd9552250" | ||
23 | |||
24 | export MATHLIB_WORK_DIR="${S}" | ||
25 | export CGTOOLS_INSTALL_DIR = "${STAGING_DIR_NATIVE}/usr/share/ti/cgt-c6x" | ||
26 | export C64PCODEGENTOOL="${CGTOOLS_INSTALL_DIR}" | ||
27 | export C674CODEGENTOOL="${CGTOOLS_INSTALL_DIR}" | ||
28 | export C66CODEGENTOOL ="${CGTOOLS_INSTALL_DIR}" | ||
29 | export SWTOOLS_PATH = "${SWTOOLS_INSTALL_DIR}/ti/mas/swtools" | ||
30 | export XDCBUILDCFG="${SWTOOLS_PATH}/config.bld" | ||
31 | |||
32 | PATH_append = ":${XDC_INSTALL_DIR}" | ||
33 | |||
34 | XDCPATH.="${XDCCGROOT}/include;${XDC_INSTALL_DIR}/packages;${SYSBIOS_INSTALL_DIR}/packages;" | ||
35 | XDCPATH.="${SWTOOLS_INSTALL_DIR};${MATHLIB_WORK_DIR};" | ||
36 | |||
37 | export XDCPATH | ||
38 | |||
39 | MATHLIB_PACKAGE_NAME = "mathlib_${MATHLIB_BUILD_TARGET}_${PV}" | ||
40 | |||
41 | do_compile() { | ||
42 | cd ${MATHLIB_WORK_DIR}/ti/mathlib; | ||
43 | xdc XDCARGS="${MATHLIB_BUILD_TARGET} bundle" XDCOPTIONS="-v" | ||
44 | } | ||
45 | |||
46 | do_install() { | ||
47 | install -d ${D}${MATHLIB_INSTALL_DIR_RECIPE} | ||
48 | |||
49 | find -name "${MATHLIB_PACKAGE_NAME}.zip" -exec unzip -o {} -d ${D}${MATHLIB_INSTALL_DIR_RECIPE} \; | ||
50 | mv ${D}${MATHLIB_INSTALL_DIR_RECIPE}/mathlib/* ${D}${MATHLIB_INSTALL_DIR_RECIPE} | ||
51 | mv ${D}${MATHLIB_INSTALL_DIR_RECIPE}/mathlib/.metadata ${D}${MATHLIB_INSTALL_DIR_RECIPE} | ||
52 | rm -r ${D}${MATHLIB_INSTALL_DIR_RECIPE}/mathlib | ||
53 | } | ||
54 | |||
55 | inherit deploy | ||
56 | addtask deploy before do_build after do_install | ||
57 | |||
58 | do_deploy() { | ||
59 | install -d ${DEPLOYDIR} | ||
60 | # zip up files in ${D}${MATHLIB_INSTALL_DIR_RECIPE} | ||
61 | # and place the zip file in ${DEPLOYDIR} | ||
62 | mkdir ./${MATHLIB_PACKAGE_NAME} | ||
63 | cp -r ${D}${MATHLIB_INSTALL_DIR_RECIPE}/* ./${MATHLIB_PACKAGE_NAME} | ||
64 | cp -r ${D}${MATHLIB_INSTALL_DIR_RECIPE}/.metadata ./${MATHLIB_PACKAGE_NAME} | ||
65 | zip -9 -y -r -q ${DEPLOYDIR}/${MATHLIB_PACKAGE_NAME}.zip ./${MATHLIB_PACKAGE_NAME} | ||
66 | rm -r ./${MATHLIB_PACKAGE_NAME} | ||
67 | } | ||
68 | |||
69 | ALLOW_EMPTY_${PN} = "1" | ||
70 | FILES_${PN}-dev += "${MATHLIB_INSTALL_DIR_RECIPE}" | ||
71 | |||
72 | INSANE_SKIP_${PN}-dev = "arch" | ||