OSDN Git Service

Merge remote-tracking branch 'x86/nougat-x86' into oreo-x86
authorChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 15 Jul 2020 17:30:37 +0000 (01:30 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 15 Jul 2020 17:30:37 +0000 (01:30 +0800)
Conflicts:
nativebridge/bin/enable_nativebridge

1  2 
init.sh
nativebridge/bin/enable_nativebridge

diff --combined init.sh
+++ b/init.sh
@@@ -66,10 -66,13 +66,10 @@@ function init_hal_audio(
                VirtualBox*|Bochs*)
                        [ -d /proc/asound/card0 ] || modprobe snd-sb16 isapnp=0 irq=5
                        ;;
 -              *)
 +              TS10*)
 +                      set_prop_if_empty hal.audio.out pcmC0D2p
                        ;;
        esac
 -
 -      if grep -qi "IntelHDMI" /proc/asound/card0/id; then
 -              [ -d /proc/asound/card1 ] || set_property ro.hardware.audio.primary hdmi
 -      fi
  }
  
  function init_hal_bluetooth()
  function init_hal_camera()
  {
        case "$UEVENT" in
+               *81EK*)
+                       set_prop_if_empty hal.camera.0 0,0
+                       ;;
                *e-tabPro*)
                        set_prop_if_empty hal.camera.0 0,270
                        set_prop_if_empty hal.camera.2 1,90
@@@ -179,18 -185,18 +182,18 @@@ function init_uvesafb(
  
  function init_hal_gralloc()
  {
 +      [ "$VULKAN" = "1" ] && GRALLOC=gbm
 +
        case "$(cat /proc/fb | head -1)" in
 -              *virtiodrmfb)
 -                      if [ "$HWACCEL" != "0" ]; then
 -                              set_property ro.hardware.hwcomposer drm
 -                              set_property ro.hardware.gralloc gbm
 -                              set_property debug.drm.mode.force ${video:-1280x800}
 -                      fi
 -                      set_prop_if_empty sleep.state none
 -                      ;;
 -              0*inteldrmfb|0*radeondrmfb|0*nouveaufb|0*svgadrmfb|0*amdgpudrmfb)
 +              *virtio*drmfb|*DRM*emulated)
 +                      HWC=${HWC:-drm}
 +                      GRALLOC=${GRALLOC:-gbm}
 +                      video=${video:-1280x768}
 +                      ;&
 +              0*i915drmfb|0*inteldrmfb|0*radeondrmfb|0*nouveau*|0*svgadrmfb|0*amdgpudrmfb)
                        if [ "$HWACCEL" != "0" ]; then
 -                              set_property ro.hardware.gralloc drm
 +                              set_property ro.hardware.hwcomposer ${HWC:-}
 +                              set_property ro.hardware.gralloc ${GRALLOC:-drm}
                                set_drm_mode
                        fi
                        ;;
