device/generic/common
修訂 | 1ce213591377b93a4a5c3e8d53562420c3c4c9bf (tree) |
---|---|
時間 | 2015-01-10 02:35:30 |
作者 | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
Sync with android-x86-4.4-r2 release
@@ -28,7 +28,10 @@ endif | ||
28 | 28 | TARGET_PRELINK_MODULE := false |
29 | 29 | TARGET_NO_KERNEL ?= false |
30 | 30 | TARGET_NO_RECOVERY ?= true |
31 | -TARGET_EXTRA_KERNEL_MODULES := 8723au tp_smapi | |
31 | +TARGET_EXTRA_KERNEL_MODULES := tp_smapi | |
32 | +ifneq ($(filter efi_img,$(MAKECMDGOALS)),) | |
33 | +TARGET_KERNEL_ARCH ?= x86_64 | |
34 | +endif | |
32 | 35 | |
33 | 36 | BOARD_USES_GENERIC_AUDIO ?= false |
34 | 37 | BOARD_USES_ALSA_AUDIO ?= true |
@@ -74,4 +77,4 @@ TARGET_HARDWARE_3D := true | ||
74 | 77 | BOARD_EGL_CFG ?= device/generic/common/gpu/egl_mesa.cfg |
75 | 78 | endif |
76 | 79 | |
77 | -BOARD_KERNEL_CMDLINE := root=/dev/ram0 androidboot.hardware=$(TARGET_PRODUCT) video=-16 | |
80 | +BOARD_KERNEL_CMDLINE := root=/dev/ram0 androidboot.hardware=$(TARGET_PRODUCT) |
@@ -20,7 +20,6 @@ function init_misc() | ||
20 | 20 | |
21 | 21 | case "$PRODUCT" in |
22 | 22 | T10*TA) |
23 | - echo on > /sys/bus/platform/drivers/sdhci-acpi/INT33BB:00/power/control | |
24 | 23 | ;; |
25 | 24 | *) |
26 | 25 | ;; |
@@ -141,48 +140,45 @@ function init_hal_power() | ||
141 | 140 | |
142 | 141 | function init_hal_sensors() |
143 | 142 | { |
143 | + local hal_sensors=kbd | |
144 | 144 | case "$(cat $DMIPATH/uevent)" in |
145 | - *T*00LA*) | |
146 | - modprobe kfifo-buf | |
147 | - modprobe industrialio-triggered-buffer | |
148 | - modprobe hid-sensor-hub | |
149 | - modprobe hid-sensor-iio-common | |
150 | - modprobe hid-sensor-trigger | |
151 | - modprobe hid-sensor-accel-3d | |
152 | - modprobe hid-sensor-gyro-3d | |
153 | - modprobe hid-sensor-als | |
154 | - modprobe hid-sensor-magn-3d | |
155 | - sleep 1; busybox chown -R 1000.1000 /sys/bus/iio/devices/iio:device?/ | |
156 | - set_property ro.hardware.sensors hsb | |
157 | - ;; | |
158 | 145 | *Lucid-MWE*) |
159 | 146 | set_property ro.ignore_atkbd 1 |
160 | - set_property ro.hardware.sensors hdaps | |
147 | + hal_sensors=hdaps | |
161 | 148 | ;; |
162 | 149 | *ICONIA*W5*) |
163 | - set_property ro.hardware.sensors w500 | |
150 | + hal_sensors=w500 | |
164 | 151 | ;; |
165 | 152 | *S10-3t*) |
166 | - set_property ro.hardware.sensors s103t | |
153 | + hal_sensors=s103t | |
167 | 154 | ;; |
168 | 155 | *Inagua*) |
169 | 156 | #setkeycodes 0x62 29 |
170 | 157 | #setkeycodes 0x74 56 |
171 | 158 | set_property ro.ignore_atkbd 1 |
172 | - set_property ro.hardware.sensors kbd | |
173 | 159 | set_property hal.sensors.kbd.type 2 |
174 | 160 | ;; |
175 | 161 | *TEGA*|*2010:svnIntel:*) |
176 | 162 | set_property ro.ignore_atkbd 1 |
177 | - set_property ro.hardware.sensors kbd | |
178 | 163 | set_property hal.sensors.kbd.type 1 |
179 | 164 | io_switch 0x0 0x1 |
180 | 165 | setkeycodes 0x6d 125 |
181 | 166 | ;; |
167 | + *DLI*) | |
168 | + set_property ro.ignore_atkbd 1 | |
169 | + set_property hal.sensors.kbd.type 1 | |
170 | + setkeycodes 0x64 1 | |
171 | + setkeycodes 0x65 172 | |
172 | + setkeycodes 0x66 120 | |
173 | + setkeycodes 0x67 116 | |
174 | + setkeycodes 0x68 114 | |
175 | + setkeycodes 0x69 115 | |
176 | + setkeycodes 0x6c 114 | |
177 | + setkeycodes 0x6d 115 | |
178 | + ;; | |
182 | 179 | *tx2*) |
183 | 180 | setkeycodes 0xb1 138 |
184 | 181 | setkeycodes 0x8a 152 |
185 | - set_property ro.hardware.sensors kbd | |
186 | 182 | set_property hal.sensors.kbd.type 6 |
187 | 183 | set_property poweroff.doubleclick 0 |
188 | 184 | set_property qemu.hw.mainkeys 1 |
@@ -190,20 +186,33 @@ function init_hal_sensors() | ||
190 | 186 | *MS-N0E1*) |
191 | 187 | set_property ro.ignore_atkbd 1 |
192 | 188 | set_property poweroff.doubleclick 0 |
189 | + setkeycodes 0xa5 125 | |
190 | + setkeycodes 0xa7 1 | |
191 | + setkeycodes 0xe3 142 | |
193 | 192 | ;; |
194 | 193 | *Aspire1*25*) |
195 | 194 | modprobe lis3lv02d_i2c |
196 | - set_property ro.hardware.sensors hdaps | |
195 | + hal_sensors=hdaps | |
197 | 196 | echo -n "enabled" > /sys/class/thermal/thermal_zone0/mode |
198 | 197 | ;; |
199 | 198 | *ThinkPad*Tablet*) |
200 | 199 | modprobe hdaps |
201 | - set_property ro.hardware.sensors hdaps | |
200 | + hal_sensors=hdaps | |
202 | 201 | ;; |
203 | 202 | *) |
204 | - set_property ro.hardware.sensors kbd | |
205 | 203 | ;; |
206 | 204 | esac |
205 | + | |
206 | + # has sensor-hub? | |
207 | + for i in /sys/bus/iio/devices/iio:device?; do | |
208 | + if [ -e $i/in_accel_scale ]; then | |
209 | + busybox chown -R 1000.1000 /sys/bus/iio/devices/iio:device?/ | |
210 | + hal_sensors=hsb | |
211 | + break | |
212 | + fi | |
213 | + done | |
214 | + | |
215 | + set_property ro.hardware.sensors $hal_sensors | |
207 | 216 | } |
208 | 217 | |
209 | 218 | function create_pointercal() |
@@ -297,6 +306,8 @@ function do_bootcomplete() | ||
297 | 306 | # FIXME: autosleep works better on i965? |
298 | 307 | [ "$(getprop debug.mesa.driver)" = "i965" ] && setprop debug.autosleep 1 |
299 | 308 | |
309 | + lsmod | grep -e brcmfmac && setprop wlan.no-unload-driver 1 | |
310 | + | |
300 | 311 | for bt in $(lsusb -v | awk ' /Class:.E0/ { print $9 } '); do |
301 | 312 | chown 1002.1002 $bt && chmod 660 $bt |
302 | 313 | done |