aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-graphics/vc-graphics
diff options
context:
space:
mode:
authorAndrei Gherzan <andrei@gherzan.ro>2015-03-02 00:06:19 +0100
committerAndrei Gherzan <andrei@gherzan.ro>2015-03-12 22:20:51 +0100
commitd1fa1c0b75a8de15ae27a9a2f9eaa496a5fe6de9 (patch)
tree439b4a56ded9efafa4889d3106cbbb4a8432e271 /recipes-graphics/vc-graphics
parentddd1f033733a34b68da5e1e8c6a315b18234b86f (diff)
downloadmeta-raspberrypi-d1fa1c0b75a8de15ae27a9a2f9eaa496a5fe6de9.tar.gz
meta-raspberrypi-d1fa1c0b75a8de15ae27a9a2f9eaa496a5fe6de9.tar.bz2
meta-raspberrypi-d1fa1c0b75a8de15ae27a9a2f9eaa496a5fe6de9.zip
vc-graphics: Move to recipes-graphics
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Diffstat (limited to 'recipes-graphics/vc-graphics')
-rw-r--r--recipes-graphics/vc-graphics/files/egl.pc10
-rw-r--r--recipes-graphics/vc-graphics/files/vchiq.sh24
-rw-r--r--recipes-graphics/vc-graphics/vc-graphics-hardfp.bb6
-rw-r--r--recipes-graphics/vc-graphics/vc-graphics.bb6
-rw-r--r--recipes-graphics/vc-graphics/vc-graphics.inc56
5 files changed, 102 insertions, 0 deletions
diff --git a/recipes-graphics/vc-graphics/files/egl.pc b/recipes-graphics/vc-graphics/files/egl.pc
new file mode 100644
index 0000000..c314202
--- /dev/null
+++ b/recipes-graphics/vc-graphics/files/egl.pc
@@ -0,0 +1,10 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: egl
+Description: egl for RaspberryPI
+Version: 0.0
+Libs: -L${libdir} -lEGL -lGLESv2
+Cflags: -I${includedir}/vc -I${includedir}/interface -I${includedir}/interface/vcos -I${includedir}/interface/vcos/pthreads
diff --git a/recipes-graphics/vc-graphics/files/vchiq.sh b/recipes-graphics/vc-graphics/files/vchiq.sh
new file mode 100644
index 0000000..c73e3a9
--- /dev/null
+++ b/recipes-graphics/vc-graphics/files/vchiq.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: vchiq.sh
+# Required-Start: $remote_fs rmnologin
+# Required-Stop:
+# Default-Start: S
+# Default-Stop:
+# Short-Description: Create /dev/vchiq.
+# Description: Get the major number from /proc/devices and use it
+# ti create /dev/vchiq
+### END INIT INFO
+
+rm -f /dev/vchiq
+
+#Get the major number
+major=$(awk "\$2==\"vchiq\" {print \$1}" /proc/devices)
+
+if [ -z "$major" ]; then
+ echo "Error: Cannot find vchiq in /proc/devices"
+ exit 2
+else
+ mknod /dev/vchiq c "$major" 0
+ chmod a+w /dev/vchiq
+fi
diff --git a/recipes-graphics/vc-graphics/vc-graphics-hardfp.bb b/recipes-graphics/vc-graphics/vc-graphics-hardfp.bb
new file mode 100644
index 0000000..0db71fd
--- /dev/null
+++ b/recipes-graphics/vc-graphics/vc-graphics-hardfp.bb
@@ -0,0 +1,6 @@
+CONFLICTS = "vc-graphics"
+
+VCDIR = "hardfp/opt/vc"
+require vc-graphics.inc
+
+PR = "${INCPR}.0"
diff --git a/recipes-graphics/vc-graphics/vc-graphics.bb b/recipes-graphics/vc-graphics/vc-graphics.bb
new file mode 100644
index 0000000..a1bce56
--- /dev/null
+++ b/recipes-graphics/vc-graphics/vc-graphics.bb
@@ -0,0 +1,6 @@
+CONFLICTS = "vc-graphics-hardfp"
+
+VCDIR = "opt/vc"
+require vc-graphics.inc
+
+PR = "${INCPR}.0"
diff --git a/recipes-graphics/vc-graphics/vc-graphics.inc b/recipes-graphics/vc-graphics/vc-graphics.inc
new file mode 100644
index 0000000..a1c8d29
--- /dev/null
+++ b/recipes-graphics/vc-graphics/vc-graphics.inc
@@ -0,0 +1,56 @@
+DESCRIPTION = "Graphics libraries for BCM2835."
+LICENSE = "Proprietary"
+
+LIC_FILES_CHKSUM = "file://LICENCE;md5=86e53f5f5909ee66900418028de11780"
+
+PROVIDES = "virtual/libgles2 virtual/egl"
+COMPATIBLE_MACHINE = "raspberrypi"
+
+include recipes-bsp/common/firmware.inc
+
+SRC_URI += " \
+ file://egl.pc \
+ file://vchiq.sh \
+"
+
+S = "${RPIFW_S}/${VCDIR}"
+
+INCPR = "r1"
+
+inherit pkgconfig update-rc.d
+
+do_install () {
+ install -d ${D}${bindir}
+ cp -R bin/* ${D}${bindir}
+
+ install -d ${D}${sbindir}
+ cp -R sbin/* ${D}${sbindir}
+
+ install -d ${D}${libdir}
+ # note: -H option to deref symlinked .so
+ cp -R -H lib/* ${D}${libdir}
+
+ install -d ${D}${includedir}
+ cp -R include/* ${D}${includedir}
+
+ install -d ${D}${libdir}/pkgconfig
+ install -m 0644 ${WORKDIR}/egl.pc ${D}${libdir}/pkgconfig/
+
+ install -d ${D}/${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/vchiq.sh ${D}${sysconfdir}/init.d/
+}
+
+# These are proprietary binaries generated elsewhere so don't check ldflags
+INSANE_SKIP_${PN} = "ldflags"
+
+INITSCRIPT_NAME = "vchiq.sh"
+INITSCRIPT_PARAMS = "start 03 S ."
+
+FILES_${PN} = "${bindir}/* \
+ ${sbindir}/* \
+ ${libdir}/lib*.so \
+ ${sysconfdir}/init.d \
+ ${libdir}/plugins"
+FILES_${PN}-dev = "${libdir}/pkgconfig \
+ ${includedir}"
+FILES_${PN}-dbg += "${libdir}/plugins/.debug"