ti-dvtb: add new recipe to build DVTB (Digital Video Test Bench)
authorBrijesh Singh <bksingh@ti.com>
Wed, 29 Sep 2010 02:36:18 +0000 (21:36 -0500)
committerKoen Kooi <koen@openembedded.org>
Thu, 30 Sep 2010 11:20:25 +0000 (13:20 +0200)
Signed-off-by: Brijesh Singh <bksingh@ti.com>
Signed-off-by: Denys Dmytriyenko <denis@denix.org>
Signed-off-by: Roger Monk <r-monk@ti.com>
Signed-off-by: Koen Kooi <k-kooi@ti.com>
recipes/ti/ti-dvtb.inc [new file with mode: 0644]
recipes/ti/ti-dvtb/loadmodules-ti-dvtb-dm355.sh [new file with mode: 0644]
recipes/ti/ti-dvtb/loadmodules-ti-dvtb-dm365.sh [new file with mode: 0644]
recipes/ti/ti-dvtb/loadmodules-ti-dvtb-dm6467.sh [new file with mode: 0644]
recipes/ti/ti-dvtb/loadmodules-ti-dvtb-omap3530.sh [new file with mode: 0644]
recipes/ti/ti-dvtb/make-include-rules.make-conditional.patch [new file with mode: 0644]
recipes/ti/ti-dvtb_4.20.12.bb [new file with mode: 0644]

diff --git a/recipes/ti/ti-dvtb.inc b/recipes/ti/ti-dvtb.inc
new file mode 100644 (file)
index 0000000..94dadf9
--- /dev/null
@@ -0,0 +1,91 @@
+DESCRIPTION = "DVTB for TI ARM/DSP processors"
+SECTION = "multimedia"
+LICENSE = "TI"
+
+PR = "r14"
+DEPENDS = "virtual/kernel alsa-lib ti-framework-components ti-codec-engine ti-xdctools ti-linuxutils alsa-lib jpeg ncurses ti-xdais "
+
+DEPENDS_append_dm365 = "ti-codecs-dm365"
+DEPENDS_append_omap3 = "ti-codecs-omap3530"
+
+SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/dvtb/${PV_dot}/exports/dvtb_${PV}.tar.gz;name=dvtbtarball \
+  file://make-include-rules.make-conditional.patch \
+  file://loadmodules-ti-dvtb-${DVTBPLATFORM}.sh \
+"
+
+
+S = "${WORKDIR}/dvtb_${PV}"
+
+require ti-paths.inc
+require ti-staging.inc
+
+DVTBPLATFORM_dm365    = "dm365"
+DVTBPLATFORM_omap3    = "omap3530"
+DVTBPLATFORM          ?= "DVTBPLATFORM_UNDEFINED"
+
+do_compile () {
+       cd ${S}
+       make clean
+       make PLATFORM=${DVTBPLATFORM} \
+               VERBOSE="true" \
+               DMAI_INSTALL_DIR="${DMAI_INSTALL_DIR}" \
+               XDC_INSTALL_DIR="${XDC_INSTALL_DIR}" \
+               CE_INSTALL_DIR="${CE_INSTALL_DIR}" \
+               FC_INSTALL_DIR="${FC_INSTALL_DIR}" \
+               CODEC_INSTALL_DIR="${CODEC_INSTALL_DIR}" \
+               CODEGEN_INSTALL_DIR="${CODEGEN_INSTALL_DIR}" \
+               BIOS_INSTALL_DIR="${BIOS_INSTALL_DIR}"\
+               CROSS_COMPILE="${TOOLCHAIN_PATH}/bin/${TARGET_PREFIX}" \
+               XDAIS_INSTALL_DIR="${XDAIS_INSTALL_DIR}" \
+               LINK_INSTALL_DIR="${LINK_INSTALL_DIR}" \
+               CMEM_INSTALL_DIR="${CMEM_INSTALL_DIR}" \
+               LPM_INSTALL_DIR="${LPM_INSTALL_DIR}" \
+               LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \
+               LINUXLIBS_INSTALL_DIR="${STAGING_DIR_TARGET}/usr" \
+               MVTOOL_DIR="${TOOLCHAIN_PATH}" \
+               CSTOOL_DIR="${TOOLCHAIN_PATH}" \
+               MVTOOL_PREFIX="${TOOLCHAIN_PATH}/bin/${TARGET_PREFIX}" \
+               CSTOOL_PREFIX="${TOOLCHAIN_PATH}/bin/${TARGET_PREFIX}" \
+               ${DVTBPLATFORM}
+}
+
+do_install () {
+        install -d ${D}${DVTB_INSTALL_DIR_RECIPE}
+        cp -pPrf ${S}/* ${D}${DVTB_INSTALL_DIR_RECIPE}
+
+        # DVTB does not currently support make install, so copying files manually.
+        install -d ${D}/${installdir}/dvtb
+               # on OMAP3 platform, dvtb bins are found under linux directory
+               if [ "${DVTBPLATFORM}" = "omap3530" ]; then
+               cp ${S}/packages/ti/sdo/dvtb/${DVTBPLATFORM}/linux/bin/* ${D}/${installdir}/dvtb
+               else
+               cp ${S}/packages/ti/sdo/dvtb/${DVTBPLATFORM}/bin/* ${D}/${installdir}/dvtb
+
+               fi
+
+        # Copy demos' loadmodules.sh into dvtb directory
+               if [ -f ${WORKDIR}/loadmodules-ti-dvtb-${DVTBPLATFORM}.sh ]; then
+        install -m 0755 ${WORKDIR}/loadmodules-ti-dvtb-${DVTBPLATFORM}.sh ${D}/${installdir}/dvtb/loadmodules.sh
+               fi
+
+        # Copy dvtb example scripts into dvtb directory
+        install -d ${D}/${installdir}/dvtb/scripts
+        cp ${S}/packages/ti/sdo/dvtb/scripts/${DVTBPLATFORM}/* ${D}/${installdir}/dvtb/scripts
+}
+
+pkg_postinst_${PN} () {
+       ln -sf ${installdir}/ti-codecs-server/*.${DSPSUFFIX} ${installdir}/dvtb/
+}
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+RDEPENDS_ti-dvtb_dm6467 += "ti-cmem-module alsa-lib jpeg"
+RDEPENDS_ti-dmai-apps_omap3     += "ti-codecs-omap3530-server ti-cmem-module ti-dsplink-module ti-lpm-module ti-sdma-module alsa-lib jpeg"
+RDEPENDS_ti-dvtb_dm355  += "ti-dm355mm-module ti-cmem-module alsa-lib jpeg"
+RDEPENDS_ti-dvtb_dm365  += "ti-dm365mm-module ti-cmem-module alsa-lib jpeg"
+
+FILES_${PN} = "${installdir}/dvtb/*"
+
+INHIBIT_PACKAGE_STRIP = "1"
+INSANE_SKIP_${PN} = "True"
diff --git a/recipes/ti/ti-dvtb/loadmodules-ti-dvtb-dm355.sh b/recipes/ti/ti-dvtb/loadmodules-ti-dvtb-dm355.sh
new file mode 100644 (file)
index 0000000..aa8db84
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# Default Memory Map
+#
+# Start Addr    Size    Description
+# -------------------------------------------
+# 0x80000000    96 MB   Linux
+# 0x86000000    32 MB   CMEM
+
+# Sample bootargs is given below
+# mem=96M console=ttyS0,115200n8 root=/dev/nfs rw nfsroot=<nfsroot> ip=dhcp video=davincifb:vid0=OFF:vid1=OFF:osd0=720x576x16,2025K
+
+rmmod cmemk 2>/dev/null
+rmmod irqk 2>/dev/null
+rmmod edmak 2>/dev/null
+rmmod dm350mmap 2>/dev/null
+
+modprobe cmemk phys_start=0x86000000 phys_end=0x88000000 pools=10x829440,1x1529856,1x276,1x4320,1x560,2x344,1x144,1x81920,2x512,1x14000,1x12960,1x11360,1x4,2x296,1x8192,59x56,4x24,1x1505280,9x1658880,1x2258880
+
+./mapdmaq
+
+modprobe irqk 
+modprobe edmak
+modprobe dm350mmap
+
+rm -f /dev/dm350mmap
+mknod /dev/dm350mmap c `awk "\\$2==\"dm350mmap\" {print \\$1}" /proc/devices` 0
diff --git a/recipes/ti/ti-dvtb/loadmodules-ti-dvtb-dm365.sh b/recipes/ti/ti-dvtb/loadmodules-ti-dvtb-dm365.sh
new file mode 100644 (file)
index 0000000..0ecf142
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# Default DM365 Memory Map 128 MB
+#
+# Start Addr    Size    Description
+# ----------------------------------------------------------------
+# 0x00001000    32K     ARM926 TCM memory used by platinum codec
+# 0x80000000    48 MB   Linux
+# 0x83000000    12 MB   Video driver memory (Linux)
+# 0x83C00000    68 MB   CMEM
+# 0x88000000    BOTTOM  ADDRESS
+#
+
+rmmod cmemk 2>/dev/null
+
+# Pools configuration
+modprobe cmemk phys_start=0x83C00000 phys_end=0x88000000 pools=2x384,1x16384,1x2688,1x20480,3x74,1x60288,2x28,1x147048,1x10240,1x896,1x65536,1x663552,1x9175376,4x24,1x282624,2x5984,1x58144,1x1024,1x48952,1x464,2x16768,1x1251264,1x30720,1x65792,8x774144,1x173712,1x146,1x98,2x296,50x56,2x86,1x624,1x3328,1x518912,4x62,1x242,4x663552,1x1637824,14x1645056,1x16538976,4x1382400 allowOverlap=1 phys_start_1=0x00001000 phys_end_1=0x00008000 pools_1=1x28672
+
+modprobe irqk 
+modprobe edmak
+modprobe dm365mmap
+
+rm -f /dev/dm365mmap
+mknod /dev/dm365mmap c `awk "\\$2==\"dm365mmap\" {print \\$1}" /proc/devices` 0
+
diff --git a/recipes/ti/ti-dvtb/loadmodules-ti-dvtb-dm6467.sh b/recipes/ti/ti-dvtb/loadmodules-ti-dvtb-dm6467.sh
new file mode 100644 (file)
index 0000000..f5e15bc
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+# Default Memory Map
+#
+# Start Addr    Size    Description
+# -------------------------------------------
+# 0x80000000     76 MB  Linux
+# 0x84C00000    110 MB  CMEM
+# 0x8ba00000     70 MB  CODEC SERVER
+
+# Sample bootargs is given below
+# mem=76M console=ttyS0,115200n8 root=/dev/nfs rw nfsroot=<nfsroot> ip=dhcp vpif_display.ch2_numbuffers=0 vpif_display.ch3_numbuffers=0 
+
+rmmod cmemk 2>/dev/null
+rmmod dsplinkk 2>/dev/null 
+
+modprobe cmemk phys_start=0x84C00000 phys_end=0x8ba00000 pools=2x921600,1x460800,1x1048576,1x345600,2x86400,11x564528,5x677376,14x5396480,3x4147200,4x1451520,4x1843200
+
+modprobe dsplinkk
+
+# alter dma queue mapping for better visual performance
+if [ -f mapdmaq-hd ]
+then
+    ./mapdmaq-hd
+fi
+
+# make /dev/dsplink
+rm -f /dev/dsplink
+mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0
+
diff --git a/recipes/ti/ti-dvtb/loadmodules-ti-dvtb-omap3530.sh b/recipes/ti/ti-dvtb/loadmodules-ti-dvtb-omap3530.sh
new file mode 100644 (file)
index 0000000..281afa3
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# Default Memory Map
+#
+# Start Addr    Size    Description
+# -------------------------------------------
+# 0x80000000     99 MB  Linux
+# 0x86300000     15 MB  CMEM
+# 0x87200000     13 MB  CODEC SERVER
+
+# remove previously loaded cmem module and use our pool configuration.
+rmmod cmemk 2>/dev/null
+
+# Allocate 15MB for CMEM
+modprobe cmemk phys_start=0x86300000 phys_end=0x87200000 pools=1x3000000,1x1429440,6x1048576,4x829440,1x327680,1x256000,7x131072,20x4096 allowOverlap=1
+
+# insert DSP/BIOS Link driver
+modprobe dsplinkk
+
+# make /dev/dsplink
+rm -f /dev/dsplink
+mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0
+
+# insert Local Power Manager driver
+modprobe lpm_omap3530
+
+# insert SDMA driver
+modprobe sdmak
+
diff --git a/recipes/ti/ti-dvtb/make-include-rules.make-conditional.patch b/recipes/ti/ti-dvtb/make-include-rules.make-conditional.patch
new file mode 100644 (file)
index 0000000..e20fa6a
--- /dev/null
@@ -0,0 +1,60 @@
+diff -uNr dvtb_4_20_04_4_orig/packages/ti/sdo/dvtb/dm355/Makefile dvtb_4_20_04_4/packages/ti/sdo/dvtb/dm355/Makefile
+--- dvtb_4_20_04_4_orig/packages/ti/sdo/dvtb/dm355/Makefile    2010-04-26 18:45:33.000000000 -0500
++++ dvtb_4_20_04_4/packages/ti/sdo/dvtb/dm355/Makefile 2010-04-26 18:46:47.000000000 -0500
+@@ -1,5 +1,5 @@
+ DVTB_ROOTDIR = ../../../../..\r
+-include ../../../../../../Rules.make\r
++-include ../../../../../../Rules.make\r
+ include pal.src\r
\r
+ TARGET = dvtb\r
+diff -uNr dvtb_4_20_04_4_orig/packages/ti/sdo/dvtb/dm357/Makefile dvtb_4_20_04_4/packages/ti/sdo/dvtb/dm357/Makefile
+--- dvtb_4_20_04_4_orig/packages/ti/sdo/dvtb/dm357/Makefile    2010-04-26 18:45:33.000000000 -0500
++++ dvtb_4_20_04_4/packages/ti/sdo/dvtb/dm357/Makefile 2010-04-26 18:48:01.000000000 -0500
+@@ -1,5 +1,5 @@
+ DVTB_ROOTDIR = ../../../../..
+-include ../../../../../../Rules.make
++-include ../../../../../../Rules.make
+ include pal.src
+ TARGET = dvtb
+diff -uNr dvtb_4_20_04_4_orig/packages/ti/sdo/dvtb/dm365/Makefile dvtb_4_20_04_4/packages/ti/sdo/dvtb/dm365/Makefile
+--- dvtb_4_20_04_4_orig/packages/ti/sdo/dvtb/dm365/Makefile    2010-04-26 18:45:33.000000000 -0500
++++ dvtb_4_20_04_4/packages/ti/sdo/dvtb/dm365/Makefile 2010-04-26 18:46:06.000000000 -0500
+@@ -1,5 +1,5 @@
+ DVTB_ROOTDIR = ../../../../..
+-include ../../../../../../Rules.make
++-include ../../../../../../Rules.make
+ include pal.src
+ include TSPA.src
+ include NONTSPA.src
+diff -uNr dvtb_4_20_04_4_orig/packages/ti/sdo/dvtb/dm6446/Makefile dvtb_4_20_04_4/packages/ti/sdo/dvtb/dm6446/Makefile
+--- dvtb_4_20_04_4_orig/packages/ti/sdo/dvtb/dm6446/Makefile   2010-04-26 18:45:33.000000000 -0500
++++ dvtb_4_20_04_4/packages/ti/sdo/dvtb/dm6446/Makefile        2010-04-26 18:48:17.000000000 -0500
+@@ -1,5 +1,5 @@
+ DVTB_ROOTDIR = ../../../../..\r
+-include ../../../../../../Rules.make\r
++-include ../../../../../../Rules.make\r
+ include pal.src\r
\r
+ TARGET = dvtb\r
+diff -uNr dvtb_4_20_04_4_orig/packages/ti/sdo/dvtb/dm6467/Makefile dvtb_4_20_04_4/packages/ti/sdo/dvtb/dm6467/Makefile
+--- dvtb_4_20_04_4_orig/packages/ti/sdo/dvtb/dm6467/Makefile   2010-04-26 18:45:33.000000000 -0500
++++ dvtb_4_20_04_4/packages/ti/sdo/dvtb/dm6467/Makefile        2010-04-26 18:47:45.000000000 -0500
+@@ -1,5 +1,5 @@
+ DVTB_ROOTDIR = ../../../../..\r
+-include ../../../../../../Rules.make\r
++-include ../../../../../../Rules.make\r
+ include pal.src\r
+ include TSPA.src\r
+ include NONTSPA.src\r
+diff -uNr dvtb_4_20_04_4_orig/packages/ti/sdo/dvtb/omap3530/linux/Makefile dvtb_4_20_04_4/packages/ti/sdo/dvtb/omap3530/linux/Makefile
+--- dvtb_4_20_04_4_orig/packages/ti/sdo/dvtb/omap3530/linux/Makefile   2010-04-26 18:45:33.000000000 -0500
++++ dvtb_4_20_04_4/packages/ti/sdo/dvtb/omap3530/linux/Makefile        2010-04-26 18:49:24.000000000 -0500
+@@ -1,5 +1,5 @@
+ DVTB_ROOTDIR = ../../../../../..
+-include ../../../../../../../Rules.make
++-include ../../../../../../../Rules.make
+ include pal.src
+ TARGET = dvtb
diff --git a/recipes/ti/ti-dvtb_4.20.12.bb b/recipes/ti/ti-dvtb_4.20.12.bb
new file mode 100644 (file)
index 0000000..e30a394
--- /dev/null
@@ -0,0 +1,8 @@
+PV = "4_20_12"
+PV_dot = "4.20.12"
+
+require ti-dvtb.inc
+
+SRC_URI[dvtbtarball.md5sum] = "74d0c71450265e35b963b89528f9bee9"
+SRC_URI[dvtbtarball.sha256sum] = "4b35c595ed78d0773077f5b9a0dffda124b8328a4073bf6654ed690a857f48b7"
+