sdm660-common: Transform into common sdm660 tree

This commit is contained in:
Max Weffers 2019-08-06 20:05:02 +02:00
parent 761cdce5c7
commit cb1b743b8d
No known key found for this signature in database
GPG key ID: 795F73D22FB93FAE
20 changed files with 86 additions and 71 deletions

View file

@ -16,7 +16,7 @@
LOCAL_PATH := $(call my-dir) LOCAL_PATH := $(call my-dir)
ifneq ($(filter jasmine_sprout wayne,$(TARGET_DEVICE)),) ifneq ($(filter jasmine_sprout wayne clover,$(TARGET_DEVICE)),)
$(shell mkdir -p $(TARGET_OUT_VENDOR)/firmware; \ $(shell mkdir -p $(TARGET_OUT_VENDOR)/firmware; \
ln -sf /dev/block/bootdevice/by-name/msadp \ ln -sf /dev/block/bootdevice/by-name/msadp \

View file

@ -22,7 +22,7 @@
# definition file). # definition file).
# #
COMMON_PATH := device/xiaomi/wayne-common COMMON_PATH := device/xiaomi/sdm660-common
BOARD_VENDOR := xiaomi BOARD_VENDOR := xiaomi
@ -197,9 +197,9 @@ DEVICE_MANIFEST_FILE := $(COMMON_PATH)/manifest.xml
DEVICE_MATRIX_FILE := $(COMMON_PATH)/compatibility_matrix.xml DEVICE_MATRIX_FILE := $(COMMON_PATH)/compatibility_matrix.xml
# Init # Init
TARGET_INIT_VENDOR_LIB := libinit_wayne TARGET_INIT_VENDOR_LIB := libinit_sdm660
TARGET_PLATFORM_DEVICE_BASE := /devices/soc/ TARGET_PLATFORM_DEVICE_BASE := /devices/soc/
TARGET_RECOVERY_DEVICE_MODULES := libinit_wayne TARGET_RECOVERY_DEVICE_MODULES := libinit_sdm660
# Keystore # Keystore
TARGET_PROVIDES_KEYMASTER := true TARGET_PROVIDES_KEYMASTER := true
@ -282,4 +282,4 @@ WIFI_HIDL_FEATURE_DUAL_INTERFACE := true
WPA_SUPPLICANT_VERSION := VER_0_8_X WPA_SUPPLICANT_VERSION := VER_0_8_X
# Inherit the proprietary files # Inherit the proprietary files
-include vendor/xiaomi/wayne-common/BoardConfigVendor.mk -include vendor/xiaomi/sdm660-common/BoardConfigVendor.mk

View file

@ -1,4 +1,19 @@
This repository contains common device configuration for Xiaomi wayne-based devices This repository contains device configuration for Xiaomi SDM660 devices
Basic | Spec Sheet
-------:|:----------
CPU | Quad-core 1.84 GHz Qualcomm Kryo 260 LP
CPU | Quad-core 2.20 GHz Qualcomm Kryo 260 HP
Chipset | Qualcomm Snapdragon 660, SDM660
GPU | Adreno 512
ROM | 32/64/128GB
RAM | 3/4/6GB
Android | 8.1.0
Note:
Depends on: android_packages_resources_devicesettings from LineageOS
Currently Supported Devices: wayne (MI 6X), jasmine_sprout (MI A2) and clover (MI PAD 4 /4 Plus)
## Copyright ## Copyright

View file

@ -14,10 +14,10 @@
// limitations under the License. // limitations under the License.
cc_binary { cc_binary {
name: "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_wayne", name: "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm660",
relative_install_path: "hw", relative_install_path: "hw",
defaults: ["hidl_defaults"], defaults: ["hidl_defaults"],
init_rc: ["android.hardware.biometrics.fingerprint@2.1-service.xiaomi_wayne.rc"], init_rc: ["android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm660.rc"],
srcs: ["service.cpp", "BiometricsFingerprint.cpp"], srcs: ["service.cpp", "BiometricsFingerprint.cpp"],
shared_libs: [ shared_libs: [
"libbase", "libbase",

View file

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
#define LOG_TAG "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_wayne" #define LOG_TAG "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm660"
#include <cutils/properties.h> #include <cutils/properties.h>

View file

@ -11,7 +11,7 @@ on boot
chown system system /sys/devices/soc/soc:fpc1020/wakeup_enable chown system system /sys/devices/soc/soc:fpc1020/wakeup_enable
chmod 0660 /sys/devices/soc/soc:fpc1020/wakeup_enable chmod 0660 /sys/devices/soc/soc:fpc1020/wakeup_enable
service vendor.fps_hal /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_wayne service vendor.fps_hal /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm660
class late_start class late_start
user system user system
group system input group system input

View file

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
#define LOG_TAG "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_wayne" #define LOG_TAG "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm660"
#include <android/log.h> #include <android/log.h>
#include <hidl/HidlTransportSupport.h> #include <hidl/HidlTransportSupport.h>

View file

@ -17,7 +17,7 @@
set -e set -e
DEVICE_COMMON=wayne-common DEVICE_COMMON=sdm660-common
VENDOR=xiaomi VENDOR=xiaomi
# Load extract_utils and do some sanity checks # Load extract_utils and do some sanity checks

View file

@ -21,17 +21,17 @@ include $(CLEAR_VARS)
LOCAL_C_INCLUDES := \ LOCAL_C_INCLUDES := \
system/core/base/include \ system/core/base/include \
system/core/init system/core/init
LOCAL_MODULE := libinit_wayne LOCAL_MODULE := libinit_sdm660
LOCAL_MODULE_TAGS := optional LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := init_wayne.cpp LOCAL_SRC_FILES := init_sdm660.cpp
LOCAL_STATIC_LIBRARIES := \ LOCAL_STATIC_LIBRARIES := \
libbase \ libbase \
libselinux libselinux
LOCAL_CFLAGS := -Wall LOCAL_CFLAGS := -Wall
ifneq ($(TARGET_LIBINIT_WAYNE_DEFINES_FILE),) ifneq ($(TARGET_LIBINIT_SDM660_DEFINES_FILE),)
LOCAL_CFLAGS += -DTARGET_HAVE_LIBINIT LOCAL_CFLAGS += -DTARGET_HAVE_LIBINIT
LOCAL_SRC_FILES += ../../../../$(TARGET_LIBINIT_WAYNE_DEFINES_FILE) LOCAL_SRC_FILES += ../../../../$(TARGET_LIBINIT_SDM660_DEFINES_FILE)
endif endif
include $(BUILD_STATIC_LIBRARY) include $(BUILD_STATIC_LIBRARY)

View file

@ -40,7 +40,7 @@
#include "vendor_init.h" #include "vendor_init.h"
#include "property_service.h" #include "property_service.h"
#include "init_wayne.h" #include "init_sdm660.h"
using android::base::GetProperty; using android::base::GetProperty;
using android::init::property_set; using android::init::property_set;

View file

@ -28,8 +28,8 @@
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef __INIT_WAYNE__H__ #ifndef __INIT_SDM660__H__
#define __INIT_WAYNE__H__ #define __INIT_SDM660__H__
#ifdef TARGET_HAVE_LIBINIT #ifdef TARGET_HAVE_LIBINIT
void init_target_properties(); void init_target_properties();
#endif #endif

View file

@ -15,8 +15,8 @@
cc_binary { cc_binary {
defaults: ["hidl_defaults"], defaults: ["hidl_defaults"],
name: "android.hardware.light@2.0-service.xiaomi_wayne", name: "android.hardware.light@2.0-service.xiaomi_sdm660",
init_rc: ["android.hardware.light@2.0-service.xiaomi_wayne.rc"], init_rc: ["android.hardware.light@2.0-service.xiaomi_sdm660.rc"],
srcs: ["service.cpp", "Light.cpp"], srcs: ["service.cpp", "Light.cpp"],
shared_libs: [ shared_libs: [
"libhardware", "libhardware",

View file

@ -16,7 +16,7 @@
//Author := dev_harsh1998, Isaac Chen //Author := dev_harsh1998, Isaac Chen
#define LOG_TAG "android.hardware.light@2.0-service.xiaomi_wayne" #define LOG_TAG "android.hardware.light@2.0-service.xiaomi_sdm660"
#include <log/log.h> #include <log/log.h>
#include <fstream> #include <fstream>

View file

@ -14,7 +14,7 @@ on boot
chmod 660 /sys/class/leds/red/ramp_step_ms chmod 660 /sys/class/leds/red/ramp_step_ms
chmod 660 /sys/class/leds/red/start_idx chmod 660 /sys/class/leds/red/start_idx
service vendor.light-hal-2-0 /vendor/bin/hw/android.hardware.light@2.0-service.xiaomi_wayne service vendor.light-hal-2-0 /vendor/bin/hw/android.hardware.light@2.0-service.xiaomi_sdm660
class hal class hal
user system user system
group system group system

View file

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
#define LOG_TAG "android.hardware.light@2.0-service.xiaomi_wayne" #define LOG_TAG "android.hardware.light@2.0-service.xiaomi_sdm660"
#include <hidl/HidlTransportSupport.h> #include <hidl/HidlTransportSupport.h>

View file

@ -22,9 +22,9 @@
# #
# Inherit proprietary files # Inherit proprietary files
$(call inherit-product, vendor/xiaomi/wayne-common/wayne-common-vendor.mk) $(call inherit-product, vendor/xiaomi/sdm660-common/sdm660-common-vendor.mk)
COMMON_PATH := device/xiaomi/wayne-common COMMON_PATH := device/xiaomi/sdm660-common
# Inherit properties # Inherit properties
$(call inherit-product, $(COMMON_PATH)/properties.mk) $(call inherit-product, $(COMMON_PATH)/properties.mk)
@ -136,7 +136,7 @@ PRODUCT_COPY_FILES += \
# Biometrics # Biometrics
PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \
android.hardware.biometrics.fingerprint@2.1-service.xiaomi_wayne android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm660
PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \
IFAAService \ IFAAService \
@ -282,7 +282,7 @@ PRODUCT_COPY_FILES += \
# Lights # Lights
PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \
android.hardware.light@2.0-service.xiaomi_wayne android.hardware.light@2.0-service.xiaomi_sdm660
# LiveDisplay native # LiveDisplay native
PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \

View file

@ -1,5 +1,5 @@
# Biometric # Biometric
/(vendor|system/vendor)/bin/hw/android\.hardware\.biometrics\.fingerprint@2\.1-service\.xiaomi_wayne u:object_r:hal_fingerprint_wayne_exec:s0 /(vendor|system/vendor)/bin/hw/android\.hardware\.biometrics\.fingerprint@2\.1-service\.xiaomi_sdm660 u:object_r:hal_fingerprint_sdm660_exec:s0
# Fpc Fingerprint # Fpc Fingerprint
/sys/devices/soc/soc:fpc1020(/.*)? u:object_r:fingerprint_sysfs:s0 /sys/devices/soc/soc:fpc1020(/.*)? u:object_r:fingerprint_sysfs:s0
@ -27,7 +27,7 @@
/vendor/usr/keylayout(/.*)? u:object_r:vendor_keylayout_file:s0 /vendor/usr/keylayout(/.*)? u:object_r:vendor_keylayout_file:s0
# Light HAL # Light HAL
/(vendor|system/vendor)/bin/hw/android\.hardware\.light@2\.0-service\.xiaomi_wayne u:object_r:hal_light_default_exec:s0 /(vendor|system/vendor)/bin/hw/android\.hardware\.light@2\.0-service\.xiaomi_sdm660 u:object_r:hal_light_default_exec:s0
# Mlipay # Mlipay
/(vendor|system/vendor)/bin/mlipayd@1.1 u:object_r:hal_mlipay_default_exec:s0 /(vendor|system/vendor)/bin/mlipayd@1.1 u:object_r:hal_mlipay_default_exec:s0

View file

@ -0,0 +1,39 @@
type hal_fingerprint_sdm660, domain, binder_in_vendor_violators;
hal_server_domain(hal_fingerprint_sdm660, hal_fingerprint)
type hal_fingerprint_sdm660_exec, exec_type, vendor_file_type, file_type;
typeattribute hal_fingerprint_sdm660 data_between_core_and_vendor_violators;
binder_use(hal_fingerprint_sdm660)
init_daemon_domain(hal_fingerprint_sdm660)
allow hal_fingerprint_sdm660 fingerprint_device:chr_file { read write open ioctl };
allow hal_fingerprint_sdm660 { tee_device uhid_device }:chr_file { read write open ioctl };
allow hal_fingerprint_sdm660 fingerprint_data_file:file rw_file_perms;
allow hal_fingerprint_sdm660 fingerprintd_data_file:dir rw_dir_perms;
allow hal_fingerprint_sdm660 fingerprintd_data_file:file create_file_perms;
allow hal_fingerprint_sdm660 { fuse mnt_user_file storage_file }:dir search;
allow hal_fingerprint_sdm660 { mnt_user_file storage_file }:lnk_file read;
allow hal_fingerprint_sdm660 fingerprint_sysfs:dir r_dir_perms;
allow hal_fingerprint_sdm660 fingerprint_sysfs:file rw_file_perms;
allow hal_fingerprint_sdm660 hal_fingerprint_sdm660:netlink_socket { create bind write read };
binder_call(hal_fingerprint_sdm660, vndservicemanager)
binder_call(hal_fingerprint_sdm660, hal_perf_default)
binder_use(hal_fingerprint_sdm660)
r_dir_file(hal_fingerprint_sdm660, firmware_file)
add_service(hal_fingerprint_sdm660, goodixvnd_service)
add_hwservice(hal_fingerprint_sdm660, goodixhw_service)
allow hal_fingerprint_sdm660 vndbinder_device:chr_file ioctl;
get_prop(hal_fingerprint_sdm660, hal_fingerprint_prop)
set_prop(hal_fingerprint_sdm660, hal_fingerprint_prop)
vndbinder_use(hal_fingerprint_sdm660)
dontaudit hal_fingerprint_sdm660 { media_rw_data_file sdcardfs}:dir search;
dontaudit hal_fingerprint_sdm660 media_rw_data_file:dir { read open };

View file

@ -1,39 +0,0 @@
type hal_fingerprint_wayne, domain, binder_in_vendor_violators;
hal_server_domain(hal_fingerprint_wayne, hal_fingerprint)
type hal_fingerprint_wayne_exec, exec_type, vendor_file_type, file_type;
typeattribute hal_fingerprint_wayne data_between_core_and_vendor_violators;
binder_use(hal_fingerprint_wayne)
init_daemon_domain(hal_fingerprint_wayne)
allow hal_fingerprint_wayne fingerprint_device:chr_file { read write open ioctl };
allow hal_fingerprint_wayne { tee_device uhid_device }:chr_file { read write open ioctl };
allow hal_fingerprint_wayne fingerprint_data_file:file rw_file_perms;
allow hal_fingerprint_wayne fingerprintd_data_file:dir rw_dir_perms;
allow hal_fingerprint_wayne fingerprintd_data_file:file create_file_perms;
allow hal_fingerprint_wayne { fuse mnt_user_file storage_file }:dir search;
allow hal_fingerprint_wayne { mnt_user_file storage_file }:lnk_file read;
allow hal_fingerprint_wayne fingerprint_sysfs:dir r_dir_perms;
allow hal_fingerprint_wayne fingerprint_sysfs:file rw_file_perms;
allow hal_fingerprint_wayne hal_fingerprint_wayne:netlink_socket { create bind write read };
binder_call(hal_fingerprint_wayne, vndservicemanager)
binder_call(hal_fingerprint_wayne, hal_perf_default)
binder_use(hal_fingerprint_wayne)
r_dir_file(hal_fingerprint_wayne, firmware_file)
add_service(hal_fingerprint_wayne, goodixvnd_service)
add_hwservice(hal_fingerprint_wayne, goodixhw_service)
allow hal_fingerprint_wayne vndbinder_device:chr_file ioctl;
get_prop(hal_fingerprint_wayne, hal_fingerprint_prop)
set_prop(hal_fingerprint_wayne, hal_fingerprint_prop)
vndbinder_use(hal_fingerprint_wayne)
dontaudit hal_fingerprint_wayne { media_rw_data_file sdcardfs}:dir search;
dontaudit hal_fingerprint_wayne media_rw_data_file:dir { read open };

View file

@ -17,7 +17,7 @@
set -e set -e
DEVICE_COMMON=wayne-common DEVICE_COMMON=sdm660-common
VENDOR=xiaomi VENDOR=xiaomi
INITIAL_COPYRIGHT_YEAR=2018 INITIAL_COPYRIGHT_YEAR=2018
@ -39,7 +39,7 @@ fi
setup_vendor "$DEVICE_COMMON" "$VENDOR" "$LINEAGE_ROOT" true setup_vendor "$DEVICE_COMMON" "$VENDOR" "$LINEAGE_ROOT" true
# Copyright headers and guards # Copyright headers and guards
write_headers "jasmine_sprout wayne" write_headers "jasmine_sprout wayne clover"
write_makefiles "$MY_DIR"/proprietary-files.txt true write_makefiles "$MY_DIR"/proprietary-files.txt true