diff options
author | Koen Kooi <k-kooi@ti.com> | 2010-03-19 15:41:46 +0100 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2010-04-12 19:43:27 +0200 |
commit | c3c7c8eac979e1c5a4369d30bf7f2ca1814772c1 (patch) | |
tree | 3aaef8b21c6361b550e717540ec31166d35c5171 | |
parent | c88d28ef872235376aae3492d919ee2cdf9be3ff (diff) |
bc-cube: add recipe for 0.1.0 + patch to build it against the 3.01.00.05 SGX SDK
-rwxr-xr-x | recipes/powervr-drivers/bc-cube/bc-cat-0.1.0-BC_PIX_FMT_.patch | 57 | ||||
-rw-r--r-- | recipes/powervr-drivers/bc-cube_0.1.0.bb | 42 |
2 files changed, 99 insertions, 0 deletions
diff --git a/recipes/powervr-drivers/bc-cube/bc-cat-0.1.0-BC_PIX_FMT_.patch b/recipes/powervr-drivers/bc-cube/bc-cat-0.1.0-BC_PIX_FMT_.patch new file mode 100755 index 0000000000..0d94a1bcaf --- /dev/null +++ b/recipes/powervr-drivers/bc-cube/bc-cat-0.1.0-BC_PIX_FMT_.patch @@ -0,0 +1,57 @@ +--- test/main.c.0.1.0 2009-10-26 11:26:30.000000000 -0500 ++++ test/main.c 2010-03-15 11:30:18.000000000 -0500 +@@ -580,15 +580,15 @@ + if (frame_init(&buf_param)) + return -1; + +- if ((bcfd = open("/dev/bc_cat", O_RDWR|O_NDELAY)) == -1) { +- printf("ERROR: open '/dev/bc_cat' failed\n"); ++ if ((bcfd = open("/dev/bccat0", O_RDWR|O_NDELAY)) == -1) { ++ printf("ERROR: open '/dev/bccat0' failed\n"); + goto err_ret; + } + + frame_w = buf_param.width; + frame_h = buf_param.height; + +- if (min_w > 0 && !(min_w % 32)) ++ if (min_w > 0 && !(min_w % 8)) + buf_param.width = min_w; + + if (min_h > 0) +--- test/capture.c.0.1.0 2009-10-26 11:26:30.000000000 -0500 ++++ test/capture.c 2010-03-15 11:32:54.000000000 -0500 +@@ -43,8 +43,6 @@ + #include <sys/mman.h> + #include <linux/videodev2.h> + #include <errno.h> +-#include <img_defs.h> +-#include <servicesext.h> + #include <bc_cat.h> + + +@@ -58,13 +56,13 @@ + #define FALSE 0 + + #define NUM_BUFFERS 3 +-#define CAPTURE_DEVICE "/dev/video0" ++#define CAPTURE_DEVICE "/dev/video0" + #define CAPTURE_NAME "Capture" + + #define USBCAM_WIDTH 320 + #define USBCAM_HEIGHT 240 + #define USBCAM_DEF_PIX_FMT V4L2_PIX_FMT_YUYV +-#define YUV_PIXEL_FMT PVRSRV_PIXEL_FORMAT_FOURCC_ORG_YUYV ++#define YUV_PIXEL_FMT BC_PIX_FMT_YUYV + + #define CLEAR(x) memset(&(x), 0, sizeof(x)) + +@@ -218,7 +216,7 @@ + p->count = 1; + p->width = USBCAM_WIDTH; + p->height = USBCAM_HEIGHT; +- p->pixel_fmt = YUV_PIXEL_FMT; ++ p->fourcc = YUV_PIXEL_FMT; + p->type = BC_MEMORY_MMAP; + } + return 0; diff --git a/recipes/powervr-drivers/bc-cube_0.1.0.bb b/recipes/powervr-drivers/bc-cube_0.1.0.bb new file mode 100644 index 0000000000..1ea5dcc67b --- /dev/null +++ b/recipes/powervr-drivers/bc-cube_0.1.0.bb @@ -0,0 +1,42 @@ +DESCRIPTION = "TI Texture streaming using bufferclass API demo (spinning video cube)" +LICENSE = "TI-BSD/GPLv2" +DEPENDS = "virtual/egl" + +SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/apps_processors/OMAP35x_AM35x_Video_Texture_Streaming/1_0/exports/bc-cat-${PV}.tar.gz \ + file://bc-cat-0.1.0-BC_PIX_FMT_.patch;patch=1;pnum=0" + +S = "${WORKDIR}/bc-cat-${PV}" + +CFLAGS += " -DLINUX -I../include -I${STAGING_INCDIR}/services4/3rdparty/bufferclass_ti/ -I${STAGING_INCDIR}/include4" +LDFLAGS += "-lGLES_CM -lEGL" + +do_configure() { + cd test + sed -i -e s:pixel_fmt:fourcc:g *.c +} + +# build both fb and x11 version +do_compile() { + cd test + oe_runmake -e clean + oe_runmake -e + mv gles1_bc_mmap gles1_bc_mmap-fb + mv gles1_bc_webcam gles1_bc_webcam-fb + + oe_runmake -e clean + CFLAGS="${CFLAGS} -DX11" oe_runmake -e X11BUILD=1 + mv gles1_bc_mmap gles1_bc_mmap-x11 + mv gles1_bc_webcam gles1_bc_webcam-x11 + +} + +do_install() { + install -d ${D}${bindir} + install -m 0755 ${S}/test/gles1_bc_mmap-* ${D}${bindir} + install -m 0755 ${S}/test/gles1_bc_webcam-* ${D}${bindir} +} + +PACKAGES =+ "${PN}-fb ${PN}-x11" +FILES_${PN}-x11 = "${bindir}/*x11" +FILES_${PN}-fb = "${bindir}/*fb" + |