@@@ -210,20 -216,6 +213,20 @@@ function init_hal_hwcomposer(
        return
  }
  
 +function init_hal_vulkan()
 +{
 +      case "$(cat /proc/fb | head -1)" in
 +              0*i915drmfb|0*inteldrmfb)
 +                      set_property ro.hardware.vulkan android-x86
 +                      ;;
 +              0*amdgpudrmfb)
 +                      set_property ro.hardware.vulkan radv
 +                      ;;
 +              *)
 +                      ;;
 +      esac
 +}
 +
  function init_hal_lights()
  {
        chown 1000.1000 /sys/class/backlight/*/brightness
@@@ -237,7 -229,7 +240,7 @@@ function init_hal_power(
  
        # TODO
        case "$PRODUCT" in
 -              HP*Omni*|OEMB|Surface*3|T10*TA)
 +              HP*Omni*|OEMB|Standard*PC*|Surface*3|T10*TA|VMware*)
                        set_prop_if_empty sleep.state none
                        ;;
                e-tab*Pro)
@@@ -382,7 -374,7 +385,7 @@@ function init_tscal(
                *ST70416-6*)
                        modprobe gslx680_ts_acpi
                        ;&
-               *T91*|*T101*|*ET2002*|*74499FU*|*945GSE-ITE8712*|*CF-19[CDYFGKLP]*|*TECLAST:rntPAD*)
+               *81EK*|*T91**|*T101*|*ET2002*|*74499FU*|*945GSE-ITE8712*|*CF-19[CDYFGKLP]*|*TECLAST:rntPAD*)
                        create_pointercal
                        return
                        ;;
@@@ -436,7 -428,6 +439,7 @@@ function do_init(
        init_hal_gps
        init_hal_gralloc
        init_hal_hwcomposer
 +      init_hal_vulkan
        init_hal_lights
        init_hal_power
        init_hal_sensors
@@@ -495,9 -486,6 +498,9 @@@ function do_bootcomplete(
                Surface*Go)
                        echo on > /sys/devices/pci0000:00/0000:00:15.1/i2c_designware.1/power/control
                        ;;
 +              VMware*)
 +                      pm disable com.android.bluetooth
 +                      ;;
                X80*Power)
                        set_property power.nonboot-cpu-off 1
                        ;;
@@@ -6,46 -6,37 +6,46 @@@ houdini_bin=
  dest_dir=/system/lib$1/arm$1
  binfmt_misc_dir=/proc/sys/fs/binfmt_misc
  
-       mount -o 'context="u:object_r:system_file:s0"' $1 $2
 +urls[0]=http://t.cn/RBJ7mfG
 +urls[1]=http://t.cn/RBJ7eml
 +urls[2]=http://t.cn/RBJzLwu
 +urls[3]=http://goo.gl/96BPKe
 +urls[4]=http://goo.gl/v6c4Co
 +urls[5]=http://goo.gl/CtKjxx
 +
 +mount_sfs()
 +{
++      mount -o 'ro,context="u:object_r:system_file:s0"' $1 $2
 +}
 +
  if [ -z "$1" ]; then
 -      if [ "`uname -m`" = "x86_64" ]; then
 -              v=7_y
 -              url=http://mrw.so/4HMwO9
 -      else
 -              v=7_x
 -              url=http://mrw.so/4Pige8
 -      fi
 +      v=8_y
 +      u=1
  else
 -      v=7_z
 -      url=http://mrw.so/5jn810
 +      v=8_z
 +      u=2
  fi
  
  if [ -s /system/lib$1/libhoudini.so ]; then
        log -pi -thoudini "found /system/lib$1/libhoudini.so"
  elif [ -e /system/etc/houdini$v.sfs ]; then
 -      mount -o ro /system/etc/houdini$v.sfs $dest_dir
 +      mount_sfs /system/etc/houdini$v.sfs $dest_dir
  else
        if mountpoint -q $dest_dir; then
                kill -9 `fuser -m $dest_dir`
                umount -f $dest_dir
        fi
 -      mkdir -p /data/arm
 -      cd /data/arm
 -      while ! mount -o ro houdini$v.sfs $dest_dir; do
 +      if [ ! -d /data/media/0/arm ]; then
 +              mkdir -p /data/media/0/arm
 +              chown 1023.1023 /data/media/0/arm
 +      fi
 +      cd /data/media/0/arm
 +      [ -s /data/arm/houdini$v.sfs ] && mv /data/arm/houdini$v.sfs .
 +      while ! mount_sfs houdini$v.sfs $dest_dir; do
                while [ "$(getprop net.dns1)" = "" ]; do
                        sleep 10
                done
 -              wget $url -cO houdini$v.sfs && continue
 -              rm -f houdini$v.sfs
 -              sleep 30
 +              [ -s houdini$v.sfs ] && sleep 10 || sleep 30
        done
  fi
  
@@@ -54,7 -45,6 +54,7 @@@
  # this is to add the supported binary formats via binfmt_misc
  
  if [ ! -e $binfmt_misc_dir/register ]; then
 +      modprobe binfmt_misc
        mount -t binfmt_misc none $binfmt_misc_dir
  fi
  
@@@ -82,4 -72,6 +82,4 @@@ els
        log -pi -thoudini "houdini$1 enabled"
  fi
  
 -[ "$(getprop ro.zygote)" = "zygote64_32" -a -z "$1" ] && exec $0 64
 -
  exit 0