OSDN Git Service

Support virgl GPU
[android-x86/device-generic-common.git] / init.sh
diff --git a/init.sh b/init.sh
index 0eb9b72..7fa0f72 100644 (file)
--- a/init.sh
+++ b/init.sh
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2013 The Android-x86 Open Source Project
+# Copyright (C) 2013-2015 The Android-x86 Open Source Project
 #
 # License: GNU Public License v2 or later
 #
@@ -12,6 +12,10 @@ function set_property()
 
 function init_misc()
 {
+       # device information
+       setprop ro.product.manufacturer "$(cat $DMIPATH/sys_vendor)"
+       setprop ro.product.model "$PRODUCT"
+
        # a hack for USB modem
        lsusb | grep 1a8d:1000 && eject
 
@@ -113,9 +117,13 @@ function init_uvesafb()
 function init_hal_gralloc()
 {
        case "$(cat /proc/fb | head -1)" in
+               *virtiodrmfb)
+                       set_property ro.hardware.hwcomposer drm
+                       ;&
                0*inteldrmfb|0*radeondrmfb|0*nouveaufb|0*svgadrmfb)
                        set_property ro.hardware.gralloc drm
                        set_drm_mode
+                       [ -n "$DEBUG" ] && set_property debug.egl.trace error
                        ;;
                "")
                        init_uvesafb
@@ -238,6 +246,9 @@ function create_pointercal()
 function init_tscal()
 {
        case "$PRODUCT" in
+               ST70416-6*)
+                       modprobe gslx680_ts_acpi
+                       ;&
                T91|T101|ET2002|74499FU|945GSE-ITE8712|CF-19[CDYFGKLP]*)
                        create_pointercal
                        return
@@ -266,8 +277,6 @@ function init_ril()
                        set_property rild.libargs "-d /dev/ttyUSB2 -v /dev/ttyUSB1"
                        ;;
                *)
-                       set_property rild.libpath /system/lib/libreference-ril.so
-                       set_property rild.libargs "-d /dev/ttyUSB2"
                        ;;
        esac
 }
@@ -368,6 +377,7 @@ function do_bootcomplete()
                        alsa_amixer -c $c set Capture 100%
                        alsa_amixer -c $c set Capture cap
                        alsa_amixer -c $c set PCM 100 unmute
+                       alsa_amixer -c $c set SPO unmute
                        alsa_amixer -c $c set 'Mic Boost' 3
                        alsa_amixer -c $c set 'Internal Mic Boost' 3
                fi
@@ -397,6 +407,14 @@ for c in `cat /proc/cmdline`; do
                        ;;
                *=*)
                        eval $c
+                       case $c in
+                               HWACCEL=*)
+                                       set_property debug.egl.hw $HWACCEL
+                                       ;;
+                               DEBUG=*)
+                                       set_property debug.logcat 1
+                                       ;;
+                       esac
                        ;;
        esac
 done