summaryrefslogtreecommitdiff
path: root/packages/dsplink/ti-cmemk-module_2.21.bb
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2008-10-23 19:50:01 +0200
committerKoen Kooi <koen@openembedded.org>2008-10-23 19:50:01 +0200
commit15185adccb9a5e218ab634673ad2d6adfa420a70 (patch)
treeb87ba3f49e7071fbc3dc1100ecd003f4a45aab31 /packages/dsplink/ti-cmemk-module_2.21.bb
parent4e2a67ce604d5e3e96359ef53af8ce44e102fa61 (diff)
ti-cmemk-module: recipe to only build cmemk.ko instead of the whole codec-engine
ti-lpm-module: ditto, but for the lpm module
Diffstat (limited to 'packages/dsplink/ti-cmemk-module_2.21.bb')
-rw-r--r--packages/dsplink/ti-cmemk-module_2.21.bb83
1 files changed, 83 insertions, 0 deletions
diff --git a/packages/dsplink/ti-cmemk-module_2.21.bb b/packages/dsplink/ti-cmemk-module_2.21.bb
new file mode 100644
index 0000000000..82e5fb61e4
--- /dev/null
+++ b/packages/dsplink/ti-cmemk-module_2.21.bb
@@ -0,0 +1,83 @@
+DESCRIPTION = "Codec Engine for TI ARM/DSP processors - cmemk module"
+
+DEPENDS = "virtual/kernel perl-native"
+RDEPENDS = "update-modules"
+
+inherit module
+
+# tconf from xdctools dislikes '.' in pwd :/
+PR = "r1"
+PV = "221"
+
+# Get CE tarball from TI website, place in sources and calculate
+# md5sum
+# Look for tarball at https://www-a.ti.com/downloads/sds_support/targetcontent/CE/index.html
+
+SRC_URI = "http://install.tarball.in.source.dir/codec_engine_2_21_00_06.tar.gz \
+ file://Makefile.dsplink \
+ "
+
+S = "${WORKDIR}/codec_engine_2_21_00_06"
+
+require ti-paths.inc
+
+export DSPLINK="${S}/cetools/packages/dsplink"
+
+PARALLEL_MAKE = ""
+
+
+do_compile() {
+ echo "MVTOOL_PREFIX=${TARGET_PREFIX}" > ${S}/Rules.make
+ echo "UCTOOL_PREFIX=${TARGET_PREFIX}" >> ${S}/Rules.make
+ echo "LINUXKERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR}" >> ${S}/Rules.make
+
+ # Build the cmem kernel module
+ # We unset CFLAGS because kernel modules need different ones, this is basically a verbatim copy of kernel.bbclass and module-base.bbclass
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+ cd ${S}/cetools/packages/ti/sdo/linuxutils/cmem
+
+ oe_runmake clean
+ # We probably don't need to build all 3, but atm it doesn't hurt us
+ oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
+ KERNEL_SRC=${STAGING_KERNEL_DIR} \
+ KERNEL_VERSION=${KERNEL_VERSION} \
+ CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
+ AR="${KERNEL_AR}" \
+ release
+ oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
+ KERNEL_SRC=${STAGING_KERNEL_DIR} \
+ KERNEL_VERSION=${KERNEL_VERSION} \
+ CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
+ AR="${KERNEL_AR}" \
+ debug
+ oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
+ KERNEL_SRC=${STAGING_KERNEL_DIR} \
+ KERNEL_VERSION=${KERNEL_VERSION} \
+ CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
+ AR="${KERNEL_AR}"
+
+}
+
+
+do_install() {
+ install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
+ cp ${S}/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
+}
+
+INHIBIT_PACKAGE_STRIP = "1"
+
+FILES_ti-cmemk-module = "${sysconfdir} /lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/cmemk.ko"
+
+pkg_postinst_ti-cmemk-module () {
+ if [ -n "$D" ]; then
+ exit 1
+ fi
+ depmod -a
+ update-modules || true
+}
+
+pkg_postrm_ti-cmemk-module () {
+ update-modules || true
+}
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"