summaryrefslogtreecommitdiff
path: root/recipes/dvsdk/ti-cmem-module_2.23.1.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/dvsdk/ti-cmem-module_2.23.1.bb')
-rw-r--r--recipes/dvsdk/ti-cmem-module_2.23.1.bb63
1 files changed, 63 insertions, 0 deletions
diff --git a/recipes/dvsdk/ti-cmem-module_2.23.1.bb b/recipes/dvsdk/ti-cmem-module_2.23.1.bb
new file mode 100644
index 0000000000..097319c722
--- /dev/null
+++ b/recipes/dvsdk/ti-cmem-module_2.23.1.bb
@@ -0,0 +1,63 @@
+DESCRIPTION = "CMEM module for TI ARM/DSP processors"
+inherit module
+
+# compile and run time dependencies
+DEPENDS = "virtual/kernel perl-native"
+RDEPENDS = "update-modules"
+
+SRC_URI = "http://install.source.dir.com/codec_engine_2_23_01.tar.gz"
+
+# Set the source directory
+S = "${WORKDIR}/codec_engine_2_23_01"
+
+PR = "r18"
+PV = "2231"
+
+do_compile() {
+ # TODO :: KERNEL_CC, etc need replacing with user CC
+ # TODO :: Need to understand why OBJDUMP is required for kernel module
+ # Unset these since LDFLAGS gets picked up and used incorrectly.... need
+ # investigation
+
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+
+ cd ${S}/cetools/packages/ti/sdo/linuxutils/cmem
+ make \
+ LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \
+ MVTOOL_PREFIX="${TARGET_PREFIX}" \
+ UCTOOL_PREFIX="${TARGET_PREFIX}" \
+ clean debug release
+}
+
+do_install () {
+ install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
+ install -m 0755 ${S}/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
+
+ cd ${S}/cetools/packages/ti/sdo/linuxutils/cmem/apps
+ make \
+ LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \
+ MVTOOL_PREFIX="${TARGET_PREFIX}" \
+ UCTOOL_PREFIX="${TARGET_PREFIX}" \
+ EXEC_DIR="${D}${prefix}/ti/ti-cmem-apps" \
+ install
+}
+
+pkg_postinst () {
+ if [ -n "$D" ]; then
+ exit 1
+ fi
+ depmod -a
+ update-modules || true
+}
+
+pkg_postrm () {
+ update-modules || true
+}
+
+INHIBIT_PACKAGE_STRIP = "1"
+FILES_${PN} = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/cmemk.ko"
+PACKAGES += " ti-cmem-apps"
+FILES_ti-cmem-apps = "${prefix}/ti/ti-cmem-apps/*"
+INSANE_SKIP_ti-cmem-apps = True
+
+