Skip to content

Commit

Permalink
ysl: Merge YSL Tree
Browse files Browse the repository at this point in the history
* Ported from sakura https://github.com/mahajant99/device_xiaomi_sakura
* Adapt YSL Changes

Signed-off-by: Tushar Mahajan <[email protected]>
  • Loading branch information
mahajant99 committed Jul 6, 2020
1 parent 4735671 commit 7a48fe6
Show file tree
Hide file tree
Showing 34 changed files with 3,960 additions and 70 deletions.
20 changes: 19 additions & 1 deletion Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,18 @@
# limitations under the License.
#

# This contains the module build definitions for the hardware-specific
# components for this device.
#
# As much as possible, those components should be built unconditionally,
# with device-specific names to avoid collisions, to avoid device-specific
# bitrot and build breakages. Building a component unconditionally does
# *not* include it on all devices, so it is safe even with hardware-specific
# components.

LOCAL_PATH := $(call my-dir)

ifneq ($(filter ysl,$(TARGET_DEVICE)),)
ifeq ($(TARGET_DEVICE),ysl)

include $(call all-makefiles-under,$(LOCAL_PATH))

Expand Down Expand Up @@ -52,6 +61,15 @@ $(LOCAL_BUILT_MODULE):
$(hide) ln -sf $(ACTUAL_DAT_FILE) $(WCNSS_DAT_SYMLINK)
$(hide) touch $@

WCNSS_MAC_SYMLINK := $(TARGET_OUT_VENDOR)/firmware/wlan/prima/wlan_mac.bin
$(WCNSS_MAC_SYMLINK): $(LOCAL_INSTALLED_MODULE)
@echo "WCNSS MAC bin link: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf /mnt/vendor/persist/$(notdir $@) $@

ALL_DEFAULT_INSTALLED_MODULES += $(WCNSS_INI_SYMLINK) $(WCNSS_MAC_SYMLINK)

#A/B builds require us to create the mount points at compile time.
#Just creating it for all cases since it does not hurt.
FIRMWARE_MOUNT_POINT := $(TARGET_OUT_VENDOR)/firmware_mnt
Expand Down
22 changes: 22 additions & 0 deletions AndroidProducts.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#
# Copyright (C) 2017-2018 The LineageOS Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/lineage_ysl.mk

COMMON_LUNCH_CHOICES := \
lineage_ysl-user \
lineage_ysl-userdebug \
lineage_ysl-eng
78 changes: 47 additions & 31 deletions BoardConfigCommon.mk → BoardConfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
# limitations under the License.
#

VENDOR_PATH := device/xiaomi/msm8953-common
DEVICE_PATH := device/xiaomi/ysl

# ANT
BOARD_ANT_WIRELESS_DEVICE := "vfs-prerelease"

# Architecture
TARGET_ARCH := arm64
Expand All @@ -37,22 +40,6 @@ BUILD_BROKEN_PHONY_TARGETS := true
TARGET_BOARD_SUFFIX := _64
TARGET_USES_64_BIT_BINDER := true

# Build
BUILD_BROKEN_DUP_RULES := true

# Kernel
BOARD_KERNEL_BASE := 0x80000000
BOARD_KERNEL_CMDLINE := androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 androidboot.bootdevice=7824900.sdhci earlycon=msm_hsl_uart,0x78af000 androidboot.usbconfigfs=true
BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive
BOARD_KERNEL_IMAGE_NAME := Image.gz-dtb
BOARD_KERNEL_PAGESIZE := 2048
BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x01000000 --tags_offset 0x00000100
TARGET_KERNEL_SOURCE := kernel/xiaomi/msm8953
TARGET_KERNEL_VERSION := 4.9

# ANT
BOARD_ANT_WIRELESS_DEVICE := "vfs-prerelease"

# Audio
AUDIO_FEATURE_ENABLED_ANC_HEADSET := true
AUDIO_FEATURE_ENABLED_ALAC_OFFLOAD := true
Expand All @@ -78,14 +65,17 @@ BOARD_USES_ALSA_AUDIO := true
USE_CUSTOM_AUDIO_POLICY := 1
USE_XML_AUDIO_POLICY_CONF := 1

# Bluetooth
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(DEVICE_PATH)/bluetooth
BOARD_HAVE_BLUETOOTH_QCOM := true
BLUETOOTH_HCI_USE_MCT := true

# Bootloader
TARGET_BOOTLOADER_BOARD_NAME := MSM8953
TARGET_NO_BOOTLOADER := true

# Bluetooth
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(VENDOR_PATH)/bluetooth
BOARD_HAVE_BLUETOOTH_QCOM := true
BLUETOOTH_HCI_USE_MCT := true
# Build
BUILD_BROKEN_DUP_RULES := true

# Camera
USE_DEVICE_SPECIFIC_CAMERA := true
Expand Down Expand Up @@ -125,6 +115,10 @@ TARGET_ENABLE_MEDIADRM_64 := true
# Filesystem
TARGET_USERIMAGES_USE_F2FS := true
TARGET_USERIMAGES_USE_EXT4 := true
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
TARGET_COPY_OUT_VENDOR := vendor
TARGET_FS_CONFIG_GEN := $(DEVICE_PATH)/config.fs

#FM
BOARD_HAVE_QCOM_FM := true
Expand All @@ -134,24 +128,38 @@ TARGET_QCOM_NO_FM_FIRMWARE := true
USE_DEVICE_SPECIFIC_GPS := true
TARGET_NO_RPC := true

# Filesystem
TARGET_FS_CONFIG_GEN := $(VENDOR_PATH)/config.fs

# HIDL
DEVICE_MANIFEST_FILE := $(VENDOR_PATH)/manifest.xml
DEVICE_MATRIX_FILE := $(VENDOR_PATH)/compatibility_matrix.xml
DEVICE_MANIFEST_FILE := $(DEVICE_PATH)/manifest.xml
DEVICE_MATRIX_FILE := $(DEVICE_PATH)/compatibility_matrix.xml

# HWUI
HWUI_COMPILE_FOR_PERF := true

# Init
TARGET_INIT_VENDOR_LIB := libinit_msm8953
TARGET_RECOVERY_DEVICE_MODULES := libinit_msm8953
TARGET_INIT_VENDOR_LIB := //$(DEVICE_PATH):libinit_msm8953
TARGET_RECOVERY_DEVICE_MODULES := //$(DEVICE_PATH):libinit_msm8953

# Kernel
BOARD_KERNEL_BASE := 0x80000000
BOARD_KERNEL_CMDLINE := androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 androidboot.bootdevice=7824900.sdhci earlycon=msm_hsl_uart,0x78af000 androidboot.usbconfigfs=true
BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive
BOARD_KERNEL_IMAGE_NAME := Image.gz-dtb
BOARD_KERNEL_PAGESIZE := 2048
BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x01000000 --tags_offset 0x00000100
TARGET_KERNEL_SOURCE := kernel/xiaomi/msm8953
TARGET_KERNEL_CONFIG := ysl_defconfig
TARGET_KERNEL_VERSION := 4.9


# Media
TARGET_USES_MEDIA_EXTENSIONS := true

# Partitions
BOARD_USERDATAIMAGE_PARTITION_SIZE := 25765043200 # 25765059584 - 16384
BOARD_CACHEIMAGE_PARTITION_SIZE := 268435456
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 67108864
BOARD_USERDATAIMAGE_PARTITION_SIZE := 25765043200 # 25765059584 - 16384
BOARD_VENDORIMAGE_PARTITION_SIZE := 1073741824
BOARD_BOOTIMAGE_PARTITION_SIZE := 67108864
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 3221225472
BOARD_PERSISTIMAGE_PARTITION_SIZE := 33554432
Expand All @@ -166,6 +174,7 @@ TARGET_PER_MGR_ENABLED := true

# Power
TARGET_USES_INTERACTION_BOOST := true
TARGET_TAP_TO_WAKE_NODE := "/dev/input/event1"

# Qualcomm
BOARD_USES_QCOM_HARDWARE := true
Expand All @@ -175,15 +184,21 @@ TARGET_QCOM_AUDIO_VARIANT := caf-msm8996
TARGET_QCOM_DISPLAY_VARIANT := caf-msm8996
TARGET_QCOM_MEDIA_VARIANT := caf-msm8996

# Recovery
TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/rootdir/fstab.qcom

# RIL
TARGET_PROVIDES_QTI_TELEPHONY_JAR := true
ENABLE_VENDOR_RIL_SERVICE := true

# Recovery
TARGET_RECOVERY_FSTAB := $(VENDOR_PATH)/rootdir/fstab.qcom
# Security Patch Level
VENDOR_SECURITY_PATCH := 2020-02-05

# SELinux
include device/qcom/sepolicy-legacy-um/sepolicy.mk
BOARD_SEPOLICY_DIRS += $(VENDOR_PATH)/sepolicy

# Sepolicy
BOARD_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy

# We modify several neverallows, so let the build proceed
ifneq ($(TARGET_BUILD_VARIANT),user)
Expand All @@ -206,4 +221,5 @@ WPA_SUPPLICANT_VERSION := VER_0_8_X
TARGET_USES_ALTERNATIVE_MANUAL_NETWORK_SELECT := true

# Inherit from the proprietary version
-include vendor/xiaomi/ysl/BoardConfigVendor.mk
-include vendor/xiaomi/msm8953-common/BoardConfigVendor.mk
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
Copyright (C) 2017 - The LineageOS Project
# Device Tree for Xiaomi Redmi S2 (ysl)

Common device tree for Xiaomi MSM8953 based devices
==============
## Spec Sheet

| Feature | Specification |
| :---------------------- | :-------------------------------- |
| CPU | Octa-core 2.0 GHz Cortex-A53 |
| Chipset | Qualcomm MSM8953 Snapdragon 625 |
| GPU | Adreno 506 |
| Memory | 3/4 GB |
| Shipped Android Version | 8.1.0 |
| Storage | 32/64 GB |
| MicroSD | Up to 256 GB |
| Battery | 3080 mAh (non-removable) |
| Dimensions | 160.7 x 77.3 x 8.1 mm |
| Display | 720 x 1440 pixels (~269 ppi) |
| Rear Camera | 12 MP, f/2.2, 1.25 μm, PDAF |
| | 5 MP, f/2.2, 1.12 μm, depth sensor|
| Front Camera | 5 MP, f/2.0 |
| Announced Date | May 2018 |

## Device Picture

![Xiaomi Redmi S2](https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-s2-5.jpg "Xiaomi Redmi S2")
Loading

0 comments on commit 7a48fe6

Please sign in to comment.