From cc199637a7f82f3b0fab9db563071b7c0790b62a Mon Sep 17 00:00:00 2001 From: Andrei Gherzan Date: Mon, 27 Aug 2012 16:44:57 +0300 Subject: vc-graphics.inc: New provides, compatible machine and init for vchiq 1. Add COMPATIBLE_MACHINE=raspberrypi. 2. This package provides libgl libgles2 and libegl. Add these to PROVIDES. 3. Add an init script to create vchiq device node while booting. This device is needed by vc_tvservice_*. Package this init script in ${PN}. Signed-off-by: Andrei Gherzan --- recipes-bcm/vc-graphics/files/vchiq.sh | 24 ++++++++++++++++++++++++ recipes-bcm/vc-graphics/vc-graphics.inc | 17 +++++++++++++---- 2 files changed, 37 insertions(+), 4 deletions(-) create mode 100755 recipes-bcm/vc-graphics/files/vchiq.sh diff --git a/recipes-bcm/vc-graphics/files/vchiq.sh b/recipes-bcm/vc-graphics/files/vchiq.sh new file mode 100755 index 0000000..c73e3a9 --- /dev/null +++ b/recipes-bcm/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-bcm/vc-graphics/vc-graphics.inc b/recipes-bcm/vc-graphics/vc-graphics.inc index 44f42a8..112f620 100644 --- a/recipes-bcm/vc-graphics/vc-graphics.inc +++ b/recipes-bcm/vc-graphics/vc-graphics.inc @@ -3,18 +3,20 @@ LICENSE = "Proprietary" LIC_FILES_CHKSUM = "file://LICENCE;md5=86e53f5f5909ee66900418028de11780" -PROVIDES += "virtual/egl" +PROVIDES = "virtual/libgl virtual/libgles2 virtual/egl" +COMPATIBLE_MACHINE = "raspberrypi" include ../common/firmware.inc SRC_URI = "git://github.com/raspberrypi/firmware.git;protocol=git;branch=master\ - file://egl.pc" + file://egl.pc \ + file://vchiq.sh" S = "${WORKDIR}/git/${VCDIR}" INCPR = "r0" -inherit pkgconfig +inherit pkgconfig update-rc.d do_install () { install -d ${D}${bindir} @@ -31,13 +33,20 @@ do_install () { 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" + ${libdir}/lib*.so \ + ${sysconfdir}/init.d" FILES_${PN}-dev = "${libdir}/pkgconfig \ ${includedir}" -- cgit v1.2.3-54-g00ecf