diff options
author | Andrei Gherzan <andrei@gherzan.ro> | 2015-03-02 00:06:19 +0100 |
---|---|---|
committer | Andrei Gherzan <andrei@gherzan.ro> | 2015-03-12 22:20:51 +0100 |
commit | d1fa1c0b75a8de15ae27a9a2f9eaa496a5fe6de9 (patch) | |
tree | 439b4a56ded9efafa4889d3106cbbb4a8432e271 /recipes-graphics/vc-graphics | |
parent | ddd1f033733a34b68da5e1e8c6a315b18234b86f (diff) | |
download | meta-raspberrypi-d1fa1c0b75a8de15ae27a9a2f9eaa496a5fe6de9.tar.gz |
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.pc | 10 | ||||
-rw-r--r-- | recipes-graphics/vc-graphics/files/vchiq.sh | 24 | ||||
-rw-r--r-- | recipes-graphics/vc-graphics/vc-graphics-hardfp.bb | 6 | ||||
-rw-r--r-- | recipes-graphics/vc-graphics/vc-graphics.bb | 6 | ||||
-rw-r--r-- | recipes-graphics/vc-graphics/vc-graphics.inc | 56 |
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 @@ | |||
1 | prefix=/usr | ||
2 | exec_prefix=${prefix} | ||
3 | libdir=${exec_prefix}/lib | ||
4 | includedir=${prefix}/include | ||
5 | |||
6 | Name: egl | ||
7 | Description: egl for RaspberryPI | ||
8 | Version: 0.0 | ||
9 | Libs: -L${libdir} -lEGL -lGLESv2 | ||
10 | 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 @@ | |||
1 | #!/bin/sh | ||
2 | ### BEGIN INIT INFO | ||
3 | # Provides: vchiq.sh | ||
4 | # Required-Start: $remote_fs rmnologin | ||
5 | # Required-Stop: | ||
6 | # Default-Start: S | ||
7 | # Default-Stop: | ||
8 | # Short-Description: Create /dev/vchiq. | ||
9 | # Description: Get the major number from /proc/devices and use it | ||
10 | # ti create /dev/vchiq | ||
11 | ### END INIT INFO | ||
12 | |||
13 | rm -f /dev/vchiq | ||
14 | |||
15 | #Get the major number | ||
16 | major=$(awk "\$2==\"vchiq\" {print \$1}" /proc/devices) | ||
17 | |||
18 | if [ -z "$major" ]; then | ||
19 | echo "Error: Cannot find vchiq in /proc/devices" | ||
20 | exit 2 | ||
21 | else | ||
22 | mknod /dev/vchiq c "$major" 0 | ||
23 | chmod a+w /dev/vchiq | ||
24 | 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 @@ | |||
1 | CONFLICTS = "vc-graphics" | ||
2 | |||
3 | VCDIR = "hardfp/opt/vc" | ||
4 | require vc-graphics.inc | ||
5 | |||
6 | 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 @@ | |||
1 | CONFLICTS = "vc-graphics-hardfp" | ||
2 | |||
3 | VCDIR = "opt/vc" | ||
4 | require vc-graphics.inc | ||
5 | |||
6 | 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 @@ | |||
1 | DESCRIPTION = "Graphics libraries for BCM2835." | ||
2 | LICENSE = "Proprietary" | ||
3 | |||
4 | LIC_FILES_CHKSUM = "file://LICENCE;md5=86e53f5f5909ee66900418028de11780" | ||
5 | |||
6 | PROVIDES = "virtual/libgles2 virtual/egl" | ||
7 | COMPATIBLE_MACHINE = "raspberrypi" | ||
8 | |||
9 | include recipes-bsp/common/firmware.inc | ||
10 | |||
11 | SRC_URI += " \ | ||
12 | file://egl.pc \ | ||
13 | file://vchiq.sh \ | ||
14 | " | ||
15 | |||
16 | S = "${RPIFW_S}/${VCDIR}" | ||
17 | |||
18 | INCPR = "r1" | ||
19 | |||
20 | inherit pkgconfig update-rc.d | ||
21 | |||
22 | do_install () { | ||
23 | install -d ${D}${bindir} | ||
24 | cp -R bin/* ${D}${bindir} | ||
25 | |||
26 | install -d ${D}${sbindir} | ||
27 | cp -R sbin/* ${D}${sbindir} | ||
28 | |||
29 | install -d ${D}${libdir} | ||
30 | # note: -H option to deref symlinked .so | ||
31 | cp -R -H lib/* ${D}${libdir} | ||
32 | |||
33 | install -d ${D}${includedir} | ||
34 | cp -R include/* ${D}${includedir} | ||
35 | |||
36 | install -d ${D}${libdir}/pkgconfig | ||
37 | install -m 0644 ${WORKDIR}/egl.pc ${D}${libdir}/pkgconfig/ | ||
38 | |||
39 | install -d ${D}/${sysconfdir}/init.d | ||
40 | install -m 0755 ${WORKDIR}/vchiq.sh ${D}${sysconfdir}/init.d/ | ||
41 | } | ||
42 | |||
43 | # These are proprietary binaries generated elsewhere so don't check ldflags | ||
44 | INSANE_SKIP_${PN} = "ldflags" | ||
45 | |||
46 | INITSCRIPT_NAME = "vchiq.sh" | ||
47 | INITSCRIPT_PARAMS = "start 03 S ." | ||
48 | |||
49 | FILES_${PN} = "${bindir}/* \ | ||
50 | ${sbindir}/* \ | ||
51 | ${libdir}/lib*.so \ | ||
52 | ${sysconfdir}/init.d \ | ||
53 | ${libdir}/plugins" | ||
54 | FILES_${PN}-dev = "${libdir}/pkgconfig \ | ||
55 | ${includedir}" | ||
56 | FILES_${PN}-dbg += "${libdir}/plugins/.debug" | ||