generic-adaptation: add mesa support for vmware 04/28504/1
authorPhilippe Coval <philippe.coval@open.eurogiciel.org>
Wed, 8 Oct 2014 10:02:20 +0000 (12:02 +0200)
committerPhilippe Coval <philippe.coval@open.eurogiciel.org>
Wed, 8 Oct 2014 10:24:06 +0000 (12:24 +0200)
Change-Id: I4b8b482c3ca3f075c251f2bf40eada7544512768
Bug-Tizen: TC-1043/part
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
Makefile
src/generic-adaptation/Makefile [new file with mode: 0644]
src/generic-adaptation/generic-adaptation.sh [new file with mode: 0644]

index 4db9456..e990878 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,7 @@ install:
        install -d ${DESTDIR}/usr/share/image-configurations/generic/scripts
        install -m 644 patterns/*.yaml ${DESTDIR}/usr/share/package-groups/generic
        install -D scripts/* ${DESTDIR}/usr/share/image-configurations/generic/scripts
+       make -C src/generic-adaptation $@
 
 test:
        merge-patterns -o output/ -p patterns -s
diff --git a/src/generic-adaptation/Makefile b/src/generic-adaptation/Makefile
new file mode 100644 (file)
index 0000000..69b512b
--- /dev/null
@@ -0,0 +1,3 @@
+install: generic-adaptation.sh
+       install -d ${DESTDIR}/etc/profile.d/
+       install $< ${DESTDIR}/etc/profile.d/
diff --git a/src/generic-adaptation/generic-adaptation.sh b/src/generic-adaptation/generic-adaptation.sh
new file mode 100644 (file)
index 0000000..9a2fabb
--- /dev/null
@@ -0,0 +1,13 @@
+do_gallium=true
+
+/usr/sbin/lspci \
+  | grep 'VGA compatible controller: VMware' >/dev/null 2>&1 \
+  || do_gallium=false
+
+if $do_gallium ; then
+  EGL_PLATFORM=gallium
+  export EGL_PLATFORM
+
+  EGL_DRIVER=egl_gallium
+  export EGL_DRIVER
+fi