Skip to contentSkip to conversation

libarch: made libarch into a RTSC package.

PATCH New Jianzhong Xu 1 participant 2 messages Apr 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 libarch: made libarch into a RTSC package.

---
 meta-arago-extras/recipes-ti/libarch/libarch-examples_git.bb | 4 ++--
 meta-arago-extras/recipes-ti/libarch/libarch.inc             | 6 +++---
 meta-arago-extras/recipes-ti/libarch/libarch_git.bb          | 9 ++-------
 3 files changed, 7 insertions(+), 12 deletions(-)
meta-arago-extras/recipes-ti/libarch/libarch-examples_git.bb +2 -2
index 62a09af..8ea5b65 100644
@@ -11,8 +11,8 @@ export LIBARCH_DIR    = "${LIBARCH_INSTALL_DIR}"
 export TARGET_ROOTDIR = "${STAGING_DIR_TARGET}"
 
 do_compile() {
-    make examples TARGET=${TARGET} LIBOS=LIB_OPENCL
-
+    cd examples
+    make TARGET=${TARGET} LIBOS=LIB_OPENCL
     # Remove object files before installing so that the binaries are not present
     find . -name "*.obj" -type f -delete
     find . -name "*.o" -type f -delete
meta-arago-extras/recipes-ti/libarch/libarch.inc +3 -3
index 83e147c..438e428 100644
@@ -2,15 +2,15 @@ HOMEPAGE = "https://git.ti.com/library-architecture/libarch"
 LICENSE = "BSD-3-Clause"
 
 PV = "1_0_0_0"
-INC_PR = "r0"
+INC_PR = "r1"
 
 require recipes-ti/includes/arago-paths.inc
 require recipes-ti/includes/ti-staging.inc
 
 BRANCH = "master"
-LIC_FILES_CHKSUM = "file://docs/LibArch_1.0.0_manifest.html;md5=bb48cacb8827ec8d8e5a94c4f2425ee3"
+LIC_FILES_CHKSUM = "file://src/ti/libarch/docs/LibArch_1.0.0_manifest.html;md5=bb48cacb8827ec8d8e5a94c4f2425ee3"
 SRC_URI = "git://git.ti.com/library-architecture/libarch.git;protocol=git;branch=${BRANCH}"
-SRCREV = "c4bc65775bdb6bd8574e43d3cb7148c6bbdc8de6"
+SRCREV = "4b2f1c5d5b6b9f3d021e498120a914456fb9eba1"
 
 COMPATIBLE_MACHINE = "k2hk-evm|am57xx"
 PACKAGE_ARCH = "${MACHINE_ARCH}"
meta-arago-extras/recipes-ti/libarch/libarch_git.bb +2 -7
index 18c998a..f125c4a 100644
@@ -5,17 +5,12 @@ include libarch.inc
 PR = "${INC_PR}.0"
 
 do_compile() {
-    make lib TARGET=${TARGET} LIBOS=LIB_OPENCL
-    make docs
-
-    # Delete .obj files before installing
-    rm src/*.obj
+    make -f build/Makefile TARGET=${TARGET} LIBOS=LIB_OPENCL
 }
 
 do_install() {
     install -d ${D}${LIBARCH_INSTALL_DIR_RECIPE}
-    cp -r docs lib include src ${D}${LIBARCH_INSTALL_DIR_RECIPE}
-    cp Makefile ${D}${LIBARCH_INSTALL_DIR_RECIPE}
+    cp -r exports/libarch_*/* ${D}${LIBARCH_INSTALL_DIR_RECIPE}
 }
 
 FILES_${PN}-dev += "${LIBARCH_INSTALL_DIR_RECIPE}"
Signature · 1 line
1.9.1
#1 lore raw

PATCH 2/2 linalg: added support for AM57xx and made into a RTSC package.

---
 .../recipes-ti/linalg/linalg-examples_git.bb       | 44 ++--------------------
 meta-arago-extras/recipes-ti/linalg/linalg.inc     |  8 ++--
 meta-arago-extras/recipes-ti/linalg/linalg_git.bb  | 12 +++---
 3 files changed, 15 insertions(+), 49 deletions(-)
meta-arago-extras/recipes-ti/linalg/linalg-examples_git.bb +4 -40
index acafb36..58b3b88 100644
@@ -8,38 +8,11 @@ RDEPENDS_${PN} += "opencl-runtime"
 
 export LINALG_DIR = "${LINALG_INSTALL_DIR}"
 
-EXAMPLES_ROOT = "${WORKDIR}/git/linalg_example_src"
-B = "${S}"
-
-LINALG_EXAMPLE_LIST = "dgemm_test \
-                       dsyrk_test \
-                       eig \
-                       gemm_bench \
-                       ludinv \
-                       matmpy \
-                       ztrmm_test \
-                       ztrsm_test \
-"
-
-python do_unpack_append() {
-    import shutil
-
-    git_dir = d.expand("${WORKDIR}/git/examples/arm+dsp")
-    s = d.getVar("EXAMPLES_ROOT", True)
-
-    os.makedirs(s)
-    shutil.copy(os.path.join(git_dir,"Makefile"),s)
-    shutil.copy(os.path.join(git_dir,"make.inc"),s)
-    shutil.copy(os.path.join(git_dir,"run_tests_evm.sh"),s)
-    for example in d.getVar("LINALG_EXAMPLE_LIST").split():
-        shutil.copytree(os.path.join(git_dir,example), os.path.join(s,example))
-}
-
-EXTRA_OEMAKE = " TARGET_ROOTDIR=${STAGING_DIR_HOST} TI_OCL_CGT_INSTALL=${STAGING_DIR_NATIVE}/usr/share/ti/cgt-c6x"
+EXAMPLES_ROOT = "${WORKDIR}/git/examples/arm+dsp"
 
 do_compile() {
-    cd ${EXAMPLES_ROOT}
-    oe_runmake
+    cd examples/arm+dsp
+    make
     # Remove object files before installing so that the binaries are not present
     find . -name "*.obj" -type f -delete
     find . -name "*.o" -type f -delete
@@ -47,16 +20,7 @@ do_compile() {
 
 do_install() {
     install -d ${D}${datadir}/ti/examples/linalg
-
-    install ${EXAMPLES_ROOT}/Makefile ${D}${datadir}/ti/examples/linalg
-    install ${EXAMPLES_ROOT}/make.inc ${D}${datadir}/ti/examples/linalg
-    install ${EXAMPLES_ROOT}/run_tests_evm.sh ${D}${datadir}/ti/examples/linalg
-
-    cd ${EXAMPLES_ROOT}
-    for linalg_example in ${LINALG_EXAMPLE_LIST}; do
-        install -d ${D}${datadir}/ti/examples/linalg/${linalg_example}
-        cp -rv ${EXAMPLES_ROOT}/${linalg_example}/. ${D}${datadir}/ti/examples/linalg/${linalg_example}
-    done
+    cp -r examples/arm+dsp/* ${D}${datadir}/ti/examples/linalg
 }
 
 FILES_${PN} += "\
meta-arago-extras/recipes-ti/linalg/linalg.inc +4 -4
index 7c197b6..bb8efdf 100644
@@ -2,7 +2,7 @@ HOMEPAGE = "git://git.ti.com/dense-linear-algebra-libraries/linalg.git"
 LICENSE = "BSD-3-Clause"
 
 PV = "1_2_0_0"
-INC_PR = "r0"
+INC_PR = "r1"
 
 S = "${WORKDIR}/git"
 
@@ -11,8 +11,8 @@ require recipes-ti/includes/ti-staging.inc
 
 BRANCH = "master"
 SRC_URI = "git://git.ti.com/dense-linear-algebra-libraries/linalg.git;protocol=git;branch=${BRANCH}"
-LIC_FILES_CHKSUM = "file://docs/LINALG_1.2.0_manifest.html;md5=f30895e41e5947c3439b1ad4cf4c8555"
-SRCREV = "4de29dac3c6fbd16df1b19876593de0afdbcb30f"
+LIC_FILES_CHKSUM = "file://src/ti/linalg/docs/LINALG_1.2.0_manifest.html;md5=f30895e41e5947c3439b1ad4cf4c8555"
+SRCREV = "5e435f2457565ed7c6199406ef248370bb2a4ad2"
 
 DEPENDS = "common-csl-ip \
            libarch \
@@ -40,4 +40,4 @@ export OMP_DIR ="${OMP_INSTALL_DIR}"
 export LIBARCH_DIR = "${LIBARCH_INSTALL_DIR}"
 export TARGET_ROOTDIR="${STAGING_DIR_TARGET}"
 
-COMPATIBLE_MACHINE = "k2hk-evm"
+COMPATIBLE_MACHINE = "k2hk-evm|am57xx"
meta-arago-extras/recipes-ti/linalg/linalg_git.bb +7 -5
index 4d7a5a4..18754a7 100644
@@ -3,17 +3,19 @@ DESCRIPTION = "TI Linear Algebra Library"
 include linalg.inc
 PR = "${INC_PR}.0"
 
-TARGET_k2hk-evm = "SOC_K2H"
-MEM_MODEL_k2hk-evm = "Large"
+TARGET_k2hk-evm      = "SOC_K2H"
+TARGET_am57xx-evm    = "SOC_AM572x"
+MEM_MODEL_k2hk-evm   = "Large"
+MEM_MODEL_am57xx-evm = "Small"
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 do_compile() {
-   make ARMplusDSP MEM_MODEL=${MEM_MODEL} TARGET=${TARGET} LIBOS=LIB_OPENCL
-   make docs
+   make -f build/Makefile MEM_MODEL=${MEM_MODEL} TARGET=${TARGET} LIBOS=LIB_OPENCL
 }
 
 do_install() {
-   make installARMplusDSPlib DESTDIR=${D}${LINALG_INSTALL_DIR_RECIPE}
+    install -d ${D}${LINALG_INSTALL_DIR_RECIPE}
+    cp -r exports/linalg_${PV}/* ${D}${LINALG_INSTALL_DIR_RECIPE}
 }
 
 # to create a package for LINALG
Signature · 1 line
1.9.1