OSDN Git Service

Merge remote-tracking branch 'x86/nougat-x86' into cm-14.1-x86
authorChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 20 May 2020 13:43:27 +0000 (21:43 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 20 May 2020 13:43:27 +0000 (21:43 +0800)
BoardConfig.mk
init.sh
init.x86.rc
modules.blacklist

index b21c975..09e5bbf 100644 (file)
@@ -60,6 +60,7 @@ USE_INTEL_OMX_COMPONENTS := true
 
 USE_OPENGL_RENDERER := true
 NUM_FRAMEBUFFER_SURFACE_BUFFERS ?= 3
+BOARD_USES_DRM_GRALLOC := true
 BOARD_USES_DRM_HWCOMPOSER ?= true
 BOARD_EGL_WORKAROUND_BUG_10194508 := true
 
diff --git a/init.sh b/init.sh
index 3e5ae24..ecdce3d 100644 (file)
--- a/init.sh
+++ b/init.sh
@@ -36,7 +36,7 @@ function init_misc()
 
        # enable sdcardfs if /data is not mounted on tmpfs or 9p
        mount | grep /data\ | grep -qE 'tmpfs|9p'
-       [ $? -ne 0 ] && modprobe sdcardfs
+       [ $? -eq 0 ] && set_prop_if_empty ro.sys.sdcardfs false
 
        # remove wl if it's not used
        local wifi
@@ -131,11 +131,15 @@ function init_hal_bluetooth()
 
 function init_hal_camera()
 {
-       case "$PRODUCT" in
-               e-tab*Pro)
+       case "$UEVENT" in
+               *e-tabPro*)
                        set_prop_if_empty hal.camera.0 0,270
                        set_prop_if_empty hal.camera.2 1,90
                        ;;
+               *LenovoideapadD330*)
+                       set_prop_if_empty hal.camera.0 0,90
+                       set_prop_if_empty hal.camera.2 1,90
+                       ;;
                *)
                        ;;
        esac
@@ -241,7 +245,7 @@ function init_hal_sensors()
 
        local hal_sensors=kbd
        local has_sensors=true
-       case "$(cat $DMIPATH/uevent)" in
+       case "$UEVENT" in
                *Lucid-MWE*)
                        set_property ro.ignore_atkbd 1
                        hal_sensors=hdaps
@@ -298,10 +302,18 @@ function init_hal_sensors()
                        modprobe hdaps
                        hal_sensors=hdaps
                        ;;
+               *LenovoideapadD330*)
+                       set_property ro.iio.accel.quirks no-trig
+                       set_property ro.iio.accel.order 102
+                       ;&
                *LINX1010B*)
+                       set_property ro.iio.accel.x.opt_scale -1
                        set_property ro.iio.accel.z.opt_scale -1
+                       ;;
+               *i7-WN*)
+                       set_property ro.iio.accel.quirks no-trig
                        ;&
-               *i7Stylus*|*M80TA*)
+               *i7Stylus*)
                        set_property ro.iio.accel.x.opt_scale -1
                        ;;
                *LenovoMIIX320*|*ONDATablet*)
@@ -315,10 +327,10 @@ function init_hal_sensors()
                *ST70416-6*)
                        set_property ro.iio.accel.order 102
                        ;;
-               *e-tabPro*|*pnEZpad*)
+               *e-tabPro*|*pnEZpad*|*TECLAST:rntPAD*)
                        set_property ro.iio.accel.quirks no-trig
                        ;&
-               *T*0*TA*)
+               *T*0*TA*|*M80TA*)
                        set_property ro.iio.accel.y.opt_scale -1
                        ;;
                *)
@@ -355,11 +367,11 @@ function create_pointercal()
 
 function init_tscal()
 {
-       case "$PRODUCT" in
-               ST70416-6*)
+       case "$UEVENT" in
+               *ST70416-6*)
                        modprobe gslx680_ts_acpi
                        ;&
-               T91|T101|ET2002|74499FU|945GSE-ITE8712|CF-19[CDYFGKLP]*)
+               *T91*|*T101*|*ET2002*|*74499FU*|*945GSE-ITE8712*|*CF-19[CDYFGKLP]*|*TECLAST:rntPAD*)
                        create_pointercal
                        return
                        ;;
@@ -381,7 +393,7 @@ function init_tscal()
 
 function init_ril()
 {
-       case "$(cat $DMIPATH/uevent)" in
+       case "$UEVENT" in
                *TEGA*|*2010:svnIntel:*|*Lucid-MWE*)
                        set_property rild.libpath /system/lib/libhuaweigeneric-ril.so
                        set_property rild.libargs "-d /dev/ttyUSB2 -v /dev/ttyUSB1"
@@ -492,7 +504,7 @@ function do_bootcomplete()
                        alsa_amixer -c $c set Speaker 100%
                        alsa_amixer -c $c set Capture 80%
                        alsa_amixer -c $c set Capture cap
-                       alsa_amixer -c $c set PCM 100 unmute
+                       alsa_amixer -c $c set PCM 100% unmute
                        alsa_amixer -c $c set SPO unmute
                        alsa_amixer -c $c set IEC958 on
                        alsa_amixer -c $c set 'Mic Boost' 1
@@ -508,6 +520,7 @@ PATH=/sbin:/system/bin:/system/xbin
 DMIPATH=/sys/class/dmi/id
 BOARD=$(cat $DMIPATH/board_name)
 PRODUCT=$(cat $DMIPATH/product_name)
+UEVENT=$(cat $DMIPATH/uevent)
 
 # import cmdline variables
 for c in `cat /proc/cmdline`; do
index eca25ae..2815562 100644 (file)
@@ -9,6 +9,8 @@ on early-init
     export EGL_LOG_LEVEL info
 #   export EGL_DRIVERS egl_dri2
 
+    exec u:r:init:s0 -- /sbin/modprobe sdcardfs
+
 on init
 
 on fs
index 832880d..97a2a6e 100644 (file)
@@ -1,5 +1,5 @@
 blacklist evbug
 deferred  amdgpu
-deferred  nouveau
+blacklist nouveau
 deferred  radeon
 deferred  soc_button_array