forked from mauronofrio/android_device_xiaomi_ginkgo
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: erwinabs <[email protected]> Change-Id: I1d86cc0c0a1b962f4c3cc1164f600b4000db0b2b
- Loading branch information
Showing
72 changed files
with
502 additions
and
706 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,8 @@ | |
# limitations under the License. | ||
# | ||
|
||
DEVICE_PATH := device/xiaomi/ginkgo | ||
# Default device path | ||
DEVICE_PATH := device/$(PRODUCT_BRAND)/$(TARGET_DEVICE) | ||
|
||
# For building with minimal manifest | ||
ALLOW_MISSING_DEPENDENCIES := true | ||
|
@@ -37,15 +38,15 @@ ENABLE_CPUSETS := true | |
ENABLE_SCHEDBOOST := true | ||
|
||
# Bootloader | ||
TARGET_BOOTLOADER_BOARD_NAME := trinket | ||
TARGET_BOOTLOADER_BOARD_NAME := $(PRODUCT_PLATFORM) | ||
TARGET_NO_BOOTLOADER := true | ||
|
||
# Platform | ||
TARGET_BOARD_PLATFORM := trinket | ||
TARGET_BOARD_PLATFORM := $(TARGET_BOOTLOADER_BOARD_NAME) | ||
TARGET_BOARD_PLATFORM_GPU := qcom-adreno640 | ||
|
||
# Kernel | ||
BOARD_KERNEL_CMDLINE := console=ttyMSM0,115200n8 earlycon=msm_geni_serial,0xa90000 androidboot.hardware=qcom androidboot.console=ttyMSM0 androidboot.memcg=1 lpm_levels.sleep_disabled=1 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 service_locator.enable=1 swiotlb=2048 firmware_class.path=/vendor/firmware_mnt/image loop.max_part=7 androidboot.usbcontroller=a600000.dwc3 androidboot.selinux=permissive | ||
BOARD_KERNEL_CMDLINE := console=ttyMSM0,115200n8 androidboot.hardware=qcom androidboot.console=ttyMSM0 androidboot.memcg=1 lpm_levels.sleep_disabled=1 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 service_locator.enable=1 swiotlb=1 earlycon=msm_geni_serial,0x4a90000 loop.max_part=7 cgroup.memory=nokmem,nosocket androidboot.selinux=permissive androidboot.usbconfigfs=true | ||
BOARD_KERNEL_BASE := 0x00000000 | ||
BOARD_KERNEL_PAGESIZE := 4096 | ||
BOARD_KERNEL_TAGS_OFFSET := 0x00000100 | ||
|
@@ -68,7 +69,11 @@ TARGET_OTA_ASSERT_DEVICE := ginkgo | |
|
||
# Avb | ||
BOARD_AVB_ENABLE := true | ||
BOARD_AVB_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) | ||
BOARD_AVB_RECOVERY_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem | ||
BOARD_AVB_RECOVERY_ALGORITHM := SHA256_RSA4096 | ||
BOARD_AVB_RECOVERY_ROLLBACK_INDEX := 1 | ||
BOARD_AVB_RECOVERY_ROLLBACK_INDEX_LOCATION := 1 | ||
BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flag 2 | ||
|
||
# Partitions | ||
BOARD_FLASH_BLOCK_SIZE := 262144 | ||
|
@@ -83,9 +88,7 @@ BOARD_VENDORIMAGE_PARTITION_SIZE := 1610612736 | |
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 | ||
|
||
# System as root | ||
#BOARD_BUILD_SYSTEM_ROOT_IMAGE := true | ||
BOARD_ROOT_EXTRA_FOLDERS := bluetooth dsp firmware persist | ||
BOARD_SUPPRESS_SECURE_ERASE := true | ||
BOARD_BUILD_SYSTEM_ROOT_IMAGE := true | ||
|
||
# File systems | ||
TARGET_USERIMAGES_USE_EXT4 := true | ||
|
@@ -95,68 +98,59 @@ TARGET_USERIMAGES_USE_F2FS := true | |
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 | ||
TARGET_COPY_OUT_VENDOR := vendor | ||
|
||
# Encryption | ||
BOARD_USES_METADATA_PARTITION := true | ||
BOARD_USES_QCOM_FBE_DECRYPTION := true | ||
TW_INCLUDE_CRYPTO := true | ||
TW_INCLUDE_FBE_METADATA_DECRYPT := true | ||
TW_USE_FSCRYPT_POLICY := 1 | ||
PLATFORM_SECURITY_PATCH := 2127-12-31 | ||
VENDOR_SECURITY_PATCH := $(PLATFORM_SECURITY_PATCH) | ||
|
||
# Extras | ||
BOARD_SUPPRESS_SECURE_ERASE := true | ||
TARGET_SYSTEM_PROP += $(DEVICE_PATH)/system.prop | ||
|
||
# Recovery | ||
BOARD_HAS_LARGE_FILESYSTEM := true | ||
TARGET_RECOVERY_PIXEL_FORMAT := "BGRA_8888" | ||
TARGET_RECOVERY_DEVICE_MODULES += \ | ||
libandroidicu \ | ||
libcap \ | ||
libion \ | ||
libxml2 | ||
|
||
# Crypto | ||
TW_INCLUDE_CRYPTO := true | ||
BOARD_USES_QCOM_FBE_DECRYPTION := true | ||
TW_INCLUDE_FBE_METADATA_DECRYPT := true | ||
TW_RECOVERY_ADDITIONAL_RELINK_LIBRARY_FILES += \ | ||
$(TARGET_OUT_SHARED_LIBRARIES)/libcap.so \ | ||
$(TARGET_OUT_SHARED_LIBRARIES)/libion.so \ | ||
$(TARGET_OUT_SHARED_LIBRARIES)/libxml2.so | ||
|
||
#TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/recovery/root/system/etc/recovery.fstab | ||
|
||
# TWRP specific build flags | ||
TW_THEME := portrait_hdpi | ||
RECOVERY_SDCARD_ON_DATA := true | ||
TARGET_RECOVERY_QCOM_RTC_FIX := true | ||
TARGET_RECOVERY_PIXEL_FORMAT := BGRA_8888 | ||
TW_THEME := portrait_hdpi | ||
TW_EXCLUDE_DEFAULT_USB_INIT := true | ||
TW_EXTRA_LANGUAGES := true | ||
TW_INCLUDE_NTFS_3G := true | ||
TW_FORCE_USE_BUSYBOX := true | ||
TW_INPUT_BLACKLIST := "hbtp_vm" | ||
#TARGET_USE_CUSTOM_LUN_FILE_PATH := "/config/usb_gadget/g1/functions/mass_storage.0/lun.%d/file" | ||
TW_BRIGHTNESS_PATH := "/sys/class/backlight/panel0-backlight/brightness" | ||
TW_INPUT_BLACKLIST := hbtp_vm | ||
TARGET_USE_CUSTOM_LUN_FILE_PATH := /config/usb_gadget/g1/functions/mass_storage.0/lun.%d/file | ||
TW_BRIGHTNESS_PATH := /sys/class/backlight/panel0-backlight/brightness | ||
TW_MAX_BRIGHTNESS := 2047 | ||
TW_DEFAULT_BRIGHTNESS := 1200 | ||
TW_Y_OFFSET := 80 | ||
TW_H_OFFSET := -80 | ||
#TW_SCREEN_BLANK_ON_BOOT := true | ||
TWRP_INCLUDE_LOGCAT := true | ||
TARGET_USES_LOGD := true | ||
TARGET_USES_MKE2FS := true | ||
TW_EXCLUDE_TWRPAPP := true | ||
TW_HAS_EDL_MODE := true | ||
TW_NO_SCREEN_TIMEOUT := true | ||
TW_INCLUDE_RESETPROP := true | ||
TW_INCLUDE_REPACKTOOLS := true | ||
TW_OVERRIDE_SYSTEM_PROPS := \ | ||
"ro.build.product;ro.build.fingerprint=ro.system.build.fingerprint;ro.build.version.incremental;ro.product.device=ro.product.system.device;ro.product.model=ro.product.system.model;ro.product.name=ro.product.system.name" | ||
|
||
TARGET_RECOVERY_DEVICE_MODULES += \ | ||
[email protected] \ | ||
ashmemd \ | ||
ashmemd_aidl_interface-cpp \ | ||
libashmemd_client \ | ||
libcap \ | ||
libicui18n \ | ||
libion \ | ||
libicuuc \ | ||
libpcrecpp \ | ||
libxml2 | ||
|
||
TW_RECOVERY_ADDITIONAL_RELINK_BINARY_FILES += \ | ||
$(TARGET_OUT_EXECUTABLES)/ashmemd | ||
"ro.build.product;ro.build.fingerprint=ro.system.build.fingerprint;ro.build.version.incremental;ro.product.device=ro.product.system.device;ro.product.model=ro.product.system.model;ro.product.name=ro.product.system.name" | ||
|
||
TW_RECOVERY_ADDITIONAL_RELINK_LIBRARY_FILES += \ | ||
$(TARGET_OUT_SHARED_LIBRARIES)/[email protected] \ | ||
$(TARGET_OUT_SHARED_LIBRARIES)/ashmemd_aidl_interface-cpp.so \ | ||
$(TARGET_OUT_SHARED_LIBRARIES)/libashmemd_client.so \ | ||
$(TARGET_OUT_SHARED_LIBRARIES)/libcap.so \ | ||
$(TARGET_OUT_SHARED_LIBRARIES)/libicui18n.so \ | ||
$(TARGET_OUT_SHARED_LIBRARIES)/libicuuc.so \ | ||
$(TARGET_OUT_SHARED_LIBRARIES)/libion.so \ | ||
$(TARGET_OUT_SHARED_LIBRARIES)/libpcrecpp.so \ | ||
$(TARGET_OUT_SHARED_LIBRARIES)/libxml2.so | ||
|
||
# Hack: prevent anti rollback | ||
PLATFORM_SECURITY_PATCH := 2099-12-31 | ||
PLATFORM_VERSION := 16.1.0 | ||
VENDOR_SECURITY_PATCH := 2099-12-31 | ||
# TWRP Debug Flags | ||
TWRP_INCLUDE_LOGCAT := true | ||
TARGET_USES_LOGD := true | ||
TARGET_RECOVERY_DEVICE_MODULES += debuggerd | ||
TW_RECOVERY_ADDITIONAL_RELINK_FILES += $(TARGET_OUT_EXECUTABLES)/debuggerd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Api | ||
PRODUCT_SHIPPING_API_LEVEL := 28 | ||
|
||
# Dependencies | ||
PRODUCT_COPY_FILES += \ | ||
$(OUT_DIR)/target/product/$(PRODUCT_RELEASE_NAME)/obj/SHARED_LIBRARIES/libandroidicu_intermediates/libandroidicu.so:$(TARGET_COPY_OUT_RECOVERY)/root/system/lib64/libandroidicu.so | ||
|
||
# Health HAL | ||
PRODUCT_PACKAGES += \ | ||
[email protected] | ||
|
||
# HIDL | ||
PRODUCT_PACKAGES += \ | ||
libhidltransport \ | ||
libhwbinder | ||
|
||
# qcom decryption | ||
PRODUCT_PACKAGES_ENG += \ | ||
qcom_decrypt \ | ||
qcom_decrypt_fbe | ||
|
||
# Soong namespaces | ||
PRODUCT_SOONG_NAMESPACES += \ | ||
$(LOCAL_PATH) |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
service health-hal-2-1 /vendor/bin/hw/[email protected] | ||
class hal charger | ||
user system | ||
group system | ||
capabilities WAKE_ALARM | ||
file /dev/kmsg w |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.