diff options
author | Jianzhong Xu <xuj@ti.com> | 2018-09-24 20:59:34 +0000 |
---|---|---|
committer | Denys Dmytriyenko <denys@ti.com> | 2018-09-24 16:34:51 +0000 |
commit | 708863d503bdd4174ee412f1dd418b1650dad520 (patch) | |
tree | abee13ea37bb8e896873956ea3bbddd199d17429 /recipes-ti | |
parent | 6a854e93404a9b190ed7b80fd18bb5e849da47f5 (diff) | |
download | meta-ti-708863d503bdd4174ee412f1dd418b1650dad520.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')
-rw-r--r-- | recipes-ti/includes/ti-paths.inc | 2 | ||||
-rw-r--r-- | recipes-ti/mathlib/mathlib-c66x.inc | 29 | ||||
-rw-r--r-- | recipes-ti/mathlib/mathlib-c66x_3.1.1.0.bb | 9 | ||||
-rw-r--r-- | recipes-ti/mathlib/mathlib-c66x_git.bb | 5 | ||||
-rw-r--r-- | recipes-ti/mathlib/mathlib-c674x_git.bb | 5 | ||||
-rw-r--r-- | recipes-ti/mathlib/mathlib.inc | 72 |
6 files changed, 84 insertions, 38 deletions
diff --git a/recipes-ti/includes/ti-paths.inc b/recipes-ti/includes/ti-paths.inc index f797a2d2..6c2b2001 100644 --- a/recipes-ti/includes/ti-paths.inc +++ b/recipes-ti/includes/ti-paths.inc | |||
@@ -51,6 +51,7 @@ export GCC_ARM_NONE_TOOLCHAIN_RECIPE = "${installdir}/gcc-arm-none-eabi" | |||
51 | export TI_CGT_PRU_INSTALL_DIR_RECIPE = "${installdir}/cgt-pru" | 51 | export TI_CGT_PRU_INSTALL_DIR_RECIPE = "${installdir}/cgt-pru" |
52 | export DSPLIB_C66_INSTALL_DIR_RECIPE = "${installdir}/ti-dsplib-c66x-tree" | 52 | export DSPLIB_C66_INSTALL_DIR_RECIPE = "${installdir}/ti-dsplib-c66x-tree" |
53 | export MATHLIB_C66_INSTALL_DIR_RECIPE = "${installdir}/ti-mathlib-c66x-tree" | 53 | export MATHLIB_C66_INSTALL_DIR_RECIPE = "${installdir}/ti-mathlib-c66x-tree" |
54 | export MATHLIB_C674_INSTALL_DIR_RECIPE = "${installdir}/ti-mathlib-c674x-tree" | ||
54 | export IMGLIB_C66_INSTALL_DIR_RECIPE = "${installdir}/ti-imglib-c66x-tree" | 55 | export IMGLIB_C66_INSTALL_DIR_RECIPE = "${installdir}/ti-imglib-c66x-tree" |
55 | export VLIB_C66_INSTALL_DIR_RECIPE = "${installdir}/ti-vlib-c66x-tree" | 56 | export VLIB_C66_INSTALL_DIR_RECIPE = "${installdir}/ti-vlib-c66x-tree" |
56 | export CG_XML_INSTALL_DIR_RECIPE = "${installdir}/ti-cg-xml-tree" | 57 | export CG_XML_INSTALL_DIR_RECIPE = "${installdir}/ti-cg-xml-tree" |
@@ -101,6 +102,7 @@ export TI_CGT_PRU_INSTALL_DIR = "${STAGING_DIR_NATIVE}${TI_CGT_PRU_INSTALL_ | |||
101 | export SWTOOLS_INSTALL_DIR = "${STAGING_DIR_TARGET}${SWTOOLS_INSTALL_DIR_RECIPE}" | 102 | export SWTOOLS_INSTALL_DIR = "${STAGING_DIR_TARGET}${SWTOOLS_INSTALL_DIR_RECIPE}" |
102 | export DSPLIB_C66_INSTALL_DIR = "${STAGING_DIR_TARGET}${DSPLIB_C66_INSTALL_DIR_RECIPE}" | 103 | export DSPLIB_C66_INSTALL_DIR = "${STAGING_DIR_TARGET}${DSPLIB_C66_INSTALL_DIR_RECIPE}" |
103 | export MATHLIB_C66_INSTALL_DIR = "${STAGING_DIR_TARGET}${MATHLIB_C66_INSTALL_DIR_RECIPE}" | 104 | export MATHLIB_C66_INSTALL_DIR = "${STAGING_DIR_TARGET}${MATHLIB_C66_INSTALL_DIR_RECIPE}" |
105 | export MATHLIB_C674_INSTALL_DIR = "${STAGING_DIR_TARGET}${MATHLIB_C674_INSTALL_DIR_RECIPE}" | ||
104 | export IMGLIB_C66_INSTALL_DIR = "${STAGING_DIR_TARGET}${IMGLIB_C66_INSTALL_DIR_RECIPE}" | 106 | export IMGLIB_C66_INSTALL_DIR = "${STAGING_DIR_TARGET}${IMGLIB_C66_INSTALL_DIR_RECIPE}" |
105 | export VLIB_C66_INSTALL_DIR = "${STAGING_DIR_TARGET}${VLIB_C66_INSTALL_DIR_RECIPE}" | 107 | export VLIB_C66_INSTALL_DIR = "${STAGING_DIR_TARGET}${VLIB_C66_INSTALL_DIR_RECIPE}" |
106 | export CG_XML_INSTALL_DIR = "${STAGING_DIR_NATIVE}${CG_XML_INSTALL_DIR_RECIPE}" | 108 | export CG_XML_INSTALL_DIR = "${STAGING_DIR_NATIVE}${CG_XML_INSTALL_DIR_RECIPE}" |
diff --git a/recipes-ti/mathlib/mathlib-c66x.inc b/recipes-ti/mathlib/mathlib-c66x.inc deleted file mode 100644 index 7951e6ca..00000000 --- a/recipes-ti/mathlib/mathlib-c66x.inc +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | DESCRIPTION = "MATHLIB contains optimized general-purpose signal-processing routines for TI DSPs" | ||
2 | HOMEPAGE = "http://www.ti.com/tool/mathlib" | ||
3 | SECTION = "devel" | ||
4 | LICENSE = "BSD-3-Clause" | ||
5 | |||
6 | require ../includes/ti-paths.inc | ||
7 | require ../includes/ti-staging.inc | ||
8 | require ../includes/ti-unpack.inc | ||
9 | |||
10 | COMPATIBLE_MACHINE = "omap-a15|keystone" | ||
11 | |||
12 | SRC_URI = "http://software-dl.ti.com/sdoemb/sdoemb_public_sw/mathlib/${PV}/exports/${BINFILE};name=mathlib" | ||
13 | |||
14 | S = "${WORKDIR}/mathlib-c66x-${PV}" | ||
15 | |||
16 | BINFILE = "mathlib_c66x_${PV}_Linux.bin" | ||
17 | TI_BIN_UNPK_ARGS = "--mode silent --prefix ${S}" | ||
18 | TI_BIN_UNPK_CMDS = "" | ||
19 | |||
20 | do_install() { | ||
21 | CP_ARGS="-Prf --preserve=mode,timestamps --no-preserve=ownership" | ||
22 | install -d ${D}${MATHLIB_C66_INSTALL_DIR_RECIPE} | ||
23 | cp ${CP_ARGS} ${S}/* ${D}${MATHLIB_C66_INSTALL_DIR_RECIPE} | ||
24 | } | ||
25 | |||
26 | ALLOW_EMPTY_${PN} = "1" | ||
27 | FILES_${PN}-dev += "${MATHLIB_C66_INSTALL_DIR_RECIPE}" | ||
28 | |||
29 | INSANE_SKIP_${PN}-dev = "arch" | ||
diff --git a/recipes-ti/mathlib/mathlib-c66x_3.1.1.0.bb b/recipes-ti/mathlib/mathlib-c66x_3.1.1.0.bb deleted file mode 100644 index 50746fb9..00000000 --- a/recipes-ti/mathlib/mathlib-c66x_3.1.1.0.bb +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | require mathlib-c66x.inc | ||
2 | |||
3 | PV = "3_1_1_0" | ||
4 | PR = "r1" | ||
5 | |||
6 | LIC_FILES_CHKSUM = "file://packages/ti/mathlib/mathlib.h;beginline=9;endline=35;md5=954ed7074e987be574989f985f1897db" | ||
7 | |||
8 | SRC_URI[mathlib.md5sum] = "f3c9ad06dfcea780b5362c57a4bc48b8" | ||
9 | SRC_URI[mathlib.sha256sum] = "85df897c94e8768e9a1f186c21702ed3887d39cda6dc67cb4580fa3f083e8925" | ||
diff --git a/recipes-ti/mathlib/mathlib-c66x_git.bb b/recipes-ti/mathlib/mathlib-c66x_git.bb new file mode 100644 index 00000000..22683855 --- /dev/null +++ b/recipes-ti/mathlib/mathlib-c66x_git.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | include mathlib.inc | ||
2 | |||
3 | MATHLIB_BUILD_TARGET = "c66x" | ||
4 | MATHLIB_INSTALL_DIR_RECIPE = "${MATHLIB_C66_INSTALL_DIR_RECIPE}" | ||
5 | MATHLIB_INSTALL_DIR = "${MATHLIB_C66_INSTALL_DIR}" | ||
diff --git a/recipes-ti/mathlib/mathlib-c674x_git.bb b/recipes-ti/mathlib/mathlib-c674x_git.bb new file mode 100644 index 00000000..1654baf2 --- /dev/null +++ b/recipes-ti/mathlib/mathlib-c674x_git.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | include mathlib.inc | ||
2 | |||
3 | MATHLIB_BUILD_TARGET = "c674x" | ||
4 | MATHLIB_INSTALL_DIR_RECIPE = "${MATHLIB_C674_INSTALL_DIR_RECIPE}" | ||
5 | MATHLIB_INSTALL_DIR = "${MATHLIB_C674_INSTALL_DIR}" | ||
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" | ||