OSDN Git Service

init: move the init.sh execution to the post-fs stage
[android-x86/device-generic-common.git] / init.sh
diff --git a/init.sh b/init.sh
index eacf3bb..c4529d2 100644 (file)
--- a/init.sh
+++ b/init.sh
@@ -6,8 +6,8 @@
 
 function set_property()
 {
-       # this must be run before post-fs stage
-       echo $1=$2 >> /x86.prop
+       setprop "$1" "$2"
+       [ -n "$DEBUG" ] && echo "$1"="$2" >> /dev/x86.prop
 }
 
 function init_misc()
@@ -68,7 +68,7 @@ function init_hal_bluetooth()
 
 function init_hal_camera()
 {
-       [ -c /dev/video0 ] || modprobe vivi
+       return
 }
 
 function init_hal_gps()
@@ -117,7 +117,7 @@ function init_hal_gralloc()
 {
        case "$(cat /proc/fb | head -1)" in
                *virtiodrmfb)
-                       set_property ro.hardware.hwcomposer drm
+#                      set_property ro.hardware.hwcomposer drm
                        ;&
                0*inteldrmfb|0*radeondrmfb|0*nouveaufb|0*svgadrmfb)
                        set_property ro.hardware.gralloc drm
@@ -218,6 +218,9 @@ function init_hal_sensors()
                        modprobe hdaps
                        hal_sensors=hdaps
                        ;;
+               *i7Stylus*)
+                       set_property hal.sensors.iio.accel.matrix 1,0,0,0,-1,0,0,0,-1
+                       ;;
                *)
                        ;;
        esac
@@ -305,7 +308,6 @@ function do_init()
        init_hal_sensors
        init_tscal
        init_ril
-       chmod 640 /x86.prop
        post_init
 }