summaryrefslogtreecommitdiffstats
path: root/meta-rcar-gen2/recipes-graphics/gles-module
diff options
context:
space:
mode:
Diffstat (limited to 'meta-rcar-gen2/recipes-graphics/gles-module')
-rw-r--r--meta-rcar-gen2/recipes-graphics/gles-module/gles-test-module.bb18
-rw-r--r--meta-rcar-gen2/recipes-graphics/gles-module/gles-user-module.bb13
-rw-r--r--meta-rcar-gen2/recipes-graphics/gles-module/gles-user-module/rc.pvr.service6
3 files changed, 24 insertions, 13 deletions
diff --git a/meta-rcar-gen2/recipes-graphics/gles-module/gles-test-module.bb b/meta-rcar-gen2/recipes-graphics/gles-module/gles-test-module.bb
index 7a8fcb9..6686fb7 100644
--- a/meta-rcar-gen2/recipes-graphics/gles-module/gles-test-module.bb
+++ b/meta-rcar-gen2/recipes-graphics/gles-module/gles-test-module.bb
@@ -5,6 +5,8 @@ PN = "gles-test-module"
PR = "r0"
OPENGLES3 ?= "0"
+require include/rcar-gen2-path-common.inc
+
COMPATIBLE_MACHINE = "(r8a7790|r8a7791|r8a7793|r8a7794)"
PACKAGE_ARCH = "${MACHINE_ARCH}"
@@ -22,15 +24,15 @@ do_compile() {
do_install() {
# Copy binary into sysroot
- mkdir -p ${D}/usr/local/bin/
+ mkdir -p ${D}${RENESAS_DATADIR}/bin/
if [ "X${OPENGLES3}" = "X0" ]; then
- cp ${S}/OES2_Texture ${D}/usr/local/bin/
- cp ${S}/FragShaderSample.fsh ${D}/usr/local/bin/
- cp ${S}/VertShaderSample.vsh ${D}/usr/local/bin/
+ cp ${S}/OES2_Texture ${D}${RENESAS_DATADIR}/bin/
+ cp ${S}/FragShaderSample.fsh ${D}${RENESAS_DATADIR}/bin/
+ cp ${S}/VertShaderSample.vsh ${D}${RENESAS_DATADIR}/bin/
else
- cp ${S}/OES3_Texture ${D}/usr/local/bin/
- cp ${S}/OES3_FragShaderSample.fsh ${D}/usr/local/bin/
- cp ${S}/OES3_VertShaderSample.vsh ${D}/usr/local/bin/
+ cp ${S}/OES3_Texture ${D}${RENESAS_DATADIR}/bin/
+ cp ${S}/OES3_FragShaderSample.fsh ${D}${RENESAS_DATADIR}/bin/
+ cp ${S}/OES3_VertShaderSample.vsh ${D}${RENESAS_DATADIR}/bin/
fi
}
@@ -38,7 +40,7 @@ PACKAGES = "\
${PN} \
"
FILES_${PN} = " \
- /usr/local/bin/* \
+ ${RENESAS_DATADIR}/bin/* \
"
RPROVIDES_${PN} += "gles-test-module"
INSANE_SKIP_${PN} += "ldflags"
diff --git a/meta-rcar-gen2/recipes-graphics/gles-module/gles-user-module.bb b/meta-rcar-gen2/recipes-graphics/gles-module/gles-user-module.bb
index 37e8052..c3dd808 100644
--- a/meta-rcar-gen2/recipes-graphics/gles-module/gles-user-module.bb
+++ b/meta-rcar-gen2/recipes-graphics/gles-module/gles-user-module.bb
@@ -1,4 +1,5 @@
require ../../include/gles-control.inc
+require include/rcar-gen2-path-common.inc
DESCRIPTION = "SGX/RGX user module"
LICENSE = "CLOSED"
@@ -60,7 +61,12 @@ do_install() {
# Copy binary into sysroot
cp -r ${S}/etc ${D}
cp -r ${S}/usr ${D}
- mv ${D}/etc/init.d/rc.pvr ${D}/usr/local/bin/
+ mkdir -p ${D}${RENESAS_DATADIR}
+ mv ${D}/usr/local/* ${D}${RENESAS_DATADIR}
+ rm -fr ${D}/usr/local
+ mv ${D}/etc/init.d/rc.pvr ${D}${RENESAS_DATADIR}/bin/
+ sed -i "s,/usr/local,${RENESAS_DATADIR},g" \
+ ${D}${RENESAS_DATADIR}/bin/rc.pvr
# Create a symbolic link for compatibility with various software
ln -s libGLESv2.so ${D}/usr/lib/libGLESv2.so.2
@@ -68,6 +74,7 @@ do_install() {
if [ "${USE_WAYLAND}" = "1" ]; then
# Rename libEGL.so
mv ${D}/usr/lib/libEGL.so ${D}/usr/lib/libEGL-pvr.so
+
# Set the "WindowSystem" parameter for wayland
if [ "${GLES}" = "rgx" ]; then
@@ -81,6 +88,8 @@ do_install() {
# Install systemd unit files
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
install -m 644 -p -D ${WORKDIR}/rc.pvr.service ${D}${systemd_system_unitdir}/rc.pvr.service
+ sed -i "s,@RENESAS_DATADIR@,${RENESAS_DATADIR},g" \
+ ${D}${systemd_system_unitdir}/rc.pvr.service
fi
}
@@ -92,7 +101,7 @@ PACKAGES = "\
FILES_${PN} = " \
${sysconfdir}/* \
${libdir}/* \
- /usr/local/bin/* \
+ ${RENESAS_DATADIR}/bin/* \
"
FILES_${PN}-dev = " \
diff --git a/meta-rcar-gen2/recipes-graphics/gles-module/gles-user-module/rc.pvr.service b/meta-rcar-gen2/recipes-graphics/gles-module/gles-user-module/rc.pvr.service
index 5aec697..a0e0321 100644
--- a/meta-rcar-gen2/recipes-graphics/gles-module/gles-user-module/rc.pvr.service
+++ b/meta-rcar-gen2/recipes-graphics/gles-module/gles-user-module/rc.pvr.service
@@ -1,6 +1,6 @@
[Unit]
-SourcePath=/usr/local/bin/rc.pvr
+SourcePath=@RENESAS_DATADIR@/bin/rc.pvr
Before=weston.service
[Service]
@@ -11,8 +11,8 @@ IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
-ExecStart=/usr/local/bin/rc.pvr start
-ExecStop=/usr/local/bin/rc.pvr stop
+ExecStart=@RENESAS_DATADIR@/bin/rc.pvr start
+ExecStop=@RENESAS_DATADIR@/bin/rc.pvr stop
[Install]
RequiredBy=weston.service