sdm845-common: Add initial common device tree files
* Initial approach for using prebuilt vendor images. Change-Id: Ic9e562fae446cb287d7495d6b6bfae816b1b7b47
This commit is contained in:
11
Android.mk
Normal file
11
Android.mk
Normal file
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# Copyright (C) 2018 The LineageOS Project
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
ifneq ($(filter polaris,$(TARGET_DEVICE)),)
|
||||
include $(call all-makefiles-under,$(LOCAL_PATH))
|
||||
endif
|
||||
105
BoardConfigCommon.mk
Normal file
105
BoardConfigCommon.mk
Normal file
@@ -0,0 +1,105 @@
|
||||
#
|
||||
# Copyright (C) 2018 The LineageOS Project
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
BOARD_VENDOR := xiaomi
|
||||
|
||||
COMMON_PATH := device/xiaomi/sdm845-common
|
||||
|
||||
# Architecture
|
||||
TARGET_ARCH := arm64
|
||||
TARGET_ARCH_VARIANT := armv8-a
|
||||
TARGET_CPU_ABI := arm64-v8a
|
||||
TARGET_CPU_ABI2 :=
|
||||
TARGET_CPU_VARIANT := generic
|
||||
|
||||
TARGET_2ND_ARCH := arm
|
||||
TARGET_2ND_ARCH_VARIANT := armv7-a-neon
|
||||
TARGET_2ND_CPU_ABI := armeabi-v7a
|
||||
TARGET_2ND_CPU_ABI2 := armeabi
|
||||
TARGET_2ND_CPU_VARIANT := cortex-a9
|
||||
|
||||
TARGET_USES_64_BIT_BINDER := true
|
||||
|
||||
# Bootloader
|
||||
TARGET_BOOTLOADER_BOARD_NAME := sdm845
|
||||
TARGET_NO_BOOTLOADER := true
|
||||
|
||||
# Kernel
|
||||
BOARD_KERNEL_BASE := 0x00000000
|
||||
BOARD_KERNEL_CMDLINE := console=ttyMSM0,115200n8 earlycon=msm_geni_serial,0xA84000 androidboot.hardware=qcom androidboot.console=ttyMSM0 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 service_locator.enable=1 swiotlb=2048 androidboot.configfs=true androidboot.usbcontroller=a600000.dwc3
|
||||
BOARD_KERNEL_IMAGE_NAME := Image.gz-dtb
|
||||
BOARD_KERNEL_PAGESIZE := 4096
|
||||
BOARD_KERNEL_TAGS_OFFSET := 0x00000100
|
||||
BOARD_RAMDISK_OFFSET := 0x01000000
|
||||
TARGET_KERNEL_ARCH := arm64
|
||||
TARGET_KERNEL_CROSS_COMPILE_PREFIX := aarch64-linux-android-
|
||||
TARGET_KERNEL_SOURCE := kernel/xiaomi/sdm845
|
||||
|
||||
# Platform
|
||||
TARGET_BOARD_PLATFORM := sdm845
|
||||
TARGET_BOARD_PLATFORM_GPU := qcom-adreno630
|
||||
|
||||
# Audio
|
||||
USE_XML_AUDIO_POLICY_CONF := 1
|
||||
|
||||
# Camera
|
||||
TARGET_USES_QTI_CAMERA_DEVICE := true
|
||||
|
||||
# Charger Mode
|
||||
BOARD_CHARGER_ENABLE_SUSPEND := true
|
||||
|
||||
# Dex
|
||||
ifeq ($(HOST_OS),linux)
|
||||
ifneq ($(TARGET_BUILD_VARIANT),eng)
|
||||
WITH_DEXPREOPT ?= true
|
||||
endif
|
||||
endif
|
||||
WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY ?= true
|
||||
|
||||
# Graphics
|
||||
NUM_FRAMEBUFFER_SURFACE_BUFFERS := 2
|
||||
TARGET_USES_HWC2 := true
|
||||
|
||||
# Lights
|
||||
TARGET_PROVIDES_LIBLIGHT := true
|
||||
|
||||
# Partitions
|
||||
BOARD_BOOTIMAGE_PARTITION_SIZE := 67108864
|
||||
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 67108864
|
||||
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 3221225472
|
||||
BOARD_USERDATAIMAGE_PARTITION_SIZE := 57453555712
|
||||
|
||||
BOARD_FLASH_BLOCK_SIZE := 262144 # (BOARD_KERNEL_PAGESIZE * 64)
|
||||
|
||||
TARGET_USERIMAGES_USE_EXT4 := true
|
||||
TARGET_USERIMAGES_USE_F2FS := true
|
||||
TARGET_USERIMAGES_SPARSE_EXT_DISABLED := false
|
||||
TARGET_USES_MKE2FS := true
|
||||
|
||||
TARGET_COPY_OUT_VENDOR := vendor
|
||||
|
||||
# QCOM
|
||||
BOARD_USES_QCOM_HARDWARE := true
|
||||
|
||||
# Recovery
|
||||
TARGET_RECOVERY_FSTAB := $(COMMON_PATH)/rootdir/etc/fstab.qcom
|
||||
TARGET_RECOVERY_PIXEL_FORMAT := "BGRA_8888"
|
||||
|
||||
# RenderScript
|
||||
OVERRIDE_RS_DRIVER := libRSDriver_adreno.so
|
||||
|
||||
# RIL
|
||||
TARGET_RIL_VARIANT := caf
|
||||
|
||||
# Sepolicy
|
||||
BOARD_PLAT_PRIVATE_SEPOLICY_DIR += $(COMMON_PATH)/sepolicy/private
|
||||
|
||||
# Treble
|
||||
PRODUCT_COMPATIBILITY_MATRIX_LEVEL_OVERRIDE := 27
|
||||
PRODUCT_FULL_TREBLE_OVERRIDE := true
|
||||
|
||||
# Inherit from the proprietary version
|
||||
-include vendor/xiaomi/sdm845-common/BoardConfigVendor.mk
|
||||
4
README.md
Normal file
4
README.md
Normal file
@@ -0,0 +1,4 @@
|
||||
Copyright (C) 2018 - The LineageOS Project
|
||||
|
||||
Common device tree for Xiaomi SDM845 based devices
|
||||
==============
|
||||
56
extract-files.sh
Executable file
56
extract-files.sh
Executable file
@@ -0,0 +1,56 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2018 The LineageOS Project
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
# Load extract_utils and do some sanity checks
|
||||
MY_DIR="${BASH_SOURCE%/*}"
|
||||
if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi
|
||||
|
||||
LINEAGE_ROOT="$MY_DIR"/../../..
|
||||
|
||||
HELPER="$LINEAGE_ROOT"/vendor/lineage/build/tools/extract_utils.sh
|
||||
if [ ! -f "$HELPER" ]; then
|
||||
echo "Unable to find helper script at $HELPER"
|
||||
exit 1
|
||||
fi
|
||||
. "$HELPER"
|
||||
|
||||
# Default to sanitizing the vendor folder before extraction
|
||||
CLEAN_VENDOR=true
|
||||
|
||||
while [ "$1" != "" ]; do
|
||||
case $1 in
|
||||
-n | --no-cleanup ) CLEAN_VENDOR=false
|
||||
;;
|
||||
-s | --section ) shift
|
||||
SECTION=$1
|
||||
CLEAN_VENDOR=false
|
||||
;;
|
||||
* ) SRC=$1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if [ -z "$SRC" ]; then
|
||||
SRC=adb
|
||||
fi
|
||||
|
||||
# Initialize the helper for common device
|
||||
setup_vendor "$DEVICE_COMMON" "$VENDOR" "$LINEAGE_ROOT" true "$CLEAN_VENDOR"
|
||||
|
||||
extract "$MY_DIR"/proprietary-files.txt "$SRC" "$SECTION"
|
||||
|
||||
if [ -s "$MY_DIR"/../$DEVICE/proprietary-files.txt ]; then
|
||||
# Reinitialize the helper for device
|
||||
setup_vendor "$DEVICE" "$VENDOR" "$LINEAGE_ROOT" false "$CLEAN_VENDOR"
|
||||
|
||||
extract "$MY_DIR"/../$DEVICE/proprietary-files.txt "$SRC" "$SECTION"
|
||||
fi
|
||||
|
||||
"$MY_DIR"/setup-makefiles.sh
|
||||
6
lineage.dependencies
Normal file
6
lineage.dependencies
Normal file
@@ -0,0 +1,6 @@
|
||||
[
|
||||
{
|
||||
"repository": "android_kernel_xiaomi_sdm845",
|
||||
"target_path": "kernel/xiaomi/sdm845"
|
||||
}
|
||||
]
|
||||
15
rootdir/etc/fstab.qcom
Normal file
15
rootdir/etc/fstab.qcom
Normal file
@@ -0,0 +1,15 @@
|
||||
# Android fstab file.
|
||||
# The filesystem that contains the filesystem e2fsck binary (typically /system) cannot
|
||||
# specify 'check', and must come before any filesystems that do specify 'check'
|
||||
|
||||
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
|
||||
/dev/block/bootdevice/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=0,noauto_da_alloc wait,check,reservedsize=128M,fileencryption=ice,quota
|
||||
/dev/block/bootdevice/by-name/cust /cust ext4 noatime,nosuid,nodev,barrier=1 wait,check
|
||||
/dev/block/bootdevice/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait
|
||||
/dev/block/bootdevice/by-name/dsp /dsp ext4 ro,nosuid,nodev,barrier=1 wait
|
||||
/dev/block/bootdevice/by-name/persist /persist ext4 noatime,nosuid,nodev,barrier=1 wait
|
||||
/dev/block/bootdevice/by-name/bluetooth /bt_firmware vfat ro,shortname=lower,uid=1002,gid=3002,dmask=227,fmask=337,context=u:object_r:bt_firmware_file:s0 wait
|
||||
/dev/block/bootdevice/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1 wait
|
||||
/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults
|
||||
|
||||
/devices/platform/soc/a600000.ssusb/a600000.dwc3/xhci-hcd.0.auto* /storage/usbotg vfat nosuid,nodev wait,voldmanaged=usbotg:auto
|
||||
56
sdm845.mk
Normal file
56
sdm845.mk
Normal file
@@ -0,0 +1,56 @@
|
||||
#
|
||||
# Copyright (C) 2018 The LineageOS Project
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
# Inherit from those products. Most specific first.
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
|
||||
|
||||
# Get non-open-source specific aspects
|
||||
$(call inherit-product-if-exists, vendor/xiaomi/sdm845-common/sdm845-common-vendor.mk)
|
||||
|
||||
# Overlays
|
||||
DEVICE_PACKAGE_OVERLAYS += \
|
||||
$(LOCAL_PATH)/overlay
|
||||
|
||||
# Audio
|
||||
PRODUCT_PACKAGES += \
|
||||
audio.a2dp.default
|
||||
|
||||
# Display
|
||||
PRODUCT_PACKAGES += \
|
||||
libvulkan
|
||||
|
||||
# IMS
|
||||
PRODUCT_PACKAGES += \
|
||||
ims-ext-common
|
||||
|
||||
# NFC
|
||||
PRODUCT_PACKAGES += \
|
||||
com.android.nfc_extras \
|
||||
NfcNci \
|
||||
Tag
|
||||
|
||||
# Net
|
||||
PRODUCT_PACKAGES += \
|
||||
netutils-wrapper-1.0
|
||||
|
||||
# RCS
|
||||
PRODUCT_PACKAGES += \
|
||||
rcs_service_aidl \
|
||||
rcs_service_aidl.xml \
|
||||
rcs_service_api \
|
||||
rcs_service_api.xml
|
||||
|
||||
# Telephony
|
||||
PRODUCT_PACKAGES += \
|
||||
telephony-ext
|
||||
|
||||
PRODUCT_BOOT_JARS += \
|
||||
telephony-ext
|
||||
|
||||
# VNDK
|
||||
PRODUCT_PACKAGES += \
|
||||
vndk_package
|
||||
4
sepolicy/private/file.te
Normal file
4
sepolicy/private/file.te
Normal file
@@ -0,0 +1,4 @@
|
||||
type adsprpcd_file, file_type;
|
||||
type bt_firmware_file, file_type;
|
||||
type firmware_file, file_type;
|
||||
type persist_file, file_type;
|
||||
5
sepolicy/private/file_contexts
Normal file
5
sepolicy/private/file_contexts
Normal file
@@ -0,0 +1,5 @@
|
||||
# Files in rootfs
|
||||
/bt_firmware(/.*)? u:object_r:bt_firmware_file:s0
|
||||
/dsp(/.*)? u:object_r:adsprpcd_file:s0
|
||||
/firmware(/.*)? u:object_r:firmware_file:s0
|
||||
/persist(/.*)? u:object_r:persist_file:s0
|
||||
50
setup-makefiles.sh
Executable file
50
setup-makefiles.sh
Executable file
@@ -0,0 +1,50 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2018 The LineageOS Project
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
INITIAL_COPYRIGHT_YEAR=2018
|
||||
|
||||
# Load extract_utils and do some sanity checks
|
||||
MY_DIR="${BASH_SOURCE%/*}"
|
||||
if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi
|
||||
|
||||
LINEAGE_ROOT="$MY_DIR"/../../..
|
||||
|
||||
HELPER="$LINEAGE_ROOT"/vendor/lineage/build/tools/extract_utils.sh
|
||||
if [ ! -f "$HELPER" ]; then
|
||||
echo "Unable to find helper script at $HELPER"
|
||||
exit 1
|
||||
fi
|
||||
. "$HELPER"
|
||||
|
||||
# Initialize the helper for common
|
||||
setup_vendor "$DEVICE_COMMON" "$VENDOR" "$LINEAGE_ROOT" true
|
||||
|
||||
# Copyright headers and guards
|
||||
write_headers "polaris"
|
||||
|
||||
# The standard common blobs
|
||||
write_makefiles "$MY_DIR"/proprietary-files.txt true
|
||||
|
||||
# We are done!
|
||||
write_footers
|
||||
|
||||
if [ -s "$MY_DIR"/../$DEVICE/proprietary-files.txt ]; then
|
||||
# Reinitialize the helper for device
|
||||
INITIAL_COPYRIGHT_YEAR="$DEVICE_BRINGUP_YEAR"
|
||||
setup_vendor "$DEVICE" "$VENDOR" "$LINEAGE_ROOT" false
|
||||
|
||||
# Copyright headers and guards
|
||||
write_headers
|
||||
|
||||
# The standard device blobs
|
||||
write_makefiles "$MY_DIR"/../$DEVICE/proprietary-files.txt true
|
||||
|
||||
# We are done!
|
||||
write_footers
|
||||
fi
|
||||
Reference in New Issue
Block a user