OSDN Git Service

Merge remote-tracking branch 'x86/marshmallow-x86' into nougat-x86
authorChih-Wei Huang <cwhuang@linux.org.tw>
Fri, 13 Jan 2017 20:21:04 +0000 (04:21 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Fri, 13 Jan 2017 20:21:04 +0000 (04:21 +0800)
BoardConfig.mk
device.mk
gpu/gpu_mesa.mk
init.sh
init.x86.rc
nativebridge/src/libnb.cpp
overlay/frameworks/base/core/res/res/values/config.xml
packages.mk
selinux_diffconfig [new file with mode: 0644]
ueventd.x86.rc

index f0789f5..fc5e10d 100644 (file)
@@ -6,6 +6,7 @@ TARGET_BOARD_PLATFORM := android-x86
 
 # Some framework code requires this to enable BT
 BOARD_HAVE_BLUETOOTH := true
+BOARD_HAVE_BLUETOOTH_LINUX := true
 
 BOARD_USE_LEGACY_UI := true
 
@@ -77,7 +78,8 @@ TARGET_HARDWARE_3D := true
 BOARD_EGL_CFG ?= device/generic/common/gpu/egl_mesa.cfg
 endif
 
-BOARD_KERNEL_CMDLINE := root=/dev/ram0
+BOARD_KERNEL_CMDLINE := root=/dev/ram0 androidboot.selinux=permissive
+TARGET_KERNEL_DIFFCONFIG := device/generic/common/selinux_diffconfig
 
 COMPATIBILITY_ENHANCEMENT_PACKAGE := true
 PRC_COMPATIBILITY_PACKAGE := true
index 2c17ac4..25f4100 100644 (file)
--- a/device.mk
+++ b/device.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2014 The Android-x86 Open Source Project
+# Copyright (C) 2014-2016 The Android-x86 Open Source Project
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -46,6 +46,7 @@ PRODUCT_COPY_FILES += \
     device/sample/etc/old-apns-conf.xml:system/etc/old-apns-conf.xml \
     frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:system/etc/media_codecs_google_audio.xml \
     frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:system/etc/media_codecs_google_video.xml \
+    frameworks/base/compiled-classes-phone:system/etc/compiled-classes \
     frameworks/native/data/etc/tablet_core_hardware.xml:system/etc/permissions/tablet_core_hardware.xml \
     frameworks/native/data/etc/android.hardware.audio.low_latency.xml:system/etc/permissions/android.hardware.audio.low_latency.xml \
     frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml \
index 16e17d5..b04ec64 100644 (file)
@@ -9,7 +9,6 @@
 #
 
 PRODUCT_PACKAGES := \
-    hwcomposer.drm  \
     gralloc.drm     \
     libGLES_mesa    \
     libtxc_dxtn     \
diff --git a/init.sh b/init.sh
index 2c0999f..07c73bc 100644 (file)
--- a/init.sh
+++ b/init.sh
@@ -51,6 +51,7 @@ function init_hal_bluetooth()
        case "$PRODUCT" in
                T10*TA|HP*Omni*)
                        BTUART_PORT=/dev/ttyS1
+                       set_property hal.bluetooth.uart.proto bcm
                        ;;
                MacBookPro8*)
                        rmmod b43
@@ -68,18 +69,16 @@ function init_hal_bluetooth()
                        modprobe btusb
                        ;;
                *)
-                       for bt in $(lsusb -v | awk ' /Class:.E0/ { print $9 } '); do
+                       for bt in $(busybox lsusb -v | awk ' /Class:.E0/ { print $9 } '); do
                                chown 1002.1002 $bt && chmod 660 $bt
                        done
-                       modprobe btusb
                        ;;
        esac
 
        if [ -n "$BTUART_PORT" ]; then
                set_property hal.bluetooth.uart $BTUART_PORT
                chown bluetooth.bluetooth $BTUART_PORT
-               start btattach:-B$BTUART_PORT
-               log -t hciconfig -p i "`hciconfig`"
+               start btattach
        fi
 }
 
@@ -405,16 +404,8 @@ function do_bootcomplete()
                        alsa_amixer -c $c set 'Internal Mic Boost' 3
                fi
        done
-}
 
-function do_hci()
-{
-       local hci=`hciconfig | grep ^hci | cut -d: -f1`
-       local btd="`getprop init.svc.bluetoothd`"
-       log -t bluetoothd -p i "$btd ($hci)"
-       if [ -n "`getprop hal.bluetooth.uart`" ]; then
-               [ "`getprop init.svc.bluetoothd`" = "running" ] && hciconfig $hci up
-       fi
+       post_bootcomplete
 }
 
 PATH=/sbin:/system/bin:/system/xbin
@@ -457,9 +448,6 @@ case "$1" in
        bootcomplete)
                do_bootcomplete
                ;;
-       hci)
-               do_hci
-               ;;
        init|"")
                do_init
                ;;
index b79a42a..46ede7d 100644 (file)
@@ -1,4 +1,3 @@
-import /init.bluetooth.rc
 import /init.superuser.rc
 
 on early-init
@@ -101,7 +100,7 @@ service powerbtnd /system/bin/powerbtnd
 service logcat /system/bin/logcat -v threadtime -f /data/log.txt
     class debug
 
-service btattach /system/bin/btattach -Pbcm
+service btattach /system/bin/btattach
     class main
     disabled
     oneshot
@@ -127,12 +126,6 @@ on property:sys.boot_completed=1
     write /proc/sys/kernel/ctrl-alt-del 0
     exec -- /system/bin/logwrapper /system/bin/sh /system/etc/init.sh bootcomplete
 
-on property:init.svc.bluetoothd=running
-    exec -- /system/bin/logwrapper /system/bin/sh /system/etc/init.sh hci
-
-on property:init.svc.bluetoothd=stopped
-    exec -- /system/bin/logwrapper /system/bin/sh /system/etc/init.sh hci
-
 on property:net.dns1=*
     exec -- /system/bin/logwrapper /system/bin/sh /system/etc/init.sh netconsole
 
index 8172c92..aa963cf 100644 (file)
@@ -115,14 +115,14 @@ static void __attribute__ ((destructor)) on_dlclose()
 extern "C" {
 
 NativeBridgeCallbacks NativeBridgeItf = {
-    version: 2,
-    initialize: &native_bridge2_initialize,
-    loadLibrary: &native_bridge2_loadLibrary,
-    getTrampoline: &native_bridge2_getTrampoline,
-    isSupported: &native_bridge2_isSupported,
-    getAppEnv: &native_bridge2_getAppEnv,
-    isCompatibleWith: &native_bridge2_is_compatible_compatible_with,
-    getSignalHandler: &native_bridge2_get_signal_handler,
+    .version = 2,
+    .initialize = &native_bridge2_initialize,
+    .loadLibrary = &native_bridge2_loadLibrary,
+    .getTrampoline = &native_bridge2_getTrampoline,
+    .isSupported = &native_bridge2_isSupported,
+    .getAppEnv = &native_bridge2_getAppEnv,
+    .isCompatibleWith = &native_bridge2_is_compatible_compatible_with,
+    .getSignalHandler = &native_bridge2_get_signal_handler,
 };
 
 } // extern "C"
index 0762c94..3789704 100644 (file)
         <item>"9,1"</item>
     </string-array>
 
-    <!-- Set of NetworkInfo.getType() that reflect data usage. -->
-    <integer-array translatable="false" name="config_data_usage_network_types">
-        <item>0</item> <!-- TYPE_MOBILE -->
-        <item>2</item> <!-- TYPE_MOBILE_MMS -->
-        <item>3</item> <!-- TYPE_MOBILE_SUPL -->
-        <item>4</item> <!-- TYPE_MOBILE_DUN -->
-        <item>5</item> <!-- TYPE_MOBILE_HIPRI -->
-        <item>9</item> <!-- TYPE_ETHERNET -->
-        <item>10</item> <!-- TYPE_MOBILE_FOTA -->
-        <item>11</item> <!-- TYPE_MOBILE_IMS -->
-        <item>12</item> <!-- TYPE_MOBILE_CBS -->
-    </integer-array>
-
     <!-- Sets whether menu shortcuts should be displayed on panel menus when
                   a keyboard is present. -->
     <bool name="config_showMenuShortcutsWhenKeyboardPresent">true</bool>
index 0e1c611..0e9889a 100644 (file)
@@ -80,6 +80,11 @@ PRODUCT_PACKAGES += \
     resize2fs \
     tune2fs \
 
+PRODUCT_PACKAGES += \
+    btattach \
+    hciconfig \
+    hcitool \
+
 # Third party apps
 PRODUCT_PACKAGES += \
     CMFileManager \
diff --git a/selinux_diffconfig b/selinux_diffconfig
new file mode 100644 (file)
index 0000000..807ed71
--- /dev/null
@@ -0,0 +1,7 @@
+CONFIG_SECURITY_PATH=y
+CONFIG_SECURITY_SELINUX_BOOTPARAM=y
+CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
+CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
+CONFIG_DEFAULT_SECURITY_SELINUX=y
+# CONFIG_DEFAULT_SECURITY_DAC is not set
+CONFIG_DEFAULT_SECURITY="selinux"
index ba82d75..c88a243 100644 (file)
@@ -1,11 +1,11 @@
-/dev/rfkill               0660   bluetooth  bluetooth
-/dev/ttyS*                0660   system     radio
-/dev/ttyACM*              0660   system     radio
-/dev/ttyUSB*              0660   radio      radio
-/dev/video*               0660   media      system
-/dev/iio:device*          0660   system     system
+/dev/ttyS*                0660  system        radio
+/dev/ttyACM*              0660  system        radio
+/dev/ttyUSB*              0660  radio         radio
+/dev/video*               0660  cameraserver  system
+/dev/iio:device*          0660  system        system
 
 # for bluetooth nodes
-/dev/uhid                 0660   bluetooth bluetooth
+/dev/rfkill               0660  bluetooth     bluetooth
+/dev/uhid                 0660  bluetooth     bluetooth
 
-/sys/devices/system/cpu/cpu*     online     0664   system     system
+/sys/devices/system/cpu/cpu*    online        0664   system     system