diff options
Diffstat (limited to 'meta-offline-voice-agent/recipes-blas')
3 files changed, 0 insertions, 219 deletions
diff --git a/meta-offline-voice-agent/recipes-blas/openblas/files/0001-Modify-makefile-for-yocto.patch b/meta-offline-voice-agent/recipes-blas/openblas/files/0001-Modify-makefile-for-yocto.patch deleted file mode 100644 index 4adb7939..00000000 --- a/meta-offline-voice-agent/recipes-blas/openblas/files/0001-Modify-makefile-for-yocto.patch +++ /dev/null @@ -1,44 +0,0 @@ -From bc9476ad859b7e582b89f532f5e84771d6e026d2 Mon Sep 17 00:00:00 2001 -From: Yongjoo Ahn <yongjoo1.ahn@samsung.com> -Date: Fri, 16 Oct 2020 14:22:38 +0900 -Subject: [PATCH] Modify makefile for yocto - -- Modify makefile for yocto make build support - -Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com> ---- - Makefile.install | 4 ++-- - Makefile.system | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/Makefile.install b/Makefile.install -index dad869f4..1bfdb94b 100644 ---- a/Makefile.install -+++ b/Makefile.install -@@ -128,8 +128,8 @@ endif - - #Generating openblas.pc - @echo Generating openblas.pc in "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)" -- @echo 'libdir='$(OPENBLAS_LIBRARY_DIR) > "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc" -- @echo 'includedir='$(OPENBLAS_INCLUDE_DIR) >> "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc" -+ @echo 'libdir='$(libdir) > "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc" -+ @echo 'includedir='$(includedir) >> "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc" - @echo 'openblas_config= USE_64BITINT='$(USE_64BITINT) 'DYNAMIC_ARCH='$(DYNAMIC_ARCH) 'DYNAMIC_OLDER='$(DYNAMIC_OLDER) 'NO_CBLAS='$(NO_CBLAS) 'NO_LAPACK='$(NO_LAPACK) 'NO_LAPACKE='$(NO_LAPACKE) 'NO_AFFINITY='$(NO_AFFINITY) 'USE_OPENMP='$(USE_OPENMP) $(CORE) 'MAX_THREADS='$(NUM_THREADS)>> "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc" - @echo 'version='$(VERSION) >> "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc" - @echo 'extralib='$(EXTRALIB) >> "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)/openblas.pc" -diff --git a/Makefile.system b/Makefile.system -index 8d78b420..4d1eab68 100644 ---- a/Makefile.system -+++ b/Makefile.system -@@ -1184,7 +1184,7 @@ endif - - KERNELDIR = $(TOPDIR)/kernel/$(ARCH) - --include $(TOPDIR)/Makefile.$(ARCH) -+# include $(TOPDIR)/Makefile.$(ARCH) - - CCOMMON_OPT += -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME - CCOMMON_OPT += -DASMNAME=$(FU)$(*F) -DASMFNAME=$(FU)$(*F)$(BU) -DNAME=$(*F)$(BU) -DCNAME=$(*F) -DCHAR_NAME=\"$(*F)$(BU)\" -DCHAR_CNAME=\"$(*F)\" --- -2.17.1 - diff --git a/meta-offline-voice-agent/recipes-blas/openblas/openblas-native_0.3.20.bb b/meta-offline-voice-agent/recipes-blas/openblas/openblas-native_0.3.20.bb deleted file mode 100644 index ac14656f..00000000 --- a/meta-offline-voice-agent/recipes-blas/openblas/openblas-native_0.3.20.bb +++ /dev/null @@ -1,111 +0,0 @@ -# -# Copyright (c) 2016 Intel Corporation. All rights reserved. -# Copyright (c) 2019 Luxoft Sweden AB -# -# SPDX-License-Identifier: MIT -# - -DESCRIPTION = "OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version." -SUMMARY = "OpenBLAS : An optimized BLAS library" -AUTHOR = "Alexander Leiva <norxander@gmail.com>" -HOMEPAGE = "http://www.openblas.net/" -SECTION = "libs" -LICENSE = "BSD-3-Clause" - -DEPENDS += "make libgfortran patchelf-native" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=5adf4792c949a00013ce25d476a2abc0" - -SRC_URI = "git://github.com/xianyi/OpenBLAS.git;protocol=https;branch=develop" - -S = "${WORKDIR}/git" -SRCREV = "0b678b19dc03f2a999d6e038814c4c50b9640a4e" - -# Used for TARGET=... , documented in TargetList.txt -BLAS_X86_ARCH ?= "ATOM" -BLAS_AARCH32_ARCH ?= "CORTEXA9" -BLAS_AARCH64_ARCH ?= "ARMV8" -BLAS_ARM_ARCH ?= "ARMV7" - -def map_arch(a, d): - import re - if re.match('i.86$', a): return d.getVar('BLAS_X86_ARCH') - elif re.match('x86_64$', a): return d.getVar('BLAS_X86_ARCH') - elif re.match('aarch32$', a): return d.getVar('BLAS_AARCH32_ARCH') - elif re.match('aarch64$', a): return d.getVar('BLAS_AARCH64_ARCH') - elif re.match('arm$', a): return d.getVar('BLAS_ARM_ARCH') - return a - -def map_bits(a, d): - import re - if re.match('i.86$', a): return 32 - elif re.match('x86_64$', a): return 64 - elif re.match('aarch32$', a): return 32 - elif re.match('aarch64$', a): return 64 - elif re.match('arm$', a): return 32 - return 32 - -def map_extra_options(a, d): - import re - if re.match('arm$', a): return '-mfpu=neon-vfpv4 -mfloat-abi=hard' - return '' - -PACKAGECONFIG[lapack] = "" -PACKAGECONFIG[lapacke] = "" -PACKAGECONFIG[cblas] = "" -PACKAGECONFIG[affinity] = "" -PACKAGECONFIG[openmp] = "" -PACKAGECONFIG[dynarch] = "" - -PACKAGECONFIG ??= "openmp" - -inherit native - -do_compile () { - oe_runmake HOSTCC="${BUILD_CC}" \ - CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS} ${@map_extra_options(d.getVar('TARGET_ARCH', True), d)}" \ - PREFIX=${exec_prefix} \ - CROSS=1 \ - CROSS_SUFFIX=${HOST_PREFIX} \ - NO_STATIC=1 \ - ${@bb.utils.contains('PACKAGECONFIG', 'lapack', 'NO_LAPACK=0', 'NO_LAPACK=1', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'lapacke', 'NO_LAPACKE=0', 'NO_LAPACKE=1', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'cblas', 'NO_CBLAS=0', 'NO_CBLAS=1', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'affinity', 'NO_AFFINITY=0', 'NO_AFFINITY=1', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'openmp', 'USE_OPENMP=1', 'USE_OPENMP=0', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'dynarch', 'DYNAMIC_ARCH=1', 'DYNAMIC_ARCH=0', d)} \ - BINARY='${@map_bits(d.getVar('TARGET_ARCH', True), d)}' \ - TARGET='${@map_arch(d.getVar('TARGET_ARCH', True), d)}' -} - -do_install() { - oe_runmake HOSTCC="${BUILD_CC}" \ - CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}" \ - PREFIX=${exec_prefix} \ - CROSS=1 \ - CROSS_SUFFIX=${HOST_PREFIX} \ - NO_STATIC=1 \ - ${@bb.utils.contains('PACKAGECONFIG', 'lapack', 'NO_LAPACK=0', 'NO_LAPACK=1', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'lapacke', 'NO_LAPACKE=0', 'NO_LAPACKE=1', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'cblas', 'NO_CBLAS=0', 'NO_CBLAS=1', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'affinity', 'NO_AFFINITY=0', 'NO_AFFINITY=1', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'openmp', 'USE_OPENMP=1', 'USE_OPENMP=0', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'dynarch', 'DYNAMIC_ARCH=1', 'DYNAMIC_ARCH=0', d)} \ - BINARY='${@map_bits(d.getVar('TARGET_ARCH', True), d)}' \ - TARGET='${@map_arch(d.getVar('TARGET_ARCH', True), d)}' \ - DESTDIR=${D} \ - install - - - rm -rf ${D}${bindir} - - cd ${D}${libdir} - cp -ar libopenblas*r*.so libblas.so.3 - patchelf --set-soname libblas.so.3 libblas.so.3 - ln -s libblas.so.3 libblas.so -} - -FILES:${PN} = "${libdir}/lib*" -FILES:${PN}-dev = "${includedir} ${libdir}/lib${PN}.a ${libdir}/libblas.a ${libdir}/cmake ${libdir}/pkgconfig ${libdir}/libopenblas.so ${libdir}/libblas.so" - -DEPENDS:remove:class-native = "libgfortran" diff --git a/meta-offline-voice-agent/recipes-blas/openblas/openblas_git.bb b/meta-offline-voice-agent/recipes-blas/openblas/openblas_git.bb deleted file mode 100644 index 7f105e26..00000000 --- a/meta-offline-voice-agent/recipes-blas/openblas/openblas_git.bb +++ /dev/null @@ -1,64 +0,0 @@ -DESCRIPTION = "OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version." -SUMMARY = "OpenBLAS : An optimized BLAS library" -HOMEPAGE = "http://www.openblas.net/" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=5adf4792c949a00013ce25d476a2abc0" - -SRC_URI = "\ - git://github.com/xianyi/OpenBLAS;protocol=https;branch=develop \ -" - -# tag 0.3.20 -SRCREV = "0b678b19dc03f2a999d6e038814c4c50b9640a4e" -S = "${WORKDIR}/git" - -DEPENDS += "libgfortran" - -def map_arch(d): - import re - arch = d.getVar('TARGET_ARCH', True) - if re.match('i.86$', arch): return 'ATOM' - elif re.match('x86_64$', arch): return 'ATOM' - elif re.match('aarch32$', arch): return 'CORTEXA9' - elif re.match('aarch64$', arch): return 'ARMV8' - return 'CORTEXA15' - -def map_bits(d): - import re - arch = d.getVar('TARGET_ARCH', True) - if re.match('i.86$', arch): return 32 - elif re.match('x86_64$', arch): return 64 - elif re.match('aarch32$', arch): return 32 - elif re.match('aarch64$', arch): return 64 - return 32 - -EXTRA_OEMAKE = "\ - BUILD_WITHOUT_LAPACK=OFF \ - HOSTCC=${BUILD_CC} \ - CROSS=1 \ - CROSS_SUFFIX=${TARGET_PREFIX} \ - BINARY=${@map_bits(d)} \ - TARGET=${@map_arch(d)} \ - OPENBLAS_LIBRARY_DIR=${D}${libdir} \ - DYNAMIC_ARCH=ON \ - BUILD_STATIC_LIBS=ON \ - USE_LOCKING=1 \ - USE_THREAD=0 \ -" - -do_install() { - oe_runmake PREFIX=${D}${prefix} install - rm -rf ${D}${bindir} ${D}${libdir}/cmake - - # fixup pkgconfig file - sed -i -e "s#libdir=/.*#libdir=${libdir}#" ${D}${libdir}/pkgconfig/openblas.pc - sed -i -e "s#includedir=/.*#includedir=${includedir}#" ${D}${libdir}/pkgconfig/openblas.pc - - cat ${D}${libdir}/pkgconfig/openblas.pc - - # Create symlink from libblas.so to libopenblas.so.0, required by scipy - ln -s libopenblas.so.0 ${D}${libdir}/libblas.so -} - -FILES:${PN} = "${libdir}/*" -FILES:${PN}-dev = "${includedir} ${libdir}/libopenblas.so ${libdir}/libblas.so" |