diff options
Diffstat (limited to 'extras/recipes-ti')
98 files changed, 7038 insertions, 0 deletions
diff --git a/extras/recipes-ti/bios/ti-biosutils.inc b/extras/recipes-ti/bios/ti-biosutils.inc new file mode 100644 index 00000000..d562c2dd --- /dev/null +++ b/extras/recipes-ti/bios/ti-biosutils.inc | |||
@@ -0,0 +1,18 @@ | |||
1 | DESCRIPTION = "TI DSP/BIOS Utilities" | ||
2 | HOMEPAGE = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/Bios_Utils" | ||
3 | SECTION = "devel" | ||
4 | LICENSE = "TI" | ||
5 | LIC_FILES_CHKSUM = "file://packages/ti/bios/utils/Load.c;md5=e666d585907c3456e82b7e10f7a09a73" | ||
6 | |||
7 | require ../includes/ti-paths.inc | ||
8 | require ../includes/ti-staging.inc | ||
9 | |||
10 | S = "${WORKDIR}/biosutils_${PV}" | ||
11 | |||
12 | SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/Bios_Utils/${PV}${PVsuffix}/exports/biosutils_${PV}.tar.gz;name=biosutilstarball" | ||
13 | |||
14 | do_install() { | ||
15 | install -d ${D}${BIOSUTILS_INSTALL_DIR_RECIPE} | ||
16 | cp -pPrf ${S}/* ${D}${BIOSUTILS_INSTALL_DIR_RECIPE} | ||
17 | } | ||
18 | |||
diff --git a/extras/recipes-ti/bios/ti-biosutils_1.02.02.bb b/extras/recipes-ti/bios/ti-biosutils_1.02.02.bb new file mode 100644 index 00000000..918f1240 --- /dev/null +++ b/extras/recipes-ti/bios/ti-biosutils_1.02.02.bb | |||
@@ -0,0 +1,8 @@ | |||
1 | require ti-biosutils.inc | ||
2 | |||
3 | PV = "1_02_02" | ||
4 | PVsuffix = "_02" | ||
5 | |||
6 | SRC_URI[biosutilstarball.md5sum] = "0654e9e72b0a6fc7a6575829c0cd90c9" | ||
7 | SRC_URI[biosutilstarball.sha256sum] = "df486500bdc8dbe3800fc7efe4241e6fa5b1827ba7c0dc17a71b41d42ef921e1" | ||
8 | |||
diff --git a/extras/recipes-ti/bios/ti-dspbios.inc b/extras/recipes-ti/bios/ti-dspbios.inc new file mode 100644 index 00000000..0e3fa62d --- /dev/null +++ b/extras/recipes-ti/bios/ti-dspbios.inc | |||
@@ -0,0 +1,25 @@ | |||
1 | DESCRIPTION = "TI DSP/BIOS v5 Kernel" | ||
2 | HOMEPAGE = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/bios/dspbios" | ||
3 | SECTION = "devel" | ||
4 | LICENSE = "TI" | ||
5 | |||
6 | # We can't depend on license files to be present, so just use the TI logo | ||
7 | LIC_FILES_CHKSUM = "file://docs/tilogo.gif;md5=f049a774c576a5cef3fca4932d707b39" | ||
8 | |||
9 | require ../includes/ti-paths.inc | ||
10 | require ../includes/ti-staging.inc | ||
11 | require ../includes/ti-eula-unpack.inc | ||
12 | |||
13 | TI_BIN_UNPK_WDEXT="/bios_${PV}" | ||
14 | S = "${WORKDIR}${TI_BIN_UNPK_WDEXT}" | ||
15 | |||
16 | SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/bios/dspbios/${PV}/exports/bios_setuplinux_${PV}.bin;name=biosbin" | ||
17 | |||
18 | BINFILE="bios_setuplinux_${PV}.bin" | ||
19 | TI_BIN_UNPK_CMDS="Y: qY:workdir:Y" | ||
20 | |||
21 | do_install() { | ||
22 | install -d ${D}${BIOS_INSTALL_DIR_RECIPE} | ||
23 | cp -pPrf ${S}/* ${D}${BIOS_INSTALL_DIR_RECIPE} | ||
24 | } | ||
25 | |||
diff --git a/extras/recipes-ti/bios/ti-dspbios_5.41.11.38.bb b/extras/recipes-ti/bios/ti-dspbios_5.41.11.38.bb new file mode 100644 index 00000000..9e3b695a --- /dev/null +++ b/extras/recipes-ti/bios/ti-dspbios_5.41.11.38.bb | |||
@@ -0,0 +1,7 @@ | |||
1 | require ti-dspbios.inc | ||
2 | |||
3 | PV = "5_41_11_38" | ||
4 | |||
5 | SRC_URI[biosbin.md5sum] = "7fab13740c25f5b34b331bcdc759536e" | ||
6 | SRC_URI[biosbin.sha256sum] = "96b8e090f79420a4c11d9c0c10d182d1d3b4afb48f11ec375c97b4c91970d0a0" | ||
7 | |||
diff --git a/extras/recipes-ti/bios/ti-sysbios.inc b/extras/recipes-ti/bios/ti-sysbios.inc new file mode 100644 index 00000000..d04a1581 --- /dev/null +++ b/extras/recipes-ti/bios/ti-sysbios.inc | |||
@@ -0,0 +1,21 @@ | |||
1 | DESCRIPTION = "TI SYS/BIOS v6 Kernel" | ||
2 | HOMEPAGE = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/bios/sysbios" | ||
3 | SECTION = "devel" | ||
4 | LICENSE = "BSD" | ||
5 | |||
6 | require ../includes/ti-paths.inc | ||
7 | require ../includes/ti-staging.inc | ||
8 | require ../includes/ti-eula-unpack.inc | ||
9 | |||
10 | S = "${WORKDIR}/bios_${PV}" | ||
11 | |||
12 | SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/bios/sysbios/${PV}/exports/bios_setuplinux_${PV}.bin;name=sysbiosbin" | ||
13 | |||
14 | BINFILE="bios_setuplinux_${PV}.bin" | ||
15 | TI_BIN_UNPK_CMDS="Y: q:workdir:Y" | ||
16 | |||
17 | do_install() { | ||
18 | install -d ${D}${SYSBIOS_INSTALL_DIR_RECIPE} | ||
19 | cp -pPrf ${S}/* ${D}${SYSBIOS_INSTALL_DIR_RECIPE} | ||
20 | } | ||
21 | |||
diff --git a/extras/recipes-ti/bios/ti-sysbios_6.33.00.19.bb b/extras/recipes-ti/bios/ti-sysbios_6.33.00.19.bb new file mode 100644 index 00000000..4e2b4456 --- /dev/null +++ b/extras/recipes-ti/bios/ti-sysbios_6.33.00.19.bb | |||
@@ -0,0 +1,9 @@ | |||
1 | require ti-sysbios.inc | ||
2 | |||
3 | PV = "6_33_00_19" | ||
4 | LIC_FILES_CHKSUM = "file://sysbios_${PV}_manifest.html;md5=94136ca9815f76603b7202a41f1d6f5e" | ||
5 | |||
6 | SRC_URI[sysbiosbin.md5sum] = "e1a2f28a8b3087896bbd986696e1a908" | ||
7 | SRC_URI[sysbiosbin.sha256sum] = "b7e096662f5d928eb818bbb14474deb1e3e038fea34b516b248de637835121ec" | ||
8 | |||
9 | S = "${WORKDIR}/ti/bios_${PV}" | ||
diff --git a/extras/recipes-ti/c6accel/ti-c6accel.inc b/extras/recipes-ti/c6accel/ti-c6accel.inc new file mode 100644 index 00000000..638c9be3 --- /dev/null +++ b/extras/recipes-ti/c6accel/ti-c6accel.inc | |||
@@ -0,0 +1,89 @@ | |||
1 | DESCRIPTION = "TI C6Accel - DSP Software Libraries on ARM" | ||
2 | HOMEPAGE = "https://gforge01.dal.design.ti.com/gf/project/dsplib4arm/" | ||
3 | |||
4 | SECTION = "devel" | ||
5 | LICENSE = "TI TSPA" | ||
6 | |||
7 | require recipes-ti/includes/ti-paths.inc | ||
8 | require recipes-ti/includes/ti-staging.inc | ||
9 | require recipes-ti/includes/ti-eula-unpack.inc | ||
10 | |||
11 | PLATFORM_omapl138 = "omapl138" | ||
12 | PLATFORM_omap3 = "omap3530" | ||
13 | PLATFORM ?= "UNDEFINED_PLATFORM" | ||
14 | |||
15 | COMPATIBLE_MACHINE = "(omapl138|omap3)" | ||
16 | |||
17 | PROVIDES += "ti-c6accel-apps" | ||
18 | |||
19 | # This recipe links statically against kernel dependant stuff, use kernel PR as base and append a local version | ||
20 | PR = "${MACHINE_KERNEL_PR}" | ||
21 | PR_append = "a" | ||
22 | |||
23 | S = "${WORKDIR}/c6accel_${PV}" | ||
24 | |||
25 | # http://software-dl.ti.com/dsps/dsps_public_sw/c6000/web/c6accel/latest/index_FDS.html | ||
26 | SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/c6000/web/c6accel/latest/exports//c6accel_${PV}_Linux-x86_Setup.bin;name=c6accelbin " | ||
27 | |||
28 | BINFILE="c6accel_${PV}_Linux-x86_Setup.bin" | ||
29 | TI_BIN_UNPK_CMDS="Y:workdir" | ||
30 | |||
31 | DEPENDS = "ti-codec-engine ti-xdais ti-dsplink ti-dspbios" | ||
32 | DEPENDS += "ti-edma3lld ti-cgt6x ti-xdctools ti-framework-components" | ||
33 | DEPENDS += "ti-biosutils" | ||
34 | |||
35 | TIARGS = ' \ | ||
36 | PLATFORM="${PLATFORM}" \ | ||
37 | CE_INSTALL_DIR="${CE_INSTALL_DIR}" \ | ||
38 | XDAIS_INSTALL_DIR="${XDAIS_INSTALL_DIR}" \ | ||
39 | LINK_INSTALL_DIR="${LINK_INSTALL_DIR}" \ | ||
40 | CMEM_INSTALL_DIR="${CMEM_INSTALL_DIR}" \ | ||
41 | EDMA3_LLD_INSTALL_DIR="${EDMA3_LLD_INSTALL_DIR}" \ | ||
42 | CODEGEN_INSTALL_DIR="${CODEGEN_INSTALL_DIR}" \ | ||
43 | XDC_INSTALL_DIR="${XDC_INSTALL_DIR}" \ | ||
44 | FC_INSTALL_DIR="${FC_INSTALL_DIR}" \ | ||
45 | BIOS_INSTALL_DIR="${BIOS_INSTALL_DIR}" \ | ||
46 | BIOSUTILS_INSTALL_DIR="${BIOSUTILS_INSTALL_DIR}" \ | ||
47 | LPM_INSTALL_DIR="${LPM_INSTALL_DIR}" \ | ||
48 | SERVER_INSTALL_DIR="${CODEC_INSTALL_DIR}" \ | ||
49 | C6ACCEL_INSTALL_DIR="${S}" \ | ||
50 | CSTOOL_DIR="${TOOLCHAIN_PATH}" \ | ||
51 | CSTOOL_PREFIX="${TOOLCHAIN_PATH}/${TARGET_PREFIX}" \ | ||
52 | LINUXLIBS_INSTALL_DIR="${STAGING_DIR_TARGET}" \ | ||
53 | CFLAGS=" ${TARGET_CC_ARCH} ${CFLAGS}" LDFLAGS="${LDFLAGS}" \ | ||
54 | ' | ||
55 | |||
56 | do_configure() { | ||
57 | unset VERBOSE | ||
58 | make ${TIARGS} clean | ||
59 | sed -i -e 's:-L$(LINUXLIBS_INSTALL_DIR)/lib:-L$(LINUXLIBS_INSTALL_DIR)/lib -L$(LINUXLIBS_INSTALL_DIR)/usr/lib ${LDFLAGS}:' ${S}/soc/app/Makefile | ||
60 | } | ||
61 | |||
62 | do_compile() { | ||
63 | unset VERBOSE | ||
64 | make ${TIARGS} all | ||
65 | } | ||
66 | |||
67 | do_install() { | ||
68 | install -d ${D}${C6ACCEL_INSTALL_DIR_RECIPE} | ||
69 | cp -pPrf ${S}/* ${D}${C6ACCEL_INSTALL_DIR_RECIPE} | ||
70 | |||
71 | # update linker.cmd file to point to sysroot | ||
72 | sed -i ${i} -e s=${S}=${C6ACCEL_INSTALL_DIR}=g ${D}${C6ACCEL_INSTALL_DIR_RECIPE}/soc/app/c6accel_app_config/linker.cmd | ||
73 | |||
74 | cd ${S} | ||
75 | make \ | ||
76 | PLATFORM="${PLATFORM}" \ | ||
77 | CMEM_INSTALL_DIR="${CMEM_INSTALL_DIR}" \ | ||
78 | LINK_INSTALL_DIR="${LINK_INSTALL_DIR}" \ | ||
79 | LPM_INSTALL_DIR="${LPM_INSTALL_DIR}" \ | ||
80 | C6ACCEL_INSTALL_DIR="${S}" \ | ||
81 | EXEC_DIR_C6ACCEL="${D}/${installdir}/c6accel-apps" \ | ||
82 | install | ||
83 | } | ||
84 | |||
85 | PACKAGES += "ti-c6accel-apps" | ||
86 | FILES_ti-c6accel-apps = "${installdir}/c6accel-apps/*" | ||
87 | INSANE_SKIP_ti-c6accel-apps = "1" | ||
88 | RDEPENDS_ti-c6accel-apps += "ti-cmem-module ti-dsplink-module" | ||
89 | |||
diff --git a/extras/recipes-ti/c6accel/ti-c6accel/0001-soc-honour-buildsystem-CFLAGS-and-LDFLAGS-when-set.patch b/extras/recipes-ti/c6accel/ti-c6accel/0001-soc-honour-buildsystem-CFLAGS-and-LDFLAGS-when-set.patch new file mode 100644 index 00000000..a108c6e0 --- /dev/null +++ b/extras/recipes-ti/c6accel/ti-c6accel/0001-soc-honour-buildsystem-CFLAGS-and-LDFLAGS-when-set.patch | |||
@@ -0,0 +1,82 @@ | |||
1 | From 192b19046a67263da44203bf50a5b51d0a655fec Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Fri, 31 Dec 2010 15:26:37 +0100 | ||
4 | Subject: [PATCH] soc: honour buildsystem CFLAGS and LDFLAGS when set | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | soc/app/Makefile | 13 ++++--------- | ||
9 | soc/c6accelw/Makefile | 14 ++++---------- | ||
10 | 2 files changed, 8 insertions(+), 19 deletions(-) | ||
11 | |||
12 | diff --git a/soc/app/Makefile b/soc/app/Makefile | ||
13 | index 2647746..bed937e 100755 | ||
14 | --- a/soc/app/Makefile | ||
15 | +++ b/soc/app/Makefile | ||
16 | @@ -53,15 +53,10 @@ CONFIGURO = $(XDC_INSTALL_DIR)/xs xdc.tools.configuro | ||
17 | CONFIG_BLD = ../../config.bld | ||
18 | |||
19 | ifeq ($(BUILD_TYPE), release) | ||
20 | -ifeq ($(ARM_ISA),armv7-a) | ||
21 | - C_FLAGS += -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp | ||
22 | -endif | ||
23 | -ifeq ($(ARM_ISA),armv5t) | ||
24 | - C_FLAGS += -mlittle-endian -march=armv5t -mtune=arm9tdmi -mabi=aapcs-linux -O | ||
25 | -endif | ||
26 | +C_FLAGS += $(CFLAGS) | ||
27 | else | ||
28 | CPP_FLAGS += -DNDEBUG | ||
29 | - C_FLAGS += -Wall -g | ||
30 | + C_FLAGS += $(CFLAGS) -Wall -g | ||
31 | endif | ||
32 | |||
33 | |||
34 | @@ -72,7 +67,7 @@ ifeq ($(PLATFORM),omapl138) | ||
35 | C_FLAGS += -DPLATFORM=138 | ||
36 | endif | ||
37 | |||
38 | -LD_FLAGS += -L$(LINUXLIBS_INSTALL_DIR)/lib -lm -lpthread | ||
39 | +LD_FLAGS += $(LDFLAGS) -L$(LINUXLIBS_INSTALL_DIR)/lib -lm -lpthread | ||
40 | C6ACCEL_LIB += ../c6accelw/lib/c6accelw_$(PLATFORM).a470MV | ||
41 | |||
42 | COMPILE.c = $(VERBOSE) $(CSTOOL_PREFIX)gcc $(CPP_FLAGS) $(C_FLAGS) $(CPP_FLAGS) -c | ||
43 | @@ -102,7 +97,7 @@ $(TARGET): $(OBJFILES) $(C6ACCEL_LIB) $(XDC_LFILE) | ||
44 | |||
45 | $(OBJFILES): %.o: %.c $(HEADERS) $(XDC_CFLAGS) | ||
46 | @echo Compiling $@ from $<.. | ||
47 | - $(COMPILE.c) $(shell cat $(XDC_CFLAGS)) -o $@ $< | ||
48 | + $(COMPILE.c) $(shell cat $(XDC_CFLAGS) | sed 's:-march=armv5t::g') -o $@ $< | ||
49 | |||
50 | $(XDC_LFILE) $(XDC_CFLAGS): $(XDC_CFGFILE) | ||
51 | @echo | ||
52 | diff --git a/soc/c6accelw/Makefile b/soc/c6accelw/Makefile | ||
53 | index cc58acf..298ab3b 100755 | ||
54 | --- a/soc/c6accelw/Makefile | ||
55 | +++ b/soc/c6accelw/Makefile | ||
56 | @@ -21,19 +21,13 @@ BUILD_TYPE=release | ||
57 | CPP_FLAGS += -I../packages -I$(XDC_INSTALL_DIR)/packages -I$(CE_INSTALL_DIR)/packages -I$(XDAIS_INSTALL_DIR)/packages -Dxdc_target_name__=arm/GCArmv5T -Dxdc_target_types__=gnu/targets/std.h | ||
58 | |||
59 | ifeq ($(BUILD_TYPE), release) | ||
60 | -ifeq ($(ARM_ISA),armv7-a) | ||
61 | - C_FLAGS += -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp | ||
62 | - endif | ||
63 | -ifeq ($(ARM_ISA),armv5t) | ||
64 | - C_FLAGS += -mlittle-endian -march=armv5t -mtune=arm9tdmi -mabi=aapcs-linux -O | ||
65 | - endif | ||
66 | - | ||
67 | +C_FLAGS += $(CFLAGS) | ||
68 | else | ||
69 | - CPP_FLAGS += -DNDEBUG | ||
70 | - C_FLAGS += -Wall -g | ||
71 | + CPP_FLAGS += -DNDEBUG | ||
72 | + C_FLAGS += $(CFLAGS) -Wall -g | ||
73 | endif | ||
74 | |||
75 | -LD_FLAGS += -L$(LINUXLIBS_INSTALL_DIR)/lib | ||
76 | +LD_FLAGS += $(LDFLAGS) -L$(LINUXLIBS_INSTALL_DIR)/lib | ||
77 | AR_FLAGS += | ||
78 | |||
79 | COMPILE.c = $(VERBOSE) $(CSTOOL_PREFIX)gcc $(CPP_FLAGS) $(C_FLAGS) -c | ||
80 | -- | ||
81 | 1.6.6.1 | ||
82 | |||
diff --git a/extras/recipes-ti/c6accel/ti-c6accel/fix-loadmodule.patch b/extras/recipes-ti/c6accel/ti-c6accel/fix-loadmodule.patch new file mode 100644 index 00000000..9921f29e --- /dev/null +++ b/extras/recipes-ti/c6accel/ti-c6accel/fix-loadmodule.patch | |||
@@ -0,0 +1,81 @@ | |||
1 | diff -uNr c6accel_1_00_00_04_orig/soc/app/omap3530/loadmodules_omap3530_c6accel.sh c6accel_1_00_00_04/soc/app/omap3530/loadmodules_omap3530_c6accel.sh | ||
2 | --- c6accel_1_00_00_04_orig/soc/app/omap3530/loadmodules_omap3530_c6accel.sh 2010-07-26 16:18:35.000000000 -0500 | ||
3 | +++ c6accel_1_00_00_04/soc/app/omap3530/loadmodules_omap3530_c6accel.sh 2010-09-12 11:50:46.129159981 -0500 | ||
4 | @@ -1,4 +1,4 @@ | ||
5 | -# loadmodules.sh | ||
6 | +#!/bin/sh | ||
7 | # | ||
8 | # Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/ | ||
9 | # | ||
10 | @@ -11,34 +11,16 @@ | ||
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
12 | # Lesser General Public License for more details. | ||
13 | |||
14 | -# | ||
15 | -# Default Memory Map | ||
16 | -# | ||
17 | -# Start Addr Size Description | ||
18 | -# ------------------------------------------- | ||
19 | -# 0x80000000 88 MB Linux | ||
20 | -# 0x85800000 08 MB CMEM | ||
21 | -# 0x86800000 24 MB DDRALGHEAP | ||
22 | -# 0x87800000 6 MB DDR2 (BIOS, Codecs, Applications) | ||
23 | -# 0x87E00000 1 MB DSPLINK (MEM) | ||
24 | -# 0x87F00000 4 KB DSPLINK (RESET) | ||
25 | -# 0x87F01000 1020 KB unused | ||
26 | -rmmod cmemk.ko | ||
27 | -rmmod lpm_omap3530.ko | ||
28 | -rmmod dsplinkk | ||
29 | -# Allocate 15MB for CMEM | ||
30 | -insmod cmemk.ko phys_start=0x86300000 phys_end=0x87200000 pools=20x4096 | ||
31 | +# remove previously loaded cmem to ensure that it configured to use our pool configuration | ||
32 | +rmmod cmemk 2>/dev/null | ||
33 | |||
34 | -# insert DSP/BIOS Link driver | ||
35 | -# | ||
36 | -insmod dsplinkk.ko | ||
37 | +# Allocate 15MB for CMEM | ||
38 | +modprobe cmemk phys_start=0x86300000 phys_end=0x87200000 pools=20x4096 allowOverlap=1 | ||
39 | +modprobe dsplinkk | ||
40 | +modprobe lpm_omap3530 | ||
41 | |||
42 | # make /dev/dsplink | ||
43 | rm -rf /dev/dsplink | ||
44 | mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0 | ||
45 | |||
46 | |||
47 | -# insert Local Power Manager driver | ||
48 | -# | ||
49 | -insmod lpm_omap3530.ko | ||
50 | - | ||
51 | diff -uNr c6accel_1_00_00_04_orig/soc/app/omapl138/loadmodules_omapl138_c6accel.sh c6accel_1_00_00_04/soc/app/omapl138/loadmodules_omapl138_c6accel.sh | ||
52 | --- c6accel_1_00_00_04_orig/soc/app/omapl138/loadmodules_omapl138_c6accel.sh 2010-07-27 09:45:37.000000000 -0500 | ||
53 | +++ c6accel_1_00_00_04/soc/app/omapl138/loadmodules_omapl138_c6accel.sh 2010-09-12 11:52:07.193160179 -0500 | ||
54 | @@ -1,4 +1,4 @@ | ||
55 | -# | ||
56 | +#!/bin/sh | ||
57 | # Copyright (c) 2008, Texas Instruments Incorporated | ||
58 | # All rights reserved. | ||
59 | # | ||
60 | @@ -29,15 +29,14 @@ | ||
61 | # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, | ||
62 | # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
63 | # | ||
64 | -rmmod dsplinkk.ko | ||
65 | -rmmod cmemk.ko | ||
66 | + | ||
67 | +# remove previously loaded cmem to ensure that its configured to use our pool configuration. | ||
68 | +rmmod cmemk 2>/dev/null | ||
69 | + | ||
70 | # insert cmemk, tell it to occupy physical 120MB-128MB, create | ||
71 | # 20 4K buffers, 10 128K buffers and two 1MB buffers | ||
72 | -insmod cmemk.ko phys_start=0xC2000000 phys_end=0xC4000000 pools=20x4096 | ||
73 | - | ||
74 | -# insert DSP/BIOS Link driver | ||
75 | -# | ||
76 | -insmod dsplinkk.ko | ||
77 | +modprobe cmemk phys_start=0xC2000000 phys_end=0xC4000000 pools=20x4096 allowOverlap=1 | ||
78 | +modprobe dsplinkk | ||
79 | |||
80 | # make /dev/dsplink | ||
81 | rm -f /dev/dsplink | ||
diff --git a/extras/recipes-ti/c6accel/ti-c6accel_1.01.00.06.bb b/extras/recipes-ti/c6accel/ti-c6accel_1.01.00.06.bb new file mode 100644 index 00000000..61263c53 --- /dev/null +++ b/extras/recipes-ti/c6accel/ti-c6accel_1.01.00.06.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | require ti-c6accel.inc | ||
2 | |||
3 | SRC_URI[c6accelbin.md5sum] = "4cfb9ae9d1b69954a22b454726d4d6cb" | ||
4 | SRC_URI[c6accelbin.sha256sum] = "9fac3295c5c8533535e18f96c9a31c446f5a275798ace8c145f9ed51fa3e3ece" | ||
5 | |||
6 | LIC_FILES_CHKSUM = "file://docs/ReleaseNotes_C6Accel.txt;md5=28fbd64e0ba4a1af1a2f1179024f38a9" | ||
7 | |||
8 | SSRC_URI_append = " \ | ||
9 | file://0001-soc-honour-buildsystem-CFLAGS-and-LDFLAGS-when-set.patch \ | ||
10 | " | ||
11 | |||
12 | PV = "1_01_00_06" | ||
13 | |||
14 | |||
15 | CFLAGS += "-fPIC" | ||
16 | |||
diff --git a/extras/recipes-ti/codec-engine/ti-codec-engine.inc b/extras/recipes-ti/codec-engine/ti-codec-engine.inc new file mode 100644 index 00000000..15bd4642 --- /dev/null +++ b/extras/recipes-ti/codec-engine/ti-codec-engine.inc | |||
@@ -0,0 +1,199 @@ | |||
1 | DESCRIPTION = "Codec Engine for TI ARM/DSP processors" | ||
2 | HOMEPAGE = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/ce" | ||
3 | SECTION = "devel" | ||
4 | LICENSE = "BSD" | ||
5 | |||
6 | # TODO :: Add Codec Engine Library Rebuild | ||
7 | # TODO :: Add Examples APP_LOCAL build as well? | ||
8 | # TODO :: Check DEPENDS - are the DSP side packages required for ARM-only products? | ||
9 | |||
10 | require recipes-ti/includes/ti-paths.inc | ||
11 | require recipes-ti/includes/ti-staging.inc | ||
12 | |||
13 | PROVIDES += "ti-codec-engine-examples" | ||
14 | |||
15 | PR = "${MACHINE_KERNEL_PR}" | ||
16 | |||
17 | S = "${WORKDIR}/codec_engine_${PV}" | ||
18 | |||
19 | SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/ce/${PV}/exports/codec_engine_${PV},lite.tar.gz;name=cetarball " | ||
20 | |||
21 | DEPENDS = "ti-framework-components ti-xdais ti-xdctools ti-linuxutils" | ||
22 | DEPENDS_append_dm6446 = " ti-dspbios ti-dsplink ti-local-power-manager ti-cgt6x ti-biosutils ti-edma3lld" | ||
23 | DEPENDS_append_dm6467 = " ti-dspbios ti-dsplink ti-cgt6x ti-biosutils ti-edma3lld" | ||
24 | DEPENDS_append_omap3 = " ti-dspbios ti-dsplink ti-local-power-manager ti-cgt6x ti-biosutils ti-edma3lld" | ||
25 | DEPENDS_append_omapl137 = " ti-dspbios ti-dsplink ti-cgt6x ti-biosutils ti-edma3lld" | ||
26 | DEPENDS_append_omapl138 = " ti-dspbios ti-dsplink ti-cgt6x ti-biosutils ti-edma3lld" | ||
27 | |||
28 | # SOC_FAMILY configuration | ||
29 | |||
30 | # Define DEVICES variable | ||
31 | CEEXAMPLESDEVICES_dm6446 = "DM6446" | ||
32 | CEEXAMPLESDEVICES_dm6467 = "DM6467" | ||
33 | CEEXAMPLESDEVICES_omap3 = "OMAP3530" | ||
34 | CEEXAMPLESDEVICES_dm355 = "DM355" | ||
35 | CEEXAMPLESDEVICES_dm365 = "DM365" | ||
36 | CEEXAMPLESDEVICES_omapl137 = "OMAPL137" | ||
37 | CEEXAMPLESDEVICES_omapl138 = "OMAPL138" | ||
38 | CEEXAMPLESDEVICES ?= "<UNDEFINED_CEEXAMPLESDEVICES>" | ||
39 | |||
40 | # Define GPPOS variable | ||
41 | CEEXAMPLESGPPOS_dm6446 = "LINUX_GCC" | ||
42 | CEEXAMPLESGPPOS_dm6467 = "LINUX_GCC" | ||
43 | CEEXAMPLESGPPOS_omap3 = "LINUX_GCC" | ||
44 | CEEXAMPLESGPPOS_dm355 = "LINUX_GCC" | ||
45 | CEEXAMPLESGPPOS_dm365 = "LINUX_GCC" | ||
46 | CEEXAMPLESGPPOS_omapl137 = "LINUX_GCC" | ||
47 | CEEXAMPLESGPPOS_omapl138 = "LINUX_GCC" | ||
48 | CEEXAMPLESGPPOS ?= "<UNDEFINED_CEEXAMPLESGPPOS>" | ||
49 | |||
50 | # Define PROGRAM variable | ||
51 | CEEXAMPLESPROGRAMS_dm6446 = "APP_CLIENT DSP_SERVER" | ||
52 | CEEXAMPLESPROGRAMS_dm6467 = "APP_CLIENT DSP_SERVER" | ||
53 | CEEXAMPLESPROGRAMS_omap3 = "APP_CLIENT DSP_SERVER" | ||
54 | CEEXAMPLESPROGRAMS_dm355 = "APP_LOCAL" | ||
55 | CEEXAMPLESPROGRAMS_dm365 = "APP_LOCAL" | ||
56 | CEEXAMPLESPROGRAMS_omapl137 = "APP_CLIENT DSP_SERVER" | ||
57 | CEEXAMPLESPROGRAMS_omapl138 = "APP_CLIENT DSP_SERVER" | ||
58 | CEEXAMPLESPROGRAMS ?= "<UNDEFINED_CEEXAMPLESPROGRAMS>" | ||
59 | |||
60 | do_configure() { | ||
61 | |||
62 | # No way to pass this via ENV? | ||
63 | sed -i \ | ||
64 | -e s:arm-none-linux-gnueabi-:${TARGET_PREFIX}:g \ | ||
65 | ${S}/examples/xdcpaths.mak | ||
66 | |||
67 | # compiler is not under ${TOOLCHAIN_PATH}/bin anymore... | ||
68 | sed -i \ | ||
69 | -e s:bin/${TARGET_PREFIX}gcc:${TARGET_PREFIX}gcc:g \ | ||
70 | ${S}/examples/xdcpaths.mak | ||
71 | |||
72 | # ... and ar is not there too | ||
73 | # sed -i \ | ||
74 | # -e s:/arm-angstrom-linux-gnueabi/bin/ar:/arm-angstrom-linux-gnueabi-ar:g \ | ||
75 | # ${S}/examples/ti/xdais/dm/examples/viddec1_copy/package.mak | ||
76 | } | ||
77 | |||
78 | do_prepsources() { | ||
79 | |||
80 | for i in codecs extensions servers apps ; do | ||
81 | cd ${S}/examples/ti/sdo/ce/examples/$i | ||
82 | make DEVICES="${CEEXAMPLESDEVICES}" \ | ||
83 | GPPOS="${CEEXAMPLESGPPOS}" \ | ||
84 | PROGRAMS="${CEEXAMPLESPROGRAMS}" \ | ||
85 | CE_INSTALL_DIR="${S}" \ | ||
86 | XDC_INSTALL_DIR="${XDC_INSTALL_DIR}" \ | ||
87 | BIOS_INSTALL_DIR="${BIOS_INSTALL_DIR}" \ | ||
88 | BIOSUTILS_INSTALL_DIR="${BIOSUTILS_INSTALL_DIR}" \ | ||
89 | DSPLINK_INSTALL_DIR="${LINK_INSTALL_DIR}" \ | ||
90 | XDAIS_INSTALL_DIR="${XDAIS_INSTALL_DIR}" \ | ||
91 | FC_INSTALL_DIR="${FC_INSTALL_DIR}" \ | ||
92 | CMEM_INSTALL_DIR="${CMEM_INSTALL_DIR}" \ | ||
93 | LPM_INSTALL_DIR="${LPM_INSTALL_DIR}" \ | ||
94 | EDMA3_LLD_INSTALL_DIR="${EDMA3_LLD_INSTALL_DIR}" \ | ||
95 | CGTOOLS_V5T="${TOOLCHAIN_PATH}" \ | ||
96 | CGTOOLS_C64P="${CODEGEN_INSTALL_DIR}" \ | ||
97 | CGTOOLS_C674="${CODEGEN_INSTALL_DIR}" \ | ||
98 | clean | ||
99 | # '.make' target was used in CE < 2.26, but its no longer | ||
100 | # supported in CE >= 2.26. Now we are moved to >=2.26 | ||
101 | # hence commenting out the .make target. | ||
102 | # .make clean | ||
103 | done | ||
104 | } | ||
105 | |||
106 | addtask prepsources after do_configure before do_compile | ||
107 | |||
108 | do_compile () { | ||
109 | |||
110 | for i in codecs extensions servers apps ; do | ||
111 | cd ${S}/examples/ti/sdo/ce/examples/$i | ||
112 | make DEVICES="${CEEXAMPLESDEVICES}" \ | ||
113 | GPPOS="${CEEXAMPLESGPPOS}" \ | ||
114 | PROGRAMS="${CEEXAMPLESPROGRAMS}" \ | ||
115 | CE_INSTALL_DIR="${S}" \ | ||
116 | XDC_INSTALL_DIR="${XDC_INSTALL_DIR}" \ | ||
117 | BIOS_INSTALL_DIR="${BIOS_INSTALL_DIR}" \ | ||
118 | BIOSUTILS_INSTALL_DIR="${BIOSUTILS_INSTALL_DIR}" \ | ||
119 | DSPLINK_INSTALL_DIR="${LINK_INSTALL_DIR}" \ | ||
120 | XDAIS_INSTALL_DIR="${XDAIS_INSTALL_DIR}" \ | ||
121 | FC_INSTALL_DIR="${FC_INSTALL_DIR}" \ | ||
122 | CMEM_INSTALL_DIR="${CMEM_INSTALL_DIR}" \ | ||
123 | LPM_INSTALL_DIR="${LPM_INSTALL_DIR}" \ | ||
124 | EDMA3_LLD_INSTALL_DIR="${EDMA3_LLD_INSTALL_DIR}" \ | ||
125 | CGTOOLS_V5T="${TOOLCHAIN_PATH}" \ | ||
126 | CGTOOLS_C64P="${CODEGEN_INSTALL_DIR}" \ | ||
127 | CGTOOLS_C674="${CODEGEN_INSTALL_DIR}" \ | ||
128 | all | ||
129 | done | ||
130 | } | ||
131 | |||
132 | do_install() { | ||
133 | |||
134 | install -d ${D}/${installdir}/ti-codec-engine-examples | ||
135 | if [ -e ${S}/examples/apps/system_files/${CEEXAMPLESDEVICES}/loadmodules.sh ]; then | ||
136 | cp ${S}/examples/apps/system_files/${CEEXAMPLESDEVICES}/loadmodules.sh ${D}/${installdir}/ti-codec-engine-examples | ||
137 | elif [ -e ${WORKDIR}/loadmodules.sh ]; then | ||
138 | cp ${WORKDIR}/loadmodules.sh ${D}/${installdir}/ti-codec-engine-examples | ||
139 | fi | ||
140 | |||
141 | cd ${S}/examples/ti/sdo/ce/examples | ||
142 | |||
143 | # Install the apps, servers and test data, mirroring the source directory structure | ||
144 | # - Put the servers inside the same folder as the executable | ||
145 | # - TODO - Check nested dirs (e.g. dualcpu_separateconfig) | ||
146 | |||
147 | # Put all servers in separate tree. | ||
148 | for i in $(find . -name "*.${DSPSUFFIX}"); do | ||
149 | install -d ${D}/${installdir}/ti-codec-engine-examples/servers/`dirname ${i} | cut -f3 -d /` | ||
150 | install ${i} ${D}/${installdir}/ti-codec-engine-examples/servers/`dirname ${i} | cut -f3 -d /` | ||
151 | done | ||
152 | |||
153 | for i in $(find . -name "*.xv5T"); do | ||
154 | install -d ${D}/${installdir}/ti-codec-engine-examples/`dirname ${i} | cut -f3 -d /` | ||
155 | install ${i} ${D}/${installdir}/ti-codec-engine-examples/`dirname ${i} | cut -f3 -d /` | ||
156 | done | ||
157 | |||
158 | for i in $(find . -name "*.dat"); do | ||
159 | install -d ${D}/${installdir}/ti-codec-engine-examples/`dirname ${i} | cut -f3 -d /` | ||
160 | install ${i} ${D}/${installdir}/ti-codec-engine-examples/`dirname ${i} | cut -f3 -d /` | ||
161 | done | ||
162 | |||
163 | # For each directory, softlink to the app server, except special cases | ||
164 | cd ${D}/${installdir}/ti-codec-engine-examples | ||
165 | for i in $(find . -type d | grep -v servers); do | ||
166 | { | ||
167 | pwd | ||
168 | cd ${D}/${installdir}/ti-codec-engine-examples/$i | ||
169 | if [ $(basename $i) = "audio1_ires" ] ; then | ||
170 | ln -s ../servers/audio1_ires/audio1_ires.${DSPSUFFIX} | ||
171 | elif [ $(basename $i) = "server_api_example" ] ; then | ||
172 | ln -s ../servers/server_api_example/audio_copy.${DSPSUFFIX} | ||
173 | elif [ $(basename $i) != "." ] ; then | ||
174 | ln -s ../servers/all_codecs/all.${DSPSUFFIX} | ||
175 | else | ||
176 | echo Skipping $i | ||
177 | fi | ||
178 | } | ||
179 | done | ||
180 | |||
181 | # Install/Stage the Source Tree | ||
182 | install -d ${D}${CE_INSTALL_DIR_RECIPE} | ||
183 | cp -pPrf ${S}/* ${D}${CE_INSTALL_DIR_RECIPE} | ||
184 | } | ||
185 | |||
186 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
187 | |||
188 | PACKAGES += "ti-codec-engine-examples" | ||
189 | |||
190 | RDEPENDS_ti-codec-engine-examples = " ti-cmem-module" | ||
191 | RDEPENDS_ti-codec-engine-examples_append_dm6446 = " ti-dsplink-module ti-lpm-module" | ||
192 | RDEPENDS_ti-codec-engine-examples_append_dm6467 = " ti-dsplink-module" | ||
193 | RDEPENDS_ti-codec-engine-examples_append_omap3 = " ti-dsplink-module ti-lpm-module" | ||
194 | RDEPENDS_ti-codec-engine-examples_append_omapl137 = " ti-dsplink-module" | ||
195 | RDEPENDS_ti-codec-engine-examples_append_omapl138 = " ti-dsplink-module" | ||
196 | FILES_ti-codec-engine-examples = "${installdir}/ti-codec-engine-examples/*" | ||
197 | INSANE_SKIP_ti-codec-engine-examples = "1" | ||
198 | |||
199 | FILES_${PN}-dbg += "${installdir}/ti-codec-engine-examples/*/.debug" | ||
diff --git a/extras/recipes-ti/codec-engine/ti-codec-engine/bypass-GCArmv5T-used-is-sealed.patch b/extras/recipes-ti/codec-engine/ti-codec-engine/bypass-GCArmv5T-used-is-sealed.patch new file mode 100644 index 00000000..b93161f4 --- /dev/null +++ b/extras/recipes-ti/codec-engine/ti-codec-engine/bypass-GCArmv5T-used-is-sealed.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | do_compile produces: | ||
2 | |||
3 | js: "/prj/oe/bb/build/tmp-eglibc/work/beagleboard-angstrom-linux-gnueabi/ti-codec-engine-2_26_02_11-r114a/codec_engine_2_26_02_11/packages/ti/sdo/ce/osal/linux/package.xs", line 50: XDC runtime error: gnu.targets.arm.GCArmv5T: '$used' is sealed | ||
4 | |||
5 | Fix per suggestion in http://e2e.ti.com/support/dsp/omap_applications_processors/f/447/t/110920.aspx | ||
6 | |||
7 | --- ./packages/ti/sdo/ce/osal/linux/package.xs.orig 2010-12-01 23:24:48.000000000 -0600 | ||
8 | +++ ./packages/ti/sdo/ce/osal/linux/package.xs 2011-12-27 14:59:39.382423341 -0600 | ||
9 | @@ -47,10 +47,10 @@ | ||
10 | } | ||
11 | |||
12 | /* Conditionally load CMEM here */ | ||
13 | - var targetMod = xdc.useModule(prog.build.target.$name); | ||
14 | - if ((":"+targetMod.getISAChain().join(":")+":").match(/:v5T:/i)) { | ||
15 | + //var targetMod = xdc.useModule(prog.build.target.$name); | ||
16 | + //if ((":"+targetMod.getISAChain().join(":")+":").match(/:v5T:/i)) { | ||
17 | xdc.useModule('ti.sdo.linuxutils.cmem.CMEM'); | ||
18 | - } | ||
19 | + //} | ||
20 | |||
21 | var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global'); | ||
22 | |||
diff --git a/extras/recipes-ti/codec-engine/ti-codec-engine/ce-2-26-00-08-Examples-Add-LPM_INSTALL_DIR-packages.patch b/extras/recipes-ti/codec-engine/ti-codec-engine/ce-2-26-00-08-Examples-Add-LPM_INSTALL_DIR-packages.patch new file mode 100644 index 00000000..1eb81086 --- /dev/null +++ b/extras/recipes-ti/codec-engine/ti-codec-engine/ce-2-26-00-08-Examples-Add-LPM_INSTALL_DIR-packages.patch | |||
@@ -0,0 +1,60 @@ | |||
1 | diff --git a/examples/ti/sdo/ce/examples/apps/audio1_ires/rtcfg_local_evm3530_linux/makefile b/examples/ti/sdo/ce/examples/apps/audio1_ires/rtcfg_local_evm3530_linux/makefile | ||
2 | index 2bbfb72..2a00d0d 100644 | ||
3 | --- a/examples/ti/sdo/ce/examples/apps/audio1_ires/rtcfg_local_evm3530_linux/makefile | ||
4 | +++ b/examples/ti/sdo/ce/examples/apps/audio1_ires/rtcfg_local_evm3530_linux/makefile | ||
5 | @@ -80,6 +80,7 @@ REPO_PATH = \ | ||
6 | $(FC_INSTALL_DIR)/packages \ | ||
7 | $(FC_INSTALL_DIR)/examples \ | ||
8 | $(CMEM_INSTALL_DIR)/packages \ | ||
9 | + $(LPM_INSTALL_DIR)/packages \ | ||
10 | $(BIOSUTILS_INSTALL_DIR)/packages \ | ||
11 | $(EXAMPLES_ROOTDIR) | ||
12 | |||
13 | diff --git a/examples/ti/sdo/ce/examples/apps/speech1_copy/rtcfg_local_evm3530_linux/makefile b/examples/ti/sdo/ce/examples/apps/speech1_copy/rtcfg_local_evm3530_linux/makefile | ||
14 | index f2b187a..827f6bc 100644 | ||
15 | --- a/examples/ti/sdo/ce/examples/apps/speech1_copy/rtcfg_local_evm3530_linux/makefile | ||
16 | +++ b/examples/ti/sdo/ce/examples/apps/speech1_copy/rtcfg_local_evm3530_linux/makefile | ||
17 | @@ -74,6 +74,7 @@ REPO_PATH = \ | ||
18 | $(XDAIS_INSTALL_DIR)/packages \ | ||
19 | $(FC_INSTALL_DIR)/packages \ | ||
20 | $(CMEM_INSTALL_DIR)/packages \ | ||
21 | + $(LPM_INSTALL_DIR)/packages \ | ||
22 | $(BIOSUTILS_INSTALL_DIR)/packages \ | ||
23 | $(EXAMPLES_ROOTDIR) | ||
24 | |||
25 | diff --git a/examples/ti/sdo/ce/examples/apps/speech1_copy/rtcfg_remote_evm3530_linux/makefile b/examples/ti/sdo/ce/examples/apps/speech1_copy/rtcfg_remote_evm3530_linux/makefile | ||
26 | index a4fe4dc..a23f991 100644 | ||
27 | --- a/examples/ti/sdo/ce/examples/apps/speech1_copy/rtcfg_remote_evm3530_linux/makefile | ||
28 | +++ b/examples/ti/sdo/ce/examples/apps/speech1_copy/rtcfg_remote_evm3530_linux/makefile | ||
29 | @@ -76,6 +76,7 @@ REPO_PATH = \ | ||
30 | $(XDAIS_INSTALL_DIR)/packages \ | ||
31 | $(FC_INSTALL_DIR)/packages \ | ||
32 | $(CMEM_INSTALL_DIR)/packages \ | ||
33 | + $(LPM_INSTALL_DIR)/packages \ | ||
34 | $(BIOSUTILS_INSTALL_DIR)/packages \ | ||
35 | $(EXAMPLES_ROOTDIR) | ||
36 | |||
37 | diff --git a/examples/ti/sdo/ce/examples/apps/video1_copy/rtcfg_local_evm3530_linux/makefile b/examples/ti/sdo/ce/examples/apps/video1_copy/rtcfg_local_evm3530_linux/makefile | ||
38 | index 8baa9dd..3c01c04 100644 | ||
39 | --- a/examples/ti/sdo/ce/examples/apps/video1_copy/rtcfg_local_evm3530_linux/makefile | ||
40 | +++ b/examples/ti/sdo/ce/examples/apps/video1_copy/rtcfg_local_evm3530_linux/makefile | ||
41 | @@ -74,6 +74,7 @@ REPO_PATH = \ | ||
42 | $(XDAIS_INSTALL_DIR)/packages \ | ||
43 | $(FC_INSTALL_DIR)/packages \ | ||
44 | $(CMEM_INSTALL_DIR)/packages \ | ||
45 | + $(LPM_INSTALL_DIR)/packages \ | ||
46 | $(BIOSUTILS_INSTALL_DIR)/packages \ | ||
47 | $(EXAMPLES_ROOTDIR) | ||
48 | |||
49 | diff --git a/examples/ti/sdo/ce/examples/apps/video1_copy/rtcfg_remote_evm3530_linux/makefile b/examples/ti/sdo/ce/examples/apps/video1_copy/rtcfg_remote_evm3530_linux/makefile | ||
50 | index 3319c06..09a6357 100644 | ||
51 | --- a/examples/ti/sdo/ce/examples/apps/video1_copy/rtcfg_remote_evm3530_linux/makefile | ||
52 | +++ b/examples/ti/sdo/ce/examples/apps/video1_copy/rtcfg_remote_evm3530_linux/makefile | ||
53 | @@ -75,6 +75,7 @@ REPO_PATH = \ | ||
54 | $(XDAIS_INSTALL_DIR)/packages \ | ||
55 | $(FC_INSTALL_DIR)/packages \ | ||
56 | $(CMEM_INSTALL_DIR)/packages \ | ||
57 | + $(LPM_INSTALL_DIR)/packages \ | ||
58 | $(BIOSUTILS_INSTALL_DIR)/packages \ | ||
59 | $(EXAMPLES_ROOTDIR) | ||
60 | |||
diff --git a/extras/recipes-ti/codec-engine/ti-codec-engine/dm365-evm/loadmodules.sh b/extras/recipes-ti/codec-engine/ti-codec-engine/dm365-evm/loadmodules.sh new file mode 100644 index 00000000..60a40f0c --- /dev/null +++ b/extras/recipes-ti/codec-engine/ti-codec-engine/dm365-evm/loadmodules.sh | |||
@@ -0,0 +1,49 @@ | |||
1 | # | ||
2 | # Copyright (c) 2008, Texas Instruments Incorporated | ||
3 | # All rights reserved. | ||
4 | # | ||
5 | # Redistribution and use in source and binary forms, with or without | ||
6 | # modification, are permitted provided that the following conditions | ||
7 | # are met: | ||
8 | # | ||
9 | # * Redistributions of source code must retain the above copyright | ||
10 | # notice, this list of conditions and the following disclaimer. | ||
11 | # | ||
12 | # * Redistributions in binary form must reproduce the above copyright | ||
13 | # notice, this list of conditions and the following disclaimer in the | ||
14 | # documentation and/or other materials provided with the distribution. | ||
15 | # | ||
16 | # * Neither the name of Texas Instruments Incorporated nor the names of | ||
17 | # its contributors may be used to endorse or promote products derived | ||
18 | # from this software without specific prior written permission. | ||
19 | # | ||
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
21 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
22 | # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
23 | # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR | ||
24 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
25 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
26 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | ||
27 | # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
28 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | ||
29 | # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, | ||
30 | # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
31 | # | ||
32 | |||
33 | # insert cmemk, tell it to occupy physical 120MB-128MB, create | ||
34 | # 20 4K buffers, 10 128K buffers and two 1MB buffers | ||
35 | CMEM_MODPARAMS="phys_start=0x87800000 phys_end=0x88000000 pools=20x4096,10x131072,2x1048576" | ||
36 | |||
37 | if [ -e cmemk.ko ] | ||
38 | then | ||
39 | insmod cmemk.ko $CMEM_MODPARAMS | ||
40 | else | ||
41 | modprobe cmemk $CMEM_MODPARAMS | ||
42 | fi | ||
43 | |||
44 | # Allow cmem driver to be used by all users | ||
45 | if [ -e /dev/cmem ] | ||
46 | then | ||
47 | chmod 666 /dev/cmem | ||
48 | fi | ||
49 | |||
diff --git a/extras/recipes-ti/codec-engine/ti-codec-engine/loadmodules-ti-codec-engine-apps.sh b/extras/recipes-ti/codec-engine/ti-codec-engine/loadmodules-ti-codec-engine-apps.sh new file mode 100644 index 00000000..9f9233d1 --- /dev/null +++ b/extras/recipes-ti/codec-engine/ti-codec-engine/loadmodules-ti-codec-engine-apps.sh | |||
@@ -0,0 +1,37 @@ | |||
1 | # | ||
2 | # Default Memory Map - for OMAP3530 CE 2.21 examples | ||
3 | # | ||
4 | # Start Addr Size Description | ||
5 | # ------------------------------------------- | ||
6 | # 0x80000000 80 MB Linux | ||
7 | # 0x85000000 08 MB CMEM | ||
8 | # 0x86000000 24 MB DDRALGHEAP | ||
9 | # 0x87800000 6 MB DDR2 (BIOS, Codecs, Applications) | ||
10 | # 0x87E00000 1 MB DSPLINK (MEM) | ||
11 | # 0x87F00000 4 KB DSPLINK (RESET) | ||
12 | # 0x87F01000 1020 KB unused | ||
13 | |||
14 | # sanity check to verify that we're using the right mem=xxM (80M in this case) | ||
15 | awk '/MemTotal:/ { | ||
16 | mem=$2 | ||
17 | |||
18 | if (mem > 80 * 1024) | ||
19 | print "Warning! You need to use mem=80M or less on the kernel cmdline" | ||
20 | |||
21 | printf "You have %dkB total memory for Linux\n", mem | ||
22 | }' /proc/meminfo | ||
23 | |||
24 | # Select cmemk parameters for best fit, i.e. starting at 0x85000000 | ||
25 | modprobe cmemk phys_start=0x85000000 phys_end=0x86000000 pools=20x4096,8x131072,5x1048576,1x1429440,1x256000,1x3600000,5x829440 | ||
26 | |||
27 | # insert DSP/BIOS Link driver | ||
28 | # | ||
29 | modprobe dsplinkk | ||
30 | |||
31 | # make /dev/dsplink | ||
32 | #rm -f /dev/dsplink | ||
33 | #mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0 | ||
34 | |||
35 | # insert Local Power Manager driver | ||
36 | # | ||
37 | modprobe lpm_omap3530 | ||
diff --git a/extras/recipes-ti/codec-engine/ti-codec-engine/unloadmodules-ti-codec-engine-apps.sh b/extras/recipes-ti/codec-engine/ti-codec-engine/unloadmodules-ti-codec-engine-apps.sh new file mode 100644 index 00000000..f990d997 --- /dev/null +++ b/extras/recipes-ti/codec-engine/ti-codec-engine/unloadmodules-ti-codec-engine-apps.sh | |||
@@ -0,0 +1,12 @@ | |||
1 | # Unload modules - CODEC ENGINE - OMAP3530 | ||
2 | |||
3 | # remove lpm module | ||
4 | rmmod lpm_omap3530 | ||
5 | |||
6 | # remove DSP/BIOS Link driver | ||
7 | rmmod dsplinkk | ||
8 | #rm -f /dev/dsplink | ||
9 | |||
10 | # remove cmem module | ||
11 | rmmod cmemk | ||
12 | |||
diff --git a/extras/recipes-ti/codec-engine/ti-codec-engine_2.26.02.11.bb b/extras/recipes-ti/codec-engine/ti-codec-engine_2.26.02.11.bb new file mode 100644 index 00000000..bcb89b77 --- /dev/null +++ b/extras/recipes-ti/codec-engine/ti-codec-engine_2.26.02.11.bb | |||
@@ -0,0 +1,10 @@ | |||
1 | require ti-codec-engine.inc | ||
2 | |||
3 | LIC_FILES_CHKSUM = "file://codec_engine_${PV}_manifest.html;md5=912535f1b02ecf329a3979bf313f91e0" | ||
4 | PV = "2_26_02_11" | ||
5 | PR_append = "b" | ||
6 | |||
7 | SRC_URI += "file://bypass-GCArmv5T-used-is-sealed.patch" | ||
8 | |||
9 | SRC_URI[cetarball.md5sum] = "4f755f77119e4da19ab5cc7ae7ccfdb4" | ||
10 | SRC_URI[cetarball.sha256sum] = "17fa053719265e0901fe3c3f90c9204957c6d0f5351d6b3ba4900df58cb7300f" | ||
diff --git a/extras/recipes-ti/codec-engine/ti-codecs-omap3530/disable-c6accel.diff b/extras/recipes-ti/codec-engine/ti-codecs-omap3530/disable-c6accel.diff new file mode 100644 index 00000000..6e2ed7e4 --- /dev/null +++ b/extras/recipes-ti/codec-engine/ti-codecs-omap3530/disable-c6accel.diff | |||
@@ -0,0 +1,47 @@ | |||
1 | diff -ur a/packages/ti/sdo/server/cs/codec.cfg b/packages/ti/sdo/server/cs/codec.cfg | ||
2 | --- a/packages/ti/sdo/server/cs/codec.cfg 2011-08-07 20:08:57.000000000 +0200 | ||
3 | +++ b/packages/ti/sdo/server/cs/codec.cfg 2011-08-07 20:08:10.000000000 +0200 | ||
4 | @@ -7,7 +7,7 @@ | ||
5 | * which we'll use to initialize config params and add the codecs to | ||
6 | * the Server.algs array. | ||
7 | */ | ||
8 | - var C6ACCEL = xdc.useModule('ti.c6accel.ce.C6ACCEL'); | ||
9 | +/* var C6ACCEL = xdc.useModule('ti.c6accel.ce.C6ACCEL'); | ||
10 | |||
11 | C6ACCEL.serverFxns = "UNIVERSAL_SKEL"; | ||
12 | C6ACCEL.stubFxns = "UNIVERSAL_STUBS"; | ||
13 | @@ -17,7 +17,7 @@ | ||
14 | C6ACCEL.alg.codeSection = codeSection; | ||
15 | C6ACCEL.alg.udataSection = udataSection; | ||
16 | C6ACCEL.alg.dataSection = dataSection; | ||
17 | - | ||
18 | +*/ | ||
19 | var AACHEDEC = xdc.useModule('ti.sdo.codecs.aachedec.ce.AACHEDEC'); | ||
20 | |||
21 | AACHEDEC.serverFxns = "AUDDEC1_SKEL"; | ||
22 | @@ -151,11 +151,11 @@ | ||
23 | * algorithms (e.g. stack sizes, priorities, etc.). | ||
24 | */ | ||
25 | Server.algs = [ | ||
26 | - {name: "c6accel", mod: C6ACCEL , threadAttrs: { | ||
27 | +/* {name: "c6accel", mod: C6ACCEL , threadAttrs: { | ||
28 | stackMemId: 0, priority: Server.MINPRI + 3}, | ||
29 | groupId : 2, | ||
30 | }, | ||
31 | - | ||
32 | +*/ | ||
33 | {name: "aachedec", mod: AACHEDEC , threadAttrs: { | ||
34 | stackMemId: 0, priority: Server.MINPRI + 3}, | ||
35 | groupId : 2, | ||
36 | diff -ur a/packages/ti/sdo/server/cs/package.xs b/packages/ti/sdo/server/cs/package.xs | ||
37 | --- a/packages/ti/sdo/server/cs/package.xs 2011-08-07 20:09:31.000000000 +0200 | ||
38 | +++ b/packages/ti/sdo/server/cs/package.xs 2011-08-07 20:08:21.000000000 +0200 | ||
39 | @@ -7,7 +7,7 @@ | ||
40 | // Each codec is validated with the following call: | ||
41 | // validate_one_codec(<package name>, <module name>); | ||
42 | |||
43 | - validate_one_codec( "ti.c6accel", "C6ACCEL" ); | ||
44 | +// validate_one_codec( "ti.c6accel", "C6ACCEL" ); | ||
45 | validate_one_codec( "ti.sdo.codecs.aachedec", "AACHEDEC" ); | ||
46 | validate_one_codec( "ti.sdo.codecs.deinterlacer", "I2P" ); | ||
47 | validate_one_codec( "ti.sdo.codecs.g711dec", "G711DEC" ); | ||
diff --git a/extras/recipes-ti/codec-engine/ti-codecs-omap3530/mp3dec_cs1omap3530.patch b/extras/recipes-ti/codec-engine/ti-codecs-omap3530/mp3dec_cs1omap3530.patch new file mode 100644 index 00000000..4ed9267e --- /dev/null +++ b/extras/recipes-ti/codec-engine/ti-codecs-omap3530/mp3dec_cs1omap3530.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | diff -uNr -x .xdcenv.mak -x mp3dec cs1omap3530_1_00_01/packages/ti/sdo/server/cs/codec.cfg cs1omap3530_1_00_01_patches/packages/ti/sdo/server/cs/codec.cfg | ||
2 | --- cs1omap3530_1_00_01/packages/ti/sdo/server/cs/codec.cfg 2009-10-26 14:19:21.000000000 -0500 | ||
3 | +++ cs1omap3530_1_00_01_patches/packages/ti/sdo/server/cs/codec.cfg 2009-10-26 14:36:03.000000000 -0500 | ||
4 | @@ -92,6 +92,14 @@ | ||
5 | MPEG4ENC.alg.udataSection = "DDR2"; | ||
6 | MPEG4ENC.alg.dataSection = "DDR2"; | ||
7 | |||
8 | + var MP3DEC = xdc.useModule('ti.sdo.codecs.mp3dec.ce.MP3DEC'); | ||
9 | + | ||
10 | + // Module Config | ||
11 | + MP3DEC.alg.watermark = false; | ||
12 | + MP3DEC.alg.codeSection = "DDR2"; | ||
13 | + MP3DEC.alg.udataSection = "DDR2"; | ||
14 | + MP3DEC.alg.dataSection = "DDR2"; | ||
15 | + | ||
16 | /* | ||
17 | * The array of algorithms this server can serve up. This array also | ||
18 | * configures details about the threads which will be created to run the | ||
19 | @@ -103,6 +111,11 @@ | ||
20 | groupId : 1, | ||
21 | }, | ||
22 | |||
23 | + {name: "mp3dec", mod: MP3DEC , threadAttrs: { | ||
24 | + stackMemId: 0, priority: Server.MINPRI + 3}, | ||
25 | + groupId : 1, | ||
26 | + }, | ||
27 | + | ||
28 | {name: "g711dec", mod: G711DEC , threadAttrs: { | ||
29 | stackMemId: 0, priority: Server.MINPRI + 3}, | ||
30 | groupId : 1, | ||
31 | diff -uNr -x .xdcenv.mak -x mp3dec cs1omap3530_1_00_01/packages/ti/sdo/server/cs/package.xs cs1omap3530_1_00_01_patches/packages/ti/sdo/server/cs/package.xs | ||
32 | --- cs1omap3530_1_00_01/packages/ti/sdo/server/cs/package.xs 2009-10-26 14:19:20.000000000 -0500 | ||
33 | +++ cs1omap3530_1_00_01_patches/packages/ti/sdo/server/cs/package.xs 2009-10-26 14:53:40.000000000 -0500 | ||
34 | @@ -17,6 +17,7 @@ | ||
35 | validate_one_codec( "ti.sdo.codecs.mpeg2dec", "MPEG2DEC" ); | ||
36 | validate_one_codec( "ti.sdo.codecs.mpeg4dec", "MPEG4DEC" ); | ||
37 | validate_one_codec( "ti.sdo.codecs.mpeg4enc", "MPEG4ENC" ); | ||
38 | + validate_one_codec( "ti.sdo.codecs.mp3dec", "MP3DEC" ); | ||
39 | } | ||
40 | |||
41 | function validate_one_codec( packageName, moduleName ) { | ||
diff --git a/extras/recipes-ti/codec-engine/ti-codecs-omap3530_4.00.00.00.bb b/extras/recipes-ti/codec-engine/ti-codecs-omap3530_4.00.00.00.bb new file mode 100644 index 00000000..ea9f3890 --- /dev/null +++ b/extras/recipes-ti/codec-engine/ti-codecs-omap3530_4.00.00.00.bb | |||
@@ -0,0 +1,208 @@ | |||
1 | DESCRIPTION = "TI Codecs and Server Combo for OMAP3530" | ||
2 | SECTION = "multimedia" | ||
3 | LICENSE = "TI" | ||
4 | |||
5 | require recipes-ti/includes/ti-paths.inc | ||
6 | require recipes-ti/includes/ti-staging.inc | ||
7 | |||
8 | PR="${MACHINE_KERNEL_PR}" | ||
9 | PR_append = "a" | ||
10 | |||
11 | PV="4_00_00_00" | ||
12 | |||
13 | LIC_FILES_CHKSUM = "file://packages/ti/sdo/server/cs/docs/cs1omap3530_software_manifest.pdf;md5=84444ba7c7abe117c30f9c960d1930ec" | ||
14 | |||
15 | CODEC_SUITE_NAME="${WORKDIR}/${PN}_${PV}" | ||
16 | |||
17 | SRCREV = "8393c892b09e0ac42b19ff1531e232478c3b1a6c" | ||
18 | |||
19 | require recipes-ti/includes/ti-eula-unpack.inc | ||
20 | |||
21 | SRC_URI="http://software-dl.ti.com/dsps/dsps_public_sw/codecs/OMAP35xx//OMAP35xx_latest/omap3530_h264enc_2_01_013_production.bin;name=h264enc \ | ||
22 | http://software-dl.ti.com/dsps/dsps_public_sw/codecs/OMAP35xx//OMAP35xx_latest/omap3530_h264dec_2_01_007_production.bin;name=h264dec \ | ||
23 | http://software-dl.ti.com/dsps/dsps_public_sw/codecs/OMAP35xx//OMAP35xx_latest/omap3530_jpegenc_02_01_01_00_production.bin;name=jpegenc \ | ||
24 | http://software-dl.ti.com/dsps/dsps_public_sw/codecs/C64XPlus_Video//C64XPlus_Video_latest/c64xplus_jpegdec_02_00_01_01_production.bin;name=jpegdec \ | ||
25 | http://software-dl.ti.com/dsps/dsps_public_sw/codecs/C64XPlus_Video//C64XPlus_Video_latest/c64xplus_mpeg2dec_02_00_02_00_production.bin;name=mpeg2dec \ | ||
26 | http://software-dl.ti.com/dsps/dsps_public_sw/codecs/OMAP35xx//OMAP35xx_latest/omap3530_mpeg4enc_02_04_00_00_production.bin;name=mpeg4enc \ | ||
27 | http://software-dl.ti.com/dsps/dsps_public_sw/codecs/C64XPlus_Video//C64XPlus_Video_latest/c64xplus_mpeg4dec_02_01_00_00_production.bin;name=mpeg4dec \ | ||
28 | http://software-dl.ti.com/dsps/dsps_public_sw/codecs/C64XPlus_Audio//C64XPlus_Audio_latest/c64xplus_aachedec_01_30_03_00_production.bin;name=aachedec \ | ||
29 | http://software-dl.ti.com/dsps/dsps_public_sw/codecs/C64XPlus_Speech//C64XPlus_Speech_latest/c64xplus_g711_1_12_00_000_production.bin;name=g711 \ | ||
30 | http://software-dl.ti.com/dsps/dsps_public_sw/sdo_tii/OMAP35xx_DM37xx_C64xPLUS_Algorithms/01_00_00_07//exports/c64xplus_deinterlacer_01_00_00_07_production.bin;name=i2p \ | ||
31 | git://arago-project.org/git/projects/codec-servers.git;protocol=git \ | ||
32 | \ | ||
33 | file://disable-c6accel.diff \ | ||
34 | " | ||
35 | |||
36 | SRC_URI[h264enc.md5sum] = "4a7a4698b1db360fe103aae76127a4ec" | ||
37 | SRC_URI[h264enc.sha256sum] = "8fd970d83004bb099f51420b0eecd660b4ba9dccc87b2759d0b5a0be46f8f1a0" | ||
38 | |||
39 | SRC_URI[h264dec.md5sum] = "81980df2d9dbedc5b64789c4e5575819" | ||
40 | SRC_URI[h264dec.sha256sum] = "19d65e71ba0342670cb217e0fa6617263ff68a513e8444a8dfd5f34bd641b24f" | ||
41 | |||
42 | SRC_URI[jpegenc.md5sum] = "c2e8ad88e90c04d2de7b199517019ac8" | ||
43 | SRC_URI[jpegenc.sha256sum] = "6525e067cb5dd00cfc0b38045c44dcbed05866f8ad20188ceac630812502d473" | ||
44 | |||
45 | SRC_URI[jpegdec.md5sum] = "cf2886c3406ab41409a586e5d550918d" | ||
46 | SRC_URI[jpegdec.sha256sum] = "6b0c9f1b8f023070c6a59af690f015f84f2c7f3143235f788ddd1a4a7b229089" | ||
47 | |||
48 | SRC_URI[mpeg2dec.md5sum] = "da3d0561f3073352be43dce96ce1ea62" | ||
49 | SRC_URI[mpeg2dec.sha256sum] = "06cdb31242b8649bdd46bc07b9276de0ccd5f4e1c137d3cb79e0866c1ed04264" | ||
50 | |||
51 | SRC_URI[mpeg4enc.md5sum] = "07c36e5d03368e1326df75a1f0c4934d" | ||
52 | SRC_URI[mpeg4enc.sha256sum] = "a9566c8978f7230936053de9b1f3bfe8820ae555262ceba87243abdf60e5193f" | ||
53 | |||
54 | SRC_URI[mpeg4dec.md5sum] = "4a27cda2d5a859e6322680a4855b6b88" | ||
55 | SRC_URI[mpeg4dec.sha256sum] = "ca35db6841586fc2c22dd9c07a7f5b8557f480fa907e8a3471b660d4ada76e40" | ||
56 | |||
57 | SRC_URI[aachedec.md5sum] = "649f2e79b4950719295cfecbff2ea82b" | ||
58 | SRC_URI[aachedec.sha256sum] = "34d19e40d624ccdc1b371f9a5d6594b4793bdf3b7223ac65912d15d75320e020" | ||
59 | |||
60 | SRC_URI[g711.md5sum] = "fd8e9f939cc505dc5761705ed17a726c" | ||
61 | SRC_URI[g711.sha256sum] = "c87021e8df2a3f494f47e5bdce8a5fad04d667aa1b792fd9b3ecff634867b48d" | ||
62 | |||
63 | SRC_URI[i2p.md5sum] = "f67c04eec9ee49c7a686eecf5d54be33" | ||
64 | SRC_URI[i2p.sha256sum] = "3fbf8801f3ce2aabb6d31eb18e1e24e41ca861696b3140536f1d66adc76f0323" | ||
65 | |||
66 | |||
67 | TI_BIN_UNPK_CMDS = "Y:workdir" | ||
68 | |||
69 | S = "${CODEC_SUITE_NAME}" | ||
70 | |||
71 | DEPENDS = "ti-cgt6x ti-xdctools ti-dspbios ti-codec-engine ti-linuxutils" | ||
72 | |||
73 | #generic codec | ||
74 | DSPSUFFIX_omap3530 = "x64P" | ||
75 | |||
76 | python do_unpack () { | ||
77 | bb.build.exec_func('base_do_unpack', d) | ||
78 | |||
79 | bb.data.setVar("BINFILE", "omap3530_h264enc_2_01_013_production.bin", d) | ||
80 | bb.data.setVar("TARFILE", "omap3530_h264enc_2_01_013_production.tar", d) | ||
81 | bb.build.exec_func('ti_bin_do_unpack', d) | ||
82 | |||
83 | bb.data.setVar("BINFILE", "omap3530_h264dec_2_01_007_production.bin", d) | ||
84 | bb.data.setVar("TARFILE", "omap3530_h264dec_2_01_007_production.tar", d) | ||
85 | bb.build.exec_func('ti_bin_do_unpack', d) | ||
86 | |||
87 | bb.data.setVar("BINFILE", "omap3530_jpegenc_02_01_01_00_production.bin", d) | ||
88 | bb.data.setVar("TARFILE", "omap3530_jpegenc_02_01_01_00_production.tar", d) | ||
89 | bb.build.exec_func('ti_bin_do_unpack', d) | ||
90 | |||
91 | bb.data.setVar("BINFILE", "c64xplus_jpegdec_02_00_01_01_production.bin", d) | ||
92 | bb.data.setVar("TARFILE", "c64xplus_jpegdec_02_00_01_01_production.tar", d) | ||
93 | bb.build.exec_func('ti_bin_do_unpack', d) | ||
94 | |||
95 | bb.data.setVar("BINFILE", "c64xplus_mpeg2dec_02_00_02_00_production.bin", d) | ||
96 | bb.data.setVar("TARFILE", "c64xplus_mpeg2dec_02_00_02_00_production.tar", d) | ||
97 | bb.build.exec_func('ti_bin_do_unpack', d) | ||
98 | |||
99 | bb.data.setVar("BINFILE", "omap3530_mpeg4enc_02_04_00_00_production.bin", d) | ||
100 | bb.data.setVar("TARFILE", "omap3530_mpeg4enc_02_04_00_00_production.tar", d) | ||
101 | bb.build.exec_func('ti_bin_do_unpack', d) | ||
102 | |||
103 | bb.data.setVar("BINFILE", "c64xplus_mpeg4dec_02_01_00_00_production.bin", d) | ||
104 | bb.data.setVar("TARFILE", "c64xplus_mpeg4dec_02_01_00_00_production.tar", d) | ||
105 | bb.build.exec_func('ti_bin_do_unpack', d) | ||
106 | |||
107 | bb.data.setVar("BINFILE", "c64xplus_aachedec_01_30_03_00_production.bin", d) | ||
108 | bb.data.setVar("TARFILE", "dm6446_aachedec_01_30_03_00_production.tar", d) | ||
109 | bb.build.exec_func('ti_bin_do_unpack', d) | ||
110 | |||
111 | bb.data.setVar("BINFILE", "c64xplus_g711_1_12_00_000_production.bin", d) | ||
112 | bb.data.setVar("TARFILE", "dm6446_g711enc_1_12_00_000_production.tar", d) | ||
113 | bb.build.exec_func('ti_bin_do_unpack', d) | ||
114 | |||
115 | bb.data.setVar("BINFILE", "c64xplus_g711_1_12_00_000_production.bin", d) | ||
116 | bb.data.setVar("TARFILE", "dm6446_g711dec_1_12_00_000_production.tar", d) | ||
117 | bb.build.exec_func('ti_bin_do_unpack', d) | ||
118 | |||
119 | bb.data.setVar("BINFILE", "c64xplus_deinterlacer_01_00_00_07_production.bin", d) | ||
120 | bb.data.setVar("TARFILE", "c64xplus_deinterlacer_01_00_00_07/c64xplus_deinterlacer_01_00_00_07_production.tar", d) | ||
121 | bb.data.setVar("TI_BIN_UNPK_CMDS", "y: :q: ", d) | ||
122 | bb.build.exec_func('ti_bin_do_unpack', d) | ||
123 | |||
124 | } | ||
125 | |||
126 | addtask prepsources after do_unpack before do_patch | ||
127 | |||
128 | do_prepsources () { | ||
129 | |||
130 | mkdir -p ${CODEC_SUITE_NAME}/packages/ti/sdo/server/cs | ||
131 | cp ${WORKDIR}/git/omap3530/cs1omap3530/rel-files/* ${CODEC_SUITE_NAME}/ | ||
132 | cp ${WORKDIR}/git/omap3530/cs1omap3530/source/* ${CODEC_SUITE_NAME}/packages/ti/sdo/server/cs | ||
133 | cp -a "${WORKDIR}/git/omap3530/cs1omap3530/docs" ${CODEC_SUITE_NAME}/packages/ti/sdo/server/cs | ||
134 | |||
135 | mkdir -p ${CODEC_SUITE_NAME}/packages/ti/sdo/codecs | ||
136 | cp -a "${WORKDIR}/omap3530_h264enc_2_01_013_production/packages/ti/sdo/codecs/h264enc" "${CODEC_SUITE_NAME}/packages/ti/sdo/codecs" | ||
137 | cp -a "${WORKDIR}/omap3530_h264dec_2_01_007_production/packages/ti/sdo/codecs/h264dec" "${CODEC_SUITE_NAME}/packages/ti/sdo/codecs" | ||
138 | cp -a "${WORKDIR}/omap3530_jpegenc_02_01_01_00_production/packages/ti/sdo/codecs/jpegenc" "${CODEC_SUITE_NAME}/packages/ti/sdo/codecs" | ||
139 | cp -a "${WORKDIR}/c64xplus_jpegdec_02_00_01_01_production/packages/ti/sdo/codecs/jpegdec" "${CODEC_SUITE_NAME}/packages/ti/sdo/codecs" | ||
140 | cp -a "${WORKDIR}/c64xplus_mpeg2dec_02_00_02_00_production/packages/ti/sdo/codecs/mpeg2dec" "${CODEC_SUITE_NAME}/packages/ti/sdo/codecs" | ||
141 | cp -a "${WORKDIR}/omap3530_mpeg4enc_02_04_00_00_production/packages/ti/sdo/codecs/mpeg4enc" "${CODEC_SUITE_NAME}/packages/ti/sdo/codecs" | ||
142 | cp -a "${WORKDIR}/c64xplus_mpeg4dec_02_01_00_00_production/packages/ti/sdo/codecs/mpeg4dec" "${CODEC_SUITE_NAME}/packages/ti/sdo/codecs" | ||
143 | chmod -R +w "${WORKDIR}/dm6446_aachedec_01_30_03_00_production/packages/ti/sdo/codecs/aachedec/docs" | ||
144 | cp -a "${WORKDIR}/dm6446_aachedec_01_30_03_00_production/packages/ti/sdo/codecs/aachedec" "${CODEC_SUITE_NAME}/packages/ti/sdo/codecs" | ||
145 | cp -a "${WORKDIR}/dm6446_g711enc_1_12_00_000_production/packages/ti/sdo/codecs/g711enc" "${CODEC_SUITE_NAME}/packages/ti/sdo/codecs" | ||
146 | cp -a "${WORKDIR}/dm6446_g711dec_1_12_00_000_production/packages/ti/sdo/codecs/g711dec" "${CODEC_SUITE_NAME}/packages/ti/sdo/codecs" | ||
147 | cp -a "${WORKDIR}/c64xplus_deinterlacer_01_00_00_07_production/packages/ti/sdo/codecs/deinterlacer" "${CODEC_SUITE_NAME}/packages/ti/sdo/codecs" | ||
148 | chmod 755 -R ${CODEC_SUITE_NAME} | ||
149 | } | ||
150 | |||
151 | do_compile() { | ||
152 | |||
153 | cd "${S}" | ||
154 | |||
155 | make \ | ||
156 | CE_INSTALL_DIR=${CE_INSTALL_DIR} \ | ||
157 | FC_INSTALL_DIR=${FC_INSTALL_DIR} \ | ||
158 | LINK_INSTALL_DIR=${LINK_INSTALL_DIR} \ | ||
159 | CMEM_INSTALL_DIR=${CMEM_INSTALL_DIR} \ | ||
160 | LPM_INSTALL_DIR=${LPM_INSTALL_DIR} \ | ||
161 | BIOS_INSTALL_DIR=${BIOS_INSTALL_DIR} \ | ||
162 | CODEGEN_INSTALL_DIR=${CODEGEN_INSTALL_DIR} \ | ||
163 | XDC_INSTALL_DIR=${XDC_INSTALL_DIR} \ | ||
164 | CODEC_INSTALL_DIR="${S}" \ | ||
165 | XDCARGS="prod" \ | ||
166 | C6ACCEL_INSTALL_DIR=${C6ACCEL_INSTALL_DIR} \ | ||
167 | clean | ||
168 | |||
169 | make \ | ||
170 | CE_INSTALL_DIR=${CE_INSTALL_DIR} \ | ||
171 | FC_INSTALL_DIR=${FC_INSTALL_DIR} \ | ||
172 | LINK_INSTALL_DIR=${LINK_INSTALL_DIR} \ | ||
173 | CMEM_INSTALL_DIR=${CMEM_INSTALL_DIR} \ | ||
174 | LPM_INSTALL_DIR=${LPM_INSTALL_DIR} \ | ||
175 | BIOS_INSTALL_DIR=${BIOS_INSTALL_DIR} \ | ||
176 | CODEGEN_INSTALL_DIR=${CODEGEN_INSTALL_DIR} \ | ||
177 | XDC_INSTALL_DIR=${XDC_INSTALL_DIR} \ | ||
178 | CODEC_INSTALL_DIR="${S}" \ | ||
179 | XDCARGS="prod" \ | ||
180 | C6ACCEL_INSTALL_DIR=${C6ACCEL_INSTALL_DIR} \ | ||
181 | all | ||
182 | } | ||
183 | |||
184 | do_install() { | ||
185 | |||
186 | install -d ${D}/${installdir}/ti-codecs-server | ||
187 | cd ${S} | ||
188 | |||
189 | # Install the DSP Server Binary | ||
190 | for file in `find . -name *.${DSPSUFFIX}`; do | ||
191 | cp ${file} ${D}/${installdir}/ti-codecs-server | ||
192 | done | ||
193 | |||
194 | # Install docs (codec qualiTI test reports, server config datasheet, etc) | ||
195 | for file in `find . -name *.html`; do | ||
196 | cp ${file} ${D}/${installdir}/ti-codecs-server | ||
197 | done | ||
198 | |||
199 | install -d ${D}${CODEC_INSTALL_DIR_RECIPE} | ||
200 | cp -pPrf ${CODEC_SUITE_NAME}/* ${D}${CODEC_INSTALL_DIR_RECIPE} | ||
201 | } | ||
202 | |||
203 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
204 | |||
205 | PACKAGES += "ti-codecs-omap3530-server" | ||
206 | FILES_ti-codecs-omap3530-server = "${installdir}/ti-codecs-server/*" | ||
207 | |||
208 | |||
diff --git a/extras/recipes-ti/devtools/ti-cgt470.inc b/extras/recipes-ti/devtools/ti-cgt470.inc new file mode 100644 index 00000000..f0992aa7 --- /dev/null +++ b/extras/recipes-ti/devtools/ti-cgt470.inc | |||
@@ -0,0 +1,24 @@ | |||
1 | DESCRIPTION = "TI ARM Code Generation Tools" | ||
2 | HOMEPAGE = "https://www-a.ti.com/downloads/sds_support/CodeGenerationTools.htm" | ||
3 | SECTION = "devel" | ||
4 | LICENSE = "TI" | ||
5 | |||
6 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=62f46f1125a152a2e213b414db7ac600" | ||
7 | |||
8 | require ../includes/ti-paths.inc | ||
9 | require ../includes/ti-staging.inc | ||
10 | require ../includes/ti-eula-unpack.inc | ||
11 | |||
12 | S = "${WORKDIR}/cgt470_${PV}" | ||
13 | |||
14 | SRC_URI = "http://install.source.dir.local/ti_cgt_tms470_${PVwithdots}_setup_linux_x86.bin;name=cgt470bin" | ||
15 | |||
16 | BINFILE="ti_cgt_tms470_${PVwithdots}_setup_linux_x86.bin" | ||
17 | TI_BIN_UNPK_CMDS="Y:qY:workdir: : " | ||
18 | TI_BIN_UNPK_WDEXT="/cgt470_${PV}" | ||
19 | |||
20 | do_install() { | ||
21 | install -d ${D}${CODEGEN_ARM_INSTALL_DIR_RECIPE} | ||
22 | cp -pPrf ${S}/* ${D}${CODEGEN_ARM_INSTALL_DIR_RECIPE} | ||
23 | } | ||
24 | |||
diff --git a/extras/recipes-ti/devtools/ti-cgt470_4.6.6.bb b/extras/recipes-ti/devtools/ti-cgt470_4.6.6.bb new file mode 100644 index 00000000..6ff2cc48 --- /dev/null +++ b/extras/recipes-ti/devtools/ti-cgt470_4.6.6.bb | |||
@@ -0,0 +1,8 @@ | |||
1 | require ti-cgt470.inc | ||
2 | |||
3 | PV = "4_6_6" | ||
4 | PVwithdots = "4.6.6" | ||
5 | |||
6 | SRC_URI[cgt470bin.md5sum] = "29a316dc6b8c8c3a53e0d6c956acb62b" | ||
7 | SRC_URI[cgt470bin.sha256sum] = "a17bc7139f450672503c932ef53b00c425522890e031b4a7c9135fdf90815740" | ||
8 | |||
diff --git a/extras/recipes-ti/devtools/ti-cgt6x.inc b/extras/recipes-ti/devtools/ti-cgt6x.inc new file mode 100644 index 00000000..1d00a553 --- /dev/null +++ b/extras/recipes-ti/devtools/ti-cgt6x.inc | |||
@@ -0,0 +1,24 @@ | |||
1 | DESCRIPTION = "TI DSP Code Generation Tools" | ||
2 | HOMEPAGE = "https://www-a.ti.com/downloads/sds_support/TICodegenerationTools/download.htm" | ||
3 | SECTION = "devel" | ||
4 | LICENSE = "TI" | ||
5 | |||
6 | require ../includes/ti-paths.inc | ||
7 | require ../includes/ti-staging.inc | ||
8 | require ../includes/ti-eula-unpack.inc | ||
9 | |||
10 | PR = "r4" | ||
11 | |||
12 | S = "${WORKDIR}/cgt6x_${PV}" | ||
13 | |||
14 | SRC_URI = "http://install.source.dir.local/ti_cgt_c6000_${PVwithdots}_setup_linux_x86.bin;name=cgt6xbin" | ||
15 | |||
16 | BINFILE="ti_cgt_c6000_${PVwithdots}_setup_linux_x86.bin" | ||
17 | TI_BIN_UNPK_CMDS="Y:qY:workdir: : " | ||
18 | TI_BIN_UNPK_WDEXT="/cgt6x_${PV}" | ||
19 | |||
20 | do_install() { | ||
21 | install -d ${D}${CODEGEN_INSTALL_DIR_RECIPE} | ||
22 | cp -pPrf ${S}/* ${D}${CODEGEN_INSTALL_DIR_RECIPE} | ||
23 | } | ||
24 | |||
diff --git a/extras/recipes-ti/devtools/ti-cgt6x_6.1.20.bb b/extras/recipes-ti/devtools/ti-cgt6x_6.1.20.bb new file mode 100644 index 00000000..1d6609c8 --- /dev/null +++ b/extras/recipes-ti/devtools/ti-cgt6x_6.1.20.bb | |||
@@ -0,0 +1,11 @@ | |||
1 | require ti-cgt6x.inc | ||
2 | |||
3 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=62f46f1125a152a2e213b414db7ac600" | ||
4 | |||
5 | PE = "1" | ||
6 | PV = "6_1_20" | ||
7 | PVwithdots = "6.1.20" | ||
8 | |||
9 | SRC_URI[cgt6xbin.md5sum] = "39485ea8211960de0a958ab27106ab9b" | ||
10 | SRC_URI[cgt6xbin.sha256sum] = "a020142011c8160e24f6386f7696ecfbfe02dab2a6c83af74ce6b67eb1da9900" | ||
11 | |||
diff --git a/extras/recipes-ti/devtools/ti-cgt6x_7.2.7.bb b/extras/recipes-ti/devtools/ti-cgt6x_7.2.7.bb new file mode 100644 index 00000000..aab1b96c --- /dev/null +++ b/extras/recipes-ti/devtools/ti-cgt6x_7.2.7.bb | |||
@@ -0,0 +1,11 @@ | |||
1 | require ti-cgt6x.inc | ||
2 | |||
3 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=62f46f1125a152a2e213b414db7ac600" | ||
4 | |||
5 | PE = "1" | ||
6 | PV = "7_2_7" | ||
7 | PVwithdots = "7.2.7" | ||
8 | |||
9 | SRC_URI[cgt6xbin.md5sum] = "71a0768a541fdebd9c35d44301019d1d" | ||
10 | SRC_URI[cgt6xbin.sha256sum] = "211477f0142d603975544abe3c45cc3b77a3b38038158676c60812806378738b" | ||
11 | |||
diff --git a/extras/recipes-ti/devtools/ti-xdctools.inc b/extras/recipes-ti/devtools/ti-xdctools.inc new file mode 100644 index 00000000..547a5554 --- /dev/null +++ b/extras/recipes-ti/devtools/ti-xdctools.inc | |||
@@ -0,0 +1,62 @@ | |||
1 | DESCRIPTION = "TI XDCtools (RTSC - Real Time Software Components - http://rtsc.eclipse.org)" | ||
2 | HOMEPAGE = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/rtsc" | ||
3 | SECTION = "devel" | ||
4 | LICENSE = "BSD & GPLv2" | ||
5 | |||
6 | require ../includes/ti-paths.inc | ||
7 | require ../includes/ti-staging.inc | ||
8 | require ../includes/ti-eula-unpack.inc | ||
9 | |||
10 | S = "${WORKDIR}/xdctools_${PV}" | ||
11 | |||
12 | SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/rtsc/${PV}/exports/xdctools_setuplinux_${PV}.bin;name=xdcbin" | ||
13 | |||
14 | BINFILE="xdctools_setuplinux_${PV}.bin" | ||
15 | TI_BIN_UNPK_CMDS="Y:workdir:Y" | ||
16 | TI_BIN_UNPK_WDEXT="/ti" | ||
17 | |||
18 | do_install() { | ||
19 | install -d ${D}${XDC_INSTALL_DIR_RECIPE} | ||
20 | cp -pPrf ${S}/* ${D}${XDC_INSTALL_DIR_RECIPE} | ||
21 | } | ||
22 | |||
23 | # Prevent internal libs from getting picked up | ||
24 | PRIVATE_LIBS = " \ | ||
25 | libncdb.so \ | ||
26 | libcdb.so \ | ||
27 | libjavaplugin_oji.so \ | ||
28 | libjavaplugin_jni.so \ | ||
29 | libjsound.so \ | ||
30 | libinstrument.so \ | ||
31 | libjawt.so \ | ||
32 | libzip.so \ | ||
33 | libjava_crw_demo.so \ | ||
34 | libjavaplugin_nscp_gcc29.so \ | ||
35 | libhprof.so \ | ||
36 | libcmm.so \ | ||
37 | libjdwp.so \ | ||
38 | libmlib_image.so \ | ||
39 | libjpeg.so \ | ||
40 | libverify.so \ | ||
41 | libjavaplugin_nscp.so \ | ||
42 | libmanagement.so \ | ||
43 | libunpack.so \ | ||
44 | librmi.so \ | ||
45 | libJdbcOdbc.so \ | ||
46 | libawt.so \ | ||
47 | libnet.so \ | ||
48 | libjaas_unix.so \ | ||
49 | libnio.so \ | ||
50 | libdcpr.so \ | ||
51 | libioser12.so \ | ||
52 | libjsoundalsa.so \ | ||
53 | libjava.so \ | ||
54 | libfontmanager.so \ | ||
55 | libdt_socket.so \ | ||
56 | libmawt.so \ | ||
57 | libjvm.so \ | ||
58 | libhpi.so \ | ||
59 | lib.so \ | ||
60 | libcairo.so.2 \ | ||
61 | " | ||
62 | |||
diff --git a/extras/recipes-ti/devtools/ti-xdctools/arm-linker-hack.diff b/extras/recipes-ti/devtools/ti-xdctools/arm-linker-hack.diff new file mode 100644 index 00000000..26debf8f --- /dev/null +++ b/extras/recipes-ti/devtools/ti-xdctools/arm-linker-hack.diff | |||
@@ -0,0 +1,19 @@ | |||
1 | --- a/packages/gnu/targets/arm/linkcmd.xdt 2010-12-30 19:33:53.000000000 +0100 | ||
2 | +++ b/packages/gnu/targets/arm/linkcmd.xdt 2010-12-30 19:42:55.000000000 +0100 | ||
3 | @@ -40,12 +40,13 @@ | ||
4 | |||
5 | %if ("BINVERS" in prog.build.target) { | ||
6 | % var _utils = xdc.loadCapsule("gnu/targets/linkUtils.xs"); | ||
7 | +% if (prog.build.target.GCCVERS < "4.3.3") { | ||
8 | SECTIONS { | ||
9 | `_utils.genSections(prog)` | ||
10 | } | ||
11 | - | ||
12 | -% if (!prog.build.target.noStdLinkScript | ||
13 | -% && prog.build.target.BINVERS >= "2.19") { | ||
14 | +% } | ||
15 | +% if (prog.build.target.noStdLinkScript | ||
16 | +% && prog.build.target.BINVERS >= "2.19") { | ||
17 | INSERT BEFORE .gnu.attributes | ||
18 | % } | ||
19 | |||
diff --git a/extras/recipes-ti/devtools/ti-xdctools/fix-hardcoded-paths.diff b/extras/recipes-ti/devtools/ti-xdctools/fix-hardcoded-paths.diff new file mode 100644 index 00000000..36142c47 --- /dev/null +++ b/extras/recipes-ti/devtools/ti-xdctools/fix-hardcoded-paths.diff | |||
@@ -0,0 +1,21 @@ | |||
1 | diff -ur a/packages/gnu/targets/ITarget.xs b/packages/gnu/targets/ITarget.xs | ||
2 | --- a/packages/gnu/targets/ITarget.xs 2011-08-06 13:24:44.000000000 +0200 | ||
3 | +++ b/packages/gnu/targets/ITarget.xs 2011-08-06 13:23:37.000000000 +0200 | ||
4 | @@ -251,7 +251,7 @@ | ||
5 | |||
6 | function askLd(target) | ||
7 | { | ||
8 | - var ldCmd = target.rootDir + "/" + target.GCCTARG + "/bin/ld"; | ||
9 | + var ldCmd = target.rootDir + "/" + target.GCCTARG + "-ld"; | ||
10 | /* If the ld executable cannot be found, and the prefix is not used, | ||
11 | * it's probably a misspelled directory path. | ||
12 | */ | ||
13 | @@ -486,7 +486,7 @@ | ||
14 | tool2cmd["link"] = cmd; | ||
15 | |||
16 | /* define the ar command template */ | ||
17 | - cmd = prefix + target.ar.cmd | ||
18 | + cmd = prefix + target.GCCTARG + "-ar" | ||
19 | + " $(AROPTS_P) " + target.ar.opts | ||
20 | + " $@ $(AROPTS_S) $(aropts) $(files)"; | ||
21 | tool2cmd["ar"] = cmd; | ||
diff --git a/extras/recipes-ti/devtools/ti-xdctools_3.23.00.32.bb b/extras/recipes-ti/devtools/ti-xdctools_3.23.00.32.bb new file mode 100644 index 00000000..b2db76c9 --- /dev/null +++ b/extras/recipes-ti/devtools/ti-xdctools_3.23.00.32.bb | |||
@@ -0,0 +1,11 @@ | |||
1 | require ti-xdctools.inc | ||
2 | |||
3 | PV = "3_23_00_32" | ||
4 | LIC_FILES_CHKSUM = "file://docs/license/xdc/shelf/package.html;md5=49b2dfbf48860a0da844709c3ce63a9c" | ||
5 | |||
6 | SRC_URI += "file://fix-hardcoded-paths.diff" | ||
7 | |||
8 | SRC_URI[xdcbin.md5sum] = "263aa11795670265551d36a8c77ad27d" | ||
9 | SRC_URI[xdcbin.sha256sum] = "880b4e263850f2a3c0ea7352c5b6e0a86692361e26634c3b70dddc42c71231a5" | ||
10 | |||
11 | S = "${WORKDIR}/ti/xdctools_${PV}" | ||
diff --git a/extras/recipes-ti/dmai/ti-dmai.inc b/extras/recipes-ti/dmai/ti-dmai.inc new file mode 100644 index 00000000..23481b7f --- /dev/null +++ b/extras/recipes-ti/dmai/ti-dmai.inc | |||
@@ -0,0 +1,161 @@ | |||
1 | DESCRIPTION = "Davinci Multimedia Application Interface (DMAI) for TI ARM/DSP processors" | ||
2 | HOMEPAGE = "https://gforge.ti.com/gf/project/dmai/" | ||
3 | SECTION = "multimedia" | ||
4 | LICENSE = "BSD" | ||
5 | |||
6 | # TODO :: | ||
7 | |||
8 | require recipes-ti/includes/ti-paths.inc | ||
9 | require recipes-ti/includes/ti-staging.inc | ||
10 | |||
11 | PROVIDES += "ti-dmai-apps" | ||
12 | |||
13 | PE = "1" | ||
14 | |||
15 | SRCREV ?= "UNDEFINED_SRCREV" | ||
16 | DMAIBRANCH ?= "UNDEFINED_DMAIBRANCH" | ||
17 | |||
18 | S = "${WORKDIR}/${DMAIBRANCH}/davinci_multimedia_application_interface/dmai_${PV}/dmai" | ||
19 | |||
20 | SRC_URI = "svn://gforge.ti.com/svn/dmai/;module=${DMAIBRANCH};proto=https;user=anonymous;pswd='' \ | ||
21 | file://loadmodules-ti-dmai-dm6446_al.sh \ | ||
22 | file://loadmodules-ti-dmai-dm6467_al.sh \ | ||
23 | file://loadmodules-ti-dmai-o3530_al.sh \ | ||
24 | file://loadmodules-ti-dmai-dm355_al.sh \ | ||
25 | file://loadmodules-ti-dmai-dm365_al.sh \ | ||
26 | file://loadmodules-ti-dmai-ol137_al.sh \ | ||
27 | file://loadmodules-ti-dmai-ol138_al.sh \ | ||
28 | file://doxygen_templates.tar.gz \ | ||
29 | file://arago-tdox \ | ||
30 | " | ||
31 | |||
32 | DEPENDS = "virtual/kernel alsa-lib ti-framework-components ti-codec-engine ti-xdctools" | ||
33 | |||
34 | DEPENDS_append_dm6446 = " ti-codecs-dm6446 ti-dspbios ti-cgt6x ti-linuxutils" | ||
35 | DEPENDS_append_dm6467 = " ti-codecs-dm6467 ti-dspbios ti-cgt6x ti-linuxutils" | ||
36 | DEPENDS_append_omap3 = " ti-codecs-omap3530 ti-dspbios ti-cgt6x ti-linuxutils" | ||
37 | DEPENDS_append_dm355 = " ti-codecs-dm355" | ||
38 | DEPENDS_append_dm365 = " ti-codecs-dm365" | ||
39 | DEPENDS_append_omapl137 = " ti-codecs-omapl137 ti-dspbios ti-cgt6x ti-linuxutils" | ||
40 | DEPENDS_append_omapl138 = " ti-codecs-omapl138 ti-dspbios ti-cgt6x ti-linuxutils" | ||
41 | |||
42 | # Define DMAI build time variables | ||
43 | DMAIPLATFORM_dm6446 = "dm6446_al" | ||
44 | DMAIPLATFORM_dm6467 = "dm6467_al" | ||
45 | DMAIPLATFORM_omap3 = "o3530_al" | ||
46 | DMAIPLATFORM_dm355 = "dm355_al" | ||
47 | DMAIPLATFORM_dm365 = "dm365_al" | ||
48 | DMAIPLATFORM_omapl137 = "ol137_al" | ||
49 | DMAIPLATFORM_omapl138 = "ol138_al" | ||
50 | DMAIPLATFORM ?= "UNDEFINED_DMAIPLATFORM" | ||
51 | |||
52 | # Need to set this for other platforms as well | ||
53 | #GPPOS_dm355 = "LINUX_GCC" | ||
54 | #GPPOS_dm365 = "LINUX_GCC" | ||
55 | #GPPOS ?= "UNDEFINEDGPPOS" | ||
56 | |||
57 | # Need to re-define this for OMAP-L137/L138 | ||
58 | DSPSUFFIX_omapl137 = "x64P" | ||
59 | DSPSUFFIX_omapl138 = "x64P" | ||
60 | DSPSUFFIX ?= "x64p" | ||
61 | |||
62 | # This is needed for dm355/dm365 targets in order to find ti.sdo.codecs.g711 | ||
63 | # TODO :: review - should we just pass this in do_compile? | ||
64 | USER_XDC_PATH = "${CE_INSTALL_DIR}/examples" | ||
65 | |||
66 | PARALLEL_MAKE = "" | ||
67 | |||
68 | do_prepsources() { | ||
69 | # run the release steps - this will delete .svn file and run doxygen to | ||
70 | # generate proper documentation of the source etc. | ||
71 | find ${WORKDIR}/${DMAIBRANCH} -name .svn -type d | xargs rm -rf | ||
72 | cp -pPrf ${WORKDIR}/doxygen_templates ${WORKDIR}/${DMAIBRANCH}/davinci_multimedia_application_interface | ||
73 | cp -pPrf ${WORKDIR}/arago-tdox ${WORKDIR}/${DMAIBRANCH}/davinci_multimedia_application_interface/tdox | ||
74 | chmod a+x ${WORKDIR}/${DMAIBRANCH}/davinci_multimedia_application_interface/release.sh | ||
75 | chmod a+x ${WORKDIR}/${DMAIBRANCH}/davinci_multimedia_application_interface/tdox | ||
76 | sed -i 's|tdox|./tdox|g' ${WORKDIR}/${DMAIBRANCH}/davinci_multimedia_application_interface/release.sh | ||
77 | (cd ${WORKDIR}/${DMAIBRANCH}/davinci_multimedia_application_interface; ./release.sh ${PV}) | ||
78 | } | ||
79 | |||
80 | # run prepare sources before do_patch to ensure that sourceipk picks the right sources. | ||
81 | addtask prepsources after do_unpack before do_patch | ||
82 | |||
83 | do_compile () { | ||
84 | # Recent kernel headers warn against inclusion from userspace | ||
85 | for makefile in $(find ${S} -name "Makefile") ; do | ||
86 | sed -i -e s:-Werror::g $makefile | ||
87 | done | ||
88 | |||
89 | # Angstrom 2008 breaks with -Wl,-T, while angstrom 2010 needs it | ||
90 | if [ $(${TARGET_PREFIX}gcc -dumpversion | awk -F. '{print $2}') -gt 3 ] ; then | ||
91 | # Fix up linkerscripts, recent toolchains need -T to prepend the default script to the custom one | ||
92 | for appmakefile in $(find ${S} -name "Makefile.app") ; do | ||
93 | sed -i -e 's: $(XDC_CFG)/linker.cmd: -Wl,-T,$(XDC_CFG)/linker.cmd:g' $appmakefile | ||
94 | done | ||
95 | fi | ||
96 | |||
97 | # TODO :: Why do we do this? | ||
98 | unset DMAI_INSTALL_DIR | ||
99 | cd ${S} | ||
100 | |||
101 | make XDC_INSTALL_DIR="${XDC_INSTALL_DIR}" PLATFORM="${DMAIPLATFORM}" clean | ||
102 | |||
103 | for dir in ${S}; do | ||
104 | cd $dir | ||
105 | # TODO: Figure out how to pass the alsa require location, currently | ||
106 | # LINUXLIBS_INSTALL_DIR is hard-coded for armv5te | ||
107 | make \ | ||
108 | CE_INSTALL_DIR="${CE_INSTALL_DIR}" \ | ||
109 | CODEC_INSTALL_DIR="${CODEC_INSTALL_DIR}" \ | ||
110 | FC_INSTALL_DIR="${FC_INSTALL_DIR}" \ | ||
111 | LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \ | ||
112 | XDC_INSTALL_DIR="${XDC_INSTALL_DIR}" \ | ||
113 | CODEGEN_INSTALL_DIR="${CODEGEN_INSTALL_DIR}" \ | ||
114 | BIOS_INSTALL_DIR="${BIOS_INSTALL_DIR}"\ | ||
115 | LINUXLIBS_INSTALL_DIR="${STAGING_DIR_TARGET}/usr" \ | ||
116 | USER_XDC_PATH="${USER_XDC_PATH}" \ | ||
117 | CROSS_COMPILE="${TOOLCHAIN_PATH}/${TARGET_PREFIX}" \ | ||
118 | CSTOOL_DIR="${TOOLCHAIN_PATH}" \ | ||
119 | VERBOSE="true" \ | ||
120 | XDAIS_INSTALL_DIR="${XDAIS_INSTALL_DIR}" \ | ||
121 | LINK_INSTALL_DIR="${LINK_INSTALL_DIR}" \ | ||
122 | CMEM_INSTALL_DIR="${CMEM_INSTALL_DIR}" \ | ||
123 | LPM_INSTALL_DIR="${LPM_INSTALL_DIR}" \ | ||
124 | C6ACCEL_INSTALL_DIR=${C6ACCEL_INSTALL_DIR} \ | ||
125 | MVTOOL_PREFIX="${TARGET_PREFIX}" \ | ||
126 | PLATFORM="${DMAIPLATFORM}" | ||
127 | done | ||
128 | } | ||
129 | |||
130 | do_install () { | ||
131 | |||
132 | # TODO :: Why do we do this? | ||
133 | unset DMAI_INSTALL_DIR | ||
134 | |||
135 | install -d ${D}/${installdir}/ti-dmai-apps | ||
136 | cd ${S} | ||
137 | make PLATFORM="${DMAIPLATFORM}" EXEC_DIR=${D}/${installdir}/ti-dmai-apps install | ||
138 | install -m 0755 ${WORKDIR}/loadmodules-ti-dmai-${DMAIPLATFORM}.sh ${D}/${installdir}/ti-dmai-apps/loadmodules.sh | ||
139 | |||
140 | install -d ${D}${DMAI_INSTALL_DIR_RECIPE} | ||
141 | cp -pPrf ${S}/* ${D}${DMAI_INSTALL_DIR_RECIPE} | ||
142 | } | ||
143 | |||
144 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
145 | |||
146 | PACKAGES += "ti-dmai-apps" | ||
147 | FILES_ti-dmai-apps = "${installdir}/ti-dmai-apps/*" | ||
148 | INSANE_SKIP_ti-dmai-apps = "1" | ||
149 | |||
150 | RDEPENDS_ti-dmai-apps_dm6446 += "ti-codecs-dm6446-server ti-cmem-module ti-dsplink-module" | ||
151 | RDEPENDS_ti-dmai-apps_dm6467 += "ti-codecs-dm6467 ti-cmem-module ti-dsplink-module" | ||
152 | RDEPENDS_ti-dmai-apps_omap3 += "ti-codecs-omap3530-server ti-cmem-module ti-dsplink-module ti-lpm-module ti-sdma-module" | ||
153 | RDEPENDS_ti-dmai-apps_dm355 += "ti-codecs-dm355 ti-cmem-module ti-dm355mm-module" | ||
154 | RDEPENDS_ti-dmai-apps_dm365 += "ti-codecs-dm365 ti-cmem-module ti-dm365mm-module ti-edma-module ti-irq-module" | ||
155 | RDEPENDS_ti-dmai-apps_omapl137 += "ti-codecs-omapl137-server ti-cmem-module ti-dsplink-module" | ||
156 | RDEPENDS_ti-dmai-apps_omapl138 += "ti-codecs-omapl138-server ti-cmem-module ti-dsplink-module" | ||
157 | |||
158 | pkg_postinst_ti-dmai-apps () { | ||
159 | ln -sf ${installdir}/ti-codecs-server/*.${DSPSUFFIX} ${installdir}/ti-dmai-apps/ | ||
160 | } | ||
161 | |||
diff --git a/extras/recipes-ti/dmai/ti-dmai/arago-tdox b/extras/recipes-ti/dmai/ti-dmai/arago-tdox new file mode 100644 index 00000000..81538cf3 --- /dev/null +++ b/extras/recipes-ti/dmai/ti-dmai/arago-tdox | |||
@@ -0,0 +1,210 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # | ||
4 | # This script sets a series of environment variable that are referenced | ||
5 | # in a doxygen configuration file. The values passed in here are simply | ||
6 | # plugged into the file locations and doxygen proceeds normaly. | ||
7 | # | ||
8 | # template location is ${VENDORS}/opensource/doxygen/templates/<version> | ||
9 | # | ||
10 | # | ||
11 | |||
12 | # Revision history | ||
13 | #! 02 Jul 2009 cring: Added cmd line args for doxygendir (-x) and template (-t) | ||
14 | #! 13 Jul 2006 ada: New template smaller pdf generation | ||
15 | #! 16 May 2006 ada: Added -p file to pdf for space in project names | ||
16 | #! 08 May 2006 ada: Added pdf generation to tdox (Solaris/Linux only). | ||
17 | #! 23 Jan 2006 ada: Overide file to change default doxyfile behaivior | ||
18 | #! 19 Jan 2006 ada: 1093, ENUM_VALUES_PER_LINE set to 1, ref doxyfile via vers | ||
19 | #! 05 Oct 2005 ada: 933, doxyfile in tools, removed win and unix vendors path | ||
20 | #! 24 Aug 2005 ada: Added 897 changes, optional css c or jave optimization | ||
21 | #! 18 Aug 2005 ada: inital version from AR 887 | ||
22 | |||
23 | # Set these defaults here as the usage statement uses them | ||
24 | TDOX_TEMPLATEDIR=${TOOLS}/default/doxygen_templates | ||
25 | DOXYGEN_EXECUTABLE=doxygen | ||
26 | |||
27 | function usage | ||
28 | { | ||
29 | OPTIONS="`basename $0` code_location out_doc_location [-x doxygen_exe ] [-t tdox_templatedir] [-n project_name] [-v version] [-f FILE_PATTERNS ] [-s strip_dir] [-c css location] [-e exclude dirs] [-b enabled sections] [-m generate chm] [-p pdf_file] [-o override doxyfile] [-j]" | ||
30 | echo "`basename $1` $OPTIONS" | ||
31 | echo "Where: " | ||
32 | echo "\tcode_location: Top of tree(s) to search for code (required as 1st param)" | ||
33 | echo "\tout_doc_location: Output location for generated files (required as 2nd param)" | ||
34 | echo "\t[-n project_name]: title of generated documentation (defaults to Project)" | ||
35 | echo "\t[-x doxygen_exe]: location of doxygen executable (defaults to $DOXYGEN_EXECUTABLE)" | ||
36 | echo "\t[-t tdox_templatedir]: location of tdox templates (defaults to $TDOX_TEMPLATEDIR)" | ||
37 | echo "\t[-v version]: version number or string (defaults to 1.0)" | ||
38 | echo "\t[-f FILE_PATTERNS]: Optional list of files to document (defaults to all)" | ||
39 | echo "\t[-s strip_dirs]: Remove directory prefix from generated files (defaults to not remove)" | ||
40 | echo "\t[-c path_to_css]: Path to a user suplied CSS style sheet" | ||
41 | echo "\t[-e exclude dirs]: List of directories to exclude" | ||
42 | echo "\t[-b enabled sections]: List of sections to enable" | ||
43 | echo "\t[-m generate chm]: chm file name (required)" | ||
44 | echo "\t[-p generate pdf <file>]: create <file>.pdf in html/pdf (Linux only)" | ||
45 | echo "\t[-o override doxyfile]: file (advanced) Overide any doxyfile default" | ||
46 | echo "\t[-j]: Optimize for Java (Generate class files) defaults to C" | ||
47 | echo "\t[-r]: Call rshd to windows for chm generation (defaults to wine)" | ||
48 | echo | ||
49 | exit | ||
50 | } | ||
51 | |||
52 | function optimizeForJava | ||
53 | { | ||
54 | DOX_OPTIMIZE_OUTPUT_JAVA="YES" | ||
55 | DOX_OPTIMIZE_OUTPUT_FOR_C="NO" | ||
56 | } | ||
57 | |||
58 | if [ "$#" -lt 2 ]; then | ||
59 | echo "Invalid number of parameters" | ||
60 | usage $0 | ||
61 | fi | ||
62 | |||
63 | # get the required parameters then shift for the getopts parameters | ||
64 | export DOX_INPUT="$1" | ||
65 | shift | ||
66 | export DOX_OUTPUT_DIRECTORY="$1" | ||
67 | shift | ||
68 | |||
69 | #set the global defaults | ||
70 | DOX_QUIET="YES" | ||
71 | DOX_OPTIMIZE_OUTPUT_JAVA="NO" | ||
72 | DOX_OPTIMIZE_OUTPUT_FOR_C="YES" | ||
73 | DOX_CHM_FILE= | ||
74 | DOX_GENERATE_HTMLHELP="NO" | ||
75 | OVERRIDE_FILE="" | ||
76 | PDF="" | ||
77 | |||
78 | # Process the rest of the arguments as getopts | ||
79 | # parameters | ||
80 | while getopts b:c:e:f:m:n:o:p:s:t:v:x:dhjr arg | ||
81 | do | ||
82 | case $arg in | ||
83 | b) DOX_ENABLED_SECTIONS=${OPTARG};; | ||
84 | c) DOX_HTML_STYLESHEET=${OPTARG};; | ||
85 | d) DEBUG=1;; | ||
86 | e) DOX_EXCLUDE=${OPTARG};; | ||
87 | f) DOX_FILE_PATTERNS=${OPTARG};; | ||
88 | h) usage;exit 0;; | ||
89 | j) optimizeForJava;; | ||
90 | r) USERSHD=1;; | ||
91 | m) DOX_CHM_FILE=${OPTARG};DOX_GENERATE_HTMLHELP="YES";; | ||
92 | n) DOX_PROJECT_NAME=${OPTARG};; | ||
93 | s) DOX_STRIP_FROM_PATH=${OPTARG};; | ||
94 | t) TDOX_TEMPLATEDIR=${OPTARG};; | ||
95 | v) DOX_PROJECT_NUMBER=${OPTARG};; | ||
96 | x) DOXYGEN_EXECUTABLE=${OPTARG};; | ||
97 | o) OVERRIDE_FILE=${OPTARG};; | ||
98 | p) PDF=${OPTARG};; | ||
99 | \?) usage | ||
100 | exit 2;; | ||
101 | esac | ||
102 | done | ||
103 | |||
104 | if [ "$DEBUG" = "1" ]; then | ||
105 | DOX_QUIET="NO" | ||
106 | set -x | ||
107 | fi | ||
108 | |||
109 | if [ "$DOX_PROJECT_NAME" = "" ]; then | ||
110 | DOX_PROJECT_NAME="Project" | ||
111 | fi | ||
112 | |||
113 | if [ "$DOX_PROJECT_NUMBER" = "" ]; then | ||
114 | DOX_PROJECT_NUMBER="1.0" | ||
115 | fi | ||
116 | |||
117 | if [ "$DOX_FILE_PATTERNS" = "" ]; then | ||
118 | DOX_FILE_PATTERNS="*.c \ | ||
119 | *.cc \ | ||
120 | *.cxx \ | ||
121 | *.cpp \ | ||
122 | *.c++ \ | ||
123 | *.d \ | ||
124 | *.java \ | ||
125 | *.ii \ | ||
126 | *.ixx \ | ||
127 | *.ipp \ | ||
128 | *.i++ \ | ||
129 | *.inl \ | ||
130 | *.h \ | ||
131 | *.hh \ | ||
132 | *.hxx \ | ||
133 | *.hpp \ | ||
134 | *.h++ \ | ||
135 | *.idl \ | ||
136 | *.odl \ | ||
137 | *.cs \ | ||
138 | *.php \ | ||
139 | *.php3 \ | ||
140 | *.inc \ | ||
141 | *.m \ | ||
142 | *.mm \ | ||
143 | *.dox" | ||
144 | fi | ||
145 | |||
146 | export DOX_INPUT | ||
147 | export DOX_OUTPUT_DIRECTORY | ||
148 | export DOX_PROJECT_NAME | ||
149 | export DOX_PROJECT_NUMBER | ||
150 | export DOX_FILE_PATTERNS | ||
151 | export DOX_STRIP_FROM_PATH | ||
152 | export DOX_QUIET | ||
153 | export DOX_HTML_STYLESHEET | ||
154 | export DOX_OPTIMIZE_OUTPUT_FOR_C | ||
155 | export DOX_OPTIMIZE_OUTPUT_JAVA | ||
156 | export DOX_EXCLUDE | ||
157 | export DOX_ENABLED_SECTIONS | ||
158 | export DOX_CHM_FILE | ||
159 | export DOX_GENERATE_HTMLHELP | ||
160 | export TDOX_TEMPLATEDIR | ||
161 | |||
162 | |||
163 | # Make sure the dir exists | ||
164 | mkdir -p $DOX_OUTPUT_DIRECTORY | ||
165 | |||
166 | # Create temp file copy of doxyfile and append overrides to the end of the file | ||
167 | cp ${TDOX_TEMPLATEDIR}/doxyfile /tmp/doxyfile$$ | ||
168 | |||
169 | chmod +w /tmp/doxyfile$$ | ||
170 | if [ "$OVERRIDE_FILE" != "" ]; then | ||
171 | cat $OVERRIDE_FILE >> /tmp/doxyfile$$ | ||
172 | fi | ||
173 | |||
174 | # Run doxygen and clean up temp file | ||
175 | ${DOXYGEN_EXECUTABLE} /tmp/doxyfile$$ | ||
176 | rm -f /tmp/doxyfile$$ | ||
177 | |||
178 | # Copy the TI banner gifs to the html directory. | ||
179 | cp -p ${TDOX_TEMPLATEDIR}/*gif $DOX_OUTPUT_DIRECTORY/html | ||
180 | |||
181 | # Generate PDF files | ||
182 | if [ "$PDF" != "" ]; then | ||
183 | if [ "$BUILD_HOST_OS" = "Linux" ]; then | ||
184 | rm -rf $DOX_OUTPUT_DIRECTORY/html/pdf | ||
185 | mkdir -p $DOX_OUTPUT_DIRECTORY/html/pdf | ||
186 | cwd=`pwd` | ||
187 | cd $DOX_OUTPUT_DIRECTORY/latex | ||
188 | latex refman.tex | ||
189 | makeindex refman.idx | ||
190 | latex refman.tex | ||
191 | latex_count=5 | ||
192 | while egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ] | ||
193 | do | ||
194 | latex refman.tex | ||
195 | latex_count=`expr $$latex_count - 1` | ||
196 | done | ||
197 | dvips -o refman.ps refman.dvi | ||
198 | ps2pdf refman.ps refman.pdf | ||
199 | cd $cwd | ||
200 | mv $DOX_OUTPUT_DIRECTORY/latex/refman.pdf $DOX_OUTPUT_DIRECTORY/html/pdf/${PDF}.pdf | ||
201 | else | ||
202 | echo "Sorry... pdf generation supported under Linux only" | ||
203 | fi | ||
204 | fi | ||
205 | |||
206 | # Generate Windows compressed help | ||
207 | if [ "$DOX_GENERATE_HTMLHELP" = "YES" ]; then | ||
208 | |||
209 | echo "chm generation is not supported" | ||
210 | fi | ||
diff --git a/extras/recipes-ti/dmai/ti-dmai/doxygen_templates.tar.gz b/extras/recipes-ti/dmai/ti-dmai/doxygen_templates.tar.gz new file mode 100644 index 00000000..6d613bf5 --- /dev/null +++ b/extras/recipes-ti/dmai/ti-dmai/doxygen_templates.tar.gz | |||
Binary files differ | |||
diff --git a/extras/recipes-ti/dmai/ti-dmai/loadmodules-ti-dmai-apps.sh b/extras/recipes-ti/dmai/ti-dmai/loadmodules-ti-dmai-apps.sh new file mode 100755 index 00000000..7120b744 --- /dev/null +++ b/extras/recipes-ti/dmai/ti-dmai/loadmodules-ti-dmai-apps.sh | |||
@@ -0,0 +1,37 @@ | |||
1 | # | ||
2 | # Default Memory Map - for OMAP3530 dvsdk examples from 3.00.00.29 - this memory map is used for DMAI apps | ||
3 | # | ||
4 | # Start Addr Size Description | ||
5 | # ------------------------------------------- | ||
6 | # 0x80000000 88 MB Linux | ||
7 | # 0x85800000 08 MB CMEM | ||
8 | # 0x86800000 16 MB DDRALGHEAP | ||
9 | # 0x87800000 6 MB DDR2 (BIOS, Codecs, Applications) | ||
10 | # 0x87E00000 1 MB DSPLINK (MEM) | ||
11 | # 0x87F00000 4 KB DSPLINK (RESET) | ||
12 | # 0x87F01000 1020 KB unused | ||
13 | |||
14 | # sanity check to verify that we're using the right mem=xxM (88M in this case) | ||
15 | awk '/MemTotal:/ { | ||
16 | mem=$2 | ||
17 | |||
18 | if (mem > 88 * 1024) | ||
19 | print "Warning! You need to use mem=88M or less on the kernel cmdline" | ||
20 | |||
21 | printf "You have %dkB total memory for Linux\n", mem | ||
22 | }' /proc/meminfo | ||
23 | |||
24 | # Select cmemk parameters for best fit, i.e. starting at 0x85000000 | ||
25 | modprobe cmemk phys_start=0x85800000 phys_end=0x86800000 pools=20x4096,8x131072,5x1048576,1x1429440,1x256000,1x3600000,5x829440 | ||
26 | |||
27 | # insert DSP/BIOS Link driver | ||
28 | # | ||
29 | modprobe dsplinkk | ||
30 | |||
31 | # make /dev/dsplink | ||
32 | #rm -f /dev/dsplink | ||
33 | #mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0 | ||
34 | |||
35 | # insert Local Power Manager driver | ||
36 | # | ||
37 | modprobe lpm_omap3530 | ||
diff --git a/extras/recipes-ti/dmai/ti-dmai/loadmodules-ti-dmai-dm355_al.sh b/extras/recipes-ti/dmai/ti-dmai/loadmodules-ti-dmai-dm355_al.sh new file mode 100755 index 00000000..ca357e20 --- /dev/null +++ b/extras/recipes-ti/dmai/ti-dmai/loadmodules-ti-dmai-dm355_al.sh | |||
@@ -0,0 +1,23 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # loadmodules.sh | ||
4 | # | ||
5 | # Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/ | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU Lesser General Public License as | ||
9 | # published by the Free Software Foundation version 2.1 of the License. | ||
10 | # | ||
11 | # This program is distributed #as is# WITHOUT ANY WARRANTY of any kind, | ||
12 | # whether express or implied; without even the implied warranty of | ||
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | # Lesser General Public License for more details. | ||
15 | |||
16 | # 12MB | ||
17 | modprobe cmemk phys_start=0x87400000 phys_end=0x88000000 pools=1x2903040,1x1529856,7x829440,1x524288,1x108680,1x81920,2x8192,6x4096 | ||
18 | |||
19 | ./mapdmaq | ||
20 | |||
21 | modprobe dm350mmap | ||
22 | rm -f /dev/dm350mmap | ||
23 | mknod /dev/dm350mmap c `awk "\\$2==\"dm350mmap\" {print \\$1}" /proc/devices` 0 | ||
diff --git a/extras/recipes-ti/dmai/ti-dmai/loadmodules-ti-dmai-dm365_al.sh b/extras/recipes-ti/dmai/ti-dmai/loadmodules-ti-dmai-dm365_al.sh new file mode 100644 index 00000000..36dc78ec --- /dev/null +++ b/extras/recipes-ti/dmai/ti-dmai/loadmodules-ti-dmai-dm365_al.sh | |||
@@ -0,0 +1,25 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # This loadmodules script is provided to support 1920x1080 resolution file based encode/decode DMAI unit test applications | ||
4 | |||
5 | # Sample bootargs is given below | ||
6 | # mem=60M console=ttyS0,115200n8 root=/dev/nfs rw nfsroot=<nfsroot> ip=dhcp video=davincifb:vid0=OFF:vid1=OFF:osd0=720x576x16,2025K dm365_imp.oper_mode=0 | ||
7 | |||
8 | depmod -a | ||
9 | rmmod cmemk 2>/dev/null | ||
10 | rmmod irqk 2>/dev/null | ||
11 | rmmod edmak 2>/dev/null | ||
12 | rmmod dm365mmap 2>/dev/null | ||
13 | |||
14 | # Pools configuration | ||
15 | modprobe cmemk phys_start=0x83C00000 phys_end=0x88000000 pools=1x384,2x5984,2x3133440,1x16384,1x48952,1x20480,1x60288,1x74,1x28,1x2048,1x6785280,1x146,1x896,1x65536,1x98,1x296,29x56,2x24,1x624,4x62,1x1456,1x18321120,1x65792,5x3523584,1x4194304,1x8355840 | ||
16 | |||
17 | #VC1 decode pool configuration | ||
18 | # insmod cmemk.ko phys_start=0x83C00000 phys_end=0x88000000 pools=1x384,1x112665,3x7680,1x319264,2x1024,5x7208960,1x80,1x116,1x29184,1x2688,1x30720,1x551680,2x128,1x74,1x28,1x10240,1x47232,1x448,2x1152,1x8192,2x272896,18x56,2x24,1x86,4x62,2x7808,1x2097152 | ||
19 | |||
20 | modprobe irqk | ||
21 | modprobe edmak | ||
22 | modprobe dm365mmap | ||
23 | |||
24 | rm -f /dev/dm365mmap | ||
25 | mknod /dev/dm365mmap c `awk "\\$2==\"dm365mmap\" {print \\$1}" /proc/devices` 0 | ||
diff --git a/extras/recipes-ti/dmai/ti-dmai/loadmodules-ti-dmai-dm6446_al.sh b/extras/recipes-ti/dmai/ti-dmai/loadmodules-ti-dmai-dm6446_al.sh new file mode 100755 index 00000000..b4a230d5 --- /dev/null +++ b/extras/recipes-ti/dmai/ti-dmai/loadmodules-ti-dmai-dm6446_al.sh | |||
@@ -0,0 +1,19 @@ | |||
1 | # | ||
2 | # loadmodules.sh | ||
3 | # | ||
4 | # Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/ | ||
5 | # | ||
6 | # This program is free software; you can redistribute it and/or modify | ||
7 | # it under the terms of the GNU Lesser General Public License as | ||
8 | # published by the Free Software Foundation version 2.1 of the License. | ||
9 | # | ||
10 | # This program is distributed #as is# WITHOUT ANY WARRANTY of any kind, | ||
11 | # whether express or implied; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | # Lesser General Public License for more details. | ||
14 | |||
15 | modprobe cmemk phys_start=0x87800000 phys_end=0x88E00000 pools=20x4096,8x202752,10x131072,2x1048576,1x2097152,10x829440,1x6750000 | ||
16 | modprobe dsplinkk ddr_start=0x8F800000 ddr_size=0x600000 | ||
17 | |||
18 | rm -rf /dev/dsplink | ||
19 | mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0 | ||
diff --git a/extras/recipes-ti/dmai/ti-dmai/loadmodules-ti-dmai-dm6467_al.sh b/extras/recipes-ti/dmai/ti-dmai/loadmodules-ti-dmai-dm6467_al.sh new file mode 100755 index 00000000..b4a230d5 --- /dev/null +++ b/extras/recipes-ti/dmai/ti-dmai/loadmodules-ti-dmai-dm6467_al.sh | |||
@@ -0,0 +1,19 @@ | |||
1 | # | ||
2 | # loadmodules.sh | ||
3 | # | ||
4 | # Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/ | ||
5 | # | ||
6 | # This program is free software; you can redistribute it and/or modify | ||
7 | # it under the terms of the GNU Lesser General Public License as | ||
8 | # published by the Free Software Foundation version 2.1 of the License. | ||
9 | # | ||
10 | # This program is distributed #as is# WITHOUT ANY WARRANTY of any kind, | ||
11 | # whether express or implied; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | # Lesser General Public License for more details. | ||
14 | |||
15 | modprobe cmemk phys_start=0x87800000 phys_end=0x88E00000 pools=20x4096,8x202752,10x131072,2x1048576,1x2097152,10x829440,1x6750000 | ||
16 | modprobe dsplinkk ddr_start=0x8F800000 ddr_size=0x600000 | ||
17 | |||
18 | rm -rf /dev/dsplink | ||
19 | mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0 | ||
diff --git a/extras/recipes-ti/dmai/ti-dmai/loadmodules-ti-dmai-o3530_al.sh b/extras/recipes-ti/dmai/ti-dmai/loadmodules-ti-dmai-o3530_al.sh new file mode 100755 index 00000000..076af072 --- /dev/null +++ b/extras/recipes-ti/dmai/ti-dmai/loadmodules-ti-dmai-o3530_al.sh | |||
@@ -0,0 +1,42 @@ | |||
1 | # loadmodules.sh | ||
2 | # | ||
3 | # Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/ | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU Lesser General Public License as | ||
7 | # published by the Free Software Foundation version 2.1 of the License. | ||
8 | # | ||
9 | # This program is distributed #as is# WITHOUT ANY WARRANTY of any kind, | ||
10 | # whether express or implied; without even the implied warranty of | ||
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
12 | # Lesser General Public License for more details. | ||
13 | |||
14 | # | ||
15 | # Default Memory Map | ||
16 | # | ||
17 | # Start Addr Size Description | ||
18 | # ------------------------------------------- | ||
19 | # 0x80000000 88 MB Linux | ||
20 | # 0x85800000 08 MB CMEM | ||
21 | # 0x86800000 24 MB DDRALGHEAP | ||
22 | # 0x87800000 6 MB DDR2 (BIOS, Codecs, Applications) | ||
23 | # 0x87E00000 1 MB DSPLINK (MEM) | ||
24 | # 0x87F00000 4 KB DSPLINK (RESET) | ||
25 | # 0x87F01000 1020 KB unused | ||
26 | |||
27 | modprobe cmemk phys_start=0x85800000 phys_end=0x86800000 pools=20x4096,8x131072,4x829440,1x5250000,1x1429440,1x256000 | ||
28 | |||
29 | |||
30 | # insert DSP/BIOS Link driver | ||
31 | # | ||
32 | modprobe dsplinkk | ||
33 | |||
34 | # make /dev/dsplink | ||
35 | rm -f /dev/dsplink | ||
36 | mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0 | ||
37 | |||
38 | |||
39 | # insert Local Power Manager driver | ||
40 | # | ||
41 | modprobe lpm_omap3530 | ||
42 | |||
diff --git a/extras/recipes-ti/dmai/ti-dmai/loadmodules-ti-dmai-ol137_al.sh b/extras/recipes-ti/dmai/ti-dmai/loadmodules-ti-dmai-ol137_al.sh new file mode 100755 index 00000000..2c98c787 --- /dev/null +++ b/extras/recipes-ti/dmai/ti-dmai/loadmodules-ti-dmai-ol137_al.sh | |||
@@ -0,0 +1,19 @@ | |||
1 | # | ||
2 | # loadmodules.sh | ||
3 | # | ||
4 | # Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/ | ||
5 | # | ||
6 | # This program is free software; you can redistribute it and/or modify | ||
7 | # it under the terms of the GNU Lesser General Public License as | ||
8 | # published by the Free Software Foundation version 2.1 of the License. | ||
9 | # | ||
10 | # This program is distributed #as is# WITHOUT ANY WARRANTY of any kind, | ||
11 | # whether express or implied; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | # Lesser General Public License for more details. | ||
14 | |||
15 | modprobe cmemk phys_start=0xC2200000 phys_end=0xC3200000 pools=1x5250000,3x1048576,3x829440,1x256000,4x131072 | ||
16 | modprobe dsplinkk | ||
17 | |||
18 | rm -rf /dev/dsplink | ||
19 | mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0 | ||
diff --git a/extras/recipes-ti/dmai/ti-dmai/loadmodules-ti-dmai-ol138_al.sh b/extras/recipes-ti/dmai/ti-dmai/loadmodules-ti-dmai-ol138_al.sh new file mode 100755 index 00000000..2c98c787 --- /dev/null +++ b/extras/recipes-ti/dmai/ti-dmai/loadmodules-ti-dmai-ol138_al.sh | |||
@@ -0,0 +1,19 @@ | |||
1 | # | ||
2 | # loadmodules.sh | ||
3 | # | ||
4 | # Copyright (C) $year Texas Instruments Incorporated - http://www.ti.com/ | ||
5 | # | ||
6 | # This program is free software; you can redistribute it and/or modify | ||
7 | # it under the terms of the GNU Lesser General Public License as | ||
8 | # published by the Free Software Foundation version 2.1 of the License. | ||
9 | # | ||
10 | # This program is distributed #as is# WITHOUT ANY WARRANTY of any kind, | ||
11 | # whether express or implied; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | # Lesser General Public License for more details. | ||
14 | |||
15 | modprobe cmemk phys_start=0xC2200000 phys_end=0xC3200000 pools=1x5250000,3x1048576,3x829440,1x256000,4x131072 | ||
16 | modprobe dsplinkk | ||
17 | |||
18 | rm -rf /dev/dsplink | ||
19 | mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0 | ||
diff --git a/extras/recipes-ti/dmai/ti-dmai/omap3530-r642-remove-include-videodev.diff b/extras/recipes-ti/dmai/ti-dmai/omap3530-r642-remove-include-videodev.diff new file mode 100644 index 00000000..63f9cc68 --- /dev/null +++ b/extras/recipes-ti/dmai/ti-dmai/omap3530-r642-remove-include-videodev.diff | |||
@@ -0,0 +1,64 @@ | |||
1 | From 06c4cfeec98f4f1e31543878ceb74c5fff1907e4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Enrico Butera <ebutera@users.berlios.de> | ||
3 | Date: Thu, 22 Dec 2011 11:01:58 +0100 | ||
4 | Subject: [PATCH 1/2] adjust videdev headers for recent kernels | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | .../packages/ti/sdo/dmai/linux/omap3530/Capture.c | 1 - | ||
9 | .../ti/sdo/dmai/linux/omap3530/Display_v4l2.c | 1 - | ||
10 | .../ti/sdo/dmai/linux/omap3530/_VideoBuf.c | 1 - | ||
11 | .../ti/sdo/dmai/linux/omap3530/priv/_VideoBuf.h | 1 - | ||
12 | 4 files changed, 0 insertions(+), 4 deletions(-) | ||
13 | |||
14 | diff --git a/davinci_multimedia_application_interface/dmai/packages/ti/sdo/dmai/linux/omap3530/Capture.c b/davinci_multimedia_application_interface/dmai/packages/ti/sdo/dmai/linux/omap3530/Capture.c | ||
15 | index a924169..c2b45d2 100644 | ||
16 | --- a/davinci_multimedia_application_interface/dmai/packages/ti/sdo/dmai/linux/omap3530/Capture.c | ||
17 | +++ b/davinci_multimedia_application_interface/dmai/packages/ti/sdo/dmai/linux/omap3530/Capture.c | ||
18 | @@ -40,7 +40,6 @@ | ||
19 | #include <sys/mman.h> | ||
20 | #include <sys/ioctl.h> | ||
21 | #include <asm/types.h> | ||
22 | -#include <linux/videodev.h> | ||
23 | #include <linux/videodev2.h> | ||
24 | |||
25 | #include <xdc/std.h> | ||
26 | diff --git a/davinci_multimedia_application_interface/dmai/packages/ti/sdo/dmai/linux/omap3530/Display_v4l2.c b/davinci_multimedia_application_interface/dmai/packages/ti/sdo/dmai/linux/omap3530/Display_v4l2.c | ||
27 | index 0d01b39..0c35efe 100644 | ||
28 | --- a/davinci_multimedia_application_interface/dmai/packages/ti/sdo/dmai/linux/omap3530/Display_v4l2.c | ||
29 | +++ b/davinci_multimedia_application_interface/dmai/packages/ti/sdo/dmai/linux/omap3530/Display_v4l2.c | ||
30 | @@ -38,7 +38,6 @@ | ||
31 | #include <sys/ioctl.h> | ||
32 | #include <sys/mman.h> | ||
33 | #include <errno.h> | ||
34 | -#include <linux/videodev.h> | ||
35 | #include <linux/videodev2.h> | ||
36 | |||
37 | #include <xdc/std.h> | ||
38 | diff --git a/davinci_multimedia_application_interface/dmai/packages/ti/sdo/dmai/linux/omap3530/_VideoBuf.c b/davinci_multimedia_application_interface/dmai/packages/ti/sdo/dmai/linux/omap3530/_VideoBuf.c | ||
39 | index 5615e2f..5cb712d 100644 | ||
40 | --- a/davinci_multimedia_application_interface/dmai/packages/ti/sdo/dmai/linux/omap3530/_VideoBuf.c | ||
41 | +++ b/davinci_multimedia_application_interface/dmai/packages/ti/sdo/dmai/linux/omap3530/_VideoBuf.c | ||
42 | @@ -38,7 +38,6 @@ | ||
43 | #include <sys/ioctl.h> | ||
44 | #include <sys/mman.h> | ||
45 | #include <errno.h> | ||
46 | -#include <linux/videodev.h> | ||
47 | #include <linux/videodev2.h> | ||
48 | |||
49 | #include <xdc/std.h> | ||
50 | diff --git a/davinci_multimedia_application_interface/dmai/packages/ti/sdo/dmai/linux/omap3530/priv/_VideoBuf.h b/davinci_multimedia_application_interface/dmai/packages/ti/sdo/dmai/linux/omap3530/priv/_VideoBuf.h | ||
51 | index b2128a3..dbaa4eb 100644 | ||
52 | --- a/davinci_multimedia_application_interface/dmai/packages/ti/sdo/dmai/linux/omap3530/priv/_VideoBuf.h | ||
53 | +++ b/davinci_multimedia_application_interface/dmai/packages/ti/sdo/dmai/linux/omap3530/priv/_VideoBuf.h | ||
54 | @@ -34,7 +34,6 @@ | ||
55 | #ifndef ti_sdo_dai_linux_priv__VideoBuf_h_ | ||
56 | #define ti_sdo_dai_linux_priv__VideoBuf_h_ | ||
57 | |||
58 | -#include <linux/videodev.h> | ||
59 | #include <linux/videodev2.h> | ||
60 | |||
61 | #include <ti/sdo/dmai/BufferGfx.h> | ||
62 | -- | ||
63 | 1.7.2.5 | ||
64 | |||
diff --git a/extras/recipes-ti/dmai/ti-dmai/r642-fix-config-bld.diff b/extras/recipes-ti/dmai/ti-dmai/r642-fix-config-bld.diff new file mode 100644 index 00000000..2f328c0e --- /dev/null +++ b/extras/recipes-ti/dmai/ti-dmai/r642-fix-config-bld.diff | |||
@@ -0,0 +1,48 @@ | |||
1 | From 86e89bb160cfe67c173f1260b93066b12dd73580 Mon Sep 17 00:00:00 2001 | ||
2 | From: Enrico Butera <ebutera@users.berlios.de> | ||
3 | Date: Thu, 22 Dec 2011 11:03:58 +0100 | ||
4 | Subject: [PATCH 2/2] fix toolchain names in config.bld | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | .../dmai/packages/config.bld | 24 +------------------ | ||
9 | 1 files changed, 2 insertions(+), 22 deletions(-) | ||
10 | |||
11 | diff --git a/davinci_multimedia_application_interface/dmai/packages/config.bld b/davinci_multimedia_application_interface/dmai/packages/config.bld | ||
12 | index 8c2e96e..566f907 100644 | ||
13 | --- a/davinci_multimedia_application_interface/dmai/packages/config.bld | ||
14 | +++ b/davinci_multimedia_application_interface/dmai/packages/config.bld | ||
15 | @@ -44,28 +44,8 @@ var C6X = xdc.useModule('ti.targets.C64P'); | ||
16 | C6X.rootDir = codegen; | ||
17 | C6X.platform = xdcplat; | ||
18 | |||
19 | -/* User passes in $(CROSS_COMPILE) where $(CROSS_COMPILE)gcc is their compiler | ||
20 | - Then the TOOLDIR and LONGNAME are derived based on a regex of CROSS_COMPILE | ||
21 | -*/ | ||
22 | -var crosscompile = "" + java.lang.System.getenv("CROSS_COMPILE"); | ||
23 | - | ||
24 | -var tooldir = ""; | ||
25 | -var longName = ""; | ||
26 | - | ||
27 | -/* Search CROSS_COMPILE for bin/ If only 1 bin/ is found, set the tooldir to | ||
28 | - the path prior to bin/ and the prefix to "bin/" + remainder of path, | ||
29 | - else leave the tooldir as "" and set the LONGNAME to the full CROSS_COMPILE | ||
30 | - path | ||
31 | -*/ | ||
32 | -var regex = new RegExp("bin/"); | ||
33 | -var find = crosscompile.split( regex ); | ||
34 | - | ||
35 | -if (find[0]!=crosscompile && find.length==2) { | ||
36 | - tooldir = find[0]; | ||
37 | - longName = "bin/" + find[1] + "gcc"; | ||
38 | -} else { | ||
39 | - longName = crosscompile + "gcc"; | ||
40 | -} | ||
41 | +var tooldir = "" + java.lang.System.getenv("CSTOOL_DIR"); | ||
42 | +var longName = "" + java.lang.System.getenv("MVTOOL_PREFIX") + "gcc"; | ||
43 | |||
44 | /* location of the GCC Arm9 tools */ | ||
45 | var GCArmv5T = xdc.useModule('gnu.targets.arm.GCArmv5T'); | ||
46 | -- | ||
47 | 1.7.2.5 | ||
48 | |||
diff --git a/extras/recipes-ti/dmai/ti-dmai/unloadmodules-ti-dmai-apps.sh b/extras/recipes-ti/dmai/ti-dmai/unloadmodules-ti-dmai-apps.sh new file mode 100644 index 00000000..793d727f --- /dev/null +++ b/extras/recipes-ti/dmai/ti-dmai/unloadmodules-ti-dmai-apps.sh | |||
@@ -0,0 +1,12 @@ | |||
1 | # Unload modules - DMAI - OMAP3530 | ||
2 | |||
3 | # remove lpm module | ||
4 | rmmod lpm_omap3530 | ||
5 | |||
6 | # remove DSP/BIOS Link driver | ||
7 | rmmod dsplinkk | ||
8 | #rm -f /dev/dsplink | ||
9 | |||
10 | # remove cmem module | ||
11 | rmmod cmemk | ||
12 | |||
diff --git a/extras/recipes-ti/dmai/ti-dmai_svn.bb b/extras/recipes-ti/dmai/ti-dmai_svn.bb new file mode 100644 index 00000000..3ac7a81d --- /dev/null +++ b/extras/recipes-ti/dmai/ti-dmai_svn.bb | |||
@@ -0,0 +1,38 @@ | |||
1 | require ti-dmai.inc | ||
2 | |||
3 | # Need to descend one level more to find source | ||
4 | S = "${WORKDIR}/${DMAIBRANCH}/davinci_multimedia_application_interface/dmai_${PV}/dmai" | ||
5 | |||
6 | # Hack to be able to use recent kernel headers from userspace | ||
7 | TARGET_CC_ARCH += " -D__EXPORTED_HEADERS__" | ||
8 | |||
9 | PV = "2_10_00_01+svnr${SRCPV}" | ||
10 | |||
11 | LIC_FILES_CHKSUM = "file://dmai_${PV}_License.html;md5=3302f728a5a42f97cabc26a54d7fa607" | ||
12 | |||
13 | # This package has high dependence on kernel, use kernel PR as base and append a local version | ||
14 | PR = "${MACHINE_KERNEL_PR}" | ||
15 | PR_append = "o" | ||
16 | |||
17 | DMAIBRANCH_dm6446 = "trunk" | ||
18 | DMAIBRANCH_dm6467 = "branches/GITPSP_INT_101009" | ||
19 | DMAIBRANCH_omap3 = "trunk" | ||
20 | DMAIBRANCH_dm355 = "branches/GITPSP_INT_101009" | ||
21 | DMAIBRANCH_dm365 = "trunk" | ||
22 | DMAIBRANCH_omapl137 = "trunk" | ||
23 | DMAIBRANCH_omapl138 = "trunk" | ||
24 | DMAIBRANCH ?= "UNDEFINED_DMAIBRANCH" | ||
25 | |||
26 | SRCREV_dm6446 = "482" | ||
27 | SRCREV_dm6467 = "441" | ||
28 | SRCREV_omap3 = "642" | ||
29 | SRCREV_dm355 = "424" | ||
30 | SRCREV_dm365 = "570" | ||
31 | SRCREV_omapl137 = "482" | ||
32 | SRCREV_omapl138 = "570" | ||
33 | SRCREV ?= "UNDEFINED_SRCREV" | ||
34 | |||
35 | SRC_URI_append = " file://omap3530-r642-remove-include-videodev.diff;striplevel=3 \ | ||
36 | file://r642-fix-config-bld.diff;striplevel=3 \ | ||
37 | " | ||
38 | |||
diff --git a/extras/recipes-ti/dsplink/ti-dsplink.inc b/extras/recipes-ti/dsplink/ti-dsplink.inc new file mode 100644 index 00000000..ce7cbf97 --- /dev/null +++ b/extras/recipes-ti/dsplink/ti-dsplink.inc | |||
@@ -0,0 +1,211 @@ | |||
1 | DESCRIPTION = "DSPLINK Inter-Processor Communications (IPC) for TI ARM/DSP processors" | ||
2 | HOMEPAGE = "http://software-dl.ti.com/dsps/dsps_public_sw/DSPLink/index.html" | ||
3 | SECTION = "devel" | ||
4 | LICENSE = "GPLv2" | ||
5 | |||
6 | LIC_FILES_CHKSUM = "file://dsplink/doc/gpl_2.0.pdf;md5=70996be607b61df78ce46093f4afe2bd" | ||
7 | |||
8 | |||
9 | # TODO :: KERNEL_CC, should use for kernel cc for module build? | ||
10 | # TODO :: Need to understand why OBJDUMP is required for kernel module | ||
11 | # TODO :: Unset required since LDFLAGS gets picked up and used incorrectly - investigate | ||
12 | # TODO :: Do we need to pass so many variables to each make step? | ||
13 | |||
14 | inherit module | ||
15 | |||
16 | require ../includes/ti-paths.inc | ||
17 | require ../includes/ti-staging.inc | ||
18 | |||
19 | PROVIDES = "ti-dsplink-module" | ||
20 | PROVIDES += "ti-dsplink-examples" | ||
21 | |||
22 | # This package builds a kernel module, use kernel PR as base and append a local version | ||
23 | PR = "${MACHINE_KERNEL_PR}" | ||
24 | PR_append = "j" | ||
25 | |||
26 | S = "${WORKDIR}/dsplink_linux_${PV}" | ||
27 | |||
28 | SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/${PV_DL_PATH}/dsplink_linux_${PV}.tar.gz;name=dsplinktarball \ | ||
29 | file://ti-dsplink-examples-run.sh \ | ||
30 | file://ti-dsplink-examples-loadmodules.sh \ | ||
31 | file://ti-dsplink-examples-unloadmodules.sh " | ||
32 | |||
33 | DEPENDS = "ti-dspbios ti-xdctools ti-cgt6x" | ||
34 | DEPENDS += "virtual/kernel perl-native" | ||
35 | |||
36 | # SOC_FAMILY configuration | ||
37 | |||
38 | DSPLINKPLATFORM_dm6446 = "DAVINCI" | ||
39 | DSPLINKPLATFORM_dm6467 = "DAVINCIHD" | ||
40 | DSPLINKPLATFORM_omapl137 = "OMAPL1XX" | ||
41 | DSPLINKPLATFORM_omapl138 = "OMAPL138" | ||
42 | DSPLINKPLATFORM_omap3 = "OMAP3530" | ||
43 | DSPLINKPLATFORM ?= "<UNDEFINED_DSPLINKPLATFORM>" | ||
44 | |||
45 | DSPLINKDSPCFG_dm6446 = "DM6446GEMSHMEM" | ||
46 | DSPLINKDSPCFG_dm6467 = "DM6467GEMSHMEM" | ||
47 | DSPLINKDSPCFG_omapl137 = "OMAPL1XXGEMSHMEM" | ||
48 | DSPLINKDSPCFG_omapl138 = "OMAPL138GEMSHMEM" | ||
49 | DSPLINKDSPCFG_omap3 = "OMAP3530SHMEM" | ||
50 | DSPLINKDSPCFG ?= "<UNDEFINED_DSPLINKDSPCFG>" | ||
51 | |||
52 | DSPLINKDSP_dm6446 = "DM6446GEM_0" | ||
53 | DSPLINKDSP_dm6467 = "DM6467GEM_0" | ||
54 | DSPLINKDSP_omapl137 = "OMAPL1XXGEM_0" | ||
55 | DSPLINKDSP_omapl138 = "OMAPL138GEM_0" | ||
56 | DSPLINKDSP_omap3 = "OMAP3530_0" | ||
57 | DSPLINKDSP ?= "<UNDEFINED_DSPLINKDSP>" | ||
58 | |||
59 | DSPLINKGPPOS_dm6446 = "DM6446LSP" | ||
60 | DSPLINKGPPOS_dm6467 = "DM6467LSP" | ||
61 | DSPLINKGPPOS_omapl137 = "ARM" | ||
62 | DSPLINKGPPOS_omapl138 = "ARM" | ||
63 | DSPLINKGPPOS_omap3 = "OMAPLSP" | ||
64 | DSPLINKGPPOS ?= "<DEFINED_DSPLINKGPPOS>" | ||
65 | |||
66 | # Exported Variable needed by build | ||
67 | DSPLINK = "${S}/dsplink" | ||
68 | export DSPLINK | ||
69 | |||
70 | do_configure() { | ||
71 | |||
72 | # Run perl script to create appropriate makefiles (v1.60 and up) | ||
73 | ( | ||
74 | cd ${DSPLINK} | ||
75 | perl config/bin/dsplinkcfg.pl --platform=${DSPLINKPLATFORM} --nodsp=1 \ | ||
76 | --dspcfg_0=${DSPLINKDSPCFG} --dspos_0=DSPBIOS5XX \ | ||
77 | --gppos=${DSPLINKGPPOS} --comps=ponslrmc | ||
78 | ) | ||
79 | } | ||
80 | |||
81 | do_prepsources () { | ||
82 | |||
83 | # Prepare the tree for rebuiling - clean and generate interfaces | ||
84 | XDCPATH=${DSPLINK} ${XDC_INSTALL_DIR}/xdc .make -PR . | ||
85 | XDCPATH=${DSPLINK} ${XDC_INSTALL_DIR}/xdc clean -PR . | ||
86 | XDCPATH=${DSPLINK} ${XDC_INSTALL_DIR}/xdc .interfaces -PR . | ||
87 | } | ||
88 | |||
89 | addtask prepsources after do_configure before do_compile | ||
90 | |||
91 | do_compile() { | ||
92 | # TODO :: KERNEL_CC, should use for kernel module build? | ||
93 | # TODO :: Need to understand why OBJDUMP is required for kernel module | ||
94 | # Unset these since LDFLAGS gets picked up and used incorrectly.... need | ||
95 | # investigation | ||
96 | |||
97 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS | ||
98 | |||
99 | # Build the gpp user space library | ||
100 | cd ${DSPLINK}/gpp/src/api && make \ | ||
101 | CROSS_COMPILE="${TARGET_PREFIX}" \ | ||
102 | CC="${TOOLCHAIN_PATH}/${TARGET_PREFIX}gcc" \ | ||
103 | AR="${TOOLCHAIN_PATH}/${TARGET_PREFIX}ar" \ | ||
104 | LD="${TOOLCHAIN_PATH}/${TARGET_PREFIX}ld" \ | ||
105 | COMPILER="${TOOLCHAIN_PATH}/${TARGET_PREFIX}gcc" \ | ||
106 | ARCHIVER="${TOOLCHAIN_PATH}/${TARGET_PREFIX}ar" \ | ||
107 | KERNEL_DIR="${STAGING_KERNEL_DIR}" \ | ||
108 | all | ||
109 | |||
110 | # Build the gpp kernel space (debug and release) | ||
111 | do_make_scripts | ||
112 | cd ${DSPLINK}/gpp/src && make \ | ||
113 | OBJDUMP="${TARGET_PREFIX}objdump" \ | ||
114 | CROSS_COMPILE="${TARGET_PREFIX}" \ | ||
115 | CC="${TOOLCHAIN_PATH}/${TARGET_PREFIX}gcc" \ | ||
116 | AR="${TOOLCHAIN_PATH}/${TARGET_PREFIX}ar" \ | ||
117 | LD="${TOOLCHAIN_PATH}/${TARGET_PREFIX}ld" \ | ||
118 | COMPILER="${TOOLCHAIN_PATH}/${TARGET_PREFIX}gcc" \ | ||
119 | ARCHIVER="${TOOLCHAIN_PATH}/${TARGET_PREFIX}ar" \ | ||
120 | KERNEL_DIR="${STAGING_KERNEL_DIR}" \ | ||
121 | BASE_BUILDOS="${STAGING_KERNEL_DIR}" \ | ||
122 | all | ||
123 | |||
124 | # Build the gpp samples | ||
125 | cd ${DSPLINK}/gpp/src/samples && make \ | ||
126 | BASE_TOOLCHAIN="${TOOLCHAIN_PATH}" \ | ||
127 | BASE_CGTOOLS="${BASE_TOOLCHAIN}/bin" \ | ||
128 | OSINC_PLATFORM="${TOOLCHAIN_PATH}/lib/gcc/${TARGET_SYS}/$(${TARGET_PREFIX}gcc -dumpversion)/include" \ | ||
129 | OSINC_TARGET="${BASE_TOOLCHAIN}/target/usr/include" \ | ||
130 | CROSS_COMPILE="${TARGET_PREFIX}" \ | ||
131 | CC="${TOOLCHAIN_PATH}/${TARGET_PREFIX}gcc" \ | ||
132 | LD="${TOOLCHAIN_PATH}/${TARGET_PREFIX}gcc" \ | ||
133 | AR="${TOOLCHAIN_PATH}/${TARGET_PREFIX}ar" \ | ||
134 | COMPILER="${TOOLCHAIN_PATH}/${TARGET_PREFIX}gcc" \ | ||
135 | LINKER="${TOOLCHAIN_PATH}/${TARGET_PREFIX}gcc" \ | ||
136 | ARCHIVER="${TOOLCHAIN_PATH}/${TARGET_PREFIX}ar" \ | ||
137 | KERNEL_DIR="${STAGING_KERNEL_DIR}" \ | ||
138 | all | ||
139 | |||
140 | # Build the dsp library (debug and release) | ||
141 | cd ${DSPLINK}/dsp/src && make \ | ||
142 | BASE_CGTOOLS="${CODEGEN_INSTALL_DIR}" \ | ||
143 | BASE_SABIOS="${BIOS_INSTALL_DIR}" \ | ||
144 | all | ||
145 | |||
146 | # Build the dsp samples (debug and release) | ||
147 | cd ${DSPLINK}/dsp/src/samples && make \ | ||
148 | BASE_CGTOOLS="${CODEGEN_INSTALL_DIR}" \ | ||
149 | BASE_SABIOS="${BIOS_INSTALL_DIR}" \ | ||
150 | all | ||
151 | } | ||
152 | |||
153 | KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}" | ||
154 | |||
155 | do_install () { | ||
156 | |||
157 | # Install the kernel module | ||
158 | install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp | ||
159 | install -m 0755 ${DSPLINK}/gpp/export/BIN/Linux/${DSPLINKPLATFORM}/RELEASE/dsplinkk.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/ | ||
160 | |||
161 | # Install the example apps (gpp and dsp) | ||
162 | install -d ${D}/${installdir}/ti-dsplink-examples/ | ||
163 | cp ${DSPLINK}/gpp/export/BIN/Linux/${DSPLINKPLATFORM}/RELEASE/*gpp ${D}/${installdir}/ti-dsplink-examples | ||
164 | cp ${DSPLINK}/dsp/export/BIN/DspBios/${DSPLINKPLATFORM}/${DSPLINKDSP}/RELEASE/*.out ${D}/${installdir}/ti-dsplink-examples | ||
165 | |||
166 | # Install the example apps module un/load scripts | ||
167 | install ${WORKDIR}/ti-dsplink-examples-loadmodules.sh ${D}/${installdir}/ti-dsplink-examples | ||
168 | install ${WORKDIR}/ti-dsplink-examples-unloadmodules.sh ${D}/${installdir}/ti-dsplink-examples | ||
169 | install ${WORKDIR}/ti-dsplink-examples-run.sh ${D}/${installdir}/ti-dsplink-examples | ||
170 | |||
171 | # Install/Stage the Source Tree | ||
172 | install -d ${D}${LINK_INSTALL_DIR_RECIPE} | ||
173 | cp -pPrf ${S}/* ${D}${LINK_INSTALL_DIR_RECIPE} | ||
174 | chmod -R +w ${D}${LINK_INSTALL_DIR_RECIPE} | ||
175 | |||
176 | # Changes path of include txt file to use LINK_INSTALL_DIR variable for GPP | ||
177 | for i in $(find ${D}${LINK_INSTALL_DIR_RECIPE}/dsplink/gpp/export/BIN/Linux/${DSPLINKPLATFORM}/*/ -name "*.txt"); do | ||
178 | sed -i ${i} -e s=${S}=\$\{LINK_INSTALL_DIR\}=g | ||
179 | done | ||
180 | |||
181 | # Changes path of include txt file to use LINK_INSTALL_DIR variable for DSP | ||
182 | for i in $(find ${D}${LINK_INSTALL_DIR_RECIPE}/dsplink/dsp/export/BIN/DspBios/${DSPLINKPLATFORM}/${DSPLINKDSP}/*/ -name "*.txt"); do | ||
183 | sed -i ${i} -e s=${S}=\$\{LINK_INSTALL_DIR\}=g | ||
184 | done | ||
185 | |||
186 | } | ||
187 | |||
188 | PACKAGES =+ "ti-dsplink-module" | ||
189 | FILES_ti-dsplink-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/dsplinkk.ko" | ||
190 | RDEPENDS_ti-dsplink-module += "update-modules" | ||
191 | |||
192 | pkg_postinst_ti-dsplink-module () { | ||
193 | #!/bin/sh | ||
194 | if [ -n "$D" ]; then | ||
195 | exit 1 | ||
196 | fi | ||
197 | |||
198 | depmod -a | ||
199 | update-modules || true | ||
200 | } | ||
201 | |||
202 | pkg_postrm_ti-dsplink-module () { | ||
203 | #!/bin/sh | ||
204 | update-modules || true | ||
205 | } | ||
206 | |||
207 | PACKAGES += "ti-dsplink-examples" | ||
208 | RDEPENDS_ti-dsplink-examples_append = " ti-dsplink-module" | ||
209 | RDEPENDS_ti-dsplink-examples_append_omap3 += " ti-lpm-module ti-lpm-utils" | ||
210 | FILES_ti-dsplink-examples = "${installdir}/ti-dsplink-examples/*" | ||
211 | INSANE_SKIP_ti-dsplink-examples = "1" | ||
diff --git a/extras/recipes-ti/dsplink/ti-dsplink/0001-remove-check-for-make-version-3.85-works-fine.patch b/extras/recipes-ti/dsplink/ti-dsplink/0001-remove-check-for-make-version-3.85-works-fine.patch new file mode 100644 index 00000000..70596c5d --- /dev/null +++ b/extras/recipes-ti/dsplink/ti-dsplink/0001-remove-check-for-make-version-3.85-works-fine.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From a96aa25518f306138c71b3fc074381f102092a13 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Fri, 23 Dec 2011 10:58:47 +0100 | ||
4 | Subject: [PATCH] remove check for make version, 3.85 works fine | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | dsplink/make/start.mk | 4 ---- | ||
9 | 1 files changed, 0 insertions(+), 4 deletions(-) | ||
10 | |||
11 | diff --git a/dsplink/make/start.mk b/dsplink/make/start.mk | ||
12 | index 0589f3c..a8f5740 100644 | ||
13 | --- a/dsplink/make/start.mk | ||
14 | +++ b/dsplink/make/start.mk | ||
15 | @@ -39,10 +39,6 @@ | ||
16 | # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
17 | # ============================================================================ | ||
18 | |||
19 | - | ||
20 | -# Check for MAKE version | ||
21 | -$(if $(filter $(MAKE_VERSION), 3.81 3.81beta1 3.90 3.92),,\ | ||
22 | -$(error This makefile requires one of GNU make version 3.81 3.81beta1 3.90 3.92)) | ||
23 | # ============================================================================ | ||
24 | # Export the directory separator | ||
25 | # ============================================================================ | ||
26 | -- | ||
27 | 1.7.7.4 | ||
28 | |||
diff --git a/extras/recipes-ti/dsplink/ti-dsplink/dsplink-BKL-fix.patch b/extras/recipes-ti/dsplink/ti-dsplink/dsplink-BKL-fix.patch new file mode 100644 index 00000000..eab3ec63 --- /dev/null +++ b/extras/recipes-ti/dsplink/ti-dsplink/dsplink-BKL-fix.patch | |||
@@ -0,0 +1,71 @@ | |||
1 | From e0931bf37628727903a567f1c7096ae0011edc3d Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Tue, 4 Jan 2011 13:49:05 +0100 | ||
4 | Subject: [PATCH] Adjust drv_pmgr for post 2.6.36 ioctl changes | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | dsplink/gpp/src/pmgr/Linux/2.6.18/drv_pmgr.c | 17 ++++++++++++++++- | ||
9 | 1 files changed, 16 insertions(+), 1 deletions(-) | ||
10 | |||
11 | diff --git a/dsplink/gpp/src/pmgr/Linux/2.6.18/drv_pmgr.c b/dsplink/gpp/src/pmgr/Linux/2.6.18/drv_pmgr.c | ||
12 | index a9b831c..e4a836d 100644 | ||
13 | --- a/dsplink/gpp/src/pmgr/Linux/2.6.18/drv_pmgr.c | ||
14 | +++ b/dsplink/gpp/src/pmgr/Linux/2.6.18/drv_pmgr.c | ||
15 | @@ -399,10 +399,15 @@ DRV_Release (struct inode * inode, struct file * filp) ; | ||
16 | * @see None | ||
17 | * ---------------------------------------------------------------------------- | ||
18 | */ | ||
19 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36) | ||
20 | STATIC | ||
21 | int | ||
22 | DRV_Ioctl (struct inode * inode, struct file * filp, | ||
23 | unsigned int cmd, unsigned long args) ; | ||
24 | +#else | ||
25 | +STATIC | ||
26 | +int DRV_Ioctl (struct file *filp, unsigned int cmd, unsigned long args); | ||
27 | +#endif | ||
28 | |||
29 | |||
30 | /** ---------------------------------------------------------------------------- | ||
31 | @@ -495,7 +500,11 @@ STATIC struct file_operations driverOps = { | ||
32 | open: DRV_Open, | ||
33 | flush: DRV_Flush, | ||
34 | release: DRV_Release, | ||
35 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36) | ||
36 | ioctl: DRV_Ioctl, | ||
37 | +#else | ||
38 | + unlocked_ioctl: DRV_Ioctl, | ||
39 | +#endif | ||
40 | mmap: DRV_Mmap, | ||
41 | read: DRV_Read, | ||
42 | .owner = THIS_MODULE | ||
43 | @@ -817,10 +826,16 @@ DRV_Release (struct inode * inode, struct file * filp) | ||
44 | * @desc Function to invoke the APIs through ioctl. | ||
45 | * ---------------------------------------------------------------------------- | ||
46 | */ | ||
47 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36) | ||
48 | STATIC | ||
49 | NORMAL_API | ||
50 | int DRV_Ioctl (struct inode * inode, struct file * filp, | ||
51 | unsigned int cmd, unsigned long args) | ||
52 | +#else | ||
53 | +STATIC | ||
54 | +NORMAL_API | ||
55 | +int DRV_Ioctl (struct file *filp, unsigned int cmd, unsigned long args) | ||
56 | +#endif | ||
57 | { | ||
58 | DSP_STATUS status = DSP_SOK ; | ||
59 | int osStatus = 0 ; | ||
60 | @@ -829,7 +844,7 @@ int DRV_Ioctl (struct inode * inode, struct file * filp, | ||
61 | CMD_Args apiArgs ; | ||
62 | |||
63 | |||
64 | - TRC_4ENTER ("DRV_Ioctl", inode, filp, cmd, args) ; | ||
65 | + TRC_3ENTER ("DRV_Ioctl", filp, cmd, args) ; | ||
66 | |||
67 | retVal = copy_from_user ((Pvoid) &apiArgs, | ||
68 | (const Pvoid) srcAddr, | ||
69 | -- | ||
70 | 1.6.6.1 | ||
71 | |||
diff --git a/extras/recipes-ti/dsplink/ti-dsplink/dsplink_1_64_add_dm6446_build_support.patch b/extras/recipes-ti/dsplink/ti-dsplink/dsplink_1_64_add_dm6446_build_support.patch new file mode 100644 index 00000000..5a25dbb5 --- /dev/null +++ b/extras/recipes-ti/dsplink/ti-dsplink/dsplink_1_64_add_dm6446_build_support.patch | |||
@@ -0,0 +1,337 @@ | |||
1 | From 7b36e94dcb33892e1df7d3327db31bd41fb6167e Mon Sep 17 00:00:00 2001 | ||
2 | From: Roger Monk <r-monk@ti.com> | ||
3 | Date: Fri, 5 Mar 2010 19:22:58 +0000 | ||
4 | Subject: [PATCH] dsplink_1_64: Add support for building with CS tools + against 2.6.30+ | ||
5 | |||
6 | * Tweaked Patches from Niclas | ||
7 | |||
8 | Signed-off-by: Roger Monk <r-monk@ti.com> | ||
9 | --- | ||
10 | dsplink/config/bin/dsplinkcfg.pl | 17 ++++- | ||
11 | dsplink/gpp/src/DIRS | 5 + | ||
12 | dslpink/gpp/src/Makefile | 8 ++- | ||
13 | dsplink/gpp/src/Rules.mk | 5 + | ||
14 | dsplink/make/Linux/davinci_2.6.mk | 211 +++++++++++++++++++++++++++++++++++++++++++++ | ||
15 | 5 files changed, 244 insertions(+), 2 deletions(-) | ||
16 | create mode 100644 make/Linux/davinci_2.6.mk | ||
17 | |||
18 | diff --git a/dsplink/config/bin/dsplinkcfg.pl b/dsplink/config/bin/dsplinkcfg.pl | ||
19 | index 644aa38..e83c133 100644 | ||
20 | --- a/dsplink/config/bin/dsplinkcfg.pl | ||
21 | +++ b/dsplink/config/bin/dsplinkcfg.pl | ||
22 | @@ -215,6 +215,18 @@ my %CFG_GPPOS_DM6467LSPuc = | ||
23 | 'OSPREFIX' => 'uc', | ||
24 | ) ; | ||
25 | |||
26 | +# DM6446 Linux | ||
27 | +my %CFG_GPPOS_DM6446LSP = | ||
28 | +( | ||
29 | + 'NAME' => 'DM6446LSP', | ||
30 | + 'PREFIX' => '2.6', | ||
31 | + 'ID' => 'DM6446LSP', | ||
32 | + 'DESC' => 'DM6446 LSP for DM6446', | ||
33 | + 'VER' => '2.6.18', | ||
34 | + 'TYPE' => 'Linux', | ||
35 | + 'LOADERS'=> [\%CFG_LOADER_COFF, ], | ||
36 | + 'COMPS' => 'ponslrmc', | ||
37 | +) ; | ||
38 | |||
39 | # OMAPL138 Linux with uCLibc filesystem | ||
40 | my %CFG_GPPOS_OMAPL138LSPuc = | ||
41 | @@ -356,7 +368,7 @@ my %CFG_DSPCFG_DM6446GEMSHMEM = | ||
42 | 'PHYID' => 'DM6446GEMSHMEM', | ||
43 | 'PHYDESC' => 'Shared Memory Physical Interface', | ||
44 | 'PHYTYPE' => 'SHMEM', | ||
45 | - 'GPPOS' => [\%CFG_GPPOS_MVL5U, \%CFG_GPPOS_MVL5G], | ||
46 | + 'GPPOS' => [\%CFG_GPPOS_MVL5U, \%CFG_GPPOS_MVL5G, \%CFG_GPPOS_DM6446LSP], | ||
47 | 'DSPOS' => [\%CFG_DSPOS_5XX, \%CFG_DSPOS_6XX], | ||
48 | # DSP defines | ||
49 | 'DSPNAME' => 'DM6446GEM', | ||
50 | @@ -2994,6 +3006,9 @@ sub main { | ||
51 | if ($platform {'ID'} eq 'DA850') { | ||
52 | print "GPP side distribution file: \$DSPLINK" . $DIRSEP . "gpp" . $DIRSEP. "src" . $DIRSEP. "Rules.mk\n" ; | ||
53 | } | ||
54 | + if ($platform {'ID'} eq 'DAVINCI') { | ||
55 | + print "GPP side distribution file: \$DSPLINK" . $DIRSEP . "gpp" . $DIRSEP. "src" . $DIRSEP. "Rules.mk\n" ; | ||
56 | + } | ||
57 | if ($platform {'ID'} eq 'DAVINCIHD') { | ||
58 | print "GPP side distribution file: \$DSPLINK" . $DIRSEP . "gpp" . $DIRSEP. "src" . $DIRSEP. "Rules.mk\n" ; | ||
59 | } | ||
60 | diff --git a/dsplink/gpp/src/DIRS b/dsplink/gpp/src/DIRS | ||
61 | index e82969c..05bad2b 100644 | ||
62 | --- a/dsplink/gpp/src/DIRS | ||
63 | +++ b/dsplink/gpp/src/DIRS | ||
64 | @@ -63,6 +63,10 @@ ifeq ("$(TI_DSPLINK_PLATFORM)", "DAVINCIHD") | ||
65 | DIRS += \ | ||
66 | api | ||
67 | else # ifeq ("$(TI_DSPLINK_PLATFORM)", "DAVINCIHD") | ||
68 | +ifeq ("$(TI_DSPLINK_PLATFORM)", "DAVINCI") | ||
69 | +DIRS += \ | ||
70 | + api | ||
71 | +else # ifeq ("$(TI_DSPLINK_PLATFORM)", "DAVINCI") | ||
72 | ifeq ("$(TI_DSPLINK_PLATFORM)", "DA850") | ||
73 | DIRS += \ | ||
74 | api | ||
75 | @@ -77,6 +81,7 @@ DIRS += \ | ||
76 | endif # ifeq ("$(TI_DSPLINK_PLATFORM)", "OMAP3530") | ||
77 | endif # ifeq ("$(TI_DSPLINK_PLATFORM)", "OMAPL138") | ||
78 | endif # ifeq ("$(TI_DSPLINK_PLATFORM)", "DAVINCIHD") | ||
79 | +endif # ifeq ("$(TI_DSPLINK_PLATFORM)", "DAVINCI") | ||
80 | endif # ifeq ("$(TI_DSPLINK_PLATFORM)", "DA850") | ||
81 | else # ifeq ("$(TI_DSPLINK_GPPOS)", "Linux") | ||
82 | DIRS += \ | ||
83 | diff --git a/dsplink/gpp/src/Makefile b/dsplink/gpp/src/Makefile | ||
84 | index 9e6bbb1..49c3b97 100644 | ||
85 | --- a/dsplink/gpp/src/Makefile | ||
86 | +++ b/dsplink/gpp/src/Makefile | ||
87 | @@ -78,7 +78,13 @@ ifeq ("$(TI_DSPLINK_GPPOS)", "Linux") | ||
88 | include $(DSPLINK)$(DIRSEP)gpp$(DIRSEP)src$(DIRSEP)Rules.mk | ||
89 | include $(DSPLINK)$(DIRSEP)gpp$(DIRSEP)src$(DIRSEP)Makefile_kbuild | ||
90 | else # else ("$(TI_DSPLINK_PLATFORM)", "DAVINCIHD") | ||
91 | - include Makefile_bld | ||
92 | + ifeq ("$(TI_DSPLINK_PLATFORM)", "DAVINCI") | ||
93 | + include $(DSPLINK)$(DIRSEP)gpp$(DIRSEP)src$(DIRSEP)Makefile_bld | ||
94 | + include $(DSPLINK)$(DIRSEP)gpp$(DIRSEP)src$(DIRSEP)Rules.mk | ||
95 | + include $(DSPLINK)$(DIRSEP)gpp$(DIRSEP)src$(DIRSEP)Makefile_kbuild | ||
96 | + else # else ("$(TI_DSPLINK_PLATFORM)", "DAVINCI") | ||
97 | + include Makefile_bld | ||
98 | + endif # ifeq ("$(TI_DSPLINK_PLATFORM)", "DAVINCI") | ||
99 | endif # ifeq ("$(TI_DSPLINK_PLATFORM)", "OMAP3530") | ||
100 | endif # ifeq ("$(TI_DSPLINK_PLATFORM)", "DA850") | ||
101 | endif # ifeq ("$(TI_DSPLINK_PLATFORM)", "OMAPL138") | ||
102 | diff --git a/dsplink/gpp/src/Rules.mk b/dsplink/gpp/src/Rules.mk | ||
103 | index 658ee8a..5a6f52a 100644 | ||
104 | --- a/dsplink/gpp/src/Rules.mk | ||
105 | +++ b/dsplink/gpp/src/Rules.mk | ||
106 | @@ -63,6 +63,11 @@ KERNEL_DIR := ${HOME}/da850/DaVinci-PSP-SDK-03.20.00.01/src/kernel/linux-03.2 | ||
107 | TOOL_PATH := ${HOME}/git/arm-2008q3/bin | ||
108 | endif #ifeq ("$(TI_DSPLINK_PLATFORM)", "DA850") | ||
109 | |||
110 | +ifeq ("$(TI_DSPLINK_PLATFORM)", "DAVINCI") | ||
111 | +KERNEL_DIR := ${HOME}/linux-davinci | ||
112 | +TOOL_PATH := ${HOME}/toolchains/git/arm-2009q1-203/bin | ||
113 | +endif #ifeq ("$(TI_DSPLINK_PLATFORM)", "DAVINCI") | ||
114 | + | ||
115 | ifeq ("$(TI_DSPLINK_PLATFORM)", "DAVINCIHD") | ||
116 | KERNEL_DIR := ${HOME}/linux-davinci | ||
117 | TOOL_PATH := ${HOME}/toolchains/git/arm-2009q1-203/bin | ||
118 | diff --git a/dsplink/make/Linux/davinci_2.6.mk b/dsplink/make/Linux/davinci_2.6.mk | ||
119 | new file mode 100644 | ||
120 | index 0000000..834fd74 | ||
121 | --- /dev/null | ||
122 | +++ b/dsplink/make/Linux/davinci_2.6.mk | ||
123 | @@ -0,0 +1,211 @@ | ||
124 | +# ============================================================================ | ||
125 | +# @file davinci_2.6.mk | ||
126 | +# | ||
127 | +# @path $(DSPLINK)/make/Linux/ | ||
128 | +# | ||
129 | +# @desc This makefile defines OS specific macros used by MAKE system for | ||
130 | +# the Montavista Pro 5.0 Linux distribution. | ||
131 | +# | ||
132 | +# @ver 1.64 | ||
133 | +# ============================================================================ | ||
134 | +# Copyright (C) 2002-2009, Texas Instruments Incorporated - | ||
135 | +# http://www.ti.com/ | ||
136 | +# | ||
137 | +# Redistribution and use in source and binary forms, with or without | ||
138 | +# modification, are permitted provided that the following conditions | ||
139 | +# are met: | ||
140 | +# | ||
141 | +# * Redistributions of source code must retain the above copyright | ||
142 | +# notice, this list of conditions and the following disclaimer. | ||
143 | +# | ||
144 | +# * Redistributions in binary form must reproduce the above copyright | ||
145 | +# notice, this list of conditions and the following disclaimer in the | ||
146 | +# documentation and/or other materials provided with the distribution. | ||
147 | +# | ||
148 | +# * Neither the name of Texas Instruments Incorporated nor the names of | ||
149 | +# its contributors may be used to endorse or promote products derived | ||
150 | +# from this software without specific prior written permission. | ||
151 | +# | ||
152 | +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
153 | +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
154 | +# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
155 | +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR | ||
156 | +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
157 | +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
158 | +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | ||
159 | +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
160 | +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | ||
161 | +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, | ||
162 | +# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
163 | +# ============================================================================ | ||
164 | + | ||
165 | + | ||
166 | +ifndef DAVINCI_LINUX2_6_MK | ||
167 | + | ||
168 | +define DAVINCI_LINUX2_6_MK | ||
169 | +endef | ||
170 | + | ||
171 | + | ||
172 | +# ============================================================================ | ||
173 | +# Let the make system know that a specific distribution for the GPP OS | ||
174 | +# is being used. | ||
175 | +# ============================================================================ | ||
176 | +USE_DISTRIBUTION := 1 | ||
177 | + | ||
178 | + | ||
179 | +# ============================================================================ | ||
180 | +# Set the values of necessary variables to be used for the OS. | ||
181 | +# ============================================================================ | ||
182 | + | ||
183 | +# ---------------------------------------------------------------------------- | ||
184 | +# Base directory for the GPP OS | ||
185 | +# ---------------------------------------------------------------------------- | ||
186 | +BASE_BUILDOS := ${HOME}/linux-davinci | ||
187 | + | ||
188 | +# ---------------------------------------------------------------------------- | ||
189 | +# Base for toolchain | ||
190 | +# ---------------------------------------------------------------------------- | ||
191 | +BASE_TOOLCHAIN := ${HOME}/toolchains/git/arm-2009q1-203 | ||
192 | + | ||
193 | +# ---------------------------------------------------------------------------- | ||
194 | +# Base for code generation tools - compiler, linker, archiver etc. | ||
195 | +# ---------------------------------------------------------------------------- | ||
196 | +BASE_CGTOOLS := $(BASE_TOOLCHAIN)/bin | ||
197 | + | ||
198 | +# ---------------------------------------------------------------------------- | ||
199 | +# Base directory for include files provided by GPP OS | ||
200 | +# ---------------------------------------------------------------------------- | ||
201 | +BASE_OSINC := $(BASE_BUILDOS)/include | ||
202 | + | ||
203 | +OSINC_GENERIC := $(BASE_OSINC) | ||
204 | +OSINC_PLATFORM := $(BASE_TOOLCHAIN)/lib/gcc/arm-none-linux-gnueabi/4.2.3/include | ||
205 | +OSINC_TARGET := $(BASE_TOOLCHAIN)/arm-none-linux-gnueabi/libc/usr/include | ||
206 | + | ||
207 | +ifneq ("$(VARIANT)", "") | ||
208 | +OSINC_VARIANT := $(BASE_OSINC) | ||
209 | +endif | ||
210 | + | ||
211 | + | ||
212 | +# ---------------------------------------------------------------------------- | ||
213 | +# Base directory for libraries provided by GPP OS | ||
214 | +# ---------------------------------------------------------------------------- | ||
215 | +BASE_OSLIB := $(BASE_TOOLCHAIN)/lib | ||
216 | + | ||
217 | +OSLIB_GENERIC := $(BASE_OSLIB) | ||
218 | +OSLIB_PLATFORM := $(BASE_OSLIB) | ||
219 | + | ||
220 | + | ||
221 | +ifneq ("$(VARIANT)", "") | ||
222 | +OSLIB_VARIANT := $(BASE_OSLIB) | ||
223 | +endif | ||
224 | + | ||
225 | + | ||
226 | +# ============================================================================ | ||
227 | +# COMPILER | ||
228 | +# ============================================================================ | ||
229 | + | ||
230 | +# ---------------------------------------------------------------------------- | ||
231 | +# Name of the compiler | ||
232 | +# ---------------------------------------------------------------------------- | ||
233 | +COMPILER := $(BASE_CGTOOLS)/arm-none-linux-gnueabi-gcc | ||
234 | +LD := $(BASE_CGTOOLS)/arm-none-linux-gnueabi-ld | ||
235 | + | ||
236 | +CROSS_COMPILE := arm-none-linux-gnueabi- | ||
237 | +export CROSS_COMPILE | ||
238 | + | ||
239 | +# ---------------------------------------------------------------------------- | ||
240 | +# Command line switches used by the compiler | ||
241 | +# | ||
242 | +# CC_SW_DEF Command line defines | ||
243 | +# CC_SW_INC Search path for header files | ||
244 | +# CC_SW_OBJ Create object file | ||
245 | +# CC_SW_DEB Include debug information | ||
246 | +# ---------------------------------------------------------------------------- | ||
247 | +CC_SW_DEF := -D | ||
248 | +CC_SW_INC := -I | ||
249 | +CC_SW_OBJ := -o | ||
250 | +CC_SW_DEB := -g | ||
251 | + | ||
252 | +# ---------------------------------------------------------------------------- | ||
253 | +# Standard flags for the compiler | ||
254 | +# ---------------------------------------------------------------------------- | ||
255 | +STD_USER_FLAGS := -Wall -c | ||
256 | + | ||
257 | +# ---------------------------------------------------------------------------- | ||
258 | +# Flags for the compiler when building a library | ||
259 | +# ---------------------------------------------------------------------------- | ||
260 | +EXE_CC_FLAGS := | ||
261 | + | ||
262 | +# ---------------------------------------------------------------------------- | ||
263 | +# Standard flags for the compiler when building an executable | ||
264 | +# ---------------------------------------------------------------------------- | ||
265 | +DRV_CC_FLAGS := -nostdinc | ||
266 | + | ||
267 | +# ---------------------------------------------------------------------------- | ||
268 | +# Flags for the compiler when building a driver | ||
269 | +# ---------------------------------------------------------------------------- | ||
270 | +LIB_CC_FLAGS := | ||
271 | + | ||
272 | +# ---------------------------------------------------------------------------- | ||
273 | +# Standard definitions for the compiler | ||
274 | +# ---------------------------------------------------------------------------- | ||
275 | +STD_CC_DEFNS := -D_REENTRANT | ||
276 | + | ||
277 | +# ============================================================================ | ||
278 | +# ARCHIVER2 - This denotes the archiver. | ||
279 | +# ============================================================================ | ||
280 | +ARCHIVER := $(BASE_CGTOOLS)/arm-none-linux-gnueabi-ar | ||
281 | + | ||
282 | +# ---------------------------------------------------------------------------- | ||
283 | +# Standard flags for the archiver | ||
284 | +# ---------------------------------------------------------------------------- | ||
285 | +STD_AR_FLAGS := -rs | ||
286 | + | ||
287 | + | ||
288 | +# ============================================================================ | ||
289 | +# LINKER used for Library & Driver build | ||
290 | +# ============================================================================ | ||
291 | +LINKER := $(BASE_CGTOOLS)/arm-none-linux-gnueabi-gcc | ||
292 | + | ||
293 | +# ---------------------------------------------------------------------------- | ||
294 | +# Command line switches used by the linker | ||
295 | +# | ||
296 | +# LD_SW_LIB Search path for libraries | ||
297 | +# LD_SW_OUT Output filename | ||
298 | +# LD_SW_RELOC Generate relocateable output | ||
299 | +# ---------------------------------------------------------------------------- | ||
300 | +LD_SW_LIB := -L | ||
301 | +LD_SW_OUT := -o | ||
302 | +LD_SW_RELOC := -r | ||
303 | + | ||
304 | +# ---------------------------------------------------------------------------- | ||
305 | +# Flags for the LD when building an executable | ||
306 | +# ---------------------------------------------------------------------------- | ||
307 | +STD_LD_FLAGS := | ||
308 | + | ||
309 | +# ---------------------------------------------------------------------------- | ||
310 | +# Standard flags for the LD | ||
311 | +# ---------------------------------------------------------------------------- | ||
312 | +EXE_LD_FLAGS := -lpthread -lc | ||
313 | + | ||
314 | +# ---------------------------------------------------------------------------- | ||
315 | +# Standard flags for the archiver | ||
316 | +# ---------------------------------------------------------------------------- | ||
317 | +DRV_LD_FLAGS := | ||
318 | + | ||
319 | + | ||
320 | +# ============================================================================ | ||
321 | +# Post processing utilities for Linux 2.6 | ||
322 | +# ============================================================================ | ||
323 | +ifneq ($(CONFIG_MODVERSIONS),) | ||
324 | +CMD_MODPOST_FLAGS := -m -i | ||
325 | +else | ||
326 | +CMD_MODPOST_FLAGS := -i | ||
327 | +endif | ||
328 | + | ||
329 | +CMD_MODPOST := $(BASE_BUILDOS)/scripts/mod/modpost \ | ||
330 | + $(CMD_MODPOST_FLAGS) $(BASE_BUILDOS)/Module.symvers \ | ||
331 | + $(BASE_BUILDOS)/vmlinux | ||
332 | + | ||
333 | + | ||
334 | +endif # ifndef DAVINCI_LINUX2_6_MK | ||
335 | -- | ||
336 | 1.6.0.6 | ||
337 | |||
diff --git a/extras/recipes-ti/dsplink/ti-dsplink/dsplink_1_64_add_omapl137_build_support.patch b/extras/recipes-ti/dsplink/ti-dsplink/dsplink_1_64_add_omapl137_build_support.patch new file mode 100644 index 00000000..fa4cb2e6 --- /dev/null +++ b/extras/recipes-ti/dsplink/ti-dsplink/dsplink_1_64_add_omapl137_build_support.patch | |||
@@ -0,0 +1,288 @@ | |||
1 | From fd5858c3a247bc61a4de3af1a5097cb05042cfa4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Roger Monk <r-monk@ti.com> | ||
3 | Date: Sun, 14 Mar 2010 22:13:42 +0000 | ||
4 | Subject: [PATCH] omap1 | ||
5 | |||
6 | Signed-off-by: Roger Monk <r-monk@ti.com> | ||
7 | --- | ||
8 | dsplink/config/bin/dsplinkcfg.pl | 2 +- | ||
9 | dsplink/gpp/src/DIRS | 5 + | ||
10 | dsplink/gpp/src/Makefile | 8 ++- | ||
11 | dsplink/make/Linux/omapl1xx_arm.mk | 210 ++++++++++++++++++++++++++++++++++++ | ||
12 | 4 files changed, 223 insertions(+), 2 deletions(-) | ||
13 | create mode 100644 dsplink/make/Linux/omapl1xx_arm.mk | ||
14 | |||
15 | diff --git a/dsplink/config/bin/dsplinkcfg.pl b/dsplink/config/bin/dsplinkcfg.pl | ||
16 | index e83c133..8151945 100644 | ||
17 | --- a/dsplink/config/bin/dsplinkcfg.pl | ||
18 | +++ b/dsplink/config/bin/dsplinkcfg.pl | ||
19 | @@ -523,7 +523,7 @@ my %CFG_DSPCFG_OMAPL1XXGEMSHMEM = | ||
20 | 'PHYID' => 'OMAPL1XXGEMSHMEM', | ||
21 | 'PHYDESC' => 'Shared Memory Physical Interface', | ||
22 | 'PHYTYPE' => 'SHMEM', | ||
23 | - 'GPPOS' => [\%CFG_GPPOS_MVL5U, \%CFG_GPPOS_MVL5G], | ||
24 | + 'GPPOS' => [\%CFG_GPPOS_MVL5U, \%CFG_GPPOS_MVL5G, \%CFG_GPPOS_ARM], | ||
25 | 'DSPOS' => [\%CFG_DSPOS_5XX], | ||
26 | # DSP defines | ||
27 | 'DSPNAME' => 'OMAPL1XXGEM', | ||
28 | diff --git a/dsplink/gpp/src/DIRS b/dsplink/gpp/src/DIRS | ||
29 | index 05bad2b..af48904 100644 | ||
30 | --- a/dsplink/gpp/src/DIRS | ||
31 | +++ b/dsplink/gpp/src/DIRS | ||
32 | @@ -55,6 +55,10 @@ ifeq ("$(TI_DSPLINK_PLATFORM)", "OMAPL138") | ||
33 | DIRS += \ | ||
34 | api | ||
35 | else # ifeq ("$(TI_DSPLINK_PLATFORM)", "OMAPL138") | ||
36 | +ifeq ("$(TI_DSPLINK_PLATFORM)", "OMAPL1XX") | ||
37 | +DIRS += \ | ||
38 | + api | ||
39 | +else # ifeq ("$(TI_DSPLINK_PLATFORM)", "OMAPL1XX") | ||
40 | ifeq ("$(TI_DSPLINK_PLATFORM)", "OMAP3530") | ||
41 | DIRS += \ | ||
42 | api | ||
43 | @@ -83,6 +87,7 @@ endif # ifeq ("$(TI_DSPLINK_PLATFORM)", "OMAPL138") | ||
44 | endif # ifeq ("$(TI_DSPLINK_PLATFORM)", "DAVINCIHD") | ||
45 | endif # ifeq ("$(TI_DSPLINK_PLATFORM)", "DAVINCI") | ||
46 | endif # ifeq ("$(TI_DSPLINK_PLATFORM)", "DA850") | ||
47 | +endif | ||
48 | else # ifeq ("$(TI_DSPLINK_GPPOS)", "Linux") | ||
49 | DIRS += \ | ||
50 | arch \ | ||
51 | diff --git a/dsplink/gpp/src/Makefile b/dsplink/gpp/src/Makefile | ||
52 | index 49c3b97..0afd988 100644 | ||
53 | --- a/dsplink/gpp/src/Makefile | ||
54 | +++ b/dsplink/gpp/src/Makefile | ||
55 | @@ -83,7 +83,13 @@ ifeq ("$(TI_DSPLINK_GPPOS)", "Linux") | ||
56 | include $(DSPLINK)$(DIRSEP)gpp$(DIRSEP)src$(DIRSEP)Rules.mk | ||
57 | include $(DSPLINK)$(DIRSEP)gpp$(DIRSEP)src$(DIRSEP)Makefile_kbuild | ||
58 | else # else ("$(TI_DSPLINK_PLATFORM)", "DAVINCI") | ||
59 | - include Makefile_bld | ||
60 | + ifeq ("$(TI_DSPLINK_PLATFORM)", "OMAPL1XX") | ||
61 | + include $(DSPLINK)$(DIRSEP)gpp$(DIRSEP)src$(DIRSEP)Makefile_bld | ||
62 | + include $(DSPLINK)$(DIRSEP)gpp$(DIRSEP)src$(DIRSEP)Rules.mk | ||
63 | + include $(DSPLINK)$(DIRSEP)gpp$(DIRSEP)src$(DIRSEP)Makefile_kbuild | ||
64 | + else # else ("$(TI_DSPLINK_PLATFORM)", "DAVINCI") | ||
65 | + include Makefile_bld | ||
66 | + endif | ||
67 | endif # ifeq ("$(TI_DSPLINK_PLATFORM)", "DAVINCI") | ||
68 | endif # ifeq ("$(TI_DSPLINK_PLATFORM)", "OMAP3530") | ||
69 | endif # ifeq ("$(TI_DSPLINK_PLATFORM)", "DA850") | ||
70 | diff --git a/dsplink/make/Linux/omapl1xx_arm.mk b/dsplink/make/Linux/omapl1xx_arm.mk | ||
71 | new file mode 100644 | ||
72 | index 0000000..3e42e87 | ||
73 | --- /dev/null | ||
74 | +++ b/dsplink/make/Linux/omapl1xx_arm.mk | ||
75 | @@ -0,0 +1,210 @@ | ||
76 | +# ============================================================================ | ||
77 | +# @file omapl1xx_arm.mk | ||
78 | +# | ||
79 | +# @path $(DSPLINK)/make/Linux/ | ||
80 | +# | ||
81 | +# @desc This makefile defines OS specific macros used by MAKE system for | ||
82 | +# the Montavista Pro 5.0 Linux distribution with mvlpro. | ||
83 | +# | ||
84 | +# @ver 1.64 | ||
85 | +# ============================================================================ | ||
86 | +# Copyright (C) 2002-2009, Texas Instruments Incorporated - | ||
87 | +# http://www.ti.com/ | ||
88 | +# | ||
89 | +# Redistribution and use in source and binary forms, with or without | ||
90 | +# modification, are permitted provided that the following conditions | ||
91 | +# are met: | ||
92 | +# | ||
93 | +# * Redistributions of source code must retain the above copyright | ||
94 | +# notice, this list of conditions and the following disclaimer. | ||
95 | +# | ||
96 | +# * Redistributions in binary form must reproduce the above copyright | ||
97 | +# notice, this list of conditions and the following disclaimer in the | ||
98 | +# documentation and/or other materials provided with the distribution. | ||
99 | +# | ||
100 | +# * Neither the name of Texas Instruments Incorporated nor the names of | ||
101 | +# its contributors may be used to endorse or promote products derived | ||
102 | +# from this software without specific prior written permission. | ||
103 | +# | ||
104 | +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
105 | +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
106 | +# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
107 | +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR | ||
108 | +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
109 | +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
110 | +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | ||
111 | +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
112 | +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | ||
113 | +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, | ||
114 | +# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
115 | +# ============================================================================ | ||
116 | + | ||
117 | +ifndef OMAPL1XX_ARM_MK | ||
118 | + | ||
119 | +define OMAPL1XX_ARM_MK | ||
120 | +endef | ||
121 | + | ||
122 | + | ||
123 | +# ============================================================================ | ||
124 | +# Let the make system know that a specific distribution for the GPP OS | ||
125 | +# is being used. | ||
126 | +# ============================================================================ | ||
127 | +USE_DISTRIBUTION := 1 | ||
128 | + | ||
129 | + | ||
130 | +# ============================================================================ | ||
131 | +# Set the values of necessary variables to be used for the OS. | ||
132 | +# ============================================================================ | ||
133 | + | ||
134 | +# ---------------------------------------------------------------------------- | ||
135 | +# Base directory for the GPP OS | ||
136 | +# ---------------------------------------------------------------------------- | ||
137 | +BASE_BUILDOS := ${HOME}/da850/DaVinci-PSP-SDK-03.20.00.01/src/kernel/linux-03.20.00.01 | ||
138 | + | ||
139 | +# ---------------------------------------------------------------------------- | ||
140 | +# Base for toolchain | ||
141 | +# ---------------------------------------------------------------------------- | ||
142 | +BASE_TOOLCHAIN := ${HOME}/git/arm-2008q3 | ||
143 | + | ||
144 | +# ---------------------------------------------------------------------------- | ||
145 | +# Base for code generation tools - compiler, linker, archiver etc. | ||
146 | +# ---------------------------------------------------------------------------- | ||
147 | +BASE_CGTOOLS := $(BASE_TOOLCHAIN)/bin | ||
148 | + | ||
149 | +# ---------------------------------------------------------------------------- | ||
150 | +# Base directory for include files provided by GPP OS | ||
151 | +# ---------------------------------------------------------------------------- | ||
152 | +BASE_OSINC := $(BASE_BUILDOS)/include | ||
153 | + | ||
154 | +OSINC_GENERIC := $(BASE_OSINC) | ||
155 | +OSINC_PLATFORM := $(BASE_TOOLCHAIN)/lib/gcc/arm-none-linux-gnueabi/4.3.2/include | ||
156 | +OSINC_TARGET := $(BASE_TOOLCHAIN)/arm-none-linux-gnueabi/libc/usr/include | ||
157 | + | ||
158 | +ifneq ("$(VARIANT)", "") | ||
159 | +OSINC_VARIANT := $(BASE_OSINC) | ||
160 | +endif | ||
161 | + | ||
162 | + | ||
163 | +# ---------------------------------------------------------------------------- | ||
164 | +# Base directory for libraries provided by GPP OS | ||
165 | +# ---------------------------------------------------------------------------- | ||
166 | +BASE_OSLIB := $(BASE_TOOLCHAIN)/lib | ||
167 | + | ||
168 | +OSLIB_GENERIC := $(BASE_OSLIB) | ||
169 | +OSLIB_PLATFORM := $(BASE_OSLIB) | ||
170 | + | ||
171 | + | ||
172 | +ifneq ("$(VARIANT)", "") | ||
173 | +OSLIB_VARIANT := $(BASE_OSLIB) | ||
174 | +endif | ||
175 | + | ||
176 | + | ||
177 | +# ============================================================================ | ||
178 | +# COMPILER | ||
179 | +# ============================================================================ | ||
180 | + | ||
181 | +# ---------------------------------------------------------------------------- | ||
182 | +# Name of the compiler | ||
183 | +# ---------------------------------------------------------------------------- | ||
184 | +COMPILER := $(BASE_CGTOOLS)/arm-none-linux-gnueabi-gcc | ||
185 | +LD := $(BASE_CGTOOLS)/arm-none-linux-gnueabi-ld | ||
186 | + | ||
187 | +CROSS_COMPILE := arm-none-linux-gnueabi- | ||
188 | +export CROSS_COMPILE | ||
189 | + | ||
190 | +# ---------------------------------------------------------------------------- | ||
191 | +# Command line switches used by the compiler | ||
192 | +# | ||
193 | +# CC_SW_DEF Command line defines | ||
194 | +# CC_SW_INC Search path for header files | ||
195 | +# CC_SW_OBJ Create object file | ||
196 | +# CC_SW_DEB Include debug information | ||
197 | +# ---------------------------------------------------------------------------- | ||
198 | +CC_SW_DEF := -D | ||
199 | +CC_SW_INC := -I | ||
200 | +CC_SW_OBJ := -o | ||
201 | +CC_SW_DEB := -g | ||
202 | + | ||
203 | +# ---------------------------------------------------------------------------- | ||
204 | +# Standard flags for the compiler | ||
205 | +# ---------------------------------------------------------------------------- | ||
206 | +STD_USER_FLAGS := -Wall -c | ||
207 | + | ||
208 | +# ---------------------------------------------------------------------------- | ||
209 | +# Standard flags for the compiler when building an executable | ||
210 | +# ---------------------------------------------------------------------------- | ||
211 | +EXE_CC_FLAGS := | ||
212 | + | ||
213 | +# ---------------------------------------------------------------------------- | ||
214 | +# Flags for the compiler when building a driver | ||
215 | +# ---------------------------------------------------------------------------- | ||
216 | +DRV_CC_FLAGS := -nostdinc | ||
217 | + | ||
218 | +# ---------------------------------------------------------------------------- | ||
219 | +# Flags for the compiler when building a library | ||
220 | +# ---------------------------------------------------------------------------- | ||
221 | +LIB_CC_FLAGS := | ||
222 | + | ||
223 | +# ---------------------------------------------------------------------------- | ||
224 | +# Standard definitions for the compiler | ||
225 | +# ---------------------------------------------------------------------------- | ||
226 | +STD_CC_DEFNS := -D_REENTRANT | ||
227 | + | ||
228 | +# ============================================================================ | ||
229 | +# ARCHIVER2 - This denotes the archiver. | ||
230 | +# ============================================================================ | ||
231 | +ARCHIVER := $(BASE_CGTOOLS)/arm-none-linux-gnueabi-ar | ||
232 | + | ||
233 | +# ---------------------------------------------------------------------------- | ||
234 | +# Standard flags for the archiver | ||
235 | +# ---------------------------------------------------------------------------- | ||
236 | +STD_AR_FLAGS := -rs | ||
237 | + | ||
238 | + | ||
239 | +# ============================================================================ | ||
240 | +# LINKER - The compiler is used for linking purpose as well. | ||
241 | +# ============================================================================ | ||
242 | +LINKER := $(BASE_CGTOOLS)/arm-none-linux-gnueabi-gcc | ||
243 | + | ||
244 | +# ---------------------------------------------------------------------------- | ||
245 | +# Command line switches used by the linker | ||
246 | +# | ||
247 | +# LD_SW_LIB Search path for libraries | ||
248 | +# LD_SW_OUT Output filename | ||
249 | +# LD_SW_RELOC Generate relocateable output | ||
250 | +# ---------------------------------------------------------------------------- | ||
251 | +LD_SW_LIB := -L | ||
252 | +LD_SW_OUT := -o | ||
253 | +LD_SW_RELOC := -r | ||
254 | + | ||
255 | +# ---------------------------------------------------------------------------- | ||
256 | +# Standard flags for the linker | ||
257 | +# ---------------------------------------------------------------------------- | ||
258 | +STD_LD_FLAGS := | ||
259 | + | ||
260 | +# ---------------------------------------------------------------------------- | ||
261 | +# Flags for the linker when building an executable | ||
262 | +# ---------------------------------------------------------------------------- | ||
263 | +EXE_LD_FLAGS := -lpthread -lc | ||
264 | + | ||
265 | +# ---------------------------------------------------------------------------- | ||
266 | +# Flags for the linker when building a driver | ||
267 | +# ---------------------------------------------------------------------------- | ||
268 | +DRV_LD_FLAGS := | ||
269 | + | ||
270 | + | ||
271 | +# ============================================================================ | ||
272 | +# Post processing utilities for Linux 2.6 | ||
273 | +# ============================================================================ | ||
274 | +ifneq ($(CONFIG_MODVERSIONS),) | ||
275 | +CMD_MODPOST_FLAGS := -m -i | ||
276 | +else | ||
277 | +CMD_MODPOST_FLAGS := -i | ||
278 | +endif | ||
279 | + | ||
280 | +CMD_MODPOST := $(BASE_BUILDOS)/scripts/mod/modpost \ | ||
281 | + $(CMD_MODPOST_FLAGS) $(BASE_BUILDOS)/Module.symvers \ | ||
282 | + $(BASE_BUILDOS)/vmlinux | ||
283 | + | ||
284 | + | ||
285 | +endif # ifndef OMAPL1XX_ARM_MK | ||
286 | -- | ||
287 | 1.6.0.6 | ||
288 | |||
diff --git a/extras/recipes-ti/dsplink/ti-dsplink/dsplink_1_64_kernel_2_6_33_autoconf.patch b/extras/recipes-ti/dsplink/ti-dsplink/dsplink_1_64_kernel_2_6_33_autoconf.patch new file mode 100644 index 00000000..271b3043 --- /dev/null +++ b/extras/recipes-ti/dsplink/ti-dsplink/dsplink_1_64_kernel_2_6_33_autoconf.patch | |||
@@ -0,0 +1,335 @@ | |||
1 | diff -uNr dsplink_linux_1_64a/dsplink/gpp/src/arch/DA8XXGEM/da8xxgem_hal_pwr.c dsplink_linux_1_64b/dsplink/gpp/src/arch/DA8XXGEM/da8xxgem_hal_pwr.c | ||
2 | --- dsplink_linux_1_64a/dsplink/gpp/src/arch/DA8XXGEM/da8xxgem_hal_pwr.c 2009-11-13 12:12:47.000000000 +0000 | ||
3 | +++ dsplink_linux_1_64b/dsplink/gpp/src/arch/DA8XXGEM/da8xxgem_hal_pwr.c 2010-02-09 17:42:37.000000000 +0000 | ||
4 | @@ -22,7 +22,12 @@ | ||
5 | |||
6 | |||
7 | /* ----------------------------------- OSAL Headers */ | ||
8 | +#include <linux/version.h> | ||
9 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) | ||
10 | +#include <generated/autoconf.h> | ||
11 | +#else | ||
12 | #include <linux/autoconf.h> | ||
13 | +#endif | ||
14 | #include <asm/page.h> | ||
15 | #include <asm/io.h> | ||
16 | |||
17 | diff -uNr dsplink_linux_1_64a/dsplink/gpp/src/arch/DA8XXGEM/shmem/Linux/da8xxgem_phy_shmem.c dsplink_linux_1_64b/dsplink/gpp/src/arch/DA8XXGEM/shmem/Linux/da8xxgem_phy_shmem.c | ||
18 | --- dsplink_linux_1_64a/dsplink/gpp/src/arch/DA8XXGEM/shmem/Linux/da8xxgem_phy_shmem.c 2009-11-13 12:12:47.000000000 +0000 | ||
19 | +++ dsplink_linux_1_64b/dsplink/gpp/src/arch/DA8XXGEM/shmem/Linux/da8xxgem_phy_shmem.c 2010-02-09 17:43:06.000000000 +0000 | ||
20 | @@ -22,7 +22,12 @@ | ||
21 | |||
22 | |||
23 | /* ----------------------------------- OS Headers */ | ||
24 | +#include <linux/version.h> | ||
25 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) | ||
26 | +#include <generated/autoconf.h> | ||
27 | +#else | ||
28 | #include <linux/autoconf.h> | ||
29 | +#endif | ||
30 | #include <linux/module.h> | ||
31 | #include <linux/types.h> | ||
32 | #include <linux/kernel.h> | ||
33 | diff -uNr dsplink_linux_1_64a/dsplink/gpp/src/arch/DM6437/pci/dm6437_hal_pci_dma.c dsplink_linux_1_64b/dsplink/gpp/src/arch/DM6437/pci/dm6437_hal_pci_dma.c | ||
34 | --- dsplink_linux_1_64a/dsplink/gpp/src/arch/DM6437/pci/dm6437_hal_pci_dma.c 2009-11-13 12:12:46.000000000 +0000 | ||
35 | +++ dsplink_linux_1_64b/dsplink/gpp/src/arch/DM6437/pci/dm6437_hal_pci_dma.c 2010-02-09 17:45:06.000000000 +0000 | ||
36 | @@ -21,7 +21,12 @@ | ||
37 | */ | ||
38 | |||
39 | |||
40 | +#include <linux/version.h> | ||
41 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) | ||
42 | +#include <generated/autoconf.h> | ||
43 | +#else | ||
44 | #include <linux/autoconf.h> | ||
45 | +#endif | ||
46 | #include <asm/page.h> | ||
47 | #include <asm/io.h> | ||
48 | |||
49 | diff -uNr dsplink_linux_1_64a/dsplink/gpp/src/arch/DM6437/pci/Linux/2.6.18/dm6437_phy_pci.c dsplink_linux_1_64b/dsplink/gpp/src/arch/DM6437/pci/Linux/2.6.18/dm6437_phy_pci.c | ||
50 | --- dsplink_linux_1_64a/dsplink/gpp/src/arch/DM6437/pci/Linux/2.6.18/dm6437_phy_pci.c 2009-11-13 12:12:46.000000000 +0000 | ||
51 | +++ dsplink_linux_1_64b/dsplink/gpp/src/arch/DM6437/pci/Linux/2.6.18/dm6437_phy_pci.c 2010-02-09 17:44:49.000000000 +0000 | ||
52 | @@ -22,7 +22,12 @@ | ||
53 | |||
54 | |||
55 | /* ----------------------------------- OS Headers */ | ||
56 | +#include <linux/version.h> | ||
57 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) | ||
58 | +#include <generated/autoconf.h> | ||
59 | +#else | ||
60 | #include <linux/autoconf.h> | ||
61 | +#endif | ||
62 | #include <linux/module.h> | ||
63 | #include <linux/types.h> | ||
64 | #include <linux/kernel.h> | ||
65 | diff -uNr dsplink_linux_1_64a/dsplink/gpp/src/arch/DM6446GEM/shmem/Linux/dm6446gem_phy_shmem.c dsplink_linux_1_64b/dsplink/gpp/src/arch/DM6446GEM/shmem/Linux/dm6446gem_phy_shmem.c | ||
66 | --- dsplink_linux_1_64a/dsplink/gpp/src/arch/DM6446GEM/shmem/Linux/dm6446gem_phy_shmem.c 2009-11-13 12:12:46.000000000 +0000 | ||
67 | +++ dsplink_linux_1_64b/dsplink/gpp/src/arch/DM6446GEM/shmem/Linux/dm6446gem_phy_shmem.c 2010-02-09 17:44:21.000000000 +0000 | ||
68 | @@ -22,7 +22,12 @@ | ||
69 | |||
70 | |||
71 | /* ----------------------------------- OS Headers */ | ||
72 | +#include <linux/version.h> | ||
73 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) | ||
74 | +#include <generated/autoconf.h> | ||
75 | +#else | ||
76 | #include <linux/autoconf.h> | ||
77 | +#endif | ||
78 | #include <linux/module.h> | ||
79 | #include <linux/types.h> | ||
80 | #include <linux/kernel.h> | ||
81 | diff -uNr dsplink_linux_1_64a/dsplink/gpp/src/arch/DM6467GEM/shmem/Linux/dm6467gem_phy_shmem.c dsplink_linux_1_64b/dsplink/gpp/src/arch/DM6467GEM/shmem/Linux/dm6467gem_phy_shmem.c | ||
82 | --- dsplink_linux_1_64a/dsplink/gpp/src/arch/DM6467GEM/shmem/Linux/dm6467gem_phy_shmem.c 2009-11-13 12:12:46.000000000 +0000 | ||
83 | +++ dsplink_linux_1_64b/dsplink/gpp/src/arch/DM6467GEM/shmem/Linux/dm6467gem_phy_shmem.c 2010-02-09 17:41:46.000000000 +0000 | ||
84 | @@ -22,7 +22,12 @@ | ||
85 | |||
86 | |||
87 | /* ----------------------------------- OS Headers */ | ||
88 | +#include <linux/version.h> | ||
89 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) | ||
90 | +#include <generated/autoconf.h> | ||
91 | +#else | ||
92 | #include <linux/autoconf.h> | ||
93 | +#endif | ||
94 | #include <linux/module.h> | ||
95 | #include <linux/types.h> | ||
96 | #include <linux/kernel.h> | ||
97 | diff -uNr dsplink_linux_1_64a/dsplink/gpp/src/arch/DM648/pci/dm648_hal_pci_dma.c dsplink_linux_1_64b/dsplink/gpp/src/arch/DM648/pci/dm648_hal_pci_dma.c | ||
98 | --- dsplink_linux_1_64a/dsplink/gpp/src/arch/DM648/pci/dm648_hal_pci_dma.c 2009-11-13 12:12:46.000000000 +0000 | ||
99 | +++ dsplink_linux_1_64b/dsplink/gpp/src/arch/DM648/pci/dm648_hal_pci_dma.c 2010-02-09 17:42:02.000000000 +0000 | ||
100 | @@ -20,7 +20,12 @@ | ||
101 | * ============================================================================ | ||
102 | */ | ||
103 | |||
104 | +#include <linux/version.h> | ||
105 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) | ||
106 | +#include <generated/autoconf.h> | ||
107 | +#else | ||
108 | #include <linux/autoconf.h> | ||
109 | +#endif | ||
110 | #include <asm/page.h> | ||
111 | #include <asm/io.h> | ||
112 | |||
113 | diff -uNr dsplink_linux_1_64a/dsplink/gpp/src/arch/DM648/pci/Linux/2.6.18/dm648_phy_pci.c dsplink_linux_1_64b/dsplink/gpp/src/arch/DM648/pci/Linux/2.6.18/dm648_phy_pci.c | ||
114 | --- dsplink_linux_1_64a/dsplink/gpp/src/arch/DM648/pci/Linux/2.6.18/dm648_phy_pci.c 2009-11-13 12:12:46.000000000 +0000 | ||
115 | +++ dsplink_linux_1_64b/dsplink/gpp/src/arch/DM648/pci/Linux/2.6.18/dm648_phy_pci.c 2010-02-09 17:42:21.000000000 +0000 | ||
116 | @@ -22,7 +22,12 @@ | ||
117 | |||
118 | |||
119 | /* ----------------------------------- OS Headers */ | ||
120 | +#include <linux/version.h> | ||
121 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) | ||
122 | +#include <generated/autoconf.h> | ||
123 | +#else | ||
124 | #include <linux/autoconf.h> | ||
125 | +#endif | ||
126 | #include <linux/module.h> | ||
127 | #include <linux/types.h> | ||
128 | #include <linux/kernel.h> | ||
129 | diff -uNr dsplink_linux_1_64a/dsplink/gpp/src/arch/OMAP2530/shmem/Linux/omap2530_phy_shmem.c dsplink_linux_1_64b/dsplink/gpp/src/arch/OMAP2530/shmem/Linux/omap2530_phy_shmem.c | ||
130 | --- dsplink_linux_1_64a/dsplink/gpp/src/arch/OMAP2530/shmem/Linux/omap2530_phy_shmem.c 2009-11-13 12:12:47.000000000 +0000 | ||
131 | +++ dsplink_linux_1_64b/dsplink/gpp/src/arch/OMAP2530/shmem/Linux/omap2530_phy_shmem.c 2010-02-09 17:43:29.000000000 +0000 | ||
132 | @@ -25,7 +25,12 @@ | ||
133 | |||
134 | |||
135 | /* ----------------------------------- OS Headers */ | ||
136 | +#include <linux/version.h> | ||
137 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) | ||
138 | +#include <generated/autoconf.h> | ||
139 | +#else | ||
140 | #include <linux/autoconf.h> | ||
141 | +#endif | ||
142 | #include <linux/module.h> | ||
143 | #include <linux/types.h> | ||
144 | #include <linux/kernel.h> | ||
145 | diff -uNr dsplink_linux_1_64a/dsplink/gpp/src/arch/OMAP3530/shmem/Linux/omap3530_phy_shmem.c dsplink_linux_1_64b/dsplink/gpp/src/arch/OMAP3530/shmem/Linux/omap3530_phy_shmem.c | ||
146 | --- dsplink_linux_1_64a/dsplink/gpp/src/arch/OMAP3530/shmem/Linux/omap3530_phy_shmem.c 2009-11-13 12:12:47.000000000 +0000 | ||
147 | +++ dsplink_linux_1_64b/dsplink/gpp/src/arch/OMAP3530/shmem/Linux/omap3530_phy_shmem.c 2010-02-09 17:43:50.000000000 +0000 | ||
148 | @@ -22,7 +22,12 @@ | ||
149 | |||
150 | |||
151 | /* ----------------------------------- OS Headers */ | ||
152 | +#include <linux/version.h> | ||
153 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) | ||
154 | +#include <generated/autoconf.h> | ||
155 | +#else | ||
156 | #include <linux/autoconf.h> | ||
157 | +#endif | ||
158 | #include <linux/module.h> | ||
159 | #include <linux/types.h> | ||
160 | #include <linux/kernel.h> | ||
161 | diff -uNr dsplink_linux_1_64a/dsplink/gpp/src/arch/TNETV107XGEM/shmem/Linux/tnetv107xgem_phy_shmem.c dsplink_linux_1_64b/dsplink/gpp/src/arch/TNETV107XGEM/shmem/Linux/tnetv107xgem_phy_shmem.c | ||
162 | --- dsplink_linux_1_64a/dsplink/gpp/src/arch/TNETV107XGEM/shmem/Linux/tnetv107xgem_phy_shmem.c 2009-11-13 12:12:47.000000000 +0000 | ||
163 | +++ dsplink_linux_1_64b/dsplink/gpp/src/arch/TNETV107XGEM/shmem/Linux/tnetv107xgem_phy_shmem.c 2010-02-09 17:44:06.000000000 +0000 | ||
164 | @@ -22,7 +22,12 @@ | ||
165 | |||
166 | |||
167 | /* ----------------------------------- OS Headers */ | ||
168 | +#include <linux/version.h> | ||
169 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) | ||
170 | +#include <generated/autoconf.h> | ||
171 | +#else | ||
172 | #include <linux/autoconf.h> | ||
173 | +#endif | ||
174 | #include <linux/module.h> | ||
175 | #include <linux/types.h> | ||
176 | #include <linux/kernel.h> | ||
177 | diff -uNr dsplink_linux_1_64a/dsplink/gpp/src/osal/Linux/2.6.18/dpc.c dsplink_linux_1_64b/dsplink/gpp/src/osal/Linux/2.6.18/dpc.c | ||
178 | --- dsplink_linux_1_64a/dsplink/gpp/src/osal/Linux/2.6.18/dpc.c 2009-11-13 12:12:47.000000000 +0000 | ||
179 | +++ dsplink_linux_1_64b/dsplink/gpp/src/osal/Linux/2.6.18/dpc.c 2010-02-09 17:47:25.000000000 +0000 | ||
180 | @@ -22,7 +22,12 @@ | ||
181 | |||
182 | |||
183 | /* ----------------------------------- OS Specific Headers */ | ||
184 | +#include <linux/version.h> | ||
185 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) | ||
186 | +#include <generated/autoconf.h> | ||
187 | +#else | ||
188 | #include <linux/autoconf.h> | ||
189 | +#endif | ||
190 | #include <linux/spinlock.h> | ||
191 | #include <linux/sched.h> | ||
192 | #include <linux/interrupt.h> | ||
193 | diff -uNr dsplink_linux_1_64a/dsplink/gpp/src/osal/Linux/2.6.18/isr.c dsplink_linux_1_64b/dsplink/gpp/src/osal/Linux/2.6.18/isr.c | ||
194 | --- dsplink_linux_1_64a/dsplink/gpp/src/osal/Linux/2.6.18/isr.c 2009-11-13 12:12:47.000000000 +0000 | ||
195 | +++ dsplink_linux_1_64b/dsplink/gpp/src/osal/Linux/2.6.18/isr.c 2010-02-09 17:46:54.000000000 +0000 | ||
196 | @@ -22,7 +22,12 @@ | ||
197 | |||
198 | |||
199 | /* ----------------------------------- OS Specific Headers */ | ||
200 | +#include <linux/version.h> | ||
201 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) | ||
202 | +#include <generated/autoconf.h> | ||
203 | +#else | ||
204 | #include <linux/autoconf.h> | ||
205 | +#endif | ||
206 | #include <linux/version.h> | ||
207 | #include <linux/spinlock.h> | ||
208 | #include <linux/sched.h> | ||
209 | diff -uNr dsplink_linux_1_64a/dsplink/gpp/src/osal/Linux/2.6.18/kfiledef.c dsplink_linux_1_64b/dsplink/gpp/src/osal/Linux/2.6.18/kfiledef.c | ||
210 | --- dsplink_linux_1_64a/dsplink/gpp/src/osal/Linux/2.6.18/kfiledef.c 2009-11-13 12:12:47.000000000 +0000 | ||
211 | +++ dsplink_linux_1_64b/dsplink/gpp/src/osal/Linux/2.6.18/kfiledef.c 2010-02-09 17:46:39.000000000 +0000 | ||
212 | @@ -22,7 +22,12 @@ | ||
213 | |||
214 | |||
215 | /* ----------------------------------- OS Specific Headers */ | ||
216 | +#include <linux/version.h> | ||
217 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) | ||
218 | +#include <generated/autoconf.h> | ||
219 | +#else | ||
220 | #include <linux/autoconf.h> | ||
221 | +#endif | ||
222 | #include <linux/spinlock.h> | ||
223 | #include <linux/kernel.h> | ||
224 | #include <linux/mm.h> | ||
225 | diff -uNr dsplink_linux_1_64a/dsplink/gpp/src/osal/Linux/2.6.18/mem.c dsplink_linux_1_64b/dsplink/gpp/src/osal/Linux/2.6.18/mem.c | ||
226 | --- dsplink_linux_1_64a/dsplink/gpp/src/osal/Linux/2.6.18/mem.c 2009-11-13 12:12:47.000000000 +0000 | ||
227 | +++ dsplink_linux_1_64b/dsplink/gpp/src/osal/Linux/2.6.18/mem.c 2010-02-09 17:46:25.000000000 +0000 | ||
228 | @@ -22,7 +22,12 @@ | ||
229 | |||
230 | |||
231 | /* ----------------------------------- OS Specific Headers */ | ||
232 | +#include <linux/version.h> | ||
233 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) | ||
234 | +#include <generated/autoconf.h> | ||
235 | +#else | ||
236 | #include <linux/autoconf.h> | ||
237 | +#endif | ||
238 | #include <linux/spinlock.h> | ||
239 | #include <linux/sched.h> | ||
240 | #include <linux/types.h> | ||
241 | diff -uNr dsplink_linux_1_64a/dsplink/gpp/src/osal/Linux/2.6.18/notify_knl.c dsplink_linux_1_64b/dsplink/gpp/src/osal/Linux/2.6.18/notify_knl.c | ||
242 | --- dsplink_linux_1_64a/dsplink/gpp/src/osal/Linux/2.6.18/notify_knl.c 2009-11-13 12:12:47.000000000 +0000 | ||
243 | +++ dsplink_linux_1_64b/dsplink/gpp/src/osal/Linux/2.6.18/notify_knl.c 2010-02-09 17:47:12.000000000 +0000 | ||
244 | @@ -22,7 +22,12 @@ | ||
245 | |||
246 | |||
247 | /* ----------------------------------- OS Specific Headers */ | ||
248 | +#include <linux/version.h> | ||
249 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) | ||
250 | +#include <generated/autoconf.h> | ||
251 | +#else | ||
252 | #include <linux/autoconf.h> | ||
253 | +#endif | ||
254 | #include <linux/spinlock.h> | ||
255 | #include <linux/signal.h> | ||
256 | #include <linux/kernel.h> | ||
257 | diff -uNr dsplink_linux_1_64a/dsplink/gpp/src/osal/Linux/2.6.18/sync.c dsplink_linux_1_64b/dsplink/gpp/src/osal/Linux/2.6.18/sync.c | ||
258 | --- dsplink_linux_1_64a/dsplink/gpp/src/osal/Linux/2.6.18/sync.c 2009-11-13 12:12:47.000000000 +0000 | ||
259 | +++ dsplink_linux_1_64b/dsplink/gpp/src/osal/Linux/2.6.18/sync.c 2010-02-09 17:47:39.000000000 +0000 | ||
260 | @@ -22,7 +22,12 @@ | ||
261 | |||
262 | |||
263 | /* ----------------------------------- OS Specific Headers */ | ||
264 | +#include <linux/version.h> | ||
265 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) | ||
266 | +#include <generated/autoconf.h> | ||
267 | +#else | ||
268 | #include <linux/autoconf.h> | ||
269 | +#endif | ||
270 | #include <linux/spinlock.h> | ||
271 | #include <linux/timer.h> | ||
272 | #include <linux/sched.h> | ||
273 | diff -uNr dsplink_linux_1_64a/dsplink/gpp/src/osal/Linux/prcs.c dsplink_linux_1_64b/dsplink/gpp/src/osal/Linux/prcs.c | ||
274 | --- dsplink_linux_1_64a/dsplink/gpp/src/osal/Linux/prcs.c 2009-11-13 12:12:47.000000000 +0000 | ||
275 | +++ dsplink_linux_1_64b/dsplink/gpp/src/osal/Linux/prcs.c 2010-02-09 17:45:44.000000000 +0000 | ||
276 | @@ -22,7 +22,12 @@ | ||
277 | |||
278 | |||
279 | /* ----------------------------------- OS Specific Headers */ | ||
280 | +#include <linux/version.h> | ||
281 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) | ||
282 | +#include <generated/autoconf.h> | ||
283 | +#else | ||
284 | #include <linux/autoconf.h> | ||
285 | +#endif | ||
286 | #include <linux/spinlock.h> | ||
287 | #include <linux/module.h> | ||
288 | #include <linux/mm.h> | ||
289 | diff -uNr dsplink_linux_1_64a/dsplink/gpp/src/osal/Linux/print.c dsplink_linux_1_64b/dsplink/gpp/src/osal/Linux/print.c | ||
290 | --- dsplink_linux_1_64a/dsplink/gpp/src/osal/Linux/print.c 2009-11-13 12:12:47.000000000 +0000 | ||
291 | +++ dsplink_linux_1_64b/dsplink/gpp/src/osal/Linux/print.c 2010-02-09 17:45:30.000000000 +0000 | ||
292 | @@ -22,7 +22,12 @@ | ||
293 | |||
294 | |||
295 | /* ----------------------------------- OS Specific Headers */ | ||
296 | +#include <linux/version.h> | ||
297 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) | ||
298 | +#include <generated/autoconf.h> | ||
299 | +#else | ||
300 | #include <linux/autoconf.h> | ||
301 | +#endif | ||
302 | #include <linux/spinlock.h> | ||
303 | #include <stdarg.h> | ||
304 | #include <linux/types.h> | ||
305 | diff -uNr dsplink_linux_1_64a/dsplink/gpp/src/osal/Linux/user.c dsplink_linux_1_64b/dsplink/gpp/src/osal/Linux/user.c | ||
306 | --- dsplink_linux_1_64a/dsplink/gpp/src/osal/Linux/user.c 2009-11-13 12:12:47.000000000 +0000 | ||
307 | +++ dsplink_linux_1_64b/dsplink/gpp/src/osal/Linux/user.c 2010-02-09 17:46:07.000000000 +0000 | ||
308 | @@ -22,7 +22,12 @@ | ||
309 | |||
310 | |||
311 | /* ----------------------------------- OS Specific Headers */ | ||
312 | +#include <linux/version.h> | ||
313 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) | ||
314 | +#include <generated/autoconf.h> | ||
315 | +#else | ||
316 | #include <linux/autoconf.h> | ||
317 | +#endif | ||
318 | #include <linux/spinlock.h> | ||
319 | #include <linux/timer.h> | ||
320 | #include <linux/sched.h> | ||
321 | diff -uNr dsplink_linux_1_64a/dsplink/gpp/src/pmgr/Linux/2.6.18/drv_pmgr.c dsplink_linux_1_64b/dsplink/gpp/src/pmgr/Linux/2.6.18/drv_pmgr.c | ||
322 | --- dsplink_linux_1_64a/dsplink/gpp/src/pmgr/Linux/2.6.18/drv_pmgr.c 2009-11-13 12:12:48.000000000 +0000 | ||
323 | +++ dsplink_linux_1_64b/dsplink/gpp/src/pmgr/Linux/2.6.18/drv_pmgr.c 2010-02-09 17:40:59.000000000 +0000 | ||
324 | @@ -33,7 +33,11 @@ | ||
325 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) | ||
326 | #include <linux/device.h> | ||
327 | #endif | ||
328 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) | ||
329 | +#include <generated/autoconf.h> | ||
330 | +#else | ||
331 | #include <linux/autoconf.h> | ||
332 | +#endif | ||
333 | #include <linux/spinlock.h> | ||
334 | #include <linux/module.h> | ||
335 | #include <linux/init.h> | ||
diff --git a/extras/recipes-ti/dsplink/ti-dsplink/ti-dsplink-examples-loadmodules.sh b/extras/recipes-ti/dsplink/ti-dsplink/ti-dsplink-examples-loadmodules.sh new file mode 100755 index 00000000..9cfb19d5 --- /dev/null +++ b/extras/recipes-ti/dsplink/ti-dsplink/ti-dsplink-examples-loadmodules.sh | |||
@@ -0,0 +1,25 @@ | |||
1 | # | ||
2 | # Default Memory Map - for OMAP3530 dsplink examples | ||
3 | # | ||
4 | # Start Addr Size Description | ||
5 | # ------------------------------------------- | ||
6 | # 0x80000000 126 MB Linux | ||
7 | # 0x87E00000 2 MB DSPLINK (MEM) + DDR + DSPLINK (RESET) | ||
8 | |||
9 | # sanity check to verify that we're using the right mem=xxM (126M in this case) | ||
10 | awk '/MemTotal:/ { | ||
11 | mem=$2 | ||
12 | |||
13 | if (mem > 126 * 1024) | ||
14 | print "Warning! You need to use mem=126M or less on the kernel cmdline" | ||
15 | |||
16 | printf "You have %dkB total memory for Linux\n", mem | ||
17 | }' /proc/meminfo | ||
18 | |||
19 | # insert DSP/BIOS Link driver | ||
20 | # | ||
21 | modprobe dsplinkk | ||
22 | |||
23 | # make /dev/dsplink | ||
24 | #rm -f /dev/dsplink | ||
25 | #mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0 | ||
diff --git a/extras/recipes-ti/dsplink/ti-dsplink/ti-dsplink-examples-run.sh b/extras/recipes-ti/dsplink/ti-dsplink/ti-dsplink-examples-run.sh new file mode 100755 index 00000000..b2f2faac --- /dev/null +++ b/extras/recipes-ti/dsplink/ti-dsplink/ti-dsplink-examples-run.sh | |||
@@ -0,0 +1,25 @@ | |||
1 | #! /bin/sh | ||
2 | |||
3 | echo "Running Loop Sample App" | ||
4 | ./loopgpp loop.out 1024 2000 0 | ||
5 | |||
6 | echo "Running Message Sample App" | ||
7 | ./messagegpp message.out 10000 0 | ||
8 | |||
9 | echo "Running Message Multi Sample App" | ||
10 | ./messagemultigpp messagemulti.out 128 1 0 | ||
11 | |||
12 | echo "Running MultiProcessor List Sample App" | ||
13 | ./mplistgpp mplist.out 128 128 0 | ||
14 | |||
15 | echo "Running MultiProcessorCriticalSection Transfer Sample App" | ||
16 | ./mpcsxfergpp mpcsxfer.out 128 1000 0 | ||
17 | |||
18 | echo "Running Ringio Sample App" | ||
19 | ./ringiogpp ringio.out 2048 128 0 | ||
20 | |||
21 | echo "Running Scale Sample App" | ||
22 | ./scalegpp scale.out 128 500 0 | ||
23 | |||
24 | #echo "Running Read/Write Sample App" | ||
25 | #./readwritegpp readwrite.out | ||
diff --git a/extras/recipes-ti/dsplink/ti-dsplink/ti-dsplink-examples-unloadmodules.sh b/extras/recipes-ti/dsplink/ti-dsplink/ti-dsplink-examples-unloadmodules.sh new file mode 100755 index 00000000..48fa84b0 --- /dev/null +++ b/extras/recipes-ti/dsplink/ti-dsplink/ti-dsplink-examples-unloadmodules.sh | |||
@@ -0,0 +1,5 @@ | |||
1 | # Unload modules - DSPLINK - OMAP3530 | ||
2 | |||
3 | # remove DSP/BIOS Link driver | ||
4 | rmmod dsplinkk | ||
5 | #rm -f /dev/dsplink | ||
diff --git a/extras/recipes-ti/dsplink/ti-dsplink_1.65.00.03.bb b/extras/recipes-ti/dsplink/ti-dsplink_1.65.00.03.bb new file mode 100644 index 00000000..a124b21a --- /dev/null +++ b/extras/recipes-ti/dsplink/ti-dsplink_1.65.00.03.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | require ti-dsplink.inc | ||
2 | |||
3 | PE = "1" | ||
4 | PV = "1_65_00_03" | ||
5 | PV_dot = "1.65.00.03" | ||
6 | PV_major = "1_65" | ||
7 | |||
8 | PV_DL_PATH = "DSPLink/${PV_major}/${PV}/${PV_dot}" | ||
9 | |||
10 | SRC_URI += "file://dsplink-BKL-fix.patch \ | ||
11 | file://0001-remove-check-for-make-version-3.85-works-fine.patch \ | ||
12 | " | ||
13 | |||
14 | SRC_URI[dsplinktarball.md5sum] = "1bda596b631bd2f517edc70f6be4f2ca" | ||
15 | SRC_URI[dsplinktarball.sha256sum] = "4b1bda89bd8465b887f5bcdf7b95018bc1d1f8968c0c44f8cbad2a9e1c52bcb7" | ||
16 | |||
diff --git a/extras/recipes-ti/edma3lld/ti-edma3lld.inc b/extras/recipes-ti/edma3lld/ti-edma3lld.inc new file mode 100644 index 00000000..fb131b66 --- /dev/null +++ b/extras/recipes-ti/edma3lld/ti-edma3lld.inc | |||
@@ -0,0 +1,23 @@ | |||
1 | DESCRIPTION = "TI EDMA3 Low Level Driver (LLD)" | ||
2 | HOMEPAGE = "http://software-dl.ti.com/dsps/dsps_public_sw/${SRC_URI_edma3lldsite}/edma3_lld" | ||
3 | SECTION = "devel" | ||
4 | LICENSE = "TI" | ||
5 | LIC_FILES_CHKSUM = "file://packages/ti/sdo/edma3/drv/edma3_drv.h;md5=c1aa300aaf369a0a03e7922c1b0bbf8e" | ||
6 | |||
7 | require ../includes/ti-paths.inc | ||
8 | require ../includes/ti-staging.inc | ||
9 | require ../includes/ti-eula-unpack.inc | ||
10 | |||
11 | TI_BIN_UNPK_WDEXT="/edma3_lld_${PV}" | ||
12 | S = "${WORKDIR}${TI_BIN_UNPK_WDEXT}" | ||
13 | |||
14 | SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/${SRC_URI_edma3lldsite}/edma3_lld/edma3-lld-bios5/${PV}/exports/EDMA3_LLD_setuplinux_${PV}.bin;name=edma3lldbin" | ||
15 | |||
16 | BINFILE="EDMA3_LLD_setuplinux_${PV}.bin" | ||
17 | TI_BIN_UNPK_CMDS="Y:workdir" | ||
18 | |||
19 | do_install() { | ||
20 | install -d ${D}${EDMA3_LLD_INSTALL_DIR_RECIPE} | ||
21 | cp -pPrf ${S}/* ${D}${EDMA3_LLD_INSTALL_DIR_RECIPE} | ||
22 | } | ||
23 | |||
diff --git a/extras/recipes-ti/edma3lld/ti-edma3lld_01.11.01.04.bb b/extras/recipes-ti/edma3lld/ti-edma3lld_01.11.01.04.bb new file mode 100644 index 00000000..9b03e9b3 --- /dev/null +++ b/extras/recipes-ti/edma3lld/ti-edma3lld_01.11.01.04.bb | |||
@@ -0,0 +1,9 @@ | |||
1 | require ti-edma3lld.inc | ||
2 | |||
3 | PV = "01_11_01_04" | ||
4 | |||
5 | SRC_URI_edma3lldsite = "sdo_tii/psp" | ||
6 | |||
7 | SRC_URI[edma3lldbin.md5sum] = "b3c41cb946e2e4b94348fc6bcbe30b16" | ||
8 | SRC_URI[edma3lldbin.sha256sum] = "617db3eadff33a88e3d42818c204f379906da3b312bc120092408043e7e2aaeb" | ||
9 | |||
diff --git a/extras/recipes-ti/framework-components/ti-framework-components.inc b/extras/recipes-ti/framework-components/ti-framework-components.inc new file mode 100644 index 00000000..f2244db4 --- /dev/null +++ b/extras/recipes-ti/framework-components/ti-framework-components.inc | |||
@@ -0,0 +1,21 @@ | |||
1 | DESCRIPTION = "TI Framework Components" | ||
2 | HOMEPAGE = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/fc" | ||
3 | SECTION = "devel" | ||
4 | LICENSE = "BSD" | ||
5 | |||
6 | LIC_FILES_CHKSUM = "file://framework_components_2_26_00_01_manifest.html;md5=3250f9da7ee72284c07f8dd840400c75" | ||
7 | |||
8 | require recipes-ti/includes/ti-paths.inc | ||
9 | require recipes-ti/includes/ti-staging.inc | ||
10 | |||
11 | PR = "r1" | ||
12 | |||
13 | S = "${WORKDIR}/framework_components_${PV}" | ||
14 | |||
15 | SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/fc/${PV}/exports/framework_components_${PV},lite.tar.gz;name=fctarball" | ||
16 | |||
17 | do_install() { | ||
18 | install -d ${D}${FC_INSTALL_DIR_RECIPE} | ||
19 | cp -pPrf ${S}/* ${D}${FC_INSTALL_DIR_RECIPE} | ||
20 | } | ||
21 | |||
diff --git a/extras/recipes-ti/framework-components/ti-framework-components_2.26.00.01.bb b/extras/recipes-ti/framework-components/ti-framework-components_2.26.00.01.bb new file mode 100644 index 00000000..b7ea9b83 --- /dev/null +++ b/extras/recipes-ti/framework-components/ti-framework-components_2.26.00.01.bb | |||
@@ -0,0 +1,8 @@ | |||
1 | require ti-framework-components.inc | ||
2 | |||
3 | PV = "2_26_00_01" | ||
4 | |||
5 | SRC_URI[fctarball.md5sum] = "40b51cade2f9ae6e6f6dca73c17065af" | ||
6 | SRC_URI[fctarball.sha256sum] = "3f7a12a51dfe87310828a31518d7ef8f9039e59269c0ca24f74a68433c235048" | ||
7 | |||
8 | |||
diff --git a/extras/recipes-ti/gstreamer-ti/gstreamer-ti.inc b/extras/recipes-ti/gstreamer-ti/gstreamer-ti.inc new file mode 100644 index 00000000..cb032666 --- /dev/null +++ b/extras/recipes-ti/gstreamer-ti/gstreamer-ti.inc | |||
@@ -0,0 +1,164 @@ | |||
1 | DESCRIPTION = "GSTREAMER Plugin (gstreamer-ti) for TI ARM/DSP processors" | ||
2 | HOMEPAGE = "https://gforge.ti.com/gf/project/gstreamer_ti/" | ||
3 | SECTION = "multimedia" | ||
4 | LICENSE = "LGPL" | ||
5 | |||
6 | # TODO :: Replace omapl137 with official support in GST (currently linking to omapl138) | ||
7 | # TODO :: Codec Server Environment Variables shouldn't be required | ||
8 | # TODO :: Add (and check) rc scripts for all targets (just copied for now) (365,6467,omapl137) | ||
9 | # TODO :: Check if CPPFLAGS_append is still required | ||
10 | # TODO :: Remove ENCODE/DECODE combo exports - these are not used anymore (check?) | ||
11 | |||
12 | inherit autotools | ||
13 | inherit update-rc.d | ||
14 | require recipes-ti/includes/ti-paths.inc | ||
15 | require recipes-ti/includes/ti-staging.inc | ||
16 | |||
17 | # Rebuild on kernel change since it links statically to ti-dmai, ti-codec-engine, etc | ||
18 | PR = "r85+${MACHINE_KERNEL_PR}" | ||
19 | |||
20 | DEPENDS = "ti-dmai gstreamer gst-plugins-base" | ||
21 | |||
22 | # enable c6accel elements on omapl138 and omap3 | ||
23 | #DEPENDS_append_omapl138 = " ti-c6accel " | ||
24 | #EXTRA_OECONF_omapl138 = "--enable-c6accel" | ||
25 | #DEPENDS_append_omap3 = " ti-c6accel " | ||
26 | #EXTRA_OECONF_omap3 = "--enable-c6accel" | ||
27 | export C6ACCEL_INSTALL_DIR | ||
28 | |||
29 | # gstreamer_ti picks up some config variables from the environment | ||
30 | # - variables are used in the gstreamer makefile | ||
31 | # - PLATFORM, XDC_PLATFORM, XDC_TARGET, MVTOOL_DIR | ||
32 | # - others used by config.bld (which it gets from the dmai config.bld) | ||
33 | # - CROSS_COMPILE, PLATFORM_XDC | ||
34 | |||
35 | PLATFORM_dm6446 = "dm6446" | ||
36 | PLATFORM_dm6467 = "dm6467" | ||
37 | PLATFORM_dm6467t = "dm6467t" | ||
38 | PLATFORM_omap3 = "omap3530" | ||
39 | PLATFORM_dm355 = "dm355" | ||
40 | PLATFORM_dm365 = "dm365" | ||
41 | PLATFORM_omapl137 = "omapl137" | ||
42 | PLATFORM_omapl138 = "omapl138" | ||
43 | PLATFORM ?= "UNDEFINED_PLATFORM" | ||
44 | GST_TI_PLATFORM = "${PLATFORM}" | ||
45 | |||
46 | XDC_PLATFORM_dm6446 = "ti.platforms.evmDM6446" | ||
47 | XDC_PLATFORM_dm6467 = "ti.platforms.evmDM6467" | ||
48 | XDC_PLATFORM_omap3 = "ti.platforms.evm3530" | ||
49 | XDC_PLATFORM_dm355 = "ti.platforms.evmDM355" | ||
50 | XDC_PLATFORM_dm365 = "ti.platforms.evmDM365" | ||
51 | XDC_PLATFORM_omapl137 = "ti.platforms.evmOMAPL137" | ||
52 | XDC_PLATFORM_omapl138 = "ti.platforms.evmOMAPL138" | ||
53 | XDC_PLATFORM ?= "UNDEFINED_XDC_PLATFORM" | ||
54 | |||
55 | MEMARGS_omap3 = "99M@0x80000000" | ||
56 | MEMARGS ?= "UNDEFINED_MEM_ARGS" | ||
57 | |||
58 | export MEMARGS | ||
59 | export PLATFORM | ||
60 | export GST_TI_PLATFORM | ||
61 | export XDC_PLATFORM | ||
62 | export XDC_TARGET = "gnu.targets.arm.GCArmv5T" | ||
63 | export PLATFORM_XDC = "${XDC_PLATFORM}" | ||
64 | export CSTOOL_DIR = "${TOOLCHAIN_PATH}" | ||
65 | export MVTOOL_DIR = "${TOOLCHAIN_PATH}" | ||
66 | export MVTOOL_PREFIX = "${TARGET_PREFIX}" | ||
67 | export CROSS_COMPILE = "${TOOLCHAIN_PATH}/${TARGET_PREFIX}" | ||
68 | export LINK_XDC_ROOT = "${LINK_INSTALL_DIR}" | ||
69 | |||
70 | # export codec combo (or server) locations | ||
71 | # Why do we need to do this?? - These will get picked up from CODEC_INSTALL_DIR? | ||
72 | # Sould only need this if we change from default server | ||
73 | |||
74 | export CODEC_SERVER = "${installdir}/ti-codecs-server/cs.x64P" | ||
75 | CPPFLAGS_append = " -DPlatform_${PLATFORM}" | ||
76 | |||
77 | # We are still using encode/decode combo for DM6446 | ||
78 | export ENCODE_COMBO = "${installdir}/ti-codecs-server/encodeCombo.x64P" | ||
79 | export DECODE_COMBO = "${installdir}/ti-codecs-server/decodeCombo.x64P" | ||
80 | # Makefile also expects to be able to find the kernel headers from the envirionment | ||
81 | export LINUXKERNEL_INSTALL_DIR = "${STAGING_KERNEL_DIR}" | ||
82 | |||
83 | do_configure_prepend() { | ||
84 | # PSP kernel is based on older DSS. we need to replace linux/omapfb.h with mach/omapfb.h | ||
85 | if ! [ -e ${STAGING_KERNEL_DIR}/include/linux/omapfb.h ] ; then | ||
86 | sed -i -e s:linux/omapfb:mach/omapfb:g ${S}/src/omapfb.h || true | ||
87 | fi | ||
88 | |||
89 | # Angstrom 2008 breaks with -Wl,-T, while angstrom 2010 needs it | ||
90 | if [ $(${TARGET_PREFIX}gcc -dumpversion | awk -F. '{print $2}') -gt 3 ] ; then | ||
91 | # Fix up linkerscripts, recent toolchains need -T to prepend the default script to the custom one | ||
92 | for makefile in $(find ${S} -name "Makefile.am") ; do | ||
93 | sed -i -e 's:-Wl,$(XDC_CONFIG_BASENAME)/linker.cmd:-Wl,-T,$(XDC_CONFIG_BASENAME)/linker.cmd:g' $makefile | ||
94 | done | ||
95 | fi | ||
96 | } | ||
97 | |||
98 | do_compile() { | ||
99 | # Recent kernel headers warn against inclusion from userspace | ||
100 | for makefile in $(find ${S} -name "Makefile") ; do | ||
101 | sed -i -e s:-Werror::g $makefile | ||
102 | done | ||
103 | |||
104 | oe_runmake | ||
105 | } | ||
106 | |||
107 | do_install_prepend () { | ||
108 | |||
109 | install -d ${D}/${installdir}/gst/${PLATFORM} | ||
110 | |||
111 | # copy gstreamer demo scripts | ||
112 | cp -R ${WORKDIR}/gstreamer_ti/gstreamer_demo/shared ${D}/${installdir}/gst | ||
113 | |||
114 | # If we have loadmodules.sh in WORKDIR then give preference to this over | ||
115 | # the default gst-ti loadmdules.sh | ||
116 | if [ -f ${WORKDIR}/loadmodules.sh ]; then | ||
117 | cp ${WORKDIR}/loadmodules.sh ${D}/${installdir}/gst/${PLATFORM} | ||
118 | else | ||
119 | cp -R ${WORKDIR}/gstreamer_ti/gstreamer_demo/${PLATFORM} ${D}/${installdir}/gst | ||
120 | fi | ||
121 | |||
122 | # delete .svn files | ||
123 | find ${D}/${installdir}/gst -name .svn -type d | xargs rm -rf | ||
124 | chmod 0755 ${D}/${installdir}/gst -R | ||
125 | |||
126 | install -d ${D}${sysconfdir}/init.d/ | ||
127 | install -m 0755 ${WORKDIR}/gstreamer-ti-rc.sh ${D}${sysconfdir}/init.d/gstti-init | ||
128 | sed -i -e 's|<platform>|${PLATFORM}|g' ${D}${sysconfdir}/init.d/gstti-init | ||
129 | |||
130 | install -d ${D}${base_libdir}/systemd/system | ||
131 | install -m 0644 ${WORKDIR}/gstti-init.service ${D}${base_libdir}/systemd/system/ | ||
132 | sed -i -e 's|<platform>|${PLATFORM}|g' -e 's|MEMARGS|${MEMARGS}|' ${D}${base_libdir}/systemd/system/gstti-init.service | ||
133 | } | ||
134 | |||
135 | RRECOMMENDS_${PN}_append_dm6446 += "ti-codecs-dm6446-server ti-cmem-module ti-dsplink-module" | ||
136 | RRECOMMENDS_${PN}_append_dm6467 += "ti-codecs-dm6467 ti-cmem-module ti-dsplink-module" | ||
137 | RRECOMMENDS_${PN}_append_omap3 += "ti-codecs-omap3530-server ti-cmem-module ti-dsplink-module ti-lpm-module ti-sdma-module" | ||
138 | RRECOMMENDS_${PN}_append_dm355 += "ti-codecs-dm355 ti-cmem-module ti-dm355mm-module" | ||
139 | RRECOMMENDS_${PN}_append_dm365 += "ti-codecs-dm365 ti-cmem-module ti-dm365mm-module ti-edma-module ti-irq-module" | ||
140 | RRECOMMENDS_${PN}_append_omapl137 += "ti-codecs-omapl137-server ti-cmem-module ti-dsplink-module" | ||
141 | RRECOMMENDS_${PN}_append_omapl138 += "ti-codecs-omapl138-server ti-cmem-module ti-dsplink-module" | ||
142 | |||
143 | FILES_${PN} += "${libdir}/gstreamer-0.10/*.so ${sysconfdir} ${installdir} ${base_libdir}/systemd" | ||
144 | FILES_${PN}-dev += "${libdir}/gstreamer-0.10/*.a ${libdir}/gstreamer-0.10/*.la" | ||
145 | FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug" | ||
146 | |||
147 | pkg_postinst_${PN} () { | ||
148 | if test "x$D" != "x"; then | ||
149 | echo "Can't run gstreamer-ti postinst offline" | ||
150 | exit 1 | ||
151 | fi | ||
152 | if [ -e ${base_bindir}/systemctl ] ; then | ||
153 | systemctl enable gstti-init.service | ||
154 | fi | ||
155 | |||
156 | if [ -d ${installdir}/ti-codecs-server/ ]; then | ||
157 | ln -sf ${installdir}/ti-codecs-server/* ${installdir}/gst/${PLATFORM}/ | ||
158 | fi | ||
159 | } | ||
160 | |||
161 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
162 | |||
163 | INITSCRIPT_NAME = "gstti-init" | ||
164 | INITSCRIPT_PARAMS = "start 30 5 2 . stop 40 0 1 6 ." | ||
diff --git a/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0001-add-omapdmaifbsink.patch b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0001-add-omapdmaifbsink.patch new file mode 100644 index 00000000..bcf0d904 --- /dev/null +++ b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0001-add-omapdmaifbsink.patch | |||
@@ -0,0 +1,1336 @@ | |||
1 | diff -uNr ticodecplugin/configure.ac ticodecplugin.new/configure.ac | ||
2 | --- ticodecplugin/configure.ac 2010-08-24 15:08:58.609410984 -0500 | ||
3 | +++ ticodecplugin.new/configure.ac 2010-09-03 13:54:11.909410298 -0500 | ||
4 | @@ -25,6 +25,7 @@ | ||
5 | AC_SUBST(ACLOCAL_AMFLAGS, "-I m4") | ||
6 | |||
7 | AM_CONFIG_HEADER(config.h) | ||
8 | +AM_PROG_AS | ||
9 | |||
10 | dnl check for tools | ||
11 | AC_PROG_CC | ||
12 | diff -uNr ticodecplugin/src/gstticodecplugin.c ticodecplugin.new/src/gstticodecplugin.c | ||
13 | --- ticodecplugin/src/gstticodecplugin.c 2010-08-24 15:08:58.609410984 -0500 | ||
14 | +++ ticodecplugin.new/src/gstticodecplugin.c 2010-09-03 13:54:11.929409696 -0500 | ||
15 | @@ -42,6 +42,7 @@ | ||
16 | #include "gsttiaudenc1.h" | ||
17 | #include "gsttividresize.h" | ||
18 | #include "gsttidmaiperf.h" | ||
19 | +#include "omapfb.h" | ||
20 | |||
21 | #ifdef HAVE_C6ACCEL | ||
22 | #include "gsttic6xcolorspace.h" | ||
23 | @@ -134,6 +135,13 @@ | ||
24 | return FALSE; | ||
25 | #endif | ||
26 | |||
27 | + env_value = getenv("GST_omapdmaifbsink_DISABLE"); | ||
28 | + | ||
29 | + if ((!env_value || strcmp(env_value,"1")) && !gst_element_register( | ||
30 | + TICodecPlugin, "omapdmaifbsink", GST_RANK_PRIMARY, | ||
31 | + GST_OMAPFB_SINK_TYPE)) | ||
32 | + return FALSE; | ||
33 | + | ||
34 | return TRUE; | ||
35 | } | ||
36 | |||
37 | diff -uNr ticodecplugin/src/Makefile.am ticodecplugin.new/src/Makefile.am | ||
38 | --- ticodecplugin/src/Makefile.am 2010-08-24 22:01:30.989165985 -0500 | ||
39 | +++ ticodecplugin.new/src/Makefile.am 2010-09-03 13:53:41.037663172 -0500 | ||
40 | @@ -12,16 +12,16 @@ | ||
41 | |||
42 | |||
43 | # sources used to compile this plug-in | ||
44 | -libgstticodecplugin_la_SOURCES = gstticodecplugin.c gsttiauddec1.c gsttividdec2.c gsttiimgenc1.c gsttiimgdec1.c gsttidmaibuffertransport.c gsttidmaibuftab.c gstticircbuffer.c gsttidmaivideosink.c gstticodecs.c gstticodecs_platform.c gsttiquicktime_aac.c gsttiquicktime_h264.c gsttividenc1.c gsttiaudenc1.c gstticommonutils.c gsttividresize.c gsttidmaiperf.c gsttiquicktime_mpeg4.c $(C6ACCEL_SRC) | ||
45 | +libgstticodecplugin_la_SOURCES = gstticodecplugin.c gsttiauddec1.c gsttividdec2.c gsttiimgenc1.c gsttiimgdec1.c gsttidmaibuffertransport.c gsttidmaibuftab.c gstticircbuffer.c gsttidmaivideosink.c gstticodecs.c gstticodecs_platform.c gsttiquicktime_aac.c gsttiquicktime_h264.c gsttividenc1.c gsttiaudenc1.c gstticommonutils.c gsttividresize.c gsttidmaiperf.c gsttiquicktime_mpeg4.c $(C6ACCEL_SRC) omapfb.c yuv.S | ||
46 | |||
47 | # flags used to compile this plugin | ||
48 | # add other _CFLAGS and _LIBS as needed | ||
49 | -libgstticodecplugin_la_CFLAGS = $(GST_CFLAGS) $(shell cat $(XDC_CONFIG_BASENAME)/compiler.opt) | ||
50 | -libgstticodecplugin_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstvideo-0.10 -lgstaudio-0.10 -lm | ||
51 | +libgstticodecplugin_la_CFLAGS = $(GST_CFLAGS) $(shell cat $(XDC_CONFIG_BASENAME)/compiler.opt) -I$(LINUXKERNEL_INSTALL_DIR)/include | ||
52 | +libgstticodecplugin_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstvideo-0.10 -lgstaudio-0.10 -lm -lX11 | ||
53 | libgstticodecplugin_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -Wl,$(XDC_CONFIG_BASENAME)/linker.cmd -Wl,$(C6ACCEL_LIB) | ||
54 | |||
55 | # headers we need but don't want installed | ||
56 | -noinst_HEADERS = gsttiauddec1.h gsttividdec2.h gsttiimgenc1.h gsttiimgdec1.h gsttidmaibuffertransport.h gsttidmaibuftab.h gstticircbuffer.h gsttidmaivideosink.h gsttithreadprops.h gstticodecs.h gsttiquicktime_aac.h gsttiquicktime_h264.h gsttividenc1.h gsttiaudenc1.h gstticommonutils.h gsttividresize.h gsttiquicktime_mpeg4.h $(C6ACCEL_HEAD) | ||
57 | +noinst_HEADERS = gsttiauddec1.h gsttividdec2.h gsttiimgenc1.h gsttiimgdec1.h gsttidmaibuffertransport.h gsttidmaibuftab.h gstticircbuffer.h gsttidmaivideosink.h gsttithreadprops.h gstticodecs.h gsttiquicktime_aac.h gsttiquicktime_h264.h gsttividenc1.h gsttiaudenc1.h gstticommonutils.h gsttividresize.h gsttiquicktime_mpeg4.h $(C6ACCEL_HEAD) omapfb.h | ||
58 | |||
59 | # XDC Configuration | ||
60 | CONFIGURO = $(XDC_INSTALL_DIR)/xs xdc.tools.configuro | ||
61 | diff -uNr ticodecplugin/src/omapfb.c ticodecplugin.new/src/omapfb.c | ||
62 | --- ticodecplugin/src/omapfb.c 1969-12-31 18:00:00.000000000 -0600 | ||
63 | +++ ticodecplugin.new/src/omapfb.c 2010-09-03 13:54:11.929409696 -0500 | ||
64 | @@ -0,0 +1,1005 @@ | ||
65 | +/* | ||
66 | + * Copyright (C) 2008 Felipe Contreras <felipe.contreras@gmail.com> | ||
67 | + * Copyright (C) 2009 Tim Yamin <plasm@roo.me.uk> | ||
68 | + * Copyright (C) 2009 Brijesh Singh <brijesh.ksingh@gmail.com> | ||
69 | + * | ||
70 | + * X code largely copied from ximagesink by Julien Moutte and | ||
71 | + * vo_omapfb.c by Gregoire Gentil. | ||
72 | + * | ||
73 | + * Use DMAI hw framecopy module to copy the dmai transport buffers. | ||
74 | + * | ||
75 | + * This library is free software; you can redistribute it and/or | ||
76 | + * modify it under the terms of the GNU Lesser General Public | ||
77 | + * License as published by the Free Software Foundation | ||
78 | + * version 2.1 of the License. | ||
79 | + * | ||
80 | + * This library is distributed in the hope that it will be useful, | ||
81 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
82 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
83 | + * Lesser General Public License for more details. | ||
84 | + * | ||
85 | + * You should have received a copy of the GNU General Public License | ||
86 | + * along with this program; if not, write to the Free Software | ||
87 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA | ||
88 | + */ | ||
89 | + | ||
90 | +#include <fcntl.h> | ||
91 | +#include <sys/ioctl.h> | ||
92 | +#include <sys/mman.h> | ||
93 | +#include <unistd.h> | ||
94 | +#include <string.h> | ||
95 | +#include <sys/types.h> | ||
96 | +#include <malloc.h> | ||
97 | +#include <stdlib.h> | ||
98 | + | ||
99 | +#include "omapfb.h" | ||
100 | +#include <gst/interfaces/xoverlay.h> | ||
101 | + | ||
102 | +static GstVideoSinkClass *parent_class = NULL; | ||
103 | + | ||
104 | +extern void yuv420_to_yuv422(__uint8_t *yuv, __uint8_t *y, __uint8_t *u, __uint8_t *v, | ||
105 | + int w, int h, int yw, int cw, int dw); | ||
106 | + | ||
107 | +static void x11_get_window_abs_position(Display *display, Window window, | ||
108 | + int *wx, int *wy, int *ww, int *wh) | ||
109 | +{ | ||
110 | + Window root, parent; | ||
111 | + Window *child; | ||
112 | + unsigned int n_children; | ||
113 | + XWindowAttributes attribs; | ||
114 | + | ||
115 | + /* Get window attributes */ | ||
116 | + XGetWindowAttributes(display, window, &attribs); | ||
117 | + | ||
118 | + /* Get relative position of given window */ | ||
119 | + *wx = attribs.x; | ||
120 | + *wy = attribs.y; | ||
121 | + if (ww) | ||
122 | + *ww = attribs.width; | ||
123 | + if (wh) | ||
124 | + *wh = attribs.height; | ||
125 | + | ||
126 | + /* Query window tree information */ | ||
127 | + XQueryTree(display, window, &root, &parent, &child, &n_children); | ||
128 | + if (parent) | ||
129 | + { | ||
130 | + int x, y; | ||
131 | + | ||
132 | + /* If we have a parent we must go there and discover his position */ | ||
133 | + x11_get_window_abs_position(display, parent, &x, &y, NULL, NULL); | ||
134 | + *wx += x; | ||
135 | + *wy += y; | ||
136 | + } | ||
137 | + | ||
138 | + /* If we had children, free them */ | ||
139 | + if(n_children) | ||
140 | + XFree(child); | ||
141 | +} | ||
142 | + | ||
143 | +static GstXWindow * | ||
144 | +gst_omapfbsink_xwindow_new (GstOmapFbSink * omapfbsink, gint width, gint height) | ||
145 | +{ | ||
146 | + GstXWindow *xwindow = NULL; | ||
147 | + XGCValues values; | ||
148 | + | ||
149 | + if(!omapfbsink->xcontext) | ||
150 | + return NULL; | ||
151 | + | ||
152 | + xwindow = g_new0 (GstXWindow, 1); | ||
153 | + xwindow->width = width; | ||
154 | + xwindow->height = height; | ||
155 | + xwindow->internal = TRUE; | ||
156 | + | ||
157 | + g_mutex_lock (omapfbsink->x_lock); | ||
158 | + xwindow->win = XCreateSimpleWindow (omapfbsink->xcontext->disp, | ||
159 | + omapfbsink->xcontext->root, | ||
160 | + 0, 0, xwindow->width, xwindow->height, | ||
161 | + 0, 0, omapfbsink->colorKey); | ||
162 | + | ||
163 | + /* We have to do that to prevent X from redrawing the background on | ||
164 | + ConfigureNotify. This takes away flickering of video when resizing. */ | ||
165 | + XSetWindowBackgroundPixmap (omapfbsink->xcontext->disp, xwindow->win, None); | ||
166 | + | ||
167 | + if (omapfbsink->handle_events) { | ||
168 | + Atom wm_delete; | ||
169 | + | ||
170 | + XSelectInput (omapfbsink->xcontext->disp, xwindow->win, ExposureMask | | ||
171 | + StructureNotifyMask | PointerMotionMask | KeyPressMask | | ||
172 | + KeyReleaseMask | ButtonPressMask | ButtonReleaseMask); | ||
173 | + | ||
174 | + /* Tell the window manager we'd like delete client messages instead of | ||
175 | + * being killed */ | ||
176 | + wm_delete = XInternAtom (omapfbsink->xcontext->disp, | ||
177 | + "WM_DELETE_WINDOW", False); | ||
178 | + (void) XSetWMProtocols (omapfbsink->xcontext->disp, xwindow->win, | ||
179 | + &wm_delete, 1); | ||
180 | + } | ||
181 | + | ||
182 | + xwindow->gc = XCreateGC (omapfbsink->xcontext->disp, xwindow->win, | ||
183 | + 0, &values); | ||
184 | + | ||
185 | + XMapRaised (omapfbsink->xcontext->disp, xwindow->win); | ||
186 | + XSync (omapfbsink->xcontext->disp, FALSE); | ||
187 | + | ||
188 | + g_mutex_unlock (omapfbsink->x_lock); | ||
189 | + gst_x_overlay_got_xwindow_id (GST_X_OVERLAY (omapfbsink), xwindow->win); | ||
190 | + | ||
191 | + return xwindow; | ||
192 | +} | ||
193 | + | ||
194 | +static gboolean gst_omapfbsink_update_plane (GstOmapFbSink *omapfbsink) | ||
195 | +{ | ||
196 | + int wx, wy, ww, wh; | ||
197 | + if (!omapfbsink->xcontext) | ||
198 | + { | ||
199 | + if (ioctl (omapfbsink->overlay_fd, OMAPFB_SETUP_PLANE, &omapfbsink->plane_info)) | ||
200 | + return FALSE; | ||
201 | + return TRUE; | ||
202 | + } | ||
203 | + | ||
204 | + if (omapfbsink->plane_info.enabled != 1) | ||
205 | + return FALSE; | ||
206 | + | ||
207 | + x11_get_window_abs_position(omapfbsink->xcontext->disp, | ||
208 | + omapfbsink->xwindow->win, &wx, &wy, &ww, &wh); | ||
209 | + | ||
210 | + if (wx != omapfbsink->xwindow->wx || wy != omapfbsink->xwindow->wy || | ||
211 | + wh != omapfbsink->xwindow->height || ww != omapfbsink->xwindow->width) { | ||
212 | + omapfbsink->plane_info.out_width = omapfbsink->xwindow->width = ww; | ||
213 | + omapfbsink->plane_info.out_height = omapfbsink->xwindow->height = wh; | ||
214 | + omapfbsink->plane_info.pos_x = omapfbsink->xwindow->wx = wx; | ||
215 | + omapfbsink->plane_info.pos_y = omapfbsink->xwindow->wy = wy; | ||
216 | + | ||
217 | + GST_DEBUG_OBJECT(omapfbsink, "updating geometry to: (%d,%d) %dx%d", wx, wy, ww, wh); | ||
218 | + | ||
219 | + XSetForeground (omapfbsink->xcontext->disp, omapfbsink->xwindow->gc, omapfbsink->colorKey); | ||
220 | + XFillRectangle (omapfbsink->xcontext->disp, omapfbsink->xwindow->win, omapfbsink->xwindow->gc, 0, 0, ww, wh); | ||
221 | + | ||
222 | + if (ioctl (omapfbsink->overlay_fd, OMAPFB_SETUP_PLANE, &omapfbsink->plane_info)) | ||
223 | + return FALSE; | ||
224 | + } | ||
225 | + | ||
226 | + return TRUE; | ||
227 | +} | ||
228 | + | ||
229 | +static void | ||
230 | +gst_omapfbsink_expose (GstXOverlay * overlay) | ||
231 | +{ | ||
232 | + gst_omapfbsink_update_plane(GST_OMAPFB_SINK (overlay)); | ||
233 | +} | ||
234 | + | ||
235 | +static void | ||
236 | +gst_omapfbsink_xwindow_destroy (GstOmapFbSink * omapfbsink, | ||
237 | + GstXWindow * xwindow) | ||
238 | +{ | ||
239 | + g_return_if_fail (xwindow != NULL); | ||
240 | + g_mutex_lock (omapfbsink->x_lock); | ||
241 | + | ||
242 | + /* If we did not create that window we just free the GC and let it live */ | ||
243 | + if (xwindow->internal) | ||
244 | + XDestroyWindow (omapfbsink->xcontext->disp, xwindow->win); | ||
245 | + else | ||
246 | + XSelectInput (omapfbsink->xcontext->disp, xwindow->win, 0); | ||
247 | + | ||
248 | + XFreeGC (omapfbsink->xcontext->disp, xwindow->gc); | ||
249 | + XSync (omapfbsink->xcontext->disp, FALSE); | ||
250 | + g_mutex_unlock (omapfbsink->x_lock); | ||
251 | + g_free (xwindow); | ||
252 | +} | ||
253 | + | ||
254 | +/* This function handles XEvents that might be in the queue. It generates | ||
255 | + GstEvent that will be sent upstream in the pipeline to handle interactivity | ||
256 | + and navigation.*/ | ||
257 | +static void | ||
258 | +gst_omapfbsink_handle_xevents (GstOmapFbSink * omapfbsink) | ||
259 | +{ | ||
260 | + XEvent e; | ||
261 | + g_mutex_lock (omapfbsink->flow_lock); | ||
262 | + g_mutex_lock (omapfbsink->x_lock); | ||
263 | + | ||
264 | + while (XCheckWindowEvent (omapfbsink->xcontext->disp, | ||
265 | + omapfbsink->xwindow->win, ExposureMask | StructureNotifyMask, &e)) { | ||
266 | + switch (e.type) { | ||
267 | + case Expose: | ||
268 | + case ConfigureNotify: | ||
269 | + gst_omapfbsink_update_plane (omapfbsink); | ||
270 | + break; | ||
271 | + default: | ||
272 | + break; | ||
273 | + } | ||
274 | + } | ||
275 | + | ||
276 | + /* Handle Display events */ | ||
277 | + while (XPending (omapfbsink->xcontext->disp)) { | ||
278 | + XNextEvent (omapfbsink->xcontext->disp, &e); | ||
279 | + | ||
280 | + switch (e.type) { | ||
281 | + case ClientMessage:{ | ||
282 | + Atom wm_delete; | ||
283 | + | ||
284 | + wm_delete = XInternAtom (omapfbsink->xcontext->disp, | ||
285 | + "WM_DELETE_WINDOW", False); | ||
286 | + if (wm_delete == (Atom) e.xclient.data.l[0]) { | ||
287 | + /* Handle window deletion by posting an error on the bus */ | ||
288 | + GST_ELEMENT_ERROR (omapfbsink, RESOURCE, NOT_FOUND, | ||
289 | + ("Output window was closed"), (NULL)); | ||
290 | + | ||
291 | + g_mutex_unlock (omapfbsink->x_lock); | ||
292 | + gst_omapfbsink_xwindow_destroy (omapfbsink, omapfbsink->xwindow); | ||
293 | + omapfbsink->xwindow = NULL; | ||
294 | + g_mutex_lock (omapfbsink->x_lock); | ||
295 | + } | ||
296 | + break; | ||
297 | + } | ||
298 | + default: | ||
299 | + break; | ||
300 | + } | ||
301 | + } | ||
302 | + | ||
303 | + g_mutex_unlock (omapfbsink->x_lock); | ||
304 | + g_mutex_unlock (omapfbsink->flow_lock); | ||
305 | +} | ||
306 | + | ||
307 | +static gpointer | ||
308 | +gst_omapfbsink_event_thread (GstOmapFbSink * omapfbsink) | ||
309 | +{ | ||
310 | + GST_OBJECT_LOCK (omapfbsink); | ||
311 | + while (omapfbsink->running) { | ||
312 | + GST_OBJECT_UNLOCK (omapfbsink); | ||
313 | + | ||
314 | + if (omapfbsink->xwindow) | ||
315 | + gst_omapfbsink_handle_xevents (omapfbsink); | ||
316 | + g_usleep (100000); | ||
317 | + | ||
318 | + GST_OBJECT_LOCK (omapfbsink); | ||
319 | + } | ||
320 | + GST_OBJECT_UNLOCK (omapfbsink); | ||
321 | + | ||
322 | + return NULL; | ||
323 | +} | ||
324 | + | ||
325 | +/* This function gets the X Display and global info about it. Everything is | ||
326 | + stored in our object and will be cleaned when the object is disposed. */ | ||
327 | +static GstXContext * | ||
328 | +gst_omapfbsink_xcontext_get (GstOmapFbSink * omapfbsink) | ||
329 | +{ | ||
330 | + GstXContext *xcontext = g_new0 (GstXContext, 1); | ||
331 | + g_mutex_lock (omapfbsink->x_lock); | ||
332 | + | ||
333 | + xcontext->disp = XOpenDisplay (omapfbsink->display_name); | ||
334 | + | ||
335 | + if (!xcontext->disp) { | ||
336 | + g_mutex_unlock (omapfbsink->x_lock); | ||
337 | + g_free (xcontext); | ||
338 | + GST_ELEMENT_WARNING (omapfbsink, RESOURCE, WRITE, | ||
339 | + ("Could not initialise X output"), | ||
340 | + ("Could not open display")); | ||
341 | + return NULL; | ||
342 | + } | ||
343 | + | ||
344 | + xcontext->screen = DefaultScreenOfDisplay (xcontext->disp); | ||
345 | + xcontext->screen_num = DefaultScreen (xcontext->disp); | ||
346 | + xcontext->visual = DefaultVisual (xcontext->disp, xcontext->screen_num); | ||
347 | + xcontext->root = DefaultRootWindow (xcontext->disp); | ||
348 | + | ||
349 | + xcontext->width = DisplayWidth (xcontext->disp, xcontext->screen_num); | ||
350 | + xcontext->height = DisplayHeight (xcontext->disp, xcontext->screen_num); | ||
351 | + | ||
352 | + g_mutex_unlock (omapfbsink->x_lock); | ||
353 | + | ||
354 | + /* Setup our event listening thread */ | ||
355 | + GST_OBJECT_LOCK (omapfbsink); | ||
356 | + omapfbsink->running = TRUE; | ||
357 | + omapfbsink->event_thread = g_thread_create ( | ||
358 | + (GThreadFunc) gst_omapfbsink_event_thread, omapfbsink, TRUE, NULL); | ||
359 | + GST_OBJECT_UNLOCK (omapfbsink); | ||
360 | + | ||
361 | + return xcontext; | ||
362 | +} | ||
363 | + | ||
364 | +static void | ||
365 | +gst_omapfbsink_set_xwindow_id (GstXOverlay * overlay, XID xwindow_id) | ||
366 | +{ | ||
367 | + GstOmapFbSink *omapfbsink = GST_OMAPFB_SINK (overlay); | ||
368 | + GstXWindow *xwindow = NULL; | ||
369 | + XWindowAttributes attr; | ||
370 | + | ||
371 | + /* If we already use that window, return */ | ||
372 | + if (omapfbsink->xwindow && (xwindow_id == omapfbsink->xwindow->win)) | ||
373 | + return; | ||
374 | + | ||
375 | + /* If the element has not initialized the X11 context try to do so */ | ||
376 | + if (!omapfbsink->xcontext && | ||
377 | + !(omapfbsink->xcontext = gst_omapfbsink_xcontext_get (omapfbsink))) { | ||
378 | + g_mutex_unlock (omapfbsink->flow_lock); | ||
379 | + return; | ||
380 | + } | ||
381 | + | ||
382 | + /* If a window is there already we destroy it */ | ||
383 | + if (omapfbsink->xwindow) { | ||
384 | + gst_omapfbsink_xwindow_destroy (omapfbsink, omapfbsink->xwindow); | ||
385 | + omapfbsink->xwindow = NULL; | ||
386 | + } | ||
387 | + | ||
388 | + /* If the xid is 0 we go back to an internal window */ | ||
389 | + if (xwindow_id == 0) { | ||
390 | + /* If no width/height caps nego did not happen window will be created | ||
391 | + during caps nego then */ | ||
392 | + if (GST_VIDEO_SINK_WIDTH (omapfbsink) && GST_VIDEO_SINK_HEIGHT (omapfbsink)) { | ||
393 | + xwindow = gst_omapfbsink_xwindow_new (omapfbsink, | ||
394 | + GST_VIDEO_SINK_WIDTH (omapfbsink), | ||
395 | + GST_VIDEO_SINK_HEIGHT (omapfbsink)); | ||
396 | + } | ||
397 | + } else { | ||
398 | + xwindow = g_new0 (GstXWindow, 1); | ||
399 | + xwindow->wx = xwindow->wy = -1; | ||
400 | + xwindow->win = xwindow_id; | ||
401 | + | ||
402 | + /* We get window geometry, set the event we want to receive, | ||
403 | + and create a GC */ | ||
404 | + g_mutex_lock (omapfbsink->x_lock); | ||
405 | + XGetWindowAttributes (omapfbsink->xcontext->disp, xwindow->win, &attr); | ||
406 | + xwindow->width = attr.width; | ||
407 | + xwindow->height = attr.height; | ||
408 | + xwindow->internal = FALSE; | ||
409 | + if (omapfbsink->handle_events) { | ||
410 | + XSelectInput (omapfbsink->xcontext->disp, xwindow->win, ExposureMask | | ||
411 | + StructureNotifyMask | PointerMotionMask | KeyPressMask | | ||
412 | + KeyReleaseMask); | ||
413 | + } | ||
414 | + | ||
415 | + xwindow->gc = XCreateGC (omapfbsink->xcontext->disp, xwindow->win, 0, NULL); | ||
416 | + g_mutex_unlock (omapfbsink->x_lock); | ||
417 | + } | ||
418 | + | ||
419 | + if (xwindow) { | ||
420 | + omapfbsink->xwindow = xwindow; | ||
421 | + | ||
422 | + g_mutex_lock (omapfbsink->x_lock); | ||
423 | + gst_omapfbsink_update_plane(omapfbsink); | ||
424 | + g_mutex_unlock (omapfbsink->x_lock); | ||
425 | + } | ||
426 | +} | ||
427 | + | ||
428 | +static void | ||
429 | +gst_omapfbsink_xwindow_clear (GstOmapFbSink * omapfbsink, | ||
430 | + GstXWindow * xwindow) | ||
431 | +{ | ||
432 | + g_return_if_fail (xwindow != NULL); | ||
433 | + g_mutex_lock (omapfbsink->x_lock); | ||
434 | + | ||
435 | + XSetForeground (omapfbsink->xcontext->disp, xwindow->gc, | ||
436 | + XBlackPixel (omapfbsink->xcontext->disp, | ||
437 | + omapfbsink->xcontext->screen_num)); | ||
438 | + | ||
439 | + XFillRectangle (omapfbsink->xcontext->disp, xwindow->win, xwindow->gc, | ||
440 | + 0, 0, xwindow->width, xwindow->height); | ||
441 | + | ||
442 | + XSync (omapfbsink->xcontext->disp, FALSE); | ||
443 | + g_mutex_unlock (omapfbsink->x_lock); | ||
444 | +} | ||
445 | + | ||
446 | +static void | ||
447 | +gst_omapfbsink_set_event_handling (GstXOverlay * overlay, | ||
448 | + gboolean handle_events) | ||
449 | +{ | ||
450 | + GstOmapFbSink *omapfbsink = GST_OMAPFB_SINK (overlay); | ||
451 | + omapfbsink->handle_events = handle_events; | ||
452 | + | ||
453 | + g_mutex_lock (omapfbsink->flow_lock); | ||
454 | + | ||
455 | + if (G_UNLIKELY (!omapfbsink->xwindow)) { | ||
456 | + g_mutex_unlock (omapfbsink->flow_lock); | ||
457 | + return; | ||
458 | + } | ||
459 | + | ||
460 | + g_mutex_lock (omapfbsink->x_lock); | ||
461 | + | ||
462 | + if (handle_events) { | ||
463 | + if (omapfbsink->xwindow->internal) { | ||
464 | + XSelectInput (omapfbsink->xcontext->disp, omapfbsink->xwindow->win, | ||
465 | + ExposureMask | StructureNotifyMask | PointerMotionMask | | ||
466 | + KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask); | ||
467 | + } else { | ||
468 | + XSelectInput (omapfbsink->xcontext->disp, omapfbsink->xwindow->win, | ||
469 | + ExposureMask | StructureNotifyMask | PointerMotionMask | | ||
470 | + KeyPressMask | KeyReleaseMask); | ||
471 | + } | ||
472 | + } else { | ||
473 | + XSelectInput (omapfbsink->xcontext->disp, omapfbsink->xwindow->win, 0); | ||
474 | + } | ||
475 | + | ||
476 | + g_mutex_unlock (omapfbsink->x_lock); | ||
477 | + g_mutex_unlock (omapfbsink->flow_lock); | ||
478 | +} | ||
479 | + | ||
480 | +static void | ||
481 | +gst_omapfbsink_xoverlay_init (GstXOverlayClass * iface) | ||
482 | +{ | ||
483 | + iface->set_xwindow_id = gst_omapfbsink_set_xwindow_id; | ||
484 | + iface->expose = gst_omapfbsink_expose; | ||
485 | + iface->handle_events = gst_omapfbsink_set_event_handling; | ||
486 | +} | ||
487 | + | ||
488 | +static GstCaps * | ||
489 | +generate_sink_template (void) | ||
490 | +{ | ||
491 | + GstCaps *caps; | ||
492 | + GstStructure *struc; | ||
493 | + | ||
494 | + caps = gst_caps_new_empty (); | ||
495 | + | ||
496 | + struc = gst_structure_new ("video/x-raw-yuv", | ||
497 | + "width", GST_TYPE_INT_RANGE, 16, 4096, | ||
498 | + "height", GST_TYPE_INT_RANGE, 16, 4096, | ||
499 | + "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, 30, 1, | ||
500 | + NULL); | ||
501 | + | ||
502 | + { | ||
503 | + GValue list; | ||
504 | + GValue val; | ||
505 | + | ||
506 | + list.g_type = val.g_type = 0; | ||
507 | + | ||
508 | + g_value_init (&list, GST_TYPE_LIST); | ||
509 | + g_value_init (&val, GST_TYPE_FOURCC); | ||
510 | + | ||
511 | +#if 0 | ||
512 | + gst_value_set_fourcc (&val, GST_MAKE_FOURCC ('Y', 'U', 'Y', '2')); | ||
513 | + gst_value_list_append_value (&list, &val); | ||
514 | +#else | ||
515 | + gst_value_set_fourcc (&val, GST_MAKE_FOURCC ('I', '4', '2', '0')); | ||
516 | + gst_value_list_append_value (&list, &val); | ||
517 | + | ||
518 | + gst_value_set_fourcc (&val, GST_MAKE_FOURCC ('U', 'Y', 'V', 'Y')); | ||
519 | + gst_value_list_append_value (&list, &val); | ||
520 | +#endif | ||
521 | + | ||
522 | + gst_structure_set_value (struc, "format", &list); | ||
523 | + | ||
524 | + g_value_unset (&val); | ||
525 | + g_value_unset (&list); | ||
526 | + } | ||
527 | + | ||
528 | + gst_caps_append_structure (caps, struc); | ||
529 | + | ||
530 | + return caps; | ||
531 | +} | ||
532 | + | ||
533 | +static GstFlowReturn | ||
534 | +buffer_alloc (GstBaseSink *bsink, | ||
535 | + guint64 offset, | ||
536 | + guint size, | ||
537 | + GstCaps *caps, | ||
538 | + GstBuffer **buf) | ||
539 | +{ | ||
540 | + GstOmapFbSink *self; | ||
541 | + GstBuffer *buffer = NULL; | ||
542 | + GstFlowReturn ret = GST_FLOW_OK; | ||
543 | + self = GST_OMAPFB_SINK (bsink); | ||
544 | + | ||
545 | + if(self->row_skip) { | ||
546 | + buffer = gst_buffer_new (); | ||
547 | + GST_BUFFER_DATA (buffer) = self->buffer = self->framebuffer; | ||
548 | + GST_BUFFER_SIZE (buffer) = self->buffer_size = size; | ||
549 | + gst_buffer_set_caps (buffer, caps); | ||
550 | + } else { | ||
551 | + if(self->buffer && size == self->buffer_size) { | ||
552 | + buffer = gst_buffer_new (); | ||
553 | + GST_BUFFER_DATA (buffer) = self->buffer; | ||
554 | + GST_BUFFER_SIZE (buffer) = size; | ||
555 | + gst_buffer_set_caps (buffer, caps); | ||
556 | + } else { | ||
557 | + if(self->buffer) | ||
558 | + free(self->buffer); | ||
559 | + if(posix_memalign(&self->buffer, 16, (size_t) size) == 0) { | ||
560 | + buffer = gst_buffer_new (); | ||
561 | + GST_BUFFER_DATA (buffer) = self->buffer; | ||
562 | + GST_BUFFER_SIZE (buffer) = self->buffer_size = size; | ||
563 | + gst_buffer_set_caps (buffer, caps); | ||
564 | + } else { | ||
565 | + GST_ELEMENT_ERROR (self, RESOURCE, WRITE, ("Could not allocate aligned buf!"), | ||
566 | + ("Could not alloc aligned buf!")); | ||
567 | + } | ||
568 | + } | ||
569 | + } | ||
570 | + | ||
571 | + *buf = buffer; | ||
572 | + return ret; | ||
573 | +} | ||
574 | + | ||
575 | +static void | ||
576 | +x_memcpy (GstOmapFbSink *omapfbsink, __uint8_t *outBuf, __uint8_t *inBuf) | ||
577 | +{ | ||
578 | + BufferGfx_Attrs gfxAttrs = BufferGfx_Attrs_DEFAULT; | ||
579 | + Buffer_Handle hInBuf = NULL, hOutBuf = NULL; | ||
580 | + Framecopy_Attrs fcAttrs = Framecopy_Attrs_DEFAULT; | ||
581 | + int size; | ||
582 | + | ||
583 | + if (omapfbsink->hFc == NULL) { | ||
584 | + fcAttrs.accel = TRUE; | ||
585 | + omapfbsink->hFc = Framecopy_create(&fcAttrs); | ||
586 | + if (omapfbsink->hFc == NULL) { | ||
587 | + GST_ELEMENT_ERROR(omapfbsink, RESOURCE, WRITE, ("failed to create dmai framecopy handle"), ("failed to create dmai framecopy handle")); | ||
588 | + goto cleanup; | ||
589 | + } | ||
590 | + } | ||
591 | + | ||
592 | + gfxAttrs.bAttrs.reference = TRUE; | ||
593 | + gfxAttrs.dim.width = GST_VIDEO_SINK_WIDTH (omapfbsink); | ||
594 | + gfxAttrs.dim.height = GST_VIDEO_SINK_HEIGHT (omapfbsink); | ||
595 | + gfxAttrs.colorSpace = ColorSpace_UYVY; | ||
596 | + gfxAttrs.dim.lineLength = omapfbsink->fixinfo.line_length; | ||
597 | + size = gfxAttrs.dim.height * gfxAttrs.dim.width * 2; | ||
598 | + | ||
599 | + hInBuf = Buffer_create(size, BufferGfx_getBufferAttrs(&gfxAttrs)); | ||
600 | + if (hInBuf == NULL) { | ||
601 | + GST_ELEMENT_ERROR(omapfbsink, RESOURCE, WRITE, ("Could not allocate refer dmai buffer"), ("Could not allocate refer dmai buffer")); | ||
602 | + goto cleanup; | ||
603 | + } | ||
604 | + Buffer_setUserPtr(hInBuf, (Int8*) inBuf); | ||
605 | + Buffer_setNumBytesUsed(hInBuf,Buffer_getSize(hInBuf)); | ||
606 | + | ||
607 | + hOutBuf = Buffer_create(size, BufferGfx_getBufferAttrs(&gfxAttrs)); | ||
608 | + if (hOutBuf == NULL) { | ||
609 | + GST_ELEMENT_ERROR(omapfbsink, RESOURCE, WRITE, ("Could not allocate refer dmai buffer"), ("Could not allocate refer dmai buffer")); | ||
610 | + goto cleanup; | ||
611 | + } | ||
612 | + Buffer_setUserPtr(hOutBuf, (Int8*) outBuf); | ||
613 | + Buffer_setNumBytesUsed(hOutBuf,Buffer_getSize(hOutBuf)); | ||
614 | + | ||
615 | + | ||
616 | + if (Framecopy_config(omapfbsink->hFc, hInBuf, hOutBuf) < 0) { | ||
617 | + GST_ELEMENT_ERROR(omapfbsink, RESOURCE, WRITE, ("failed to configure dmai framecopy handle"), ("failed to configure dmai framecopy handle")); | ||
618 | + goto cleanup; | ||
619 | + } | ||
620 | + | ||
621 | + if (Framecopy_execute(omapfbsink->hFc, hInBuf, hOutBuf) < 0) { | ||
622 | + GST_ELEMENT_ERROR(omapfbsink, RESOURCE, WRITE, ("failed to execute dmai framecopy handle"), ("failed to configure dmai framecopy handle")); | ||
623 | + goto cleanup; | ||
624 | + } | ||
625 | + cleanup: | ||
626 | + | ||
627 | + if (hInBuf) | ||
628 | + Buffer_delete(hInBuf); | ||
629 | + if (hOutBuf) | ||
630 | + Buffer_delete(hOutBuf); | ||
631 | +} | ||
632 | + | ||
633 | +static GstFlowReturn | ||
634 | +render (GstBaseSink * bsink, GstBuffer * buf) | ||
635 | +{ | ||
636 | + int i, w, h; | ||
637 | + GstOmapFbSink *omapfbsink = GST_OMAPFB_SINK(bsink); | ||
638 | + __uint8_t *fb = omapfbsink->framebuffer, *data = GST_BUFFER_DATA(buf); | ||
639 | + gboolean useXcopy = FALSE; | ||
640 | + | ||
641 | + if (GST_IS_TIDMAIBUFFERTRANSPORT(buf)) { | ||
642 | + GST_LOG("found dmai transport buffer, enabling hw framecopy.\n"); | ||
643 | + useXcopy = TRUE; | ||
644 | + } | ||
645 | + | ||
646 | + if(omapfbsink->plane_info.enabled == 2) | ||
647 | + { | ||
648 | + omapfbsink->plane_info.enabled = 1; | ||
649 | + | ||
650 | + g_mutex_lock (omapfbsink->x_lock); | ||
651 | + gst_omapfbsink_update_plane(omapfbsink); | ||
652 | + g_mutex_unlock (omapfbsink->x_lock); | ||
653 | + } | ||
654 | + | ||
655 | + /* If a buffer which wasn't supplied by us is given to us to render with, | ||
656 | + we need to copy to our buffer first so that memory alignment constraints | ||
657 | + are met. */ | ||
658 | + if((data != omapfbsink->buffer && GST_BUFFER_SIZE(buf) <= omapfbsink->buffer_size) && !useXcopy) | ||
659 | + { | ||
660 | + memcpy(omapfbsink->buffer, data, GST_BUFFER_SIZE(buf)); | ||
661 | + data = omapfbsink->buffer; | ||
662 | + } | ||
663 | + | ||
664 | + /* buffer_alloc gave a direct buffer, so we have nothing to | ||
665 | + do here... */ | ||
666 | + if(omapfbsink->row_skip) | ||
667 | + return GST_FLOW_OK; | ||
668 | + | ||
669 | + switch(omapfbsink->image_format) { | ||
670 | + case GST_MAKE_FOURCC('I', '4', '2', '0'): | ||
671 | + /* Convert to YUV422 and send to FB */ | ||
672 | + | ||
673 | + h = GST_VIDEO_SINK_HEIGHT (omapfbsink); | ||
674 | + w = GST_VIDEO_SINK_WIDTH (omapfbsink); | ||
675 | + | ||
676 | + __uint8_t *y, *u, *v; | ||
677 | + y = data; | ||
678 | + u = y + w * h; | ||
679 | + v = u + w / 2 * h / 2; | ||
680 | + yuv420_to_yuv422(fb, y, u, v, w & ~15, h, w, w / 2, omapfbsink->fixinfo.line_length); | ||
681 | + break; | ||
682 | + | ||
683 | + case GST_MAKE_FOURCC('U', 'Y', 'V', 'Y'): | ||
684 | + /* Send to FB, taking into account line_length */ | ||
685 | + if (useXcopy) { | ||
686 | + x_memcpy(omapfbsink, fb, data); | ||
687 | + } | ||
688 | + else { | ||
689 | + | ||
690 | + w = 2 * GST_VIDEO_SINK_WIDTH (omapfbsink); | ||
691 | + for(i = 0; i < GST_VIDEO_SINK_HEIGHT (omapfbsink); i++) | ||
692 | + { | ||
693 | + memcpy(fb, data, w); | ||
694 | + | ||
695 | + fb += omapfbsink->fixinfo.line_length; | ||
696 | + data += w; | ||
697 | + } | ||
698 | + } | ||
699 | + break; | ||
700 | + } | ||
701 | + | ||
702 | + return GST_FLOW_OK; | ||
703 | +} | ||
704 | + | ||
705 | +static gboolean | ||
706 | +setcaps (GstBaseSink *bsink, | ||
707 | + GstCaps *vscapslist) | ||
708 | +{ | ||
709 | + GstOmapFbSink *self; | ||
710 | + GstStructure *structure; | ||
711 | + | ||
712 | + gint width, height; | ||
713 | + struct omapfb_color_key color_key; | ||
714 | + | ||
715 | + self = GST_OMAPFB_SINK (bsink); | ||
716 | + | ||
717 | + structure = gst_caps_get_structure (vscapslist, 0); | ||
718 | + | ||
719 | + gst_structure_get_int (structure, "width", &width); | ||
720 | + gst_structure_get_int (structure, "height", &height); | ||
721 | + | ||
722 | + self->overlay_info.xres = MIN (self->varinfo.xres, width) & ~15; | ||
723 | + self->overlay_info.yres = MIN (self->varinfo.yres, height) & ~15; | ||
724 | + self->overlay_info.xres_virtual = self->overlay_info.xres; | ||
725 | + self->overlay_info.yres_virtual = self->overlay_info.yres; | ||
726 | + | ||
727 | + self->overlay_info.xoffset = 0; | ||
728 | + self->overlay_info.yoffset = 0; | ||
729 | + | ||
730 | + gst_structure_get_fourcc (structure, "format", &self->image_format); | ||
731 | + switch(self->image_format) { | ||
732 | + case GST_MAKE_FOURCC('I', '4', '2', '0'): | ||
733 | + self->row_skip = FALSE; /* Colorspace conversion required */ | ||
734 | + self->overlay_info.nonstd = OMAPFB_COLOR_YUY422; | ||
735 | + break; | ||
736 | + case GST_MAKE_FOURCC('U', 'Y', 'V', 'Y'): | ||
737 | + /* Can data be pushed straight to the FB or do we need to interleave? */ | ||
738 | + if (self->fixinfo.line_length != 2 * width) | ||
739 | + self->row_skip = FALSE; | ||
740 | + else | ||
741 | + self->row_skip = TRUE; | ||
742 | + self->overlay_info.nonstd = OMAPFB_COLOR_YUV422; | ||
743 | + break; | ||
744 | + } | ||
745 | + | ||
746 | + if (ioctl (self->overlay_fd, FBIOPUT_VSCREENINFO, &self->overlay_info)) | ||
747 | + return FALSE; | ||
748 | + | ||
749 | + GST_VIDEO_SINK_WIDTH (self) = width; | ||
750 | + GST_VIDEO_SINK_HEIGHT (self) = height; | ||
751 | + if (!self->xwindow) { | ||
752 | + self->xwindow = gst_omapfbsink_xwindow_new (self, | ||
753 | + GST_VIDEO_SINK_WIDTH (self), GST_VIDEO_SINK_HEIGHT (self)); | ||
754 | + } | ||
755 | + | ||
756 | + color_key.channel_out = OMAPFB_CHANNEL_OUT_LCD; | ||
757 | + color_key.background = 0x0; | ||
758 | + color_key.trans_key = self->colorKey; | ||
759 | + if (self->xwindow) | ||
760 | + color_key.key_type = OMAPFB_COLOR_KEY_GFX_DST; | ||
761 | + else | ||
762 | + color_key.key_type = OMAPFB_COLOR_KEY_DISABLED; | ||
763 | + | ||
764 | + if (ioctl (self->overlay_fd, OMAPFB_SET_COLOR_KEY, &color_key)) | ||
765 | + return FALSE; | ||
766 | + | ||
767 | + self->plane_info.pos_x = 0; | ||
768 | + self->plane_info.pos_y = 0; | ||
769 | + self->plane_info.out_width = self->overlay_info.xres; | ||
770 | + self->plane_info.out_height = self->overlay_info.yres; | ||
771 | + self->plane_info.enabled = 2; | ||
772 | + | ||
773 | + if (ioctl (self->overlay_fd, FBIOGET_FSCREENINFO, &self->fixinfo)) | ||
774 | + return FALSE; | ||
775 | + | ||
776 | + self->enabled = TRUE; | ||
777 | + return TRUE; | ||
778 | +} | ||
779 | + | ||
780 | +static gboolean | ||
781 | +start (GstBaseSink *bsink) | ||
782 | +{ | ||
783 | + GstOmapFbSink *self; | ||
784 | + int fd; | ||
785 | + | ||
786 | + self = GST_OMAPFB_SINK (bsink); | ||
787 | + | ||
788 | + fd = open ("/dev/fb0", O_RDWR); | ||
789 | + | ||
790 | + if (fd == -1) | ||
791 | + return FALSE; | ||
792 | + | ||
793 | + if (ioctl (fd, FBIOGET_VSCREENINFO, &self->varinfo)) | ||
794 | + { | ||
795 | + close (fd); | ||
796 | + return FALSE; | ||
797 | + } | ||
798 | + | ||
799 | + if (close (fd)) | ||
800 | + return FALSE; | ||
801 | + | ||
802 | + self->overlay_fd = open ("/dev/fb1", O_RDWR); | ||
803 | + | ||
804 | + if (self->overlay_fd == -1) | ||
805 | + return FALSE; | ||
806 | + | ||
807 | + if (ioctl (self->overlay_fd, FBIOGET_VSCREENINFO, &self->overlay_info)) | ||
808 | + return FALSE; | ||
809 | + | ||
810 | + if (ioctl (self->overlay_fd, OMAPFB_QUERY_PLANE, &self->plane_info)) | ||
811 | + return FALSE; | ||
812 | + | ||
813 | + if (ioctl (self->overlay_fd, OMAPFB_QUERY_MEM, &self->mem_info)) | ||
814 | + return FALSE; | ||
815 | + | ||
816 | + self->framebuffer = mmap (NULL, self->mem_info.size, PROT_WRITE, MAP_SHARED, self->overlay_fd, 0); | ||
817 | + if (self->framebuffer == MAP_FAILED) | ||
818 | + return FALSE; | ||
819 | + | ||
820 | + return TRUE; | ||
821 | +} | ||
822 | + | ||
823 | +static gboolean | ||
824 | +stop (GstBaseSink *bsink) | ||
825 | +{ | ||
826 | + GstOmapFbSink *self; | ||
827 | + | ||
828 | + self = GST_OMAPFB_SINK (bsink); | ||
829 | + | ||
830 | + if (self->enabled) | ||
831 | + { | ||
832 | + self->plane_info.enabled = 0; | ||
833 | + | ||
834 | + if (ioctl (self->overlay_fd, OMAPFB_SETUP_PLANE, &self->plane_info)) | ||
835 | + return FALSE; | ||
836 | + } | ||
837 | + | ||
838 | + if (munmap (self->framebuffer, self->mem_info.size)) | ||
839 | + return FALSE; | ||
840 | + | ||
841 | + if (close (self->overlay_fd)) | ||
842 | + return FALSE; | ||
843 | + | ||
844 | + if (self->hFc) | ||
845 | + Framecopy_delete(self->hFc); | ||
846 | + | ||
847 | + return TRUE; | ||
848 | +} | ||
849 | + | ||
850 | +/* This function cleans the X context. Closing the Display and unrefing the | ||
851 | + caps for supported formats. */ | ||
852 | +static void | ||
853 | +gst_omapfbsink_xcontext_clear (GstOmapFbSink * omapfbsink) | ||
854 | +{ | ||
855 | + GstXContext *xcontext; | ||
856 | + GST_OBJECT_LOCK (omapfbsink); | ||
857 | + if (omapfbsink->xcontext == NULL) { | ||
858 | + GST_OBJECT_UNLOCK (omapfbsink); | ||
859 | + return; | ||
860 | + } | ||
861 | + | ||
862 | + xcontext = omapfbsink->xcontext; | ||
863 | + omapfbsink->xcontext = NULL; | ||
864 | + | ||
865 | + GST_OBJECT_UNLOCK (omapfbsink); | ||
866 | + g_mutex_lock (omapfbsink->x_lock); | ||
867 | + | ||
868 | + XCloseDisplay (xcontext->disp); | ||
869 | + g_mutex_unlock (omapfbsink->x_lock); | ||
870 | + g_free (xcontext); | ||
871 | +} | ||
872 | + | ||
873 | +static void | ||
874 | +gst_omapfbsink_reset (GstOmapFbSink *omapfbsink) | ||
875 | +{ | ||
876 | + GThread *thread; | ||
877 | + | ||
878 | + GST_OBJECT_LOCK (omapfbsink); | ||
879 | + omapfbsink->running = FALSE; | ||
880 | + /* grab thread and mark it as NULL */ | ||
881 | + thread = omapfbsink->event_thread; | ||
882 | + omapfbsink->event_thread = NULL; | ||
883 | + GST_OBJECT_UNLOCK (omapfbsink); | ||
884 | + | ||
885 | + /* Wait for our event thread to finish before we clean up our stuff. */ | ||
886 | + if (thread) | ||
887 | + g_thread_join (thread); | ||
888 | + | ||
889 | + g_mutex_lock (omapfbsink->flow_lock); | ||
890 | + if (omapfbsink->xwindow) { | ||
891 | + gst_omapfbsink_xwindow_clear (omapfbsink, omapfbsink->xwindow); | ||
892 | + gst_omapfbsink_xwindow_destroy (omapfbsink, omapfbsink->xwindow); | ||
893 | + omapfbsink->xwindow = NULL; | ||
894 | + } | ||
895 | + g_mutex_unlock (omapfbsink->flow_lock); | ||
896 | + gst_omapfbsink_xcontext_clear (omapfbsink); | ||
897 | +} | ||
898 | + | ||
899 | +static GstStateChangeReturn | ||
900 | +gst_omapfbsink_change_state (GstElement * element, GstStateChange transition) | ||
901 | +{ | ||
902 | + GstOmapFbSink *omapfbsink; | ||
903 | + GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS; | ||
904 | + GstXContext *xcontext = NULL; | ||
905 | + | ||
906 | + omapfbsink = GST_OMAPFB_SINK (element); | ||
907 | + | ||
908 | + switch (transition) { | ||
909 | + case GST_STATE_CHANGE_NULL_TO_READY: | ||
910 | + | ||
911 | + /* Initializing the XContext */ | ||
912 | + if (omapfbsink->xcontext == NULL) { | ||
913 | + xcontext = gst_omapfbsink_xcontext_get (omapfbsink); | ||
914 | + | ||
915 | + GST_OBJECT_LOCK (omapfbsink); | ||
916 | + omapfbsink->xcontext = xcontext; | ||
917 | + GST_OBJECT_UNLOCK (omapfbsink); | ||
918 | + } | ||
919 | + break; | ||
920 | + case GST_STATE_CHANGE_READY_TO_PAUSED: | ||
921 | + g_mutex_lock (omapfbsink->flow_lock); | ||
922 | + if (omapfbsink->xwindow) | ||
923 | + gst_omapfbsink_xwindow_clear (omapfbsink, omapfbsink->xwindow); | ||
924 | + g_mutex_unlock (omapfbsink->flow_lock); | ||
925 | + break; | ||
926 | + case GST_STATE_CHANGE_PAUSED_TO_PLAYING: | ||
927 | + break; | ||
928 | + default: | ||
929 | + break; | ||
930 | + } | ||
931 | + | ||
932 | + ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); | ||
933 | + | ||
934 | + switch (transition) { | ||
935 | + case GST_STATE_CHANGE_PLAYING_TO_PAUSED: | ||
936 | + break; | ||
937 | + case GST_STATE_CHANGE_PAUSED_TO_READY: | ||
938 | + GST_VIDEO_SINK_WIDTH (omapfbsink) = 0; | ||
939 | + GST_VIDEO_SINK_HEIGHT (omapfbsink) = 0; | ||
940 | + break; | ||
941 | + case GST_STATE_CHANGE_READY_TO_NULL: | ||
942 | + gst_omapfbsink_reset (omapfbsink); | ||
943 | + break; | ||
944 | + default: | ||
945 | + break; | ||
946 | + } | ||
947 | + | ||
948 | + return ret; | ||
949 | +} | ||
950 | + | ||
951 | +static void | ||
952 | +type_class_init (gpointer g_class, | ||
953 | + gpointer class_data) | ||
954 | +{ | ||
955 | + GstElementClass *element_class; | ||
956 | + GstBaseSinkClass *base_sink_class; | ||
957 | + | ||
958 | + element_class = (GstElementClass *) g_class; | ||
959 | + base_sink_class = (GstBaseSinkClass *) g_class; | ||
960 | + | ||
961 | + parent_class = g_type_class_peek_parent (g_class); | ||
962 | + | ||
963 | + base_sink_class->set_caps = GST_DEBUG_FUNCPTR (setcaps); | ||
964 | + base_sink_class->buffer_alloc = GST_DEBUG_FUNCPTR (buffer_alloc); | ||
965 | + base_sink_class->render = GST_DEBUG_FUNCPTR (render); | ||
966 | + base_sink_class->start = GST_DEBUG_FUNCPTR (start); | ||
967 | + base_sink_class->stop = GST_DEBUG_FUNCPTR (stop); | ||
968 | + | ||
969 | + element_class->change_state = gst_omapfbsink_change_state; | ||
970 | +} | ||
971 | + | ||
972 | +static void | ||
973 | +type_base_init (gpointer g_class) | ||
974 | +{ | ||
975 | + GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); | ||
976 | + | ||
977 | + { | ||
978 | + GstElementDetails details; | ||
979 | + | ||
980 | + details.longname = "Linux OMAP framebuffer sink"; | ||
981 | + details.klass = "Sink/Video"; | ||
982 | + details.description = "Renders video with omapfb"; | ||
983 | + details.author = "Felipe Contreras"; | ||
984 | + | ||
985 | + gst_element_class_set_details (element_class, &details); | ||
986 | + } | ||
987 | + | ||
988 | + { | ||
989 | + GstPadTemplate *template; | ||
990 | + | ||
991 | + template = gst_pad_template_new ("sink", GST_PAD_SINK, | ||
992 | + GST_PAD_ALWAYS, | ||
993 | + generate_sink_template ()); | ||
994 | + | ||
995 | + gst_element_class_add_pad_template (element_class, template); | ||
996 | + } | ||
997 | +} | ||
998 | + | ||
999 | +static gboolean | ||
1000 | +gst_omapfbsink_interface_supported (GstImplementsInterface * iface, GType type) | ||
1001 | +{ | ||
1002 | + g_assert (type == GST_TYPE_X_OVERLAY); | ||
1003 | + return TRUE; | ||
1004 | +} | ||
1005 | + | ||
1006 | +static void | ||
1007 | +gst_omapfbsink_interface_init (GstImplementsInterfaceClass * klass) | ||
1008 | +{ | ||
1009 | + klass->supported = gst_omapfbsink_interface_supported; | ||
1010 | +} | ||
1011 | + | ||
1012 | +static void | ||
1013 | +gst_omapfbsink_init (GstOmapFbSink * omapfbsink) | ||
1014 | +{ | ||
1015 | + omapfbsink->display_name = NULL; | ||
1016 | + omapfbsink->xcontext = NULL; | ||
1017 | + omapfbsink->xwindow = NULL; | ||
1018 | + | ||
1019 | + omapfbsink->event_thread = NULL; | ||
1020 | + omapfbsink->running = FALSE; | ||
1021 | + | ||
1022 | + omapfbsink->x_lock = g_mutex_new (); | ||
1023 | + omapfbsink->flow_lock = g_mutex_new (); | ||
1024 | + | ||
1025 | + omapfbsink->handle_events = TRUE; | ||
1026 | + omapfbsink->colorKey = 0xff0; | ||
1027 | + | ||
1028 | + omapfbsink->plane_info.enabled = 0; | ||
1029 | + omapfbsink->row_skip = FALSE; | ||
1030 | + | ||
1031 | + omapfbsink->buffer = NULL; | ||
1032 | + omapfbsink->buffer_size = 0; | ||
1033 | + omapfbsink->hFc = NULL; | ||
1034 | +} | ||
1035 | + | ||
1036 | +GType | ||
1037 | +gst_omapfbsink_get_type (void) | ||
1038 | +{ | ||
1039 | + static GType type = 0; | ||
1040 | + | ||
1041 | + if (G_UNLIKELY (type == 0)) | ||
1042 | + { | ||
1043 | + GTypeInfo *type_info; | ||
1044 | + static const GInterfaceInfo iface_info = { | ||
1045 | + (GInterfaceInitFunc) gst_omapfbsink_interface_init, | ||
1046 | + NULL, | ||
1047 | + NULL, | ||
1048 | + }; | ||
1049 | + static const GInterfaceInfo overlay_info = { | ||
1050 | + (GInterfaceInitFunc) gst_omapfbsink_xoverlay_init, | ||
1051 | + NULL, | ||
1052 | + NULL, | ||
1053 | + }; | ||
1054 | + type_info = g_new0 (GTypeInfo, 1); | ||
1055 | + type_info->class_size = sizeof (GstOmapFbSinkClass); | ||
1056 | + type_info->base_init = type_base_init; | ||
1057 | + type_info->class_init = type_class_init; | ||
1058 | + type_info->instance_size = sizeof (GstOmapFbSink); | ||
1059 | + type_info->instance_init = (GInstanceInitFunc) gst_omapfbsink_init; | ||
1060 | + | ||
1061 | + type = g_type_register_static (GST_TYPE_BASE_SINK, "GstOmapFbSink", type_info, 0); | ||
1062 | + g_type_add_interface_static (type, GST_TYPE_IMPLEMENTS_INTERFACE, &iface_info); | ||
1063 | + g_type_add_interface_static (type, GST_TYPE_X_OVERLAY, &overlay_info); | ||
1064 | + | ||
1065 | + g_free (type_info); | ||
1066 | + } | ||
1067 | + | ||
1068 | + return type; | ||
1069 | +} | ||
1070 | diff -uNr ticodecplugin/src/omapfb.h ticodecplugin.new/src/omapfb.h | ||
1071 | --- ticodecplugin/src/omapfb.h 1969-12-31 18:00:00.000000000 -0600 | ||
1072 | +++ ticodecplugin.new/src/omapfb.h 2010-09-03 13:54:11.929409696 -0500 | ||
1073 | @@ -0,0 +1,142 @@ | ||
1074 | +/* | ||
1075 | + * Copyright (C) 2008 Felipe Contreras <felipe.contreras@gmail.com> | ||
1076 | + * | ||
1077 | + * This library is free software; you can redistribute it and/or | ||
1078 | + * modify it under the terms of the GNU Lesser General Public | ||
1079 | + * License as published by the Free Software Foundation | ||
1080 | + * version 2.1 of the License. | ||
1081 | + * | ||
1082 | + * This library is distributed in the hope that it will be useful, | ||
1083 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1084 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
1085 | + * Lesser General Public License for more details. | ||
1086 | + * | ||
1087 | + * You should have received a copy of the GNU General Public License | ||
1088 | + * along with this program; if not, write to the Free Software | ||
1089 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA | ||
1090 | + */ | ||
1091 | + | ||
1092 | +#ifndef GST_OMAPFB_H | ||
1093 | +#define GST_OMAPFB_H | ||
1094 | + | ||
1095 | +#include <ti/sdo/dmai/BufferGfx.h> | ||
1096 | +#include <ti/sdo/dmai/Framecopy.h> | ||
1097 | + | ||
1098 | +#include "gsttidmaibuffertransport.h" | ||
1099 | +#include <gst/gst.h> | ||
1100 | +#include <gst/video/gstvideosink.h> | ||
1101 | +#include <gst/video/video.h> | ||
1102 | + | ||
1103 | +#include <X11/Xlib.h> | ||
1104 | +#include <X11/Xutil.h> | ||
1105 | + | ||
1106 | +#include <linux/fb.h> | ||
1107 | +#include <linux/omapfb.h> | ||
1108 | + | ||
1109 | + | ||
1110 | +G_BEGIN_DECLS | ||
1111 | + | ||
1112 | +#define GST_OMAPFB_SINK_TYPE (gst_omapfbsink_get_type ()) | ||
1113 | +#define GST_OMAPFB_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_OMAPFB_SINK_TYPE, GstOmapFbSink)) | ||
1114 | + | ||
1115 | +typedef struct GstXContext GstXContext; | ||
1116 | +typedef struct GstXWindow GstXWindow; | ||
1117 | +typedef struct GstOmapFbSink GstOmapFbSink; | ||
1118 | +typedef struct GstOmapFbSinkClass GstOmapFbSinkClass; | ||
1119 | + | ||
1120 | +/** | ||
1121 | + * GstXWindow: | ||
1122 | + * @win: the Window ID of this X11 window | ||
1123 | + * @width: the width in pixels of Window @win | ||
1124 | + * @height: the height in pixels of Window @win | ||
1125 | + * @internal: used to remember if Window @win was created internally or passed | ||
1126 | + * through the #GstXOverlay interface | ||
1127 | + * @gc: the Graphical Context of Window @win | ||
1128 | + * | ||
1129 | + * Structure used to store informations about a Window. | ||
1130 | + */ | ||
1131 | +struct GstXWindow { | ||
1132 | + Window win; | ||
1133 | + gint width, height; | ||
1134 | + gboolean internal; | ||
1135 | + GC gc; | ||
1136 | + | ||
1137 | + gint wx, wy; | ||
1138 | +}; | ||
1139 | + | ||
1140 | +/** | ||
1141 | + * GstXContext: | ||
1142 | + * @disp: the X11 Display of this context | ||
1143 | + * @screen: the default Screen of Display @disp | ||
1144 | + * @screen_num: the Screen number of @screen | ||
1145 | + * @visual: the default Visual of Screen @screen | ||
1146 | + * @root: the root Window of Display @disp | ||
1147 | + * @white: the value of a white pixel on Screen @screen | ||
1148 | + * @black: the value of a black pixel on Screen @screen | ||
1149 | + * @depth: the color depth of Display @disp | ||
1150 | + * @bpp: the number of bits per pixel on Display @disp | ||
1151 | + * @endianness: the endianness of image bytes on Display @disp | ||
1152 | + * @width: the width in pixels of Display @disp | ||
1153 | + * @height: the height in pixels of Display @disp | ||
1154 | + * | ||
1155 | + * Structure used to store various informations collected/calculated for a | ||
1156 | + * Display. | ||
1157 | + */ | ||
1158 | +struct GstXContext { | ||
1159 | + Display *disp; | ||
1160 | + Screen *screen; | ||
1161 | + gint screen_num; | ||
1162 | + | ||
1163 | + Visual *visual; | ||
1164 | + Window root; | ||
1165 | + | ||
1166 | + gint depth; | ||
1167 | + gint bpp; | ||
1168 | + | ||
1169 | + gint width, height; | ||
1170 | +}; | ||
1171 | + | ||
1172 | +struct GstOmapFbSink | ||
1173 | +{ | ||
1174 | + GstVideoSink videosink; | ||
1175 | + | ||
1176 | + struct fb_fix_screeninfo fixinfo; | ||
1177 | + struct fb_var_screeninfo varinfo; | ||
1178 | + struct fb_var_screeninfo overlay_info; | ||
1179 | + struct omapfb_mem_info mem_info; | ||
1180 | + struct omapfb_plane_info plane_info; | ||
1181 | + | ||
1182 | + int overlay_fd; | ||
1183 | + unsigned char *framebuffer; | ||
1184 | + gboolean enabled; | ||
1185 | + | ||
1186 | + GMutex *x_lock; | ||
1187 | + GMutex *flow_lock; | ||
1188 | + | ||
1189 | + GstXContext *xcontext; | ||
1190 | + GstXWindow *xwindow; | ||
1191 | + | ||
1192 | + gulong colorKey; | ||
1193 | + char *display_name; | ||
1194 | + GThread *event_thread; | ||
1195 | + | ||
1196 | + void *buffer; | ||
1197 | + guint buffer_size; | ||
1198 | + guint image_format; | ||
1199 | + | ||
1200 | + gboolean row_skip; | ||
1201 | + gboolean handle_events; | ||
1202 | + gboolean running; | ||
1203 | + Framecopy_Handle hFc; | ||
1204 | +}; | ||
1205 | + | ||
1206 | +struct GstOmapFbSinkClass | ||
1207 | +{ | ||
1208 | + GstBaseSinkClass parent_class; | ||
1209 | +}; | ||
1210 | + | ||
1211 | +GType gst_omapfbsink_get_type (void); | ||
1212 | + | ||
1213 | +G_END_DECLS | ||
1214 | + | ||
1215 | +#endif /* GST_OMAPFB_H */ | ||
1216 | diff -uNr ticodecplugin/src/yuv.S ticodecplugin.new/src/yuv.S | ||
1217 | --- ticodecplugin/src/yuv.S 1969-12-31 18:00:00.000000000 -0600 | ||
1218 | +++ ticodecplugin.new/src/yuv.S 2010-09-03 13:54:11.929409696 -0500 | ||
1219 | @@ -0,0 +1,117 @@ | ||
1220 | +/* | ||
1221 | + Copyright (C) 2008 Mans Rullgard | ||
1222 | + | ||
1223 | + Permission is hereby granted, free of charge, to any person | ||
1224 | + obtaining a copy of this software and associated documentation | ||
1225 | + files (the "Software"), to deal in the Software without | ||
1226 | + restriction, including without limitation the rights to use, copy, | ||
1227 | + modify, merge, publish, distribute, sublicense, and/or sell copies | ||
1228 | + of the Software, and to permit persons to whom the Software is | ||
1229 | + furnished to do so, subject to the following conditions: | ||
1230 | + | ||
1231 | + The above copyright notice and this permission notice shall be | ||
1232 | + included in all copies or substantial portions of the Software. | ||
1233 | + | ||
1234 | + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
1235 | + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
1236 | + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
1237 | + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
1238 | + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
1239 | + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
1240 | + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
1241 | + DEALINGS IN THE SOFTWARE. | ||
1242 | +*/ | ||
1243 | + | ||
1244 | + .fpu neon | ||
1245 | + .text | ||
1246 | + | ||
1247 | +@ yuv420_to_yuv422(uint8_t *yuv, uint8_t *y, uint8_t *u, uint8_t *v, | ||
1248 | +@ int w, int h, int yw, int cw, int dw) | ||
1249 | + | ||
1250 | +#define yuv r0 | ||
1251 | +#define y r1 | ||
1252 | +#define u r2 | ||
1253 | +#define v r3 | ||
1254 | +#define w r4 | ||
1255 | +#define h r5 | ||
1256 | +#define yw r6 | ||
1257 | +#define cw r7 | ||
1258 | +#define dw r8 | ||
1259 | + | ||
1260 | +#define tyuv r9 | ||
1261 | +#define ty r10 | ||
1262 | +#define tu r11 | ||
1263 | +#define tv r12 | ||
1264 | +#define i lr | ||
1265 | + | ||
1266 | + .global yuv420_to_yuv422 | ||
1267 | + .func yuv420_to_yuv422 | ||
1268 | +yuv420_to_yuv422: | ||
1269 | + push {r4-r11,lr} | ||
1270 | + add r4, sp, #36 | ||
1271 | + ldm r4, {r4-r8} | ||
1272 | +1: | ||
1273 | + mov tu, u | ||
1274 | + mov tv, v | ||
1275 | + vld1.64 {d2}, [u,:64], cw @ u0 | ||
1276 | + vld1.64 {d3}, [v,:64], cw @ v0 | ||
1277 | + mov tyuv, yuv | ||
1278 | + mov ty, y | ||
1279 | + vzip.8 d2, d3 @ u0v0 | ||
1280 | + mov i, #16 | ||
1281 | +2: | ||
1282 | + pld [y, #64] | ||
1283 | + vld1.64 {d0, d1}, [y,:128], yw @ y0 | ||
1284 | + pld [u, #64] | ||
1285 | + subs i, i, #4 | ||
1286 | + vld1.64 {d6}, [u,:64], cw @ u2 | ||
1287 | + pld [y, #64] | ||
1288 | + vld1.64 {d4, d5}, [y,:128], yw @ y1 | ||
1289 | + pld [v, #64] | ||
1290 | + vld1.64 {d7}, [v,:64], cw @ v2 | ||
1291 | + pld [y, #64] | ||
1292 | + vld1.64 {d16,d17}, [y,:128], yw @ y2 | ||
1293 | + vzip.8 d6, d7 @ u2v2 | ||
1294 | + pld [u, #64] | ||
1295 | + vld1.64 {d22}, [u,:64], cw @ u4 | ||
1296 | + pld [v, #64] | ||
1297 | + vld1.64 {d23}, [v,:64], cw @ v4 | ||
1298 | + pld [y, #64] | ||
1299 | + vld1.64 {d20,d21}, [y,:128], yw @ y3 | ||
1300 | + vmov q9, q3 @ u2v2 | ||
1301 | + vzip.8 d22, d23 @ u4v4 | ||
1302 | + vrhadd.u8 q3, q1, q3 @ u1v1 | ||
1303 | + vzip.8 q0, q1 @ y0u0y0v0 | ||
1304 | + vmov q12, q11 @ u4v4 | ||
1305 | + vzip.8 q2, q3 @ y1u1y1v1 | ||
1306 | + vrhadd.u8 q11, q9, q11 @ u3v3 | ||
1307 | + vst1.64 {d0-d3}, [yuv,:128], dw @ y0u0y0v0 | ||
1308 | + vzip.8 q8, q9 @ y2u2y2v2 | ||
1309 | + vst1.64 {d4-d7}, [yuv,:128], dw @ y1u1y1v1 | ||
1310 | + vzip.8 q10, q11 @ y3u3y3v3 | ||
1311 | + vst1.64 {d16-d19}, [yuv,:128], dw @ y2u2y2v2 | ||
1312 | + vmov q1, q12 | ||
1313 | + vst1.64 {d20-d23}, [yuv,:128], dw @ y3u3y3v3 | ||
1314 | + bgt 2b | ||
1315 | + subs w, w, #16 | ||
1316 | + add yuv, tyuv, #32 | ||
1317 | + add y, ty, #16 | ||
1318 | + add u, tu, #8 | ||
1319 | + add v, tv, #8 | ||
1320 | + bgt 1b | ||
1321 | + | ||
1322 | + ldr w, [sp, #36] | ||
1323 | + subs h, h, #16 | ||
1324 | + add yuv, yuv, dw, lsl #4 | ||
1325 | + sub yuv, yuv, w, lsl #1 | ||
1326 | + add y, y, yw, lsl #4 | ||
1327 | + sub y, y, w | ||
1328 | + add u, u, cw, lsl #3 | ||
1329 | + sub u, u, w, asr #1 | ||
1330 | + add v, v, cw, lsl #3 | ||
1331 | + sub v, v, w, asr #1 | ||
1332 | + bgt 1b | ||
1333 | + | ||
1334 | + pop {r4-r11,pc} | ||
1335 | + .endfunc | ||
1336 | + | ||
diff --git a/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0003-Support-setting-the-display-framerate-directly-when-.patch b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0003-Support-setting-the-display-framerate-directly-when-.patch new file mode 100644 index 00000000..eb7181be --- /dev/null +++ b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0003-Support-setting-the-display-framerate-directly-when-.patch | |||
@@ -0,0 +1,86 @@ | |||
1 | From fb4dabcac144fcf1a7e9b1eba0114b2eed594d05 Mon Sep 17 00:00:00 2001 | ||
2 | From: Don Darling <don.osc2@gmail.com> | ||
3 | Date: Thu, 26 Aug 2010 11:12:39 -0500 | ||
4 | Subject: [PATCH 3/8] Support setting the display framerate directly when possible. | ||
5 | |||
6 | If can_set_display_framerate is set to true, TIDmaiVideoSink will attempt to | ||
7 | set the display framerate directly in DMAI, instead of trying to simulate the | ||
8 | desired framerate by occasionally repeating frames. | ||
9 | |||
10 | Platforms that support this will need to enable it explicitly. | ||
11 | --- | ||
12 | .../ticodecplugin/src/gsttidmaivideosink.c | 24 ++++++++++++++++++++ | ||
13 | .../ticodecplugin/src/gsttidmaivideosink.h | 1 + | ||
14 | 2 files changed, 25 insertions(+), 0 deletions(-) | ||
15 | |||
16 | diff --git a/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.c b/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.c | ||
17 | index c87b89c..4e327ae 100644 | ||
18 | --- a/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.c | ||
19 | +++ b/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.c | ||
20 | @@ -442,6 +442,7 @@ static void gst_tidmaivideosink_init(GstTIDmaiVideoSink * dmaisink, | ||
21 | dmaisink->numBufs = -1; | ||
22 | dmaisink->framerepeat = 0; | ||
23 | dmaisink->repeat_with_refresh = FALSE; | ||
24 | + dmaisink->can_set_display_framerate = FALSE; | ||
25 | dmaisink->rotation = -1; | ||
26 | dmaisink->tempDmaiBuf = NULL; | ||
27 | dmaisink->accelFrameCopy = TRUE; | ||
28 | @@ -952,6 +953,9 @@ static void gst_tidmaivideosink_check_set_framerate(GstTIDmaiVideoSink * sink) | ||
29 | * then 1 is returned to indicate that there will be no frame | ||
30 | * repeating. | ||
31 | * | ||
32 | + * If the driver supports explicit configuration of the framerate, we | ||
33 | + * don't ever need to repeat frames, and 1 is returned. | ||
34 | + * | ||
35 | ******************************************************************************/ | ||
36 | static int gst_tidmaivideosink_get_framerepeat(GstTIDmaiVideoSink * sink) | ||
37 | { | ||
38 | @@ -959,6 +963,13 @@ static int gst_tidmaivideosink_get_framerepeat(GstTIDmaiVideoSink * sink) | ||
39 | |||
40 | GST_DEBUG("Begin\n"); | ||
41 | |||
42 | + /* If the display allows you to configure the frame rate, we never need | ||
43 | + * to repeat a frame. | ||
44 | + */ | ||
45 | + if (sink->can_set_display_framerate) { | ||
46 | + return 1; | ||
47 | + } | ||
48 | + | ||
49 | /* Divide the native framerate by the desired framerate. If the result | ||
50 | * is a whole number, return it. Otherwise return 1 -- we don't support | ||
51 | * fractional repeat rates. */ | ||
52 | @@ -1151,6 +1162,19 @@ static gboolean gst_tidmaivideosink_set_display_attrs(GstTIDmaiVideoSink *sink, | ||
53 | sink->dAttrs.displayDevice = sink->displayDevice == NULL ? | ||
54 | sink->dAttrs.displayDevice : sink->displayDevice; | ||
55 | |||
56 | + /* Specify framerate if supported by DMAI and the display driver */ | ||
57 | + if (sink->can_set_display_framerate) { | ||
58 | + #if defined (Platform_dm365) | ||
59 | + sink->dAttrs.forceFrameRateNum = | ||
60 | + gst_value_get_fraction_numerator(&sink->iattrs.framerate); | ||
61 | + sink->dAttrs.forceFrameRateDen = | ||
62 | + gst_value_get_fraction_denominator(&sink->iattrs.framerate); | ||
63 | + #else | ||
64 | + GST_ERROR("setting driver framerate is not supported\n"); | ||
65 | + return FALSE; | ||
66 | + #endif | ||
67 | + } | ||
68 | + | ||
69 | /* Set rotation on OMAP35xx */ | ||
70 | if (sink->cpu_dev == Cpu_Device_OMAP3530) { | ||
71 | sink->dAttrs.rotation = sink->rotation == -1 ? | ||
72 | diff --git a/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.h b/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.h | ||
73 | index 5d13e08..4800fcd 100644 | ||
74 | --- a/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.h | ||
75 | +++ b/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.h | ||
76 | @@ -124,6 +124,7 @@ struct _GstTIDmaiVideoSink { | ||
77 | */ | ||
78 | int framerepeat; | ||
79 | gboolean repeat_with_refresh; | ||
80 | + gboolean can_set_display_framerate; | ||
81 | gboolean signal_handoffs; | ||
82 | |||
83 | /* Hardware accelerated copy */ | ||
84 | -- | ||
85 | 1.7.0.4 | ||
86 | |||
diff --git a/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0004-Cosmetic-cleanup-clarify-some-comments.patch b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0004-Cosmetic-cleanup-clarify-some-comments.patch new file mode 100644 index 00000000..229c4521 --- /dev/null +++ b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0004-Cosmetic-cleanup-clarify-some-comments.patch | |||
@@ -0,0 +1,73 @@ | |||
1 | From 03ab3ad3f790dde2dbddfeb62001e8610dbb919a Mon Sep 17 00:00:00 2001 | ||
2 | From: Don Darling <don.osc2@gmail.com> | ||
3 | Date: Thu, 26 Aug 2010 18:25:56 -0500 | ||
4 | Subject: [PATCH 4/8] Cosmetic cleanup / clarify some comments. | ||
5 | |||
6 | --- | ||
7 | .../ticodecplugin/src/gsttidmaivideosink.c | 42 ++++++++----------- | ||
8 | 1 files changed, 18 insertions(+), 24 deletions(-) | ||
9 | |||
10 | diff --git a/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.c b/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.c | ||
11 | index 4e327ae..1d04e1c 100644 | ||
12 | --- a/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.c | ||
13 | +++ b/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.c | ||
14 | @@ -434,23 +434,23 @@ static void gst_tidmaivideosink_init(GstTIDmaiVideoSink * dmaisink, | ||
15 | * Anything that has a NULL value will be initialized with DMAI defaults | ||
16 | * in the gst_tidmaivideosink_init_display function. | ||
17 | */ | ||
18 | - dmaisink->displayStd = NULL; | ||
19 | - dmaisink->displayDevice = NULL; | ||
20 | - dmaisink->dGfxAttrs = defaultGfxAttrs; | ||
21 | - dmaisink->videoStd = NULL; | ||
22 | - dmaisink->videoOutput = NULL; | ||
23 | - dmaisink->numBufs = -1; | ||
24 | - dmaisink->framerepeat = 0; | ||
25 | - dmaisink->repeat_with_refresh = FALSE; | ||
26 | + dmaisink->displayStd = NULL; | ||
27 | + dmaisink->displayDevice = NULL; | ||
28 | + dmaisink->dGfxAttrs = defaultGfxAttrs; | ||
29 | + dmaisink->videoStd = NULL; | ||
30 | + dmaisink->videoOutput = NULL; | ||
31 | + dmaisink->numBufs = -1; | ||
32 | + dmaisink->framerepeat = 0; | ||
33 | + dmaisink->repeat_with_refresh = FALSE; | ||
34 | dmaisink->can_set_display_framerate = FALSE; | ||
35 | - dmaisink->rotation = -1; | ||
36 | - dmaisink->tempDmaiBuf = NULL; | ||
37 | - dmaisink->accelFrameCopy = TRUE; | ||
38 | - dmaisink->autoselect = FALSE; | ||
39 | - dmaisink->prevVideoStd = 0; | ||
40 | - dmaisink->useUserptrBufs = FALSE; | ||
41 | - dmaisink->hideOSD = FALSE; | ||
42 | - dmaisink->hDispBufTab = NULL; | ||
43 | + dmaisink->rotation = -1; | ||
44 | + dmaisink->tempDmaiBuf = NULL; | ||
45 | + dmaisink->accelFrameCopy = TRUE; | ||
46 | + dmaisink->autoselect = FALSE; | ||
47 | + dmaisink->prevVideoStd = 0; | ||
48 | + dmaisink->useUserptrBufs = FALSE; | ||
49 | + dmaisink->hideOSD = FALSE; | ||
50 | + dmaisink->hDispBufTab = NULL; | ||
51 | |||
52 | dmaisink->signal_handoffs = DEFAULT_SIGNAL_HANDOFFS; | ||
53 | |||
54 | @@ -947,14 +947,8 @@ static void gst_tidmaivideosink_check_set_framerate(GstTIDmaiVideoSink * sink) | ||
55 | /****************************************************************************** | ||
56 | * gst_tidmaivideosink_get_framerepeat | ||
57 | * | ||
58 | - * This function will look at the output display frame rate and the | ||
59 | - * input frame rate and determine how many times a frame should be | ||
60 | - * repeated. If the output is not an integer multiple of the input | ||
61 | - * then 1 is returned to indicate that there will be no frame | ||
62 | - * repeating. | ||
63 | - * | ||
64 | - * If the driver supports explicit configuration of the framerate, we | ||
65 | - * don't ever need to repeat frames, and 1 is returned. | ||
66 | + * Return how many times a frame should be repeated to support a | ||
67 | + * framerate lower than the display's native speed. | ||
68 | * | ||
69 | ******************************************************************************/ | ||
70 | static int gst_tidmaivideosink_get_framerepeat(GstTIDmaiVideoSink * sink) | ||
71 | -- | ||
72 | 1.7.0.4 | ||
73 | |||
diff --git a/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0005-Enable-setting-the-framerate-directly-on-DM365.patch b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0005-Enable-setting-the-framerate-directly-on-DM365.patch new file mode 100644 index 00000000..e4059577 --- /dev/null +++ b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0005-Enable-setting-the-framerate-directly-on-DM365.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 1cffa12c9ceb07558d2e4b35cc674070c7a3b8ee Mon Sep 17 00:00:00 2001 | ||
2 | From: Don Darling <don.osc2@gmail.com> | ||
3 | Date: Thu, 26 Aug 2010 18:27:50 -0500 | ||
4 | Subject: [PATCH 5/8] Enable setting the framerate directly on DM365. | ||
5 | |||
6 | This is supported by recent changes to the display driver. DM365 will no | ||
7 | longer use the "repeat_with_refresh" method to display frames more than once. | ||
8 | --- | ||
9 | .../ticodecplugin/src/gsttidmaivideosink.c | 7 ++----- | ||
10 | 1 files changed, 2 insertions(+), 5 deletions(-) | ||
11 | |||
12 | diff --git a/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.c b/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.c | ||
13 | index 1d04e1c..3615bfd 100644 | ||
14 | --- a/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.c | ||
15 | +++ b/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.c | ||
16 | @@ -475,12 +475,9 @@ static void gst_tidmaivideosink_init(GstTIDmaiVideoSink * dmaisink, | ||
17 | g_assert(GST_VALUE_HOLDS_FRACTION(&dmaisink->oattrs.framerate)); | ||
18 | gst_value_set_fraction(&dmaisink->oattrs.framerate, 0, 1); | ||
19 | |||
20 | - /* On DM365, we don't have the bandwidth to copy a frame multiple times to | ||
21 | - * display them more than once. We must put a frame to the display once | ||
22 | - * and let it be refreshed multiple times. | ||
23 | - */ | ||
24 | + /* DM365 supports setting the display framerate */ | ||
25 | #if defined(Platform_dm365) | ||
26 | - dmaisink->repeat_with_refresh = TRUE; | ||
27 | + dmaisink->can_set_display_framerate = TRUE; | ||
28 | #endif | ||
29 | |||
30 | gst_tidmaivideosink_init_env(dmaisink); | ||
31 | -- | ||
32 | 1.7.0.4 | ||
33 | |||
diff --git a/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0006-Remove-the-repeat_with_refresh-feature.patch b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0006-Remove-the-repeat_with_refresh-feature.patch new file mode 100644 index 00000000..4055d0b5 --- /dev/null +++ b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0006-Remove-the-repeat_with_refresh-feature.patch | |||
@@ -0,0 +1,132 @@ | |||
1 | From c1205a792fd519cdebc32c00a5f604ccd78d3eac Mon Sep 17 00:00:00 2001 | ||
2 | From: Don Darling <don.osc2@gmail.com> | ||
3 | Date: Thu, 26 Aug 2010 18:30:13 -0500 | ||
4 | Subject: [PATCH 6/8] Remove the "repeat_with_refresh" feature. | ||
5 | |||
6 | No platforms are using it any longer. | ||
7 | --- | ||
8 | .../ticodecplugin/src/gsttidmaivideosink.c | 67 +------------------- | ||
9 | .../ticodecplugin/src/gsttidmaivideosink.h | 1 - | ||
10 | 2 files changed, 1 insertions(+), 67 deletions(-) | ||
11 | |||
12 | diff --git a/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.c b/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.c | ||
13 | index 3615bfd..0125ed2 100644 | ||
14 | --- a/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.c | ||
15 | +++ b/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.c | ||
16 | @@ -170,8 +170,6 @@ static gboolean | ||
17 | gst_tidmaivideosink_event(GstBaseSink * bsink, GstEvent * event); | ||
18 | static void | ||
19 | gst_tidmaivideosink_init_env(GstTIDmaiVideoSink *sink); | ||
20 | -static int | ||
21 | - gst_tidmaivideosink_videostd_get_refresh_latency(VideoStd_Type videoStd); | ||
22 | static gboolean | ||
23 | gst_tidmaivideosink_alloc_display_buffers(GstTIDmaiVideoSink * sink, | ||
24 | Int32 bufSize); | ||
25 | @@ -441,7 +439,6 @@ static void gst_tidmaivideosink_init(GstTIDmaiVideoSink * dmaisink, | ||
26 | dmaisink->videoOutput = NULL; | ||
27 | dmaisink->numBufs = -1; | ||
28 | dmaisink->framerepeat = 0; | ||
29 | - dmaisink->repeat_with_refresh = FALSE; | ||
30 | dmaisink->can_set_display_framerate = FALSE; | ||
31 | dmaisink->rotation = -1; | ||
32 | dmaisink->tempDmaiBuf = NULL; | ||
33 | @@ -755,55 +752,6 @@ static int gst_tidmaivideosink_videostd_get_attrs(VideoStd_Type videoStd, | ||
34 | |||
35 | |||
36 | /******************************************************************************* | ||
37 | - * gst_tidmaivideosink_videostd_get_refresh_latency | ||
38 | - * | ||
39 | - * Return the refresh latency in us for the given display standard. | ||
40 | -*******************************************************************************/ | ||
41 | -static int gst_tidmaivideosink_videostd_get_refresh_latency( | ||
42 | - VideoStd_Type videoStd) | ||
43 | -{ | ||
44 | - switch (videoStd) { | ||
45 | - case VideoStd_1080P_24: | ||
46 | - return 41667; | ||
47 | - | ||
48 | - case VideoStd_SIF_PAL: | ||
49 | - case VideoStd_D1_PAL: | ||
50 | - case VideoStd_1080P_25: | ||
51 | - case VideoStd_1080I_25: | ||
52 | - return 40000; | ||
53 | - | ||
54 | - case VideoStd_CIF: | ||
55 | - case VideoStd_SIF_NTSC: | ||
56 | - case VideoStd_D1_NTSC: | ||
57 | - return 33367; | ||
58 | - | ||
59 | - case VideoStd_1080I_30: | ||
60 | - case VideoStd_1080P_30: | ||
61 | - return 33333; | ||
62 | - | ||
63 | - case VideoStd_576P: | ||
64 | - case VideoStd_720P_50: | ||
65 | - return 20000; | ||
66 | - | ||
67 | - case VideoStd_480P: | ||
68 | - case VideoStd_720P_60: | ||
69 | - #if defined(Platform_dm6467t) | ||
70 | - case VideoStd_1080P_60: | ||
71 | - #endif | ||
72 | - return 16667; | ||
73 | - | ||
74 | - case VideoStd_VGA: | ||
75 | - return 16667; | ||
76 | - | ||
77 | - default: | ||
78 | - break; | ||
79 | - } | ||
80 | - GST_ERROR("Unknown videoStd entered (VideoStd = %d)\n", videoStd); | ||
81 | - return 0; | ||
82 | -} | ||
83 | - | ||
84 | - | ||
85 | -/******************************************************************************* | ||
86 | * gst_tidmaivideosink_find_videostd | ||
87 | * | ||
88 | * This function will take in a VideoStd_Attrs structure and find the | ||
89 | @@ -1580,10 +1528,7 @@ static GstFlowReturn gst_tidmaivideosink_render(GstBaseSink * bsink, | ||
90 | |||
91 | /* Display the frame as many times as specified by framerepeat. By | ||
92 | * default, the input buffer is copied to a display buffer for each time | ||
93 | - * it is to be repeated. However, if repeat_with_refresh is TRUE, then | ||
94 | - * the platform doesn't have the bandwidth for multiple copies. In this | ||
95 | - * case we copy and display the input buffer only once, but let it refresh | ||
96 | - * multiple times. | ||
97 | + * it is to be repeated. | ||
98 | */ | ||
99 | for (i = 0; i < sink->framerepeat; i++) { | ||
100 | |||
101 | @@ -1594,16 +1539,6 @@ static GstFlowReturn gst_tidmaivideosink_render(GstBaseSink * bsink, | ||
102 | goto cleanup; | ||
103 | } | ||
104 | |||
105 | - /* If repeat_with_refresh was specified, wait for the display to | ||
106 | - * refresh framerepeat-1 times to make sure it has finished displaying | ||
107 | - * this buffer before we write new data into it. | ||
108 | - */ | ||
109 | - while (sink->repeat_with_refresh && i < (sink->framerepeat-1)) { | ||
110 | - usleep(gst_tidmaivideosink_videostd_get_refresh_latency( | ||
111 | - sink->dAttrs.videoStd) + 1); | ||
112 | - i++; | ||
113 | - } | ||
114 | - | ||
115 | /* Retrieve the dimensions of the display buffer */ | ||
116 | BufferGfx_getDimensions(hDispBuf, &dim); | ||
117 | GST_LOG("Display size %dx%d pitch %d\n", | ||
118 | diff --git a/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.h b/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.h | ||
119 | index 4800fcd..2a28e4f 100644 | ||
120 | --- a/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.h | ||
121 | +++ b/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.h | ||
122 | @@ -123,7 +123,6 @@ struct _GstTIDmaiVideoSink { | ||
123 | * should be repeated to match the display output frame rate. | ||
124 | */ | ||
125 | int framerepeat; | ||
126 | - gboolean repeat_with_refresh; | ||
127 | gboolean can_set_display_framerate; | ||
128 | gboolean signal_handoffs; | ||
129 | |||
130 | -- | ||
131 | 1.7.0.4 | ||
132 | |||
diff --git a/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0007-Add-support-for-pad-allocated-buffers-in-TIDmaiVideo.patch b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0007-Add-support-for-pad-allocated-buffers-in-TIDmaiVideo.patch new file mode 100644 index 00000000..863bd34d --- /dev/null +++ b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0007-Add-support-for-pad-allocated-buffers-in-TIDmaiVideo.patch | |||
@@ -0,0 +1,313 @@ | |||
1 | From 108fa0bb550f9b7355bfd5ae5340220fd1a4c9b5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Don Darling <don.osc2@gmail.com> | ||
3 | Date: Thu, 5 Aug 2010 15:09:54 -0500 | ||
4 | Subject: [PATCH 7/8] Add support for pad-allocated buffers in TIDmaiVideoSink. | ||
5 | |||
6 | This feature is currently only tested and enabled for DM365. | ||
7 | --- | ||
8 | .../ticodecplugin/src/gsttidmaibuffertransport.c | 4 +- | ||
9 | .../ticodecplugin/src/gsttidmaibuffertransport.h | 6 +- | ||
10 | .../ticodecplugin/src/gsttidmaivideosink.c | 197 ++++++++++++++++++-- | ||
11 | 3 files changed, 191 insertions(+), 16 deletions(-) | ||
12 | |||
13 | diff --git a/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaibuffertransport.c b/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaibuffertransport.c | ||
14 | index 5fad371..9c69285 100644 | ||
15 | --- a/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaibuffertransport.c | ||
16 | +++ b/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaibuffertransport.c | ||
17 | @@ -136,8 +136,8 @@ static void gst_tidmaibuffertransport_finalize(GstBuffer *gstbuffer) | ||
18 | */ | ||
19 | if (Buffer_getBufTab(self->dmaiBuffer) != NULL) { | ||
20 | GST_LOG("clearing GStreamer useMask bit\n"); | ||
21 | - Buffer_freeUseMask(self->dmaiBuffer, | ||
22 | - gst_tidmaibuffer_GST_FREE); | ||
23 | + Buffer_freeUseMask(self->dmaiBuffer, gst_tidmaibuffer_GST_FREE); | ||
24 | + Buffer_freeUseMask(self->dmaiBuffer, gst_tidmaibuffer_VIDEOSINK_FREE); | ||
25 | } else { | ||
26 | GST_LOG("calling Buffer_delete()\n"); | ||
27 | Buffer_delete(self->dmaiBuffer); | ||
28 | diff --git a/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaibuffertransport.h b/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaibuffertransport.h | ||
29 | index 0265e70..20945f3 100644 | ||
30 | --- a/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaibuffertransport.h | ||
31 | +++ b/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaibuffertransport.h | ||
32 | @@ -52,8 +52,10 @@ G_BEGIN_DECLS | ||
33 | GstTIDmaiBufferTransportClass)) | ||
34 | |||
35 | /* Use mask flags that keep track of where buffer is in use */ | ||
36 | -#define gst_tidmaibuffer_GST_FREE 0x1 | ||
37 | -#define gst_tidmaibuffer_CODEC_FREE 0x2 | ||
38 | +#define gst_tidmaibuffer_GST_FREE 0x1 | ||
39 | +#define gst_tidmaibuffer_CODEC_FREE 0x2 | ||
40 | +#define gst_tidmaibuffer_VIDEOSINK_FREE 0x4 | ||
41 | +#define gst_tidmaibuffer_DISPLAY_FREE 0x8 | ||
42 | |||
43 | typedef struct _GstTIDmaiBufferTransport GstTIDmaiBufferTransport; | ||
44 | typedef struct _GstTIDmaiBufferTransportClass GstTIDmaiBufferTransportClass; | ||
45 | diff --git a/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.c b/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.c | ||
46 | index 0125ed2..7b84a8e 100644 | ||
47 | --- a/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.c | ||
48 | +++ b/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.c | ||
49 | @@ -151,6 +151,9 @@ static GstStateChangeReturn | ||
50 | gst_tidmaivideosink_change_state(GstElement * element, | ||
51 | GstStateChange transition); | ||
52 | static GstFlowReturn | ||
53 | + gst_tidmaivideosink_buffer_alloc(GstBaseSink * bsink, guint64 offset, | ||
54 | + guint size, GstCaps * caps, GstBuffer ** buf); | ||
55 | +static GstFlowReturn | ||
56 | gst_tidmaivideosink_preroll(GstBaseSink * bsink, GstBuffer * buffer); | ||
57 | static int | ||
58 | gst_tidmaivideosink_videostd_get_attrs(VideoStd_Type videoStd, | ||
59 | @@ -353,6 +356,13 @@ static void gst_tidmaivideosink_class_init(GstTIDmaiVideoSinkClass * klass) | ||
60 | GST_DEBUG_FUNCPTR(gst_tidmaivideosink_preroll); | ||
61 | gstbase_sink_class->render = | ||
62 | GST_DEBUG_FUNCPTR(gst_tidmaivideosink_render); | ||
63 | + gstbase_sink_class->buffer_alloc = | ||
64 | + GST_DEBUG_FUNCPTR(gst_tidmaivideosink_buffer_alloc); | ||
65 | + | ||
66 | + /* Pad-buffer allocation is currently only supported for DM365 */ | ||
67 | + #if !defined(Platform_dm365) | ||
68 | + gstbase_sink_class->buffer_alloc = NULL; | ||
69 | + #endif | ||
70 | } | ||
71 | |||
72 | |||
73 | @@ -663,6 +673,132 @@ static gboolean gst_tidmaivideosink_event(GstBaseSink * bsink, | ||
74 | |||
75 | |||
76 | /****************************************************************************** | ||
77 | + * gst_tidmaivideosink_buffer_alloc | ||
78 | + ******************************************************************************/ | ||
79 | +static GstFlowReturn gst_tidmaivideosink_buffer_alloc(GstBaseSink * bsink, | ||
80 | + guint64 offset, guint size, GstCaps * caps, | ||
81 | + GstBuffer ** buf) | ||
82 | +{ | ||
83 | + GstTIDmaiVideoSink *dmaisink = GST_TIDMAIVIDEOSINK(bsink); | ||
84 | + BufferGfx_Attrs gfxAttrs = BufferGfx_Attrs_DEFAULT; | ||
85 | + gboolean alloc_unref = FALSE; | ||
86 | + Buffer_Handle hDispBuf = NULL; | ||
87 | + GstCaps *alloc_caps; | ||
88 | + | ||
89 | + *buf = NULL; | ||
90 | + | ||
91 | + GST_LOG_OBJECT(dmaisink, | ||
92 | + "a buffer of %d bytes was requested with caps %" GST_PTR_FORMAT | ||
93 | + " and offset %" G_GUINT64_FORMAT, size, caps, offset); | ||
94 | + | ||
95 | + /* assume we're going to alloc what was requested, keep track of wheter we | ||
96 | + * need to unref or not. When we suggest a new format upstream we will | ||
97 | + * create a new caps that we need to unref. */ | ||
98 | + alloc_caps = caps; | ||
99 | + | ||
100 | + /* Process the buffer caps */ | ||
101 | + if (!gst_tidmaivideosink_process_caps(bsink, alloc_caps)) { | ||
102 | + return GST_FLOW_UNEXPECTED; | ||
103 | + } | ||
104 | + | ||
105 | + /* Pad buffer allocation requires that we use user-allocated display | ||
106 | + * buffers. | ||
107 | + */ | ||
108 | + if (!dmaisink->useUserptrBufs && dmaisink->hDisplay) { | ||
109 | + GST_ELEMENT_ERROR(dmaisink, RESOURCE, FAILED, | ||
110 | + ("Cannot use pad buffer allocation after mmap buffers already " | ||
111 | + "in use\n"), (NULL)); | ||
112 | + return GST_FLOW_UNEXPECTED; | ||
113 | + } | ||
114 | + else { | ||
115 | + dmaisink->useUserptrBufs = TRUE; | ||
116 | + } | ||
117 | + | ||
118 | + /* Allocate the display buffers */ | ||
119 | + if (!dmaisink->hDispBufTab && dmaisink->useUserptrBufs) { | ||
120 | + | ||
121 | + /* Set the display attributes now so we can allocate display buffers */ | ||
122 | + if (!gst_tidmaivideosink_set_display_attrs(dmaisink, | ||
123 | + dmaisink->dGfxAttrs.colorSpace)) { | ||
124 | + GST_ERROR("Error while trying to set the display attributes\n"); | ||
125 | + return GST_FLOW_UNEXPECTED; | ||
126 | + } | ||
127 | + | ||
128 | + if (!gst_tidmaivideosink_alloc_display_buffers(dmaisink, size)) { | ||
129 | + GST_ERROR("Failed to allocate display buffers"); | ||
130 | + return GST_FLOW_UNEXPECTED; | ||
131 | + } | ||
132 | + } | ||
133 | + | ||
134 | + /* Get a buffer from the BufTab or display driver */ | ||
135 | + if (!(hDispBuf = gst_tidmaibuftab_get_buf(dmaisink->hDispBufTab))) { | ||
136 | + if (dmaisink->hDisplay && | ||
137 | + Display_get(dmaisink->hDisplay, &hDispBuf) < 0) { | ||
138 | + GST_ELEMENT_ERROR(dmaisink, RESOURCE, FAILED, | ||
139 | + ("Failed to get display buffer\n"), (NULL)); | ||
140 | + return GST_FLOW_UNEXPECTED; | ||
141 | + } | ||
142 | + } | ||
143 | + | ||
144 | + /* If the geometry doesn't match, generate a new caps for it */ | ||
145 | + Buffer_getAttrs(hDispBuf, BufferGfx_getBufferAttrs(&gfxAttrs)); | ||
146 | + | ||
147 | + if (gfxAttrs.dim.width != dmaisink->dGfxAttrs.dim.width || | ||
148 | + gfxAttrs.dim.height != dmaisink->dGfxAttrs.dim.height || | ||
149 | + gfxAttrs.colorSpace != dmaisink->dGfxAttrs.colorSpace) { | ||
150 | + | ||
151 | + GstCaps *desired_caps; | ||
152 | + GstStructure *desired_struct; | ||
153 | + | ||
154 | + /* make a copy of the incomming caps to create the new suggestion. We | ||
155 | + * can't use make_writable because we might then destroy the original | ||
156 | + * caps which we still need when the peer does not accept the | ||
157 | + * suggestion. | ||
158 | + */ | ||
159 | + desired_caps = gst_caps_copy (caps); | ||
160 | + desired_struct = gst_caps_get_structure (desired_caps, 0); | ||
161 | + | ||
162 | + GST_DEBUG ("we prefer to receive a %ldx%ld video; %ldx%ld was requested", | ||
163 | + gfxAttrs.dim.width, gfxAttrs.dim.height, | ||
164 | + dmaisink->dGfxAttrs.dim.width, dmaisink->dGfxAttrs.dim.height); | ||
165 | + gst_structure_set (desired_struct, "width", G_TYPE_INT, | ||
166 | + gfxAttrs.dim.width, NULL); | ||
167 | + gst_structure_set (desired_struct, "height", G_TYPE_INT, | ||
168 | + gfxAttrs.dim.height, NULL); | ||
169 | + | ||
170 | + if (gst_pad_peer_accept_caps (GST_VIDEO_SINK_PAD (dmaisink), | ||
171 | + desired_caps)) { | ||
172 | + alloc_caps = desired_caps; | ||
173 | + alloc_unref = TRUE; | ||
174 | + | ||
175 | + if (!gst_tidmaivideosink_process_caps(bsink, alloc_caps)) { | ||
176 | + return GST_FLOW_UNEXPECTED; | ||
177 | + } | ||
178 | + GST_DEBUG ("peer pad accepts our desired caps %" GST_PTR_FORMAT, | ||
179 | + desired_caps); | ||
180 | + } | ||
181 | + else { | ||
182 | + GST_DEBUG ("peer pad does not accept our desired caps %" | ||
183 | + GST_PTR_FORMAT, desired_caps); | ||
184 | + } | ||
185 | + } | ||
186 | + | ||
187 | + /* Return the display buffer */ | ||
188 | + BufferGfx_resetDimensions(hDispBuf); | ||
189 | + Buffer_freeUseMask(hDispBuf, gst_tidmaibuffer_DISPLAY_FREE); | ||
190 | + *buf = gst_tidmaibuffertransport_new(hDispBuf, NULL); | ||
191 | + gst_buffer_set_caps(*buf, alloc_caps); | ||
192 | + | ||
193 | + /* If we allocated new caps, unref them now */ | ||
194 | + if (alloc_unref) { | ||
195 | + gst_caps_unref (alloc_caps); | ||
196 | + } | ||
197 | + | ||
198 | + return GST_FLOW_OK; | ||
199 | +} | ||
200 | + | ||
201 | + | ||
202 | +/****************************************************************************** | ||
203 | * gst_tidmaivideosink_preroll | ||
204 | ******************************************************************************/ | ||
205 | static GstFlowReturn gst_tidmaivideosink_preroll(GstBaseSink * bsink, | ||
206 | @@ -1282,6 +1418,18 @@ static gboolean gst_tidmaivideosink_init_display(GstTIDmaiVideoSink * sink) | ||
207 | return FALSE; | ||
208 | } | ||
209 | |||
210 | + /* If we own the display buffers, tell DMAI to delay starting the | ||
211 | + * display until we call Display_put for the first time. | ||
212 | + */ | ||
213 | + if (sink->hDispBufTab) { | ||
214 | + #if defined(Platform_dm365) | ||
215 | + sink->dAttrs.delayStreamon = TRUE; | ||
216 | + #else | ||
217 | + GST_ERROR("delayed V4L2 streamon not supported\n"); | ||
218 | + return FALSE; | ||
219 | + #endif | ||
220 | + } | ||
221 | + | ||
222 | /* Allocate user-allocated display buffers, if requested */ | ||
223 | if (!sink->hDispBufTab && sink->useUserptrBufs) { | ||
224 | if (!gst_tidmaivideosink_alloc_display_buffers(sink, 0)) { | ||
225 | @@ -1416,9 +1564,6 @@ static gboolean gst_tidmaivideosink_process_caps(GstBaseSink * bsink, | ||
226 | gst_structure_get_fraction(structure, "framerate", &framerateNum, | ||
227 | &framerateDen); | ||
228 | |||
229 | - /* Error check new values against existing ones */ | ||
230 | - /* TBD */ | ||
231 | - | ||
232 | /* Populate the display graphics attributes */ | ||
233 | dmaisink->dGfxAttrs.bAttrs.reference = dmaisink->contiguousInputFrame; | ||
234 | dmaisink->dGfxAttrs.dim.width = width; | ||
235 | @@ -1445,9 +1590,10 @@ static gboolean gst_tidmaivideosink_process_caps(GstBaseSink * bsink, | ||
236 | static GstFlowReturn gst_tidmaivideosink_render(GstBaseSink * bsink, | ||
237 | GstBuffer * buf) | ||
238 | { | ||
239 | - Buffer_Handle hDispBuf = NULL; | ||
240 | - Buffer_Handle inBuf = NULL; | ||
241 | - GstTIDmaiVideoSink *sink = GST_TIDMAIVIDEOSINK(bsink); | ||
242 | + Buffer_Handle hDispBuf = NULL; | ||
243 | + Buffer_Handle inBuf = NULL; | ||
244 | + gboolean inBufIsOurs = FALSE; | ||
245 | + GstTIDmaiVideoSink *sink = GST_TIDMAIVIDEOSINK(bsink); | ||
246 | BufferGfx_Dimensions dim; | ||
247 | gchar dur_str[64]; | ||
248 | gchar ts_str[64]; | ||
249 | @@ -1470,7 +1616,10 @@ static GstFlowReturn gst_tidmaivideosink_render(GstBaseSink * bsink, | ||
250 | * generated via videotestsrc plugin. | ||
251 | */ | ||
252 | if (GST_IS_TIDMAIBUFFERTRANSPORT(buf)) { | ||
253 | - inBuf = GST_TIDMAIBUFFERTRANSPORT_DMAIBUF(buf); | ||
254 | + inBuf = GST_TIDMAIBUFFERTRANSPORT_DMAIBUF(buf); | ||
255 | + inBufIsOurs = (sink->hDispBufTab && | ||
256 | + GST_TIDMAIBUFTAB_BUFTAB(sink->hDispBufTab) == | ||
257 | + Buffer_getBufTab(inBuf)); | ||
258 | } else { | ||
259 | /* allocate DMAI buffer */ | ||
260 | if (sink->tempDmaiBuf == NULL) { | ||
261 | @@ -1532,11 +1681,33 @@ static GstFlowReturn gst_tidmaivideosink_render(GstBaseSink * bsink, | ||
262 | */ | ||
263 | for (i = 0; i < sink->framerepeat; i++) { | ||
264 | |||
265 | - /* Get a buffer from the display driver */ | ||
266 | - if (Display_get(sink->hDisplay, &hDispBuf) < 0) { | ||
267 | - GST_ELEMENT_ERROR(sink, RESOURCE, FAILED, | ||
268 | - ("Failed to get display buffer\n"), (NULL)); | ||
269 | - goto cleanup; | ||
270 | + /* If the input buffer originated from this element via pad allocation, | ||
271 | + * simply give it back to the display and continue. | ||
272 | + */ | ||
273 | + if (inBufIsOurs) { | ||
274 | + | ||
275 | + /* Mark buffer as in-use by the display so it can't be re-used | ||
276 | + * until it comes back from Display_get */ | ||
277 | + Buffer_setUseMask(inBuf, Buffer_getUseMask(inBuf) | | ||
278 | + gst_tidmaibuffer_DISPLAY_FREE); | ||
279 | + | ||
280 | + if (Display_put(sink->hDisplay, inBuf) < 0) { | ||
281 | + GST_ELEMENT_ERROR(sink, RESOURCE, FAILED, | ||
282 | + ("Failed to put display buffer\n"), (NULL)); | ||
283 | + goto cleanup; | ||
284 | + } | ||
285 | + continue; | ||
286 | + } | ||
287 | + | ||
288 | + /* Otherwise, our input buffer originated from up-stream. Retrieve a | ||
289 | + * display buffer to copy the contents into. | ||
290 | + */ | ||
291 | + else { | ||
292 | + if (Display_get(sink->hDisplay, &hDispBuf) < 0) { | ||
293 | + GST_ELEMENT_ERROR(sink, RESOURCE, FAILED, | ||
294 | + ("Failed to get display buffer\n"), (NULL)); | ||
295 | + goto cleanup; | ||
296 | + } | ||
297 | } | ||
298 | |||
299 | /* Retrieve the dimensions of the display buffer */ | ||
300 | @@ -1844,8 +2015,10 @@ static gboolean gst_tidmaivideosink_alloc_display_buffers( | ||
301 | gfxAttrs.dim.height, gfxAttrs.dim.lineLength, gfxAttrs.colorSpace); | ||
302 | } | ||
303 | |||
304 | + gfxAttrs.bAttrs.useMask = gst_tidmaibuffer_VIDEOSINK_FREE; | ||
305 | sink->hDispBufTab = gst_tidmaibuftab_new(sink->dAttrs.numBufs, bufSize, | ||
306 | BufferGfx_getBufferAttrs(&gfxAttrs)); | ||
307 | + gst_tidmaibuftab_set_blocking(sink->hDispBufTab, FALSE); | ||
308 | |||
309 | return TRUE; | ||
310 | } | ||
311 | -- | ||
312 | 1.7.0.4 | ||
313 | |||
diff --git a/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0008-Add-support-for-pad-allocated-buffers-in-TIViddec2.patch b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0008-Add-support-for-pad-allocated-buffers-in-TIViddec2.patch new file mode 100644 index 00000000..9ceb30f5 --- /dev/null +++ b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0008-Add-support-for-pad-allocated-buffers-in-TIViddec2.patch | |||
@@ -0,0 +1,302 @@ | |||
1 | From e5a264465c1c77d5fc18eeb51b99c79fc3f28a3e Mon Sep 17 00:00:00 2001 | ||
2 | From: Don Darling <don.osc2@gmail.com> | ||
3 | Date: Tue, 8 Jun 2010 13:48:51 -0500 | ||
4 | Subject: [PATCH 8/8] Add support for pad-allocated buffers in TIViddec2. | ||
5 | |||
6 | When padAllocOutbufs=TRUE is specified to the TIViddec2 element, it will | ||
7 | attempt to allocate buffers from downstream instead of allocating its own. | ||
8 | |||
9 | Downstream buffers will only be used if it can be determined that they are | ||
10 | all members of a DMAI BufTab, which means they are CMEM-based, and will work | ||
11 | with the codecs. Currently, the only known downstream element that can provide | ||
12 | these buffers is TIDmaiVideoSink, and it is only supported for DM365. | ||
13 | |||
14 | There is currently no support for centering small clips in the middle of the | ||
15 | display screen -- this would require additional support in the display driver. | ||
16 | As a result, pad-allocation can currently only be used with clips that are at | ||
17 | least as large as the display, and this feature not enabled by default because | ||
18 | of these strict clip-size requirements. | ||
19 | |||
20 | On DM365, there are known issues with the MPEG-2 decoder's output buffer size | ||
21 | calculation that cause it not to work with D1 resolutions unless you hard-code | ||
22 | the size. H.264 and MPEG-4 decoders work as expected, and MPEG-2 works as | ||
23 | expected for 720p. | ||
24 | --- | ||
25 | .../ti_build/ticodecplugin/src/gsttividdec2.c | 159 ++++++++++++++++---- | ||
26 | .../ti_build/ticodecplugin/src/gsttividdec2.h | 1 + | ||
27 | 2 files changed, 127 insertions(+), 33 deletions(-) | ||
28 | |||
29 | diff --git a/gstreamer_ti/ti_build/ticodecplugin/src/gsttividdec2.c b/gstreamer_ti/ti_build/ticodecplugin/src/gsttividdec2.c | ||
30 | index c39208f..ec3cb05 100644 | ||
31 | --- a/gstreamer_ti/ti_build/ticodecplugin/src/gsttividdec2.c | ||
32 | +++ b/gstreamer_ti/ti_build/ticodecplugin/src/gsttividdec2.c | ||
33 | @@ -73,7 +73,8 @@ enum | ||
34 | PROP_FRAMERATE, /* framerate (GstFraction) */ | ||
35 | PROP_DISPLAY_BUFFER, /* displayBuffer (boolean) */ | ||
36 | PROP_GEN_TIMESTAMPS, /* genTimeStamps (boolean) */ | ||
37 | - PROP_RTCODECTHREAD /* rtCodecThread (boolean) */ | ||
38 | + PROP_RTCODECTHREAD, /* rtCodecThread (boolean) */ | ||
39 | + PROP_PAD_ALLOC_OUTBUFS /* padAllocOutbufs (boolean) */ | ||
40 | }; | ||
41 | |||
42 | /* Define sink (input) pad capabilities. Currently, MPEG and H264 are | ||
43 | @@ -170,8 +171,8 @@ static GstClockTime | ||
44 | gst_tividdec2_frame_duration(GstTIViddec2 *viddec2); | ||
45 | static gboolean | ||
46 | gst_tividdec2_resizeBufTab(GstTIViddec2 *viddec2); | ||
47 | -static gboolean | ||
48 | - gst_tividdec2_codec_start (GstTIViddec2 *viddec2); | ||
49 | +static gboolean | ||
50 | + gst_tividdec2_codec_start (GstTIViddec2 *viddec2, GstBuffer **padBuffer); | ||
51 | static gboolean | ||
52 | gst_tividdec2_codec_stop (GstTIViddec2 *viddec2); | ||
53 | static void | ||
54 | @@ -324,6 +325,11 @@ static void gst_tividdec2_class_init(GstTIViddec2Class *klass) | ||
55 | g_param_spec_boolean("genTimeStamps", "Generate Time Stamps", | ||
56 | "Set timestamps on output buffers", | ||
57 | TRUE, G_PARAM_WRITABLE)); | ||
58 | + | ||
59 | + g_object_class_install_property(gobject_class, PROP_PAD_ALLOC_OUTBUFS, | ||
60 | + g_param_spec_boolean("padAllocOutbufs", "Use pad allocation", | ||
61 | + "Try to allocate buffers with pad allocation", | ||
62 | + FALSE, G_PARAM_WRITABLE)); | ||
63 | } | ||
64 | |||
65 | /****************************************************************************** | ||
66 | @@ -448,6 +454,7 @@ static void gst_tividdec2_init(GstTIViddec2 *viddec2, GstTIViddec2Class *gclass) | ||
67 | |||
68 | viddec2->numOutputBufs = 0UL; | ||
69 | viddec2->hOutBufTab = NULL; | ||
70 | + viddec2->padAllocOutbufs = FALSE; | ||
71 | viddec2->circBuf = NULL; | ||
72 | |||
73 | viddec2->sps_pps_data = NULL; | ||
74 | @@ -548,6 +555,10 @@ static void gst_tividdec2_set_property(GObject *object, guint prop_id, | ||
75 | viddec2->rtCodecThread = g_value_get_boolean(value); | ||
76 | GST_LOG("setting \"RTCodecThread\" to \"%s\"\n", | ||
77 | viddec2->rtCodecThread ? "TRUE" : "FALSE"); | ||
78 | + case PROP_PAD_ALLOC_OUTBUFS: | ||
79 | + viddec2->padAllocOutbufs = g_value_get_boolean(value); | ||
80 | + GST_LOG("setting \"padAllocOutbufs\" to \"%s\"\n", | ||
81 | + viddec2->padAllocOutbufs ? "TRUE" : "FALSE"); | ||
82 | break; | ||
83 | default: | ||
84 | G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); | ||
85 | @@ -1079,9 +1090,9 @@ static gboolean gst_tividdec2_init_video(GstTIViddec2 *viddec2) | ||
86 | */ | ||
87 | Rendezvous_meet(viddec2->waitOnDecodeThread); | ||
88 | |||
89 | - if (viddec2->circBuf == NULL || viddec2->hOutBufTab == NULL) { | ||
90 | + if (viddec2->circBuf == NULL) { | ||
91 | GST_ELEMENT_ERROR(viddec2, RESOURCE, FAILED, | ||
92 | - ("decode thread failed to create circbuf or display buffer handles\n"), | ||
93 | + ("decode thread failed to create circbuf handles\n"), | ||
94 | (NULL)); | ||
95 | return FALSE; | ||
96 | } | ||
97 | @@ -1260,11 +1271,13 @@ static gboolean gst_tividdec2_codec_stop (GstTIViddec2 *viddec2) | ||
98 | * gst_tividdec2_codec_start | ||
99 | * Initialize codec engine | ||
100 | *****************************************************************************/ | ||
101 | -static gboolean gst_tividdec2_codec_start (GstTIViddec2 *viddec2) | ||
102 | +static gboolean gst_tividdec2_codec_start (GstTIViddec2 *viddec2, | ||
103 | + GstBuffer **padBuffer) | ||
104 | { | ||
105 | - VIDDEC2_Params params = Vdec2_Params_DEFAULT; | ||
106 | - VIDDEC2_DynamicParams dynParams = Vdec2_DynamicParams_DEFAULT; | ||
107 | - BufferGfx_Attrs gfxAttrs = BufferGfx_Attrs_DEFAULT; | ||
108 | + VIDDEC2_Params params = Vdec2_Params_DEFAULT; | ||
109 | + VIDDEC2_DynamicParams dynParams = Vdec2_DynamicParams_DEFAULT; | ||
110 | + BufferGfx_Attrs gfxAttrs = BufferGfx_Attrs_DEFAULT; | ||
111 | + BufTab_Handle codecBufTab = NULL; | ||
112 | Cpu_Device device; | ||
113 | ColorSpace_Type colorSpace; | ||
114 | Int defaultNumBufs; | ||
115 | @@ -1364,30 +1377,77 @@ static gboolean gst_tividdec2_codec_start (GstTIViddec2 *viddec2) | ||
116 | viddec2->numOutputBufs = defaultNumBufs; | ||
117 | } | ||
118 | |||
119 | - /* Create codec output buffers */ | ||
120 | - GST_LOG("creating output buffer table\n"); | ||
121 | - gfxAttrs.colorSpace = colorSpace; | ||
122 | - gfxAttrs.dim.width = params.maxWidth; | ||
123 | - gfxAttrs.dim.height = params.maxHeight; | ||
124 | - gfxAttrs.dim.lineLength = BufferGfx_calcLineLength( | ||
125 | - gfxAttrs.dim.width, gfxAttrs.colorSpace); | ||
126 | + /* Try to allocate a buffer from downstream. To do this, we must first | ||
127 | + * set the framerate to a reasonable default if one hasn't been specified, | ||
128 | + * and we need to set the source pad caps with the stream information we | ||
129 | + * have so far. | ||
130 | + */ | ||
131 | + gst_tividdec2_frame_duration(viddec2); | ||
132 | + gst_tividdec2_set_source_caps_base(viddec2, params.maxWidth, | ||
133 | + params.maxHeight, colorSpace); | ||
134 | + | ||
135 | + *padBuffer = NULL; | ||
136 | + if (viddec2->padAllocOutbufs) { | ||
137 | + if (gst_pad_alloc_buffer(viddec2->srcpad, 0, | ||
138 | + Vdec2_getOutBufSize(viddec2->hVd), GST_PAD_CAPS(viddec2->srcpad), | ||
139 | + padBuffer) != GST_FLOW_OK) { | ||
140 | + GST_LOG("failed to allocate a downstream buffer\n"); | ||
141 | + *padBuffer = NULL; | ||
142 | + } | ||
143 | + | ||
144 | + if (*padBuffer && !GST_IS_TIDMAIBUFFERTRANSPORT(*padBuffer)) { | ||
145 | + GST_LOG("downstream buffer is not a DMAI buffer; disabling use of " | ||
146 | + "pad-allocated buffers\n"); | ||
147 | + gst_buffer_unref(*padBuffer); | ||
148 | + *padBuffer = NULL; | ||
149 | + } | ||
150 | + | ||
151 | + if (*padBuffer) { | ||
152 | + codecBufTab = Buffer_getBufTab( | ||
153 | + GST_TIDMAIBUFFERTRANSPORT_DMAIBUF(*padBuffer)); | ||
154 | + | ||
155 | + if (!codecBufTab) { | ||
156 | + GST_LOG("downstream buffer is not a BufTab member; disabling " | ||
157 | + "use of pad-allocated buffers\n"); | ||
158 | + gst_buffer_unref(*padBuffer); | ||
159 | + *padBuffer = NULL; | ||
160 | + } | ||
161 | + } | ||
162 | + } | ||
163 | + | ||
164 | + /* If we can't use pad-allocated buffers, allocate our own BufTab for | ||
165 | + * output buffers to push downstream. | ||
166 | + */ | ||
167 | + if (!(*padBuffer)) { | ||
168 | + | ||
169 | + GST_LOG("creating output buffer table\n"); | ||
170 | + gfxAttrs.colorSpace = colorSpace; | ||
171 | + gfxAttrs.dim.width = params.maxWidth; | ||
172 | + gfxAttrs.dim.height = params.maxHeight; | ||
173 | + gfxAttrs.dim.lineLength = BufferGfx_calcLineLength( | ||
174 | + gfxAttrs.dim.width, gfxAttrs.colorSpace); | ||
175 | |||
176 | - /* By default, new buffers are marked as in-use by the codec */ | ||
177 | - gfxAttrs.bAttrs.useMask = gst_tidmaibuffer_CODEC_FREE; | ||
178 | + /* By default, new buffers are marked as in-use by the codec */ | ||
179 | + gfxAttrs.bAttrs.useMask = gst_tidmaibuffer_CODEC_FREE; | ||
180 | |||
181 | - viddec2->hOutBufTab = gst_tidmaibuftab_new( | ||
182 | - viddec2->numOutputBufs, Vdec2_getOutBufSize(viddec2->hVd), | ||
183 | - BufferGfx_getBufferAttrs(&gfxAttrs)); | ||
184 | + viddec2->hOutBufTab = gst_tidmaibuftab_new( | ||
185 | + viddec2->numOutputBufs, Vdec2_getOutBufSize(viddec2->hVd), | ||
186 | + BufferGfx_getBufferAttrs(&gfxAttrs)); | ||
187 | + | ||
188 | + codecBufTab = GST_TIDMAIBUFTAB_BUFTAB(viddec2->hOutBufTab); | ||
189 | + } | ||
190 | |||
191 | - if (viddec2->hOutBufTab == NULL) { | ||
192 | + /* The value of codecBufTab should now either point to a downstream | ||
193 | + * BufTab or our own BufTab. | ||
194 | + */ | ||
195 | + if (codecBufTab == NULL) { | ||
196 | GST_ELEMENT_ERROR(viddec2, RESOURCE, NO_SPACE_LEFT, | ||
197 | - ("failed to create output buffers\n"), (NULL)); | ||
198 | + ("no BufTab available for codec output\n"), (NULL)); | ||
199 | return FALSE; | ||
200 | } | ||
201 | |||
202 | - /* Tell the Vdec module that hOutBufTab will be used for display buffers */ | ||
203 | - Vdec2_setBufTab(viddec2->hVd, | ||
204 | - GST_TIDMAIBUFTAB_BUFTAB(viddec2->hOutBufTab)); | ||
205 | + /* Tell the Vdec module what BufTab it will be using for its output */ | ||
206 | + Vdec2_setBufTab(viddec2->hVd, codecBufTab); | ||
207 | |||
208 | return TRUE; | ||
209 | } | ||
210 | @@ -1403,8 +1463,10 @@ static void* gst_tividdec2_decode_thread(void *arg) | ||
211 | { | ||
212 | GstTIViddec2 *viddec2 = GST_TIVIDDEC2(gst_object_ref(arg)); | ||
213 | GstBuffer *encDataWindow = NULL; | ||
214 | + GstBuffer *padBuffer = NULL; | ||
215 | Buffer_Attrs bAttrs = Buffer_Attrs_DEFAULT; | ||
216 | gboolean codecFlushed = FALSE; | ||
217 | + gboolean usePadBufs = FALSE; | ||
218 | void *threadRet = GstTIThreadSuccess; | ||
219 | Buffer_Handle hDummyInputBuf = NULL; | ||
220 | Buffer_Handle hDstBuf; | ||
221 | @@ -1420,7 +1482,8 @@ static void* gst_tividdec2_decode_thread(void *arg) | ||
222 | GST_LOG("init video decode_thread \n"); | ||
223 | |||
224 | /* Initialize codec engine */ | ||
225 | - ret = gst_tividdec2_codec_start(viddec2); | ||
226 | + ret = gst_tividdec2_codec_start(viddec2, &padBuffer); | ||
227 | + usePadBufs = (padBuffer != NULL); | ||
228 | |||
229 | /* Notify main thread that is ok to continue initialization */ | ||
230 | Rendezvous_meet(viddec2->waitOnDecodeThread); | ||
231 | @@ -1476,7 +1539,34 @@ static void* gst_tividdec2_decode_thread(void *arg) | ||
232 | } | ||
233 | |||
234 | /* Obtain a free output buffer for the decoded data */ | ||
235 | - if (!(hDstBuf = gst_tidmaibuftab_get_buf(viddec2->hOutBufTab))) { | ||
236 | + if (usePadBufs) { | ||
237 | + | ||
238 | + /* First time through this loop, padBuffer will already be set | ||
239 | + * to the buffer we got in codec_start. It will be NULL for every | ||
240 | + * frame after that. | ||
241 | + */ | ||
242 | + if (G_LIKELY(!padBuffer)) { | ||
243 | + if (gst_pad_alloc_buffer(viddec2->srcpad, 0, 0, | ||
244 | + GST_PAD_CAPS(viddec2->srcpad), &padBuffer) | ||
245 | + != GST_FLOW_OK) { | ||
246 | + GST_ELEMENT_ERROR(viddec2, RESOURCE, READ, | ||
247 | + ("failed to allocate a downstream buffer\n"), (NULL)); | ||
248 | + padBuffer = NULL; | ||
249 | + goto thread_exit; | ||
250 | + } | ||
251 | + } | ||
252 | + hDstBuf = GST_TIDMAIBUFFERTRANSPORT_DMAIBUF(padBuffer); | ||
253 | + gst_buffer_unref(padBuffer); | ||
254 | + padBuffer = NULL; | ||
255 | + | ||
256 | + /* Set the CODEC_FREE flag -- this isn't done automatically when | ||
257 | + * allocating buffers from downstream. | ||
258 | + */ | ||
259 | + Buffer_setUseMask(hDstBuf, Buffer_getUseMask(hDstBuf) | | ||
260 | + gst_tidmaibuffer_CODEC_FREE); | ||
261 | + | ||
262 | + } | ||
263 | + else if (!(hDstBuf = gst_tidmaibuftab_get_buf(viddec2->hOutBufTab))) { | ||
264 | GST_ELEMENT_ERROR(viddec2, RESOURCE, READ, | ||
265 | ("failed to get a free contiguous buffer from BufTab\n"), | ||
266 | (NULL)); | ||
267 | @@ -1623,12 +1713,15 @@ thread_failure: | ||
268 | thread_exit: | ||
269 | |||
270 | /* Re-claim any buffers owned by the codec */ | ||
271 | - bufIdx = BufTab_getNumBufs(GST_TIDMAIBUFTAB_BUFTAB(viddec2->hOutBufTab)); | ||
272 | + if (viddec2->hOutBufTab) { | ||
273 | + bufIdx = | ||
274 | + BufTab_getNumBufs(GST_TIDMAIBUFTAB_BUFTAB(viddec2->hOutBufTab)); | ||
275 | |||
276 | - while (bufIdx-- > 0) { | ||
277 | - Buffer_Handle hBuf = BufTab_getBuf( | ||
278 | - GST_TIDMAIBUFTAB_BUFTAB(viddec2->hOutBufTab), bufIdx); | ||
279 | - Buffer_freeUseMask(hBuf, gst_tidmaibuffer_CODEC_FREE); | ||
280 | + while (bufIdx-- > 0) { | ||
281 | + Buffer_Handle hBuf = BufTab_getBuf( | ||
282 | + GST_TIDMAIBUFTAB_BUFTAB(viddec2->hOutBufTab), bufIdx); | ||
283 | + Buffer_freeUseMask(hBuf, gst_tidmaibuffer_CODEC_FREE); | ||
284 | + } | ||
285 | } | ||
286 | |||
287 | /* Release the last buffer we retrieved from the circular buffer */ | ||
288 | diff --git a/gstreamer_ti/ti_build/ticodecplugin/src/gsttividdec2.h b/gstreamer_ti/ti_build/ticodecplugin/src/gsttividdec2.h | ||
289 | index b16e9c5..6b09d2a 100644 | ||
290 | --- a/gstreamer_ti/ti_build/ticodecplugin/src/gsttividdec2.h | ||
291 | +++ b/gstreamer_ti/ti_build/ticodecplugin/src/gsttividdec2.h | ||
292 | @@ -91,6 +91,7 @@ struct _GstTIViddec2 | ||
293 | UInt32 numOutputBufs; | ||
294 | GstTIDmaiBufTab *hOutBufTab; | ||
295 | GstTICircBuffer *circBuf; | ||
296 | + gboolean padAllocOutbufs; | ||
297 | |||
298 | /* Quicktime h264 header */ | ||
299 | GstBuffer *sps_pps_data; | ||
300 | -- | ||
301 | 1.7.0.4 | ||
302 | |||
diff --git a/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0009-dmaisink-compilation-fix.patch b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0009-dmaisink-compilation-fix.patch new file mode 100644 index 00000000..b8525b79 --- /dev/null +++ b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0009-dmaisink-compilation-fix.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | From 721970f80e6bff0f231625f00301fa37473a2bb3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Brijesh Singh <bksingh@ti.com> | ||
3 | Date: Wed, 7 Jul 2010 19:21:01 -0500 | ||
4 | Subject: [PATCH 9/9] dmaisink compilation fix | ||
5 | |||
6 | temporary fix - should go in svn trunk | ||
7 | --- | ||
8 | src/gsttidmaivideosink.c | 2 +- | ||
9 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
10 | |||
11 | diff --git a/src/gsttidmaivideosink.c b/src/gsttidmaivideosink.c | ||
12 | index 99ca25d..2fb5aad 100644 | ||
13 | --- a/src/gsttidmaivideosink.c | ||
14 | +++ b/src/gsttidmaivideosink.c | ||
15 | @@ -1817,7 +1817,7 @@ static gboolean gst_tidmaivideosink_alloc_display_buffers( | ||
16 | return FALSE; | ||
17 | } | ||
18 | |||
19 | - GST_INFO("Allocating %ld display buffers", sink->dAttrs.numBufs); | ||
20 | + GST_INFO("Allocating %d display buffers", sink->dAttrs.numBufs); | ||
21 | |||
22 | /* Set the dimensions for the display */ | ||
23 | if (VideoStd_getResolution(sink->dAttrs.videoStd, &gfxAttrs.dim.width, | ||
24 | -- | ||
25 | 1.7.0.4 | ||
26 | |||
diff --git a/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0009-update-dm365-cfg-to-work-with-platinum-codecs.patch b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0009-update-dm365-cfg-to-work-with-platinum-codecs.patch new file mode 100644 index 00000000..0d36bf10 --- /dev/null +++ b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0009-update-dm365-cfg-to-work-with-platinum-codecs.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | From d5601a8beec6144fb39ebdc93778c081028a7fdd Mon Sep 17 00:00:00 2001 | ||
2 | From: Brijesh Singh <bksingh@ti.com> | ||
3 | Date: Tue, 28 Sep 2010 19:35:14 -0500 | ||
4 | Subject: [PATCH] update dm365 cfg to work with platinum codecs | ||
5 | |||
6 | --- | ||
7 | src/gstticodecplugin_dm365.cfg | 3 +++ | ||
8 | 1 files changed, 3 insertions(+), 0 deletions(-) | ||
9 | |||
10 | diff --git a/src/gstticodecplugin_dm365.cfg b/src/gstticodecplugin_dm365.cfg | ||
11 | index d682643..43174b1 100644 | ||
12 | --- a/src/gstticodecplugin_dm365.cfg | ||
13 | +++ b/src/gstticodecplugin_dm365.cfg | ||
14 | @@ -86,6 +86,9 @@ var ADDRSPACE = xdc.useModule('ti.sdo.fc.ires.addrspace.ADDRSPACE'); | ||
15 | |||
16 | var CMEM = xdc.useModule('ti.sdo.linuxutils.cmem.CMEM'); | ||
17 | |||
18 | +var MEMTCM = xdc.useModule('ti.sdo.fc.ires.memtcm.MEMTCM'); | ||
19 | +MEMTCM.cmemBlockId = 1; //Since we use _1 in our insmod command. | ||
20 | + | ||
21 | /* Uncomment these lines if you wish to debug FC and enable FC trace */ | ||
22 | /* | ||
23 | /* | ||
24 | -- | ||
25 | 1.7.0.4 | ||
26 | |||
diff --git a/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0010-replace-omap3530_dv400-platform-support-with-omap353.patch b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0010-replace-omap3530_dv400-platform-support-with-omap353.patch new file mode 100644 index 00000000..85550e6c --- /dev/null +++ b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0010-replace-omap3530_dv400-platform-support-with-omap353.patch | |||
@@ -0,0 +1,119 @@ | |||
1 | From 0f2ef84ad320ec141a7ba6727cf18817ac42e413 Mon Sep 17 00:00:00 2001 | ||
2 | From: Brijesh Singh <bksingh@ti.com> | ||
3 | Date: Mon, 4 Oct 2010 14:11:39 -0500 | ||
4 | Subject: [PATCH] replace omap3530_dv400 platform support with omap3530 | ||
5 | |||
6 | --- | ||
7 | Makefile.external | 19 +++---------- | ||
8 | src/gstticodecplugin_omap3530_dv400.cfg | 44 ------------------------------- | ||
9 | 2 files changed, 5 insertions(+), 58 deletions(-) | ||
10 | delete mode 100644 src/gstticodecplugin_omap3530_dv400.cfg | ||
11 | |||
12 | diff --git a/Makefile.external b/Makefile.external | ||
13 | index 6d118d8..2a85108 100644 | ||
14 | --- a/Makefile.external | ||
15 | +++ b/Makefile.external | ||
16 | @@ -8,7 +8,7 @@ | ||
17 | # Copyright (C) 2009 Ridgerun | ||
18 | # | ||
19 | |||
20 | -.PHONY: default configure dm6446 omap3530 dm355 dm6467 dm365 omapl138 omap3530_dv400 | ||
21 | +.PHONY: default configure dm6446 omap3530 dm355 dm6467 dm365 omapl138 | ||
22 | |||
23 | DVSDK_PATH=undefined | ||
24 | DMAI_INSTALL_DIR=undefined | ||
25 | @@ -23,7 +23,7 @@ $(error You need to define the environment variable DMAI_INSTALL_DIR) | ||
26 | endif | ||
27 | |||
28 | default: | ||
29 | - @echo "Please specify the target: dm6446, omap3530, dm355, dm6467, dm6467t, dm365 omapl138 omap3530_dv400" | ||
30 | + @echo "Please specify the target: dm6446, omap3530, dm355, dm6467, dm6467t, dm365 omapl138" | ||
31 | |||
32 | export GST_TI_PLATFORM=$(MAKECMDGOALS) | ||
33 | export BIOS_INSTALL_DIR | ||
34 | @@ -87,6 +87,9 @@ ifeq ($(GST_TI_PLATFORM), omap3530) | ||
35 | export MVTOOL_DIR = $(CSTOOL_DIR) | ||
36 | export PLATFORM_XDC = ${XDC_PLATFORM} | ||
37 | export CROSS_COMPILE = ${CSTOOL_PREFIX} | ||
38 | + export LINK_XDC_ROOT = $(LINK_INSTALL_DIR) | ||
39 | + export C6ACCEL_INSTALL_DIR | ||
40 | + export ENABLE_C6ACCEL ="--enable-c6accel" | ||
41 | endif | ||
42 | |||
43 | ifeq ($(GST_TI_PLATFORM), omapl138) | ||
44 | @@ -101,16 +104,6 @@ ifeq ($(GST_TI_PLATFORM), omapl138) | ||
45 | export ENABLE_C6ACCEL ="--enable-c6accel" | ||
46 | endif | ||
47 | |||
48 | -ifeq ($(GST_TI_PLATFORM), omap3530_dv400) | ||
49 | - export XDC_TARGET = gnu.targets.arm.GCArmv5T | ||
50 | - export XDC_PLATFORM = ti.platforms.evm3530 | ||
51 | - export MVTOOL_PREFIX = $(CSTOOL_PREFIX) | ||
52 | - export MVTOOL_DIR = $(CSTOOL_DIR) | ||
53 | - export PLATFORM_XDC = ${XDC_PLATFORM} | ||
54 | - export CROSS_COMPILE = ${CSTOOL_PREFIX} | ||
55 | - export LINK_XDC_ROOT = $(LINK_INSTALL_DIR) | ||
56 | -endif | ||
57 | - | ||
58 | CPPFLAGS=-DPlatform_$(GST_TI_PLATFORM) | ||
59 | HOST=arm-none-linux-gnueabi | ||
60 | |||
61 | @@ -141,5 +134,3 @@ dm365: Makefile | ||
62 | omapl138: Makefile | ||
63 | $(MAKE) -f Makefile | ||
64 | |||
65 | -omap3530_dv400: Makefile | ||
66 | - $(MAKE) -f Makefile | ||
67 | diff --git a/src/gstticodecplugin_omap3530_dv400.cfg b/src/gstticodecplugin_omap3530_dv400.cfg | ||
68 | deleted file mode 100644 | ||
69 | index 90f4edf..0000000 | ||
70 | --- a/src/gstticodecplugin_omap3530_dv400.cfg | ||
71 | +++ /dev/null | ||
72 | @@ -1,44 +0,0 @@ | ||
73 | -/* | ||
74 | - * Copyright (C) 2008-2010 Texas Instruments Incorporated - http://www.ti.com/ | ||
75 | - * | ||
76 | - * This program is free software; you can redistribute it and/or modify | ||
77 | - * it under the terms of the GNU Lesser General Public License as | ||
78 | - * published by the Free Software Foundation version 2.1 of the License. | ||
79 | - * | ||
80 | - * This program is distributed #as is# WITHOUT ANY WARRANTY of any kind, | ||
81 | - * whether express or implied; without even the implied warranty of | ||
82 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
83 | - * Lesser General Public License for more details. | ||
84 | - * | ||
85 | - */ | ||
86 | - | ||
87 | -/* Load the Codec Engine 'Operating System Abstraction Layer' */ | ||
88 | -var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global'); | ||
89 | - | ||
90 | -var os = xdc.useModule('ti.sdo.ce.osal.linux.Settings'); | ||
91 | -osalGlobal.os = os; | ||
92 | - | ||
93 | -/* Configure CE to use it's DSP Link Linux version */ | ||
94 | -var ipc = xdc.useModule('ti.sdo.ce.ipc.Settings'); | ||
95 | -ipc.commType = ipc.COMM_DSPLINK; | ||
96 | - | ||
97 | -/* | ||
98 | - * ======== Engine Configuration ======== | ||
99 | - */ | ||
100 | -var Engine = xdc.useModule('ti.sdo.ce.Engine'); | ||
101 | -var demoEngine = Engine.createFromServer( | ||
102 | - "codecServer", | ||
103 | - "./bin/cs.x64P", | ||
104 | - "ti.sdo.server.cs" | ||
105 | - ); | ||
106 | - | ||
107 | -var combopath = "" + java.lang.System.getenv("CODEC_SERVER"); | ||
108 | -if (combopath != "" && combopath != "null") { | ||
109 | - demoEngine.server = java.lang.System.getenv("CODEC_SERVER"); | ||
110 | -} | ||
111 | - | ||
112 | -/* Load support for the DMAI module */ | ||
113 | -var DMAI = xdc.loadPackage('ti.sdo.dmai'); | ||
114 | - | ||
115 | -var SCPY = xdc.useModule('ti.sdo.fc.scpy.SCPY'); | ||
116 | -var SDMA = xdc.useModule('ti.sdo.linuxutils.sdma.SDMA'); | ||
117 | -- | ||
118 | 1.7.0.4 | ||
119 | |||
diff --git a/extras/recipes-ti/gstreamer-ti/gstreamer-ti/dm355-evm/gst-ti.sh b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/dm355-evm/gst-ti.sh new file mode 100644 index 00000000..5467a67b --- /dev/null +++ b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/dm355-evm/gst-ti.sh | |||
@@ -0,0 +1,12 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # Disable XDM 0.9 elements | ||
4 | export GST_TI_TIViddec_DISABLE=1 | ||
5 | export GST_TI_TIAuddec_DISABLE=1 | ||
6 | export GST_TI_TIVidenc_DISABLE=1 | ||
7 | export GST_TI_TIImgdec_DISABLE=1 | ||
8 | export GST_TI_TIImgenc_DISABLE=1 | ||
9 | |||
10 | # Disable XDM 1.x audio decoder | ||
11 | export GST_TI_TIAuddec1_DISABLE=1 | ||
12 | |||
diff --git a/extras/recipes-ti/gstreamer-ti/gstreamer-ti/dm365-evm/loadmodules.sh b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/dm365-evm/loadmodules.sh new file mode 100644 index 00000000..c70bee1e --- /dev/null +++ b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/dm365-evm/loadmodules.sh | |||
@@ -0,0 +1,37 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # Default DM365 Memory Map 128 MB | ||
4 | # | ||
5 | # Start Addr Size Description | ||
6 | # ---------------------------------------------------------------- | ||
7 | # 0x00001000 32K ARM926 TCM memory used by platinum codec | ||
8 | # 0x80000000 48 MB Linux | ||
9 | # 0x83000000 12 MB Video driver memory (Linux) | ||
10 | # 0x83C00000 68 MB CMEM | ||
11 | # 0x88000000 BOTTOM ADDRESS | ||
12 | # | ||
13 | |||
14 | rmmod cmemk 2>/dev/null | ||
15 | |||
16 | # Pools configuration | ||
17 | modprobe cmemk phys_start=0x83C00000 phys_end=0x88000000 pools=1x16539648,1x4841472,4x1843200,14x1646592,1x282624,1x176128,1x147456,1x69632,1x61440,1x32768,2x20480,1x16384,1x12288,4x8192,69x4096 allowOverlap=1 phys_start_1=0x00001000 phys_end_1=0x00008000 pools_1=1x28672 | ||
18 | |||
19 | # Decode + Display | ||
20 | #modprobe cmemk phys_start=0x83c00000 phys_end=0x88000000 pools=1x16539648,1x4841472,14x1646592,1x282624,1x176128,1x147456,1x69632,1x61440,1x32768,2x20480,1x12288,1x8192,64x4096 | ||
21 | |||
22 | # Capture + Encode | ||
23 | #modprobe cmemk phys_start=0x83c00000 phys_end=0x88000000 pools=1x3112960,1x2764800,3x1536000,1x65536,1x61440,1x49152,1x20480,1x16384,2x8192,87x4096 | ||
24 | |||
25 | # Resizer | ||
26 | #modprobe cmemk phys_start=0x83c00000 phys_end=0x88000000 pools=3x1843200 | ||
27 | |||
28 | # Non-accel display | ||
29 | #modprobe cmemk phys_start=0x83c00000 phys_end=0x88000000 pools=1x1843200 | ||
30 | |||
31 | modprobe irqk | ||
32 | modprobe edmak | ||
33 | modprobe dm365mmap | ||
34 | |||
35 | rm -f /dev/dm365mmap | ||
36 | mknod /dev/dm365mmap c `awk "\\$2==\"dm365mmap\" {print \\$1}" /proc/devices` 0 | ||
37 | |||
diff --git a/extras/recipes-ti/gstreamer-ti/gstreamer-ti/gstreamer-ti-rc.sh b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/gstreamer-ti-rc.sh new file mode 100644 index 00000000..35bf7818 --- /dev/null +++ b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/gstreamer-ti-rc.sh | |||
@@ -0,0 +1,28 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # configure kernel modules to run gst-ti plugins elements | ||
4 | # | ||
5 | |||
6 | load_module() { | ||
7 | echo | ||
8 | echo -n "Running /usr/share/ti/gst/<platform>/loadmodules.sh" | ||
9 | /usr/share/ti/gst/<platform>/loadmodules.sh | ||
10 | } | ||
11 | |||
12 | case "$1" in | ||
13 | start) | ||
14 | echo -n "Loading kernel modules for gstreamer-ti... " | ||
15 | load_module | ||
16 | echo " done" | ||
17 | ;; | ||
18 | stop) | ||
19 | echo "Nothing to do" | ||
20 | ;; | ||
21 | restart) | ||
22 | echo "Nothing to do" | ||
23 | ;; | ||
24 | *) | ||
25 | echo "$0 <start/stop/restart>" | ||
26 | ;; | ||
27 | esac | ||
28 | |||
diff --git a/extras/recipes-ti/gstreamer-ti/gstreamer-ti/gstti-init.service b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/gstti-init.service new file mode 100644 index 00000000..cccf5343 --- /dev/null +++ b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/gstti-init.service | |||
@@ -0,0 +1,10 @@ | |||
1 | [Unit] | ||
2 | Description=TI Gstreamer plugins init | ||
3 | ConditionKernelCommandLine=mem=MEMARGS | ||
4 | |||
5 | [Service] | ||
6 | ExecStart=/usr/share/ti/gst/<platform>/loadmodules.sh | ||
7 | RemainAfterExit=yes | ||
8 | |||
9 | [Install] | ||
10 | WantedBy=multi-user.target | ||
diff --git a/extras/recipes-ti/gstreamer-ti/gstreamer-ti/omap3/loadmodules.sh b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/omap3/loadmodules.sh new file mode 100644 index 00000000..eb758834 --- /dev/null +++ b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/omap3/loadmodules.sh | |||
@@ -0,0 +1,22 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # CMEM Allocation | ||
4 | # 1x5250000 Circular buffer | ||
5 | # 6x829440,1x691200 Video buffers (max D1 PAL) | ||
6 | # 1x345600 Underlying software components (codecs, etc.) | ||
7 | # 1x1 Dummy buffer used during final flush | ||
8 | |||
9 | rmmod cmemk 2>/dev/null | ||
10 | |||
11 | modprobe cmemk allowOverlap=1 phys_start=0x86300000 phys_end=0x87300000 \ | ||
12 | pools=1x5250000,6x829440,1x345600,1x691200,1x1 | ||
13 | |||
14 | # insert DSP/BIOS Link driver | ||
15 | modprobe dsplinkk | ||
16 | |||
17 | # insert Local Power Manager driver | ||
18 | modprobe lpm_omap3530 | ||
19 | |||
20 | # insert SDMA driver | ||
21 | modprobe sdmak | ||
22 | |||
diff --git a/extras/recipes-ti/gstreamer-ti/gstreamer-ti/omapl137/loadmodules.sh b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/omapl137/loadmodules.sh new file mode 100644 index 00000000..d0311881 --- /dev/null +++ b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/omapl137/loadmodules.sh | |||
@@ -0,0 +1,12 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # configure kernel modules for TI DSP based gstreamer plugin | ||
4 | # | ||
5 | |||
6 | # insert cmemk, tell it to occupy physical 34MB-64MB. | ||
7 | # | ||
8 | modprobe cmemk phys_start=0xC2200000 phys_end=0xC3200000 \ | ||
9 | pools=1x5250000,3x1048576,3x829440,1x256000,4x131072 | ||
10 | |||
11 | modprobe dsplinkk | ||
12 | |||
diff --git a/extras/recipes-ti/gstreamer-ti/gstreamer-ti/omapl138/da850-omapl138-evm/loadmodules.sh b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/omapl138/da850-omapl138-evm/loadmodules.sh new file mode 100644 index 00000000..f4017251 --- /dev/null +++ b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/omapl138/da850-omapl138-evm/loadmodules.sh | |||
@@ -0,0 +1,16 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # configure kernel modules for TI DSP based gstreamer plugin | ||
4 | # | ||
5 | rmmod cmemk 2>/dev/null | ||
6 | rmmod dsplink 2>/dev/null | ||
7 | |||
8 | modprobe cmemk phys_start=0xC2200000 phys_end=0xC3200000 \ | ||
9 | pools=1x5250000,3x1048576,3x829440,1x256000,4x131072 \ | ||
10 | allowOverlap=1 | ||
11 | |||
12 | modprobe dsplinkk | ||
13 | |||
14 | rm -f /dev/dsplink | ||
15 | mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0 | ||
16 | |||
diff --git a/extras/recipes-ti/gstreamer-ti/gstreamer-ti/omapl138/loadmodules.sh b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/omapl138/loadmodules.sh new file mode 100644 index 00000000..95cfc3da --- /dev/null +++ b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/omapl138/loadmodules.sh | |||
@@ -0,0 +1,15 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # configure kernel modules for TI DSP based gstreamer plugin | ||
4 | # | ||
5 | |||
6 | rmmod cmemk 2>/dev/null | ||
7 | |||
8 | modprobe cmemk phys_start=0xC2200000 phys_end=0xC3200000 \ | ||
9 | pools=1x5250000,3x1048576,3x829440,1x256000,4x131072 | ||
10 | |||
11 | modprobe dsplinkk | ||
12 | |||
13 | rm -f /dev/dsplink | ||
14 | mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0 | ||
15 | |||
diff --git a/extras/recipes-ti/gstreamer-ti/gstreamer-ti/r962-remove-include-videodev.diff b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/r962-remove-include-videodev.diff new file mode 100644 index 00000000..cb106fc4 --- /dev/null +++ b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/r962-remove-include-videodev.diff | |||
@@ -0,0 +1,22 @@ | |||
1 | diff -ur ticodecplugin_orig/src/gstticapturesrc.c ticodecplugin/src/gstticapturesrc.c | ||
2 | --- ticodecplugin_orig/src/gstticapturesrc.c 2011-08-09 17:03:39.201308305 +0200 | ||
3 | +++ ticodecplugin/src/gstticapturesrc.c 2011-08-09 17:02:35.177308274 +0200 | ||
4 | @@ -25,7 +25,6 @@ | ||
5 | #include <gst/gst.h> | ||
6 | #include <string.h> | ||
7 | #include <gst/gstmarshal.h> | ||
8 | -#include <linux/videodev.h> | ||
9 | #include <linux/videodev2.h> | ||
10 | #include <sys/ioctl.h> | ||
11 | |||
12 | diff -ur ticodecplugin_orig/src/gsttidisplaysink2.c ticodecplugin/src/gsttidisplaysink2.c | ||
13 | --- ticodecplugin_orig/src/gsttidisplaysink2.c 2011-08-09 17:03:53.329308312 +0200 | ||
14 | +++ ticodecplugin/src/gsttidisplaysink2.c 2011-08-09 17:03:11.337308292 +0200 | ||
15 | @@ -28,7 +28,6 @@ | ||
16 | #include <gst/video/video.h> | ||
17 | #include <string.h> | ||
18 | #include <gst/gstmarshal.h> | ||
19 | -#include <linux/videodev.h> | ||
20 | #include <linux/videodev2.h> | ||
21 | #include <sys/ioctl.h> | ||
22 | |||
diff --git a/extras/recipes-ti/gstreamer-ti/gstreamer-ti_svn.bb b/extras/recipes-ti/gstreamer-ti/gstreamer-ti_svn.bb new file mode 100644 index 00000000..3d260ed5 --- /dev/null +++ b/extras/recipes-ti/gstreamer-ti/gstreamer-ti_svn.bb | |||
@@ -0,0 +1,26 @@ | |||
1 | require gstreamer-ti.inc | ||
2 | |||
3 | LIC_FILES_CHKSUM = "file://COPYING;md5=c8a292be1d17ba07ecbf7b49049cbf22" | ||
4 | |||
5 | PV = "svnr${SRCREV}" | ||
6 | |||
7 | S = "${WORKDIR}/gstreamer_ti/ti_build/ticodecplugin" | ||
8 | |||
9 | SRCREV = "962" | ||
10 | |||
11 | # apply patches from tracker 1208 to get zero copy support. | ||
12 | # https://gstreamer.ti.com/gf/project/gstreamer_ti/tracker/?action=TrackerItemEdit&tracker_item_id=1208&start=175 | ||
13 | |||
14 | SRC_URI = "svn://gforge.ti.com/svn/gstreamer_ti/trunk;module=gstreamer_ti;proto=https;user=anonymous;pswd='' \ | ||
15 | file://gstreamer-ti-rc.sh \ | ||
16 | file://r962-remove-include-videodev.diff \ | ||
17 | file://gstti-init.service \ | ||
18 | " | ||
19 | |||
20 | # use local loadmodules.sh for these platform | ||
21 | # TODO: must be removed onces these loadmodules goes in gstreamer.ti.com | ||
22 | SRC_URI_append_dm365 = " file://loadmodules.sh" | ||
23 | SRC_URI_append_omapl137 = " file://loadmodules.sh" | ||
24 | SRC_URI_append_omapl138 = " file://loadmodules.sh " | ||
25 | SRC_URI_append_omap3 = " file://loadmodules.sh " | ||
26 | |||
diff --git a/extras/recipes-ti/hdvpss/ti-hdvpss.inc b/extras/recipes-ti/hdvpss/ti-hdvpss.inc new file mode 100644 index 00000000..3c99b792 --- /dev/null +++ b/extras/recipes-ti/hdvpss/ti-hdvpss.inc | |||
@@ -0,0 +1,20 @@ | |||
1 | DESCRIPTION = "TI HDVPSS" | ||
2 | SECTION = "devel" | ||
3 | LICENSE = "TI" | ||
4 | |||
5 | require ../includes/ti-paths.inc | ||
6 | require ../includes/ti-staging.inc | ||
7 | |||
8 | S = "${WORKDIR}/REL.HDVPSS_${PV}" | ||
9 | |||
10 | SRC_URI = "http://install.source.dir.local/REL.HDVPSS.${PV}.zip" | ||
11 | |||
12 | do_compile() { | ||
13 | : | ||
14 | } | ||
15 | |||
16 | do_install() { | ||
17 | install -d ${D}${HDVPSS_INSTALL_DIR_RECIPE} | ||
18 | cp -pPrf ${S}/* ${D}${HDVPSS_INSTALL_DIR_RECIPE} | ||
19 | } | ||
20 | |||
diff --git a/extras/recipes-ti/hdvpss/ti-hdvpss_01.00.01.27.bb b/extras/recipes-ti/hdvpss/ti-hdvpss_01.00.01.27.bb new file mode 100644 index 00000000..e3b1c56f --- /dev/null +++ b/extras/recipes-ti/hdvpss/ti-hdvpss_01.00.01.27.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | require ti-hdvpss.inc | ||
2 | |||
3 | SRC_URI[md5sum] = "6db908bef3b933dc8cea666564d5d4d8" | ||
4 | SRC_URI[sha256sum] = "2caa9c859cfe348197e860f07d174a8ab7048d38d6d3a12ec576802122c9e91e" | ||
5 | |||
6 | |||
diff --git a/extras/recipes-ti/ipc/ti-ipc.inc b/extras/recipes-ti/ipc/ti-ipc.inc new file mode 100644 index 00000000..8d1b8020 --- /dev/null +++ b/extras/recipes-ti/ipc/ti-ipc.inc | |||
@@ -0,0 +1,36 @@ | |||
1 | DESCRIPTION = "TI Inter Process Ccommunication (IPC) Mechanisms (for Uni- and Multi- Processor Configurations)" | ||
2 | HOMEPAGE = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/ipc/index.html" | ||
3 | |||
4 | SECTION = "devel" | ||
5 | LICENSE = "BSD" | ||
6 | |||
7 | require ../includes/ti-paths.inc | ||
8 | require ../includes/ti-staging.inc | ||
9 | require ../includes/ti-eula-unpack.inc | ||
10 | |||
11 | S = "${WORKDIR}/ipc_${PV}" | ||
12 | |||
13 | SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/ipc/${PV}/exports/ipc_setuplinux_${PV}.bin;name=ipcbin" | ||
14 | |||
15 | SRC_URI =+ "file://ipc.pc" | ||
16 | |||
17 | DEPENDS = "ti-sysbios ti-cgt6x ti-xdctools" | ||
18 | |||
19 | BINFILE="ipc_setuplinux_${PV}.bin" | ||
20 | TI_BIN_UNPK_CMDS="Y: q:workdir:Y" | ||
21 | |||
22 | do_configure() { | ||
23 | sed -i -e s:@VERSION@:${PV}:g ${WORKDIR}/ipc.pc | ||
24 | |||
25 | cp ${WORKDIR}/ipc.pc ${S} | ||
26 | } | ||
27 | |||
28 | do_install() { | ||
29 | install -d ${D}${IPC_INSTALL_DIR_RECIPE} | ||
30 | cp -pPrf ${S}/* ${D}${IPC_INSTALL_DIR_RECIPE} | ||
31 | |||
32 | install -d ${D}/${libdir}/pkgconfig | ||
33 | install ${S}/ipc.pc ${D}/${libdir}/pkgconfig/ | ||
34 | } | ||
35 | |||
36 | FILES_ti-ipc-dev = "${libdir}/*" | ||
diff --git a/extras/recipes-ti/ipc/ti-ipc/ipc.pc b/extras/recipes-ti/ipc/ti-ipc/ipc.pc new file mode 100644 index 00000000..1a8c52df --- /dev/null +++ b/extras/recipes-ti/ipc/ti-ipc/ipc.pc | |||
@@ -0,0 +1,8 @@ | |||
1 | prefix=/../../ipc_@VERSION@ | ||
2 | includedir=${prefix}/ti/ipc | ||
3 | |||
4 | Name: TI IPC | ||
5 | Description: TI ARM-DSP IPC (Inter Processor Communication) | ||
6 | Version: @VERSION@ | ||
7 | Requires: | ||
8 | Cflags: -I${includedir} | ||
diff --git a/extras/recipes-ti/ipc/ti-ipc_1.24.00.16.bb b/extras/recipes-ti/ipc/ti-ipc_1.24.00.16.bb new file mode 100644 index 00000000..e7ae7ef1 --- /dev/null +++ b/extras/recipes-ti/ipc/ti-ipc_1.24.00.16.bb | |||
@@ -0,0 +1,8 @@ | |||
1 | require ti-ipc.inc | ||
2 | |||
3 | PV = "1_24_00_16" | ||
4 | |||
5 | LIC_FILES_CHKSUM = "file://ipc_${PV}_manifest.html;md5=573f5a5c0448d28bf8db35f438244d7f" | ||
6 | |||
7 | SRC_URI[ipcbin.md5sum] = "d2f7cc82310d555ca039dcd353bd94c5" | ||
8 | SRC_URI[ipcbin.sha256sum] = "96df7835e920c7dabcd63d30ec8bc2aea7cd0c6197c9fb9ca0f8a9b681aa5396" | ||
diff --git a/extras/recipes-ti/linuxutils/ti-linuxutils.inc b/extras/recipes-ti/linuxutils/ti-linuxutils.inc new file mode 100644 index 00000000..dba485b8 --- /dev/null +++ b/extras/recipes-ti/linuxutils/ti-linuxutils.inc | |||
@@ -0,0 +1,93 @@ | |||
1 | DESCRIPTION = "MFP Linux utils for TI ARM/DSP processors" | ||
2 | SECTION = "devel" | ||
3 | LICENSE = "GPLv2 & BSD" | ||
4 | |||
5 | BASE_SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/linuxutils/${PV}/exports" | ||
6 | SRC_URI = "${BASE_SRC_URI}/linuxutils_${PV}.tar.gz " | ||
7 | |||
8 | LIC_FILES_CHKSUM = "file://gpl_2.0.txt;md5=1298794fc2eed3df92a89f3c9d317440" | ||
9 | |||
10 | S = "${WORKDIR}/linuxutils_${PV}" | ||
11 | |||
12 | require recipes-ti/includes/ti-paths.inc | ||
13 | require recipes-ti/includes/ti-staging.inc | ||
14 | |||
15 | PR = "${MACHINE_KERNEL_PR}" | ||
16 | |||
17 | #This is a kernel module, don't set PR directly | ||
18 | MACHINE_KERNEL_PR_append = "e" | ||
19 | |||
20 | inherit module | ||
21 | |||
22 | do_compile() { | ||
23 | do_make_scripts | ||
24 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS | ||
25 | |||
26 | case "${SOC_FAMILY}" in | ||
27 | "dm365") | ||
28 | modules="cmem edma irq";; | ||
29 | "omap3") | ||
30 | modules="cmem sdma";; | ||
31 | "dm355") | ||
32 | modules="cmem edma irq";; | ||
33 | *) | ||
34 | modules="cmem" | ||
35 | esac | ||
36 | |||
37 | for module in $modules ; do | ||
38 | cd ${S}/packages/ti/sdo/linuxutils/$module | ||
39 | make \ | ||
40 | LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \ | ||
41 | MVTOOL_PREFIX="${TARGET_PREFIX}" \ | ||
42 | UCTOOL_PREFIX="${TARGET_PREFIX}" \ | ||
43 | clean debug release | ||
44 | done | ||
45 | } | ||
46 | |||
47 | do_install () { | ||
48 | install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp | ||
49 | # Install CMEM | ||
50 | for module in $(find ${S}/packages/ti/sdo/linuxutils/ -name "*.ko") ; do | ||
51 | install -m 0755 $module ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp | ||
52 | done | ||
53 | cd ${S}/packages/ti/sdo/linuxutils/cmem/apps | ||
54 | make \ | ||
55 | LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \ | ||
56 | MVTOOL_PREFIX="${TARGET_PREFIX}" \ | ||
57 | UCTOOL_PREFIX="${TARGET_PREFIX}" \ | ||
58 | EXEC_DIR="${D}${installdir}/ti-linuxutils-app/cmem-app" \ | ||
59 | install | ||
60 | # Install EDMA | ||
61 | if [ "${SOC_FAMILY}" = "dm365" ] ; then | ||
62 | cd ${S}/packages/ti/sdo/linuxutils/edma/apps | ||
63 | make \ | ||
64 | LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \ | ||
65 | MVTOOL_PREFIX="${TARGET_PREFIX}" \ | ||
66 | UCTOOL_PREFIX="${TARGET_PREFIX}" \ | ||
67 | EXEC_DIR="${D}${installdir}/ti-linuxutils-app/edma-app" \ | ||
68 | install | ||
69 | fi | ||
70 | |||
71 | # stage tree - other packages may need this | ||
72 | install -d ${D}${LINUXUTILS_INSTALL_DIR_RECIPE} | ||
73 | cp -pPrf ${S}/* ${D}${LINUXUTILS_INSTALL_DIR_RECIPE} | ||
74 | } | ||
75 | |||
76 | |||
77 | |||
78 | |||
79 | PACKAGES =+ " ti-cmem-module \ | ||
80 | ti-sdma-module \ | ||
81 | ti-edma-module \ | ||
82 | ti-irq-module \ | ||
83 | ti-linuxutils-app" | ||
84 | |||
85 | FILES_ti-cmem-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/cmem*.ko" | ||
86 | FILES_ti-sdma-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/sdma*.ko" | ||
87 | FILES_ti-edma-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/edma*.ko" | ||
88 | FILES_ti-irq-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/irq*.ko" | ||
89 | |||
90 | FILES_ti-linuxutils-app = "${installdir}/ti-linuxutils-app/*/*" | ||
91 | |||
92 | INSANE_SKIP_ti-linuxutils-app = "True" | ||
93 | INHIBIT_PACKAGE_STRIP = "1" | ||
diff --git a/extras/recipes-ti/linuxutils/ti-linuxutils/linuxutils-BKL-fix-2.patch b/extras/recipes-ti/linuxutils/ti-linuxutils/linuxutils-BKL-fix-2.patch new file mode 100644 index 00000000..1438003c --- /dev/null +++ b/extras/recipes-ti/linuxutils/ti-linuxutils/linuxutils-BKL-fix-2.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | From: Koen Kooi <k-kooi@ti.com> | ||
2 | Subject: linuxutils: fix build with 2.6.37rcX | ||
3 | |||
4 | --- | ||
5 | |||
6 | --- /tmp/sdmak.c 2010-12-05 18:43:55.000000000 +0100 | ||
7 | +++ linuxutils_2_25_05_11/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c 2010-12-05 18:48:31.000000000 +0100 | ||
8 | @@ -208,9 +208,12 @@ | ||
9 | } | ||
10 | |||
11 | up_read(¤t->mm->mmap_sem); | ||
12 | - | ||
13 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) | ||
14 | + sema_init(&(channels[channel].mutex),1); | ||
15 | +#else | ||
16 | init_MUTEX_LOCKED(&(channels[channel].mutex)); | ||
17 | - channels[channel].owner = filp; | ||
18 | +#endif | ||
19 | + channels[channel].owner = filp; | ||
20 | |||
21 | if (copy_to_user(argp, &channel, sizeof(channel))) { | ||
22 | return -EFAULT; | ||
diff --git a/extras/recipes-ti/linuxutils/ti-linuxutils/linuxutils-BKL-fix.patch b/extras/recipes-ti/linuxutils/ti-linuxutils/linuxutils-BKL-fix.patch new file mode 100644 index 00000000..29b0a444 --- /dev/null +++ b/extras/recipes-ti/linuxutils/ti-linuxutils/linuxutils-BKL-fix.patch | |||
@@ -0,0 +1,73 @@ | |||
1 | From: Koen Kooi <k-kooi@ti.com> | ||
2 | Subject: linuxutils: fix build with 2.6.37rcX | ||
3 | |||
4 | --- | ||
5 | |||
6 | --- /tmp/cmemk.c 2010-12-05 18:41:00.000000000 +0100 | ||
7 | +++ linuxutils_2_25_05_11/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c 2010-12-05 18:43:24.000000000 +0100 | ||
8 | @@ -31,6 +31,7 @@ | ||
9 | #include <linux/seq_file.h> | ||
10 | #include <linux/vmalloc.h> | ||
11 | #include <linux/sched.h> | ||
12 | +#include <linux/slab.h> | ||
13 | #include <asm/cacheflush.h> | ||
14 | #include <asm/uaccess.h> | ||
15 | #include <asm/pgtable.h> | ||
16 | @@ -204,7 +205,11 @@ | ||
17 | "\n\t\t fall back to a heap-based allocation attempt"); | ||
18 | module_param(useHeapIfPoolUnavailable, int, S_IRUGO); | ||
19 | |||
20 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) | ||
21 | +static DEFINE_SEMAPHORE(cmem_mutex); | ||
22 | +#else | ||
23 | static DECLARE_MUTEX(cmem_mutex); | ||
24 | +#endif | ||
25 | |||
26 | /* Describes a pool buffer */ | ||
27 | typedef struct pool_buffer { | ||
28 | @@ -243,8 +248,12 @@ | ||
29 | |||
30 | static struct file_operations cmem_fxns = { | ||
31 | owner: THIS_MODULE, | ||
32 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) | ||
33 | + unlocked_ioctl: ioctl, | ||
34 | +#else | ||
35 | ioctl: ioctl, | ||
36 | - mmap: mmap, | ||
37 | +#endif | ||
38 | + mmap: mmap, | ||
39 | open: open, | ||
40 | release: release | ||
41 | }; | ||
42 | --- /tmp/sdmak.c 2010-12-05 18:43:55.000000000 +0100 | ||
43 | +++ linuxutils_2_25_05_11/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c 2010-12-05 18:48:31.000000000 +0100 | ||
44 | @@ -208,9 +208,12 @@ | ||
45 | } | ||
46 | |||
47 | up_read(¤t->mm->mmap_sem); | ||
48 | - | ||
49 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) | ||
50 | + sema_init(&(channels[channel].mutex),1); | ||
51 | +#else | ||
52 | init_MUTEX_LOCKED(&(channels[channel].mutex)); | ||
53 | - channels[channel].owner = filp; | ||
54 | +#endif | ||
55 | + channels[channel].owner = filp; | ||
56 | |||
57 | if (copy_to_user(argp, &channel, sizeof(channel))) { | ||
58 | return -EFAULT; | ||
59 | @@ -286,8 +289,12 @@ | ||
60 | } | ||
61 | |||
62 | static struct file_operations fops = { | ||
63 | - .ioctl = dma_ioctl, | ||
64 | - .release = dma_release, | ||
65 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) | ||
66 | + .unlocked_ioctl = dma_ioctl, | ||
67 | +#else | ||
68 | + .ioctl = dma_ioctl, | ||
69 | +#endif | ||
70 | + .release = dma_release, | ||
71 | .owner = THIS_MODULE | ||
72 | }; | ||
73 | |||
diff --git a/extras/recipes-ti/linuxutils/ti-linuxutils_2.26.01.02.bb b/extras/recipes-ti/linuxutils/ti-linuxutils_2.26.01.02.bb new file mode 100644 index 00000000..2a67e6a4 --- /dev/null +++ b/extras/recipes-ti/linuxutils/ti-linuxutils_2.26.01.02.bb | |||
@@ -0,0 +1,10 @@ | |||
1 | require ti-linuxutils.inc | ||
2 | |||
3 | SRC_URI += "file://linuxutils-BKL-fix-2.patch" | ||
4 | |||
5 | PE = "1" | ||
6 | PV = "2_26_01_02" | ||
7 | |||
8 | SRC_URI[md5sum] = "70b4918bc35c1bcfef34d6ba3fbce0c8" | ||
9 | SRC_URI[sha256sum] = "51266dd928f8d629cd417c869789a6c0d596612120f165619119cbaadfd66ee2" | ||
10 | |||
diff --git a/extras/recipes-ti/local-power-manager/ti-local-power-manager.inc b/extras/recipes-ti/local-power-manager/ti-local-power-manager.inc new file mode 100644 index 00000000..9155c761 --- /dev/null +++ b/extras/recipes-ti/local-power-manager/ti-local-power-manager.inc | |||
@@ -0,0 +1,133 @@ | |||
1 | DESCRIPTION = "TI Local Power Manager (LPM)" | ||
2 | HOMEPAGE = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/lpm" | ||
3 | SECTION = "devel" | ||
4 | LICENSE = "GPLv2" | ||
5 | |||
6 | LIC_FILES_CHKSUM = "file://gpl_2.0.txt;md5=ebb5c50ab7cab4baeffba14977030c07" | ||
7 | |||
8 | # TODO : Hardcoded path to evm3530 - need to fix when adding omap24xx/dm6446 (other lpm targets) | ||
9 | |||
10 | require ../includes/ti-paths.inc | ||
11 | require ../includes/ti-staging.inc | ||
12 | |||
13 | PROVIDES = "ti-lpm-module" | ||
14 | PROVIDES += "ti-lpm-utils" | ||
15 | |||
16 | # This package builds a kernel module, use kernel PR as base and append a local version | ||
17 | PR = "${MACHINE_KERNEL_PR}" | ||
18 | PR_append = "e" | ||
19 | |||
20 | S = "${WORKDIR}/local_power_manager_linux_${PV}" | ||
21 | |||
22 | SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/lpm/${PV}/exports/local_power_manager_linux_${PV}.tar.gz;name=lpmtarball" | ||
23 | |||
24 | DEPENDS = "ti-dsplink ti-xdctools" | ||
25 | DEPENDS += "virtual/kernel" | ||
26 | |||
27 | # SOC_FAMILY configuration | ||
28 | |||
29 | LPMDSPPOWERSOC_omap3 = "omap3530" | ||
30 | LPMDSPPOWERSOC_dm6446 = "dm6446" | ||
31 | LPMDSPPOWERSOC ?= "UNDEFINED_LPMDSPPOWERSOC" | ||
32 | |||
33 | XDC_PLATFORM_dm6446 = "ti.platforms.evmDM6446" | ||
34 | XDC_PLATFORM_omap3 = "ti.platforms.evm3530" | ||
35 | XDC_PLATFORM ?= "UNDEFINED_XDC_PLATFORM" | ||
36 | |||
37 | do_configure () { | ||
38 | |||
39 | # Generate a config.bld for XDC | ||
40 | |||
41 | cat > ${S}/config.bld <<EOF | ||
42 | |||
43 | /* Generated by ti-local-power-manager.inc OE recipe */ | ||
44 | |||
45 | var Build = xdc.useModule('xdc.bld.BuildEnvironment'); | ||
46 | |||
47 | var GCArmv5T = xdc.useModule('gnu.targets.arm.GCArmv5T'); | ||
48 | GCArmv5T.LONGNAME = "${TARGET_PREFIX}gcc"; | ||
49 | GCArmv5T.rootDir = "${TOOLCHAIN_PATH}"; | ||
50 | GCArmv5T.ccOpts.prefix += " -Wall -fno-strict-aliasing "; | ||
51 | GCArmv5T.lnkOpts.suffix = GCArmv5T.lnkOpts.suffix.replace("-lstdc++", ""); | ||
52 | GCArmv5T.lnkOpts.suffix += " -lpthread "; | ||
53 | GCArmv5T.platform = null; | ||
54 | GCArmv5T.platforms = [ | ||
55 | "${XDC_PLATFORM}" | ||
56 | ]; | ||
57 | |||
58 | /* remove profiles we don't use */ | ||
59 | delete GCArmv5T.profiles["coverage"]; | ||
60 | delete GCArmv5T.profiles["profile"]; | ||
61 | |||
62 | Build.targets.\$add(GCArmv5T); | ||
63 | EOF | ||
64 | |||
65 | } | ||
66 | |||
67 | do_prepsources () { | ||
68 | |||
69 | # Prepare the tree for rebuiling - generate makefiles and clean | ||
70 | XDCPATH=${S} ${XDC_INSTALL_DIR}/xdc .make -PR . | ||
71 | XDCPATH=${S} ${XDC_INSTALL_DIR}/xdc clean -PR . | ||
72 | } | ||
73 | |||
74 | addtask prepsources after do_configure before do_compile | ||
75 | |||
76 | do_compile () { | ||
77 | |||
78 | # Build the LPM kernel module | ||
79 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS | ||
80 | cd ${S}/packages/ti/bios/power/modules/${LPMDSPPOWERSOC}/lpm | ||
81 | make \ | ||
82 | DSPLINK_REPO="${LINK_INSTALL_DIR}" \ | ||
83 | LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \ | ||
84 | MVTOOL_PREFIX="${TARGET_PREFIX}" \ | ||
85 | clean default | ||
86 | |||
87 | # Build the user space library | ||
88 | # TODO | ||
89 | |||
90 | # Build the utilities (lpmON/OFF) | ||
91 | cd ${S} | ||
92 | XDCPATH=${S} ${XDC_INSTALL_DIR}/xdc -PR . | ||
93 | } | ||
94 | |||
95 | KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}" | ||
96 | |||
97 | do_install () { | ||
98 | |||
99 | # Install the kernel module | ||
100 | install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp | ||
101 | install -m 0755 ${S}/packages/ti/bios/power/modules/${LPMDSPPOWERSOC}/lpm/*.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp | ||
102 | |||
103 | # Install the Utilities | ||
104 | install -d ${D}/${installdir}/ti-lpm-utils | ||
105 | install -m 0755 ${S}/packages/ti/bios/power/utils/bin/$(echo ${XDC_PLATFORM} | tr . _)/linux/release/* ${D}/${installdir}/ti-lpm-utils | ||
106 | |||
107 | # Install/Stage the Source Tree | ||
108 | install -d ${D}${LPM_INSTALL_DIR_RECIPE} | ||
109 | cp -pPrf ${S}/* ${D}${LPM_INSTALL_DIR_RECIPE} | ||
110 | } | ||
111 | |||
112 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
113 | PACKAGES += "ti-lpm-module" | ||
114 | FILES_ti-lpm-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/*lpm*ko" | ||
115 | RDEPENDS_ti-lpm-module += "ti-dsplink-module" | ||
116 | RDEPENDS_ti-lpm-module += "update-modules" | ||
117 | |||
118 | pkg_postinst_ti-lpm-module_append () { | ||
119 | if [ -n "$D" ]; then | ||
120 | exit 1 | ||
121 | fi | ||
122 | depmod -a | ||
123 | update-modules || true | ||
124 | } | ||
125 | |||
126 | pkg_postrm_ti-lpm-module_append () { | ||
127 | update-modules || true | ||
128 | } | ||
129 | |||
130 | PACKAGES += "ti-lpm-utils" | ||
131 | RDEPENDS_ti-lpm-utils += "ti-lpm-module" | ||
132 | FILES_ti-lpm-utils = "${installdir}/ti-lpm-utils/*" | ||
133 | INSANE_SKIP_ti-lpm-utils = "1" | ||
diff --git a/extras/recipes-ti/local-power-manager/ti-local-power-manager/lpm-1_24_01-replace-define-OPT.patch b/extras/recipes-ti/local-power-manager/ti-local-power-manager/lpm-1_24_01-replace-define-OPT.patch new file mode 100644 index 00000000..120792b8 --- /dev/null +++ b/extras/recipes-ti/local-power-manager/ti-local-power-manager/lpm-1_24_01-replace-define-OPT.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | diff -uNr local_power_manager_linux_1_24_01_orig/packages/ti/bios/power/modules/dm6446/lpm/Makefile local_power_manager_linux_1_24_01/packages/ti/bios/power/modules/dm6446/lpm/Makefile | ||
2 | --- local_power_manager_linux_1_24_01_orig/packages/ti/bios/power/modules/dm6446/lpm/Makefile 2009-07-22 23:10:04.000000000 -0500 | ||
3 | +++ local_power_manager_linux_1_24_01/packages/ti/bios/power/modules/dm6446/lpm/Makefile 2010-04-16 15:26:14.000000000 -0500 | ||
4 | @@ -54,7 +54,7 @@ | ||
5 | endif | ||
6 | |||
7 | MAKE_OPTS = ARCH=arm CROSS_COMPILE=$(MVTOOL_PREFIX) | ||
8 | -CFLAGS = -DUSE_UDEV -DOS_LINUX -DLINUX_KERNEL \ | ||
9 | +CFLAGS = -DUSE_UDEV -DOS_LINUX -DLINUX_KERNEL -DOPT="" \ | ||
10 | $(LINK_DEFS) $(LINK_INCS) $(LINK_INCS_INTERNAL) | ||
11 | |||
12 | # Invoke the kernel build system | ||
13 | diff -uNr local_power_manager_linux_1_24_01_orig/packages/ti/bios/power/modules/omap3530/lpm/Makefile local_power_manager_linux_1_24_01/packages/ti/bios/power/modules/omap3530/lpm/Makefile | ||
14 | --- local_power_manager_linux_1_24_01_orig/packages/ti/bios/power/modules/omap3530/lpm/Makefile 2009-07-22 23:10:05.000000000 -0500 | ||
15 | +++ local_power_manager_linux_1_24_01/packages/ti/bios/power/modules/omap3530/lpm/Makefile 2010-04-16 15:26:38.000000000 -0500 | ||
16 | @@ -54,7 +54,7 @@ | ||
17 | endif | ||
18 | |||
19 | MAKE_OPTS = ARCH=arm CROSS_COMPILE=$(MVTOOL_PREFIX) | ||
20 | -CFLAGS = -DUSE_UDEV -DOS_LINUX -DLINUX_KERNEL \ | ||
21 | +CFLAGS = -DUSE_UDEV -DOS_LINUX -DLINUX_KERNEL -DOPT="" \ | ||
22 | $(LINK_DEFS) $(LINK_INCS) $(LINK_INCS_INTERNAL) | ||
23 | |||
24 | # Invoke the kernel build system | ||
diff --git a/extras/recipes-ti/local-power-manager/ti-local-power-manager/lpm-BKL-fix.patch b/extras/recipes-ti/local-power-manager/ti-local-power-manager/lpm-BKL-fix.patch new file mode 100644 index 00000000..4b5a537a --- /dev/null +++ b/extras/recipes-ti/local-power-manager/ti-local-power-manager/lpm-BKL-fix.patch | |||
@@ -0,0 +1,72 @@ | |||
1 | From b7e83000f316f5f109b9237fde4d1c576534aa1a Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Tue, 4 Jan 2011 14:21:02 +0100 | ||
4 | Subject: [PATCH] Fix build with 2.6.37rcX | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | .../bios/power/modules/omap3530/lpm/lpm_driver.c | 12 +++++++++--- | ||
9 | 1 files changed, 9 insertions(+), 3 deletions(-) | ||
10 | |||
11 | diff --git a/packages/ti/bios/power/modules/omap3530/lpm/lpm_driver.c b/packages/ti/bios/power/modules/omap3530/lpm/lpm_driver.c | ||
12 | index fa22ea3..4663fc9 100644 | ||
13 | --- a/packages/ti/bios/power/modules/omap3530/lpm/lpm_driver.c | ||
14 | +++ b/packages/ti/bios/power/modules/omap3530/lpm/lpm_driver.c | ||
15 | @@ -40,6 +40,7 @@ | ||
16 | #include <asm/semaphore.h> | ||
17 | #endif | ||
18 | #include <linux/io.h> | ||
19 | +#include <linux/slab.h> | ||
20 | |||
21 | #include "lpm_driver.h" | ||
22 | #include "lpm_dev.h" | ||
23 | @@ -95,7 +96,7 @@ static int enablevicp = -1; | ||
24 | module_param(enablevicp, int, S_IRUGO); | ||
25 | |||
26 | /* forward declaration of system calls (used by Linux driver) */ | ||
27 | -static int lpm_ioctl (struct inode *inode, struct file *filp, | ||
28 | +static long lpm_ioctl (struct file *filp, | ||
29 | unsigned int cmd, unsigned long args); | ||
30 | static int lpm_open (struct inode *inode, struct file *filp); | ||
31 | static int lpm_release (struct inode *inode, struct file *filp); | ||
32 | @@ -111,7 +112,7 @@ static void lpm_os_trace (char *fmt, ...); | ||
33 | |||
34 | static struct file_operations lpm_fops = { | ||
35 | .owner = THIS_MODULE, | ||
36 | - .ioctl = lpm_ioctl, | ||
37 | + .unlocked_ioctl = lpm_ioctl, | ||
38 | .open = lpm_open, | ||
39 | .release = lpm_release, | ||
40 | }; | ||
41 | @@ -244,7 +245,11 @@ static int __init lpm_init(void) | ||
42 | lpm->inst[i].major = MAJOR(lpm->first); | ||
43 | lpm->inst[i].minor = MINOR(lpm->first) + i; | ||
44 | INIT_LIST_HEAD(&lpm->inst[i].clients); | ||
45 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36) | ||
46 | init_MUTEX(&lpm->inst[i].sem); | ||
47 | +#else | ||
48 | + sema_init(&lpm->inst[i].sem,1); | ||
49 | +#endif | ||
50 | init_completion(&lpm->inst[i].event); | ||
51 | lpm_devAttrs.os_instance = (void *)&lpm->inst[i]; | ||
52 | LPM_init(i, &lpm->inst[i].lpm, &lpm_devAttrs); | ||
53 | @@ -320,7 +325,7 @@ fail_02: | ||
54 | /* | ||
55 | * ======== lpm_ioctl ======== | ||
56 | */ | ||
57 | -static int lpm_ioctl(struct inode *inode, struct file *filp, | ||
58 | +static long lpm_ioctl(struct file *filp, | ||
59 | unsigned int cmd, unsigned long args) | ||
60 | { | ||
61 | struct LPM_Dev *dev; | ||
62 | @@ -328,6 +333,7 @@ static int lpm_ioctl(struct inode *inode, struct file *filp, | ||
63 | LPM_Client *client; | ||
64 | LPM_Status lpmStat = LPM_SOK; | ||
65 | int stat = 0; | ||
66 | + struct inode *inode = filp->f_dentry->d_inode; | ||
67 | |||
68 | TRACE(KERN_ALERT "--> lpm_ioctl, cmd: 0x%X\n", cmd); | ||
69 | |||
70 | -- | ||
71 | 1.6.6.1 | ||
72 | |||
diff --git a/extras/recipes-ti/local-power-manager/ti-local-power-manager_1.24.02.09.bb b/extras/recipes-ti/local-power-manager/ti-local-power-manager_1.24.02.09.bb new file mode 100644 index 00000000..759561f3 --- /dev/null +++ b/extras/recipes-ti/local-power-manager/ti-local-power-manager_1.24.02.09.bb | |||
@@ -0,0 +1,10 @@ | |||
1 | require ti-local-power-manager.inc | ||
2 | |||
3 | PV = "1_24_02_09" | ||
4 | PE = "1" | ||
5 | |||
6 | SRC_URI += "file://lpm-BKL-fix.patch" | ||
7 | |||
8 | SRC_URI[lpmtarball.md5sum] = "3d05453df26dfc811de04839d74c2f2b" | ||
9 | SRC_URI[lpmtarball.sha256sum] = "7335959a6217df17289f81839e6c6948f31cc0797ebc5389edef7190ed3ea589" | ||
10 | |||
diff --git a/extras/recipes-ti/msp430/ti-msp430-chronos_1.05.00.00.bb b/extras/recipes-ti/msp430/ti-msp430-chronos_1.05.00.00.bb new file mode 100644 index 00000000..0a48b177 --- /dev/null +++ b/extras/recipes-ti/msp430/ti-msp430-chronos_1.05.00.00.bb | |||
@@ -0,0 +1,55 @@ | |||
1 | DESCRIPTION = "eZ430 Chronos Tools - MSP430 Development Kit/Watch" | ||
2 | HOMEPAGE = "http://processors.wiki.ti.com/index.php/EZ430-Chronos" | ||
3 | LICENSE = "TI-BSD" | ||
4 | # We can't use the actualy source file, since it has space in its name :( | ||
5 | LIC_FILES_CHKSUM = "file://eZ430-Chronos_CC_1_1.tcl;md5=59ba6ee0a26650ec660a4e65a9462806" | ||
6 | |||
7 | SECTION = "multimedia" | ||
8 | |||
9 | inherit allarch | ||
10 | |||
11 | PV = "1_05_00_00" | ||
12 | |||
13 | SRC_URI = "http://focus.ti.com/lit/sw/slac388/slac388.zip;name=slac388zip" | ||
14 | |||
15 | SRC_URI[slac388zip.md5sum] = "22d4104a07af584222828fb377793796" | ||
16 | SRC_URI[slac388zip.sha256sum] = "1c9cd1e36015e8db3b36c98be41907628144b76002b3f76b27fd310f4bd35ad7" | ||
17 | |||
18 | require ../includes/ti-paths.inc | ||
19 | require ../includes/ti-staging.inc | ||
20 | require ../includes/ti-eula-unpack.inc | ||
21 | |||
22 | S = "${WORKDIR}/ti/eZ430-Chronos" | ||
23 | |||
24 | BINFILE="Chronos-Setup" | ||
25 | TI_BIN_UNPK_CMDS="Y:workdir:" | ||
26 | |||
27 | do_unpack_append() { | ||
28 | os.system('mv "Texas Instruments" ti') | ||
29 | } | ||
30 | |||
31 | do_configure() { | ||
32 | cp Control\ Center/Chronos\ Control\ Center/eZ430-Chronos_CC_1_1.tcl ${S} | ||
33 | } | ||
34 | |||
35 | do_compile() { | ||
36 | echo "Do Nothing for Now" | ||
37 | } | ||
38 | |||
39 | do_install() { | ||
40 | |||
41 | install -d ${D}/${installdir}/ti-msp430-chronos-apps | ||
42 | cp -pPrf "${S}"/"Control Center"/* ${D}/${installdir}/ti-msp430-chronos-apps | ||
43 | |||
44 | # Remove dos formatting | ||
45 | dos2unix "${D}/${installdir}/ti-msp430-chronos-apps/Chronos Data Logger"/* | ||
46 | dos2unix "${D}/${installdir}/ti-msp430-chronos-apps/Chronos Control Center"/* | ||
47 | |||
48 | # Should probably also remove hardcoded script reference to tcl8.5 | ||
49 | } | ||
50 | |||
51 | PACKAGES += "ti-msp430-chronos-apps" | ||
52 | FILES_ti-msp430-chronos-apps = "${installdir}/ti-msp430-chronos-apps/*" | ||
53 | |||
54 | RDEPENDS_ti-msp430-chronos-apps += " tcl tk xdotool" | ||
55 | RRECOMMENDS_ti-msp430-chronos-apps = "kernel-module-cdc-acm" | ||
diff --git a/extras/recipes-ti/syslink/ti-syslink.inc b/extras/recipes-ti/syslink/ti-syslink.inc new file mode 100644 index 00000000..04c59c1f --- /dev/null +++ b/extras/recipes-ti/syslink/ti-syslink.inc | |||
@@ -0,0 +1,241 @@ | |||
1 | DESCRIPTION = "SYSLINK Inter-Processor Communications (IPC) for TI ARM/DSP processors" | ||
2 | HOMEPAGE = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/syslink/index.html" | ||
3 | SECTION = "devel" | ||
4 | LICENSE = "BSD" | ||
5 | |||
6 | LIC_FILES_CHKSUM = "file://docs/bsd.pdf;md5=9f2edd962cd129f8c24e9ef1bd641029" | ||
7 | |||
8 | # TODO :: multi-machine, add m3 build as well? | ||
9 | # TODO :: proper staging? | ||
10 | # TODO :: kernel module examples? | ||
11 | # TODO :: smarter handling of config.bld | ||
12 | # TODO :: review XDC parallel make - why not happening automatically? | ||
13 | # TODO :: smarter suffix management | ||
14 | |||
15 | require ../includes/ti-paths.inc | ||
16 | require ../includes/ti-staging.inc | ||
17 | |||
18 | PROVIDES = "ti-syslink-module" | ||
19 | PROVIDES += "ti-syslink-examples" | ||
20 | |||
21 | # This package builds a kernel module, use kernel PR as base and append a local version | ||
22 | PR = "${MACHINE_KERNEL_PR}" | ||
23 | PR_append = "a" | ||
24 | PVExtra = "" | ||
25 | |||
26 | inherit module pkgconfig | ||
27 | |||
28 | S = "${WORKDIR}/syslink_${PV}${PVExtra}" | ||
29 | |||
30 | SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/syslink/${PV}${PVExtra}/exports/syslink_${PV}${PVExtra}.tar.gz;name=syslinktarball \ | ||
31 | file://syslink.pc \ | ||
32 | " | ||
33 | |||
34 | DEPENDS = "ti-sysbios ti-xdctools ti-cgt6x ti-ipc ti-cgt470" | ||
35 | DEPENDS += "virtual/kernel" | ||
36 | |||
37 | #common frameq gateMP heapBufMP heapMemMP knlNotify listMP messageQ notify ringIO ringIO_gpp sharedRegion slaveLoader tilerDaemon | ||
38 | SYSLINKHLOSSAMPLES = "knlnotify slaveLoader frameq notify" | ||
39 | #SYSLINKRTOSSAMPLES = "frameq gateMP heapBufMP heapMemMP listMP messageQ notify ringIO ringIO_gpp sharedRegion" | ||
40 | |||
41 | # SOC_FAMILY configuration | ||
42 | |||
43 | SYSLINKPLATFORM_omap3 = "OMAP3530" | ||
44 | SYSLINKPLATFORM_omapl137 = "OMAPL1XX" | ||
45 | SYSLINKPLATFORM_omapl138 = "OMAPL1XX" | ||
46 | SYSLINKPLATFORM_ti816x = "TI81XX" | ||
47 | SYSLINKPLATFORM_ti814x = "TI81XX" | ||
48 | SYSLINKPLATFORM ?= "<UNDEFINED_SYSLINKPLATFORM>" | ||
49 | |||
50 | SYSLINKVARIANT_omap3 = "OMAP3530" | ||
51 | SYSLINKVARIANT_omapl137 = "OMAPL1XX" | ||
52 | SYSLINKVARIANT_omapl138 = "OMAPL1XX" | ||
53 | SYSLINKVARIANT_ti816x = "TI816X" | ||
54 | SYSLINKVARIANT_ti814x = "TI814X" | ||
55 | SYSLINKVARIANT ?= "<UNDEFINED_SYSLINKVARIANT>" | ||
56 | |||
57 | # COFF/ELF config - omap3 can be coff/elf, omapl only coff, ti816x and ti814x only elf | ||
58 | |||
59 | # this really needs to be a list... in the case of ELF/COFF (and this could use DSPSUFFIX?) | ||
60 | SYSLINKSUFFIX_omap3 = "x64P" | ||
61 | SYSLINKSUFFIX_omapl137 = "x674" | ||
62 | SYSLINKSUFFIX_omapl138 = "x674" | ||
63 | SYSLINKSUFFIX_ti816x = "xe674" | ||
64 | SYSLINKSUFFIX_ti814x = "xe674" | ||
65 | SYSLINKSUFFIX ?= "<UNDEFINED_SYSLINKSUFFIX>" | ||
66 | |||
67 | SYSLINKLOADER_omap3 = "COFF" | ||
68 | SYSLINKLOADER_omapl137 = "COFF" | ||
69 | SYSLINKLOADER_omapl138 = "COFF" | ||
70 | SYSLINKLOADER_ti816x = "ELF" | ||
71 | SYSLINKLOADER_ti814x = "ELF" | ||
72 | SYSLINKLOADER ?= "<UNDEFINED_SYSLINKLOADER>" | ||
73 | |||
74 | # Do we really need to configure this? - configured already in config.bld | ||
75 | XDCTARGETS_omap3 = "ti.targets.C64P" | ||
76 | XDCTARGETS_omapl137 = "ti.targets.C674" | ||
77 | XDCTARGETS_omapl138 = "ti.targets.C674" | ||
78 | # for ti816x and ti814x, we should later also build for ti.targets.arm.elf.M3 | ||
79 | XDCTARGETS_ti816x = "ti.targets.elf.C674 ti.targets.arm.elf.M3" | ||
80 | XDCTARGETS_ti814x = "ti.targets.elf.C674 ti.targets.arm.elf.M3" | ||
81 | XDCTARGETS ?= "<UNDEFINED_XDCTARGETS>" | ||
82 | export XDCTARGETS | ||
83 | |||
84 | # Exported Variable needed by build | ||
85 | export SYSLINK_ROOT = "${S}/packages/" | ||
86 | |||
87 | export XDCPATH = "${IPC_INSTALL_DIR}/packages;${SYSBIOS_INSTALL_DIR}/packages" | ||
88 | |||
89 | do_configure() { | ||
90 | sed -i -e s:@VERSION@:${PV}:g ${WORKDIR}/syslink.pc | ||
91 | |||
92 | cp ${WORKDIR}/syslink.pc ${S} | ||
93 | } | ||
94 | |||
95 | do_prepsources () { | ||
96 | |||
97 | # Prepare the tree for rebuiling - clean and generate interfaces | ||
98 | cd ${SYSLINK_ROOT}/ti/syslink | ||
99 | ${XDC_INSTALL_DIR}/xdc --jobs=${BB_NUMBER_THREADS} .make -PR . | ||
100 | ${XDC_INSTALL_DIR}/xdc --jobs=${BB_NUMBER_THREADS} clean -PR . | ||
101 | ${XDC_INSTALL_DIR}/xdc --jobs=${BB_NUMBER_THREADS} .interfaces -PR . | ||
102 | } | ||
103 | |||
104 | addtask prepsources after do_configure before do_compile | ||
105 | |||
106 | do_compile() { | ||
107 | # TODO :: KERNEL_CC, should use for kernel module build? | ||
108 | # TODO :: Check the 'unset's | ||
109 | |||
110 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS | ||
111 | |||
112 | do_make_scripts | ||
113 | |||
114 | # Build the gpp (hlos) kernel space | ||
115 | cd ${SYSLINK_ROOT}/ti/syslink/utils/hlos/knl/Linux && make \ | ||
116 | ARCH="${TARGET_ARCH}" \ | ||
117 | CROSS_COMPILE="${TARGET_PREFIX}" \ | ||
118 | SYSLINK_PLATFORM="${SYSLINKPLATFORM}" \ | ||
119 | SYSLINK_VARIANT="${SYSLINKVARIANT}" \ | ||
120 | SYSLINK_LOADER="${SYSLINKLOADER}" \ | ||
121 | SYSLINK_PKGPATH="${IPC_INSTALL_DIR}/packages" \ | ||
122 | KDIR="${STAGING_KERNEL_DIR}" | ||
123 | |||
124 | # # Build the gpp (hlos) kernel space samples. | ||
125 | # for sample in ${SYSLINKHLOSSAMPLES}; do | ||
126 | # cd ${SYSLINK_ROOT}/ti/syslink/samples/hlos/$sample/knl/Linux && make \ | ||
127 | # ARCH="${TARGET_ARCH}" \ | ||
128 | # CROSS_COMPILE="${TARGET_PREFIX}" \ | ||
129 | # SYSLINK_PLATFORM="${SYSLINKPLATFORM}" \ | ||
130 | # SYSLINK_VARIANT="${SYSLINKVARIANT}" \ | ||
131 | # SYSLINK_LOADER="${SYSLINKLOADER}" \ | ||
132 | # SYSLINK_PKGPATH="${IPC_INSTALL_DIR}/packages" \ | ||
133 | # SYSLINK_SDK=EZSDK \ | ||
134 | # KDIR="${STAGING_KERNEL_DIR}" | ||
135 | # done | ||
136 | |||
137 | # Build the gpp (hlos) user space | ||
138 | cd ${SYSLINK_ROOT}/ti/syslink/utils/hlos/usr/Linux && make \ | ||
139 | ARCH="${TARGET_ARCH}" \ | ||
140 | CROSS_COMPILE="${TARGET_PREFIX}" \ | ||
141 | TOOLCHAIN_PREFIX="${TOOLCHAIN_PATH}/${TARGET_PREFIX}" \ | ||
142 | SYSLINK_PLATFORM="${SYSLINKPLATFORM}" \ | ||
143 | SYSLINK_VARIANT="${SYSLINKVARIANT}" \ | ||
144 | SYSLINK_LOADER="${SYSLINKLOADER}" \ | ||
145 | SYSLINK_PKGPATH="${IPC_INSTALL_DIR}/packages" | ||
146 | |||
147 | # Build the gpp (hlos) user space samples | ||
148 | # First build the common lib for samples. | ||
149 | cd ${SYSLINK_ROOT}/ti/syslink/samples/hlos/common/usr/Linux && make \ | ||
150 | ARCH="${TARGET_ARCH}" \ | ||
151 | CROSS_COMPILE="${TARGET_PREFIX}" \ | ||
152 | TOOLCHAIN_PREFIX="${TOOLCHAIN_PATH}/${TARGET_PREFIX}" \ | ||
153 | SYSLINK_PLATFORM="${SYSLINKPLATFORM}" \ | ||
154 | SYSLINK_VARIANT="${SYSLINKVARIANT}" \ | ||
155 | SYSLINK_LOADER="${SYSLINKLOADER}" \ | ||
156 | SYSLINK_SDK=EZSDK \ | ||
157 | SYSLINK_PKGPATH="${IPC_INSTALL_DIR}/packages" | ||
158 | |||
159 | for sample in ${SYSLINKHLOSSAMPLES}; do | ||
160 | cd ${SYSLINK_ROOT}/ti/syslink/samples/hlos/$sample/usr/Linux && make \ | ||
161 | ARCH="${TARGET_ARCH}" \ | ||
162 | CROSS_COMPILE="${TARGET_PREFIX}" \ | ||
163 | TOOLCHAIN_PREFIX="${TOOLCHAIN_PATH}/${TARGET_PREFIX}" \ | ||
164 | SYSLINK_PLATFORM="${SYSLINKPLATFORM}" \ | ||
165 | SYSLINK_VARIANT="${SYSLINKVARIANT}" \ | ||
166 | SYSLINK_LOADER="${SYSLINKLOADER}" \ | ||
167 | SYSLINK_SDK=EZSDK \ | ||
168 | SYSLINK_PKGPATH="${IPC_INSTALL_DIR}/packages" | ||
169 | done | ||
170 | |||
171 | # Build the dsp/arm (rtos) code (system and samples) | ||
172 | # cd ${SYSLINK_ROOT}/ti/syslink && \ | ||
173 | # ${XDC_INSTALL_DIR}/xdc --jobs=${BB_NUMBER_THREADS} -PR . | ||
174 | export XDCOPTIONS=v | ||
175 | cd ${SYSLINK_ROOT}/ti/syslink && \ | ||
176 | ${XDC_INSTALL_DIR}/xdc -P \ | ||
177 | `${XDC_INSTALL_DIR}/bin/xdcpkg ${SYSLINK_ROOT}/ti/syslink | grep -v samples` | ||
178 | export XDCARGS="profile=debug" | ||
179 | cd ${SYSLINK_ROOT}/ti/syslink && \ | ||
180 | ${XDC_INSTALL_DIR}/xdc --jobs=${BB_NUMBER_THREADS} -P \ | ||
181 | `${XDC_INSTALL_DIR}/bin/xdcpkg ${SYSLINK_ROOT}/ti/syslink | grep samples` | ||
182 | } | ||
183 | |||
184 | KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}" | ||
185 | |||
186 | do_install () { | ||
187 | |||
188 | # Install the hlos kernel module | ||
189 | install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp | ||
190 | install -m 0755 ${SYSLINK_ROOT}/ti/syslink/bin/${SYSLINKVARIANT}/syslink.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/ | ||
191 | |||
192 | # Install the hlos example kernel modules and apps | ||
193 | install -d ${D}/${installdir}/ti-syslink-examples | ||
194 | install -m 0755 ${SYSLINK_ROOT}/ti/syslink/bin/${SYSLINKVARIANT}/samples/* ${D}/${installdir}/ti-syslink-examples/ | ||
195 | |||
196 | # Install the rtos example apps | ||
197 | install -d ${D}/${installdir}/ti-syslink-examples/dsp | ||
198 | cd ${SYSLINK_ROOT}/ti/syslink/samples/rtos | ||
199 | for i in $(find . -name "*.${SYSLINKSUFFIX}" | grep "${SOC_FAMILY}"); do | ||
200 | install ${i} ${D}/${installdir}/ti-syslink-examples/dsp/ | ||
201 | done | ||
202 | |||
203 | # TODO :: Fixup - library/headers installation - this shouldn't go into the examples directory.... | ||
204 | # Needs proper staging | ||
205 | # Install the library in the filesystem | ||
206 | # install -d ${D}/${installdir}/ti-syslink-examples | ||
207 | # install -m 0755 ${SYSLINK_ROOT}/ti/syslink/lib/syslink.a ${D}/${installdir}/ti-syslink-examples/ | ||
208 | |||
209 | # Install/Stage the Source Tree | ||
210 | install -d ${D}${SYSLINK_INSTALL_DIR_RECIPE} | ||
211 | cp -pPrf ${S}/* ${D}${SYSLINK_INSTALL_DIR_RECIPE} | ||
212 | |||
213 | install -d ${D}/${libdir}/pkgconfig | ||
214 | install ${S}/syslink.pc ${D}/${libdir}/pkgconfig/ | ||
215 | } | ||
216 | |||
217 | PACKAGES =+ "ti-syslink-module" | ||
218 | FILES_ti-syslink-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/syslink.ko" | ||
219 | RDEPENDS_ti-syslink-module += "update-modules" | ||
220 | |||
221 | pkg_postinst_ti-syslink-module () { | ||
222 | #!/bin/sh | ||
223 | if [ -n "$D" ]; then | ||
224 | exit 1 | ||
225 | fi | ||
226 | |||
227 | depmod -a | ||
228 | update-modules || true | ||
229 | } | ||
230 | |||
231 | pkg_postrm_ti-syslink-module () { | ||
232 | #!/bin/sh | ||
233 | update-modules || true | ||
234 | } | ||
235 | |||
236 | PACKAGES =+ "ti-syslink-examples" | ||
237 | RRECOMMENDS_ti-syslink-examples_append = " ti-syslink-module" | ||
238 | FILES_ti-syslink-examples = "${installdir}/ti-syslink-examples/*" | ||
239 | INSANE_SKIP_ti-syslink-examples = "1" | ||
240 | |||
241 | FILES_ti-syslink-dev = "${libdir}/*" | ||
diff --git a/extras/recipes-ti/syslink/ti-syslink/syslink.pc b/extras/recipes-ti/syslink/ti-syslink/syslink.pc new file mode 100644 index 00000000..c4d720f1 --- /dev/null +++ b/extras/recipes-ti/syslink/ti-syslink/syslink.pc | |||
@@ -0,0 +1,10 @@ | |||
1 | prefix=/../..//syslink_@VERSION@ | ||
2 | libdir=${prefix}/ti/syslink/lib | ||
3 | includedir=${prefix}/ti/syslink | ||
4 | |||
5 | Name: TI Syslink | ||
6 | Description: Syslink ARM-DSP IPC (Inter Processor Communication) | ||
7 | Version: @VERSION@ | ||
8 | Requires: ipc | ||
9 | Libs: ${libdir}/syslink.a_release | ||
10 | Cflags: -I${includedir} -I${includedir}/inc -I${includedir}/utils | ||
diff --git a/extras/recipes-ti/syslink/ti-syslink_2.00.00.78.bb b/extras/recipes-ti/syslink/ti-syslink_2.00.00.78.bb new file mode 100644 index 00000000..71e96212 --- /dev/null +++ b/extras/recipes-ti/syslink/ti-syslink_2.00.00.78.bb | |||
@@ -0,0 +1,8 @@ | |||
1 | require ti-syslink.inc | ||
2 | |||
3 | PV = "2_00_00_78" | ||
4 | PVwithdots = "2.00.00.78" | ||
5 | |||
6 | SRC_URI[syslinktarball.md5sum] = "df7c92cd2cca38fdb38e59e4175aba61" | ||
7 | SRC_URI[syslinktarball.sha256sum] = "3409d080b08ec1d0bd24a715dbec783f1d52020e452485c165ad64e121548ebc" | ||
8 | |||
diff --git a/extras/recipes-ti/xdais/ti-xdais.inc b/extras/recipes-ti/xdais/ti-xdais.inc new file mode 100644 index 00000000..9514ce6b --- /dev/null +++ b/extras/recipes-ti/xdais/ti-xdais.inc | |||
@@ -0,0 +1,21 @@ | |||
1 | DESCRIPTION = "TI eXpress DSP Algorithm Interface Standard (XDAIS) specification" | ||
2 | HOMEPAGE = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/xdais" | ||
3 | LICENSE = "GPLv2" | ||
4 | SECTION = "devel" | ||
5 | |||
6 | LIC_FILES_CHKSUM = "file://xdais_6_26_01_03_manifest.html;md5=a5a675d49db2f658bb98746ec80cda4e" | ||
7 | |||
8 | require ../includes/ti-paths.inc | ||
9 | require ../includes/ti-staging.inc | ||
10 | |||
11 | PR = "r1" | ||
12 | |||
13 | S = "${WORKDIR}/xdais_${PV}" | ||
14 | |||
15 | SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/xdais/${PV}/exports/xdais_${PV}.tar.gz;name=xdaistarball" | ||
16 | |||
17 | do_install() { | ||
18 | install -d ${D}${XDAIS_INSTALL_DIR_RECIPE} | ||
19 | cp -pPrf ${S}/* ${D}${XDAIS_INSTALL_DIR_RECIPE} | ||
20 | } | ||
21 | |||
diff --git a/extras/recipes-ti/xdais/ti-xdais_6.26.01.03.bb b/extras/recipes-ti/xdais/ti-xdais_6.26.01.03.bb new file mode 100644 index 00000000..f8bef79a --- /dev/null +++ b/extras/recipes-ti/xdais/ti-xdais_6.26.01.03.bb | |||
@@ -0,0 +1,8 @@ | |||
1 | require ti-xdais.inc | ||
2 | |||
3 | PV = "6_26_01_03" | ||
4 | |||
5 | SRC_URI[xdaistarball.md5sum] = "9b2bea3408254e737ec0d819a031adf6" | ||
6 | SRC_URI[xdaistarball.sha256sum] = "d7bcbd8bcfe6fdfc5f402e4b125ced6c806dc30bc5296e98d5d43b0b5a237a0d" | ||
7 | |||
8 | |||