-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1c9a5d5
Showing
43 changed files
with
2,987 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# | ||
# Copyright (C) 2022 The Android Open Source Project | ||
# Copyright (C) 2022 SebaUbuntu's TWRP device tree generator | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
LOCAL_PATH := $(call my-dir) | ||
|
||
ifeq ($(TARGET_DEVICE),munch) | ||
include $(call all-subdir-makefiles,$(LOCAL_PATH)) | ||
endif |
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,12 @@ | ||
# | ||
# Copyright (C) 2022 The Android Open Source Project | ||
# Copyright (C) 2022 SebaUbuntu's TWRP device tree generator | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
PRODUCT_MAKEFILES := \ | ||
$(LOCAL_DIR)/twrp_munch.mk | ||
|
||
COMMON_LUNCH_CHOICES := \ | ||
twrp_munch-eng |
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,97 @@ | ||
# | ||
# Copyright (C) 2022 The Android Open Source Project | ||
# Copyright (C) 2022 SebaUbuntu's TWRP device tree generator | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
DEVICE_PATH := device/xiaomi/munch | ||
|
||
# For building with minimal manifest | ||
ALLOW_MISSING_DEPENDENCIES := true | ||
|
||
# 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 := generic | ||
TARGET_BOARD_SUFFIX := _64 | ||
TARGET_USES_64_BIT_BINDER := true | ||
|
||
# Assert | ||
TARGET_OTA_ASSERT_DEVICE := munch | ||
|
||
# Platform | ||
TARGET_BOARD_PLATFORM := kona | ||
TARGET_BOARD_PLATFORM_GPU := qcom-adreno650 | ||
|
||
# Kernel | ||
TARGET_KERNEL_ARCH := arm64 | ||
TARGET_KERNEL_HEADER_ARCH := $(TARGET_KERNEL_ARCH) | ||
BOARD_KERNEL_IMAGE_NAME := Image.gz-dtb | ||
TARGET_PREBUILT_KERNEL := $(DEVICE_PATH)/prebuilt/Image.gz-dtb | ||
BOARD_BOOTIMG_HEADER_VERSION := 3 | ||
|
||
BOARD_KERNEL_CMDLINE := None | ||
# TARGET_KERNEL_SOURCE := kernel/xiaomi/munch | ||
# TARGET_KERNEL_CONFIG := munch_defconfig | ||
BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOTIMG_HEADER_VERSION) | ||
|
||
# AVB | ||
BOARD_AVB_ENABLE := true | ||
|
||
# File systems | ||
BOARD_HAS_LARGE_FILESYSTEM := true | ||
BOARD_BOOTIMAGE_PARTITION_SIZE := 201326592 | ||
BOARD_SYSTEMIMAGE_PARTITION_TYPE := ext4 | ||
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 | ||
BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := f2fs | ||
TARGET_USERIMAGES_USE_F2FS := true | ||
TARGET_COPY_OUT_VENDOR := vendor | ||
|
||
# Dynamic Partiton | ||
BOARD_SUPER_PARTITION_SIZE := 9126805504 | ||
BOARD_QTI_DYNAMIC_PARTITIONS_SIZE := 9126805504 | ||
BOARD_SUPER_PARTITION_GROUPS := qti_dynamic_partitions | ||
BOARD_QTI_DYNAMIC_PARTITIONS_PARTITION_LIST := system system_ext product vendor odm | ||
|
||
# Recovery | ||
TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888 | ||
TARGET_USES_MKE2FS := true | ||
|
||
# System as root | ||
BOARD_ROOT_EXTRA_FOLDERS := bluetooth dsp firmware persist | ||
BOARD_SUPPRESS_SECURE_ERASE := true | ||
|
||
# TWRP Configuration | ||
TW_THEME := portrait_hdpi | ||
RECOVERY_SDCARD_ON_DATA := true | ||
TARGET_RECOVERY_QCOM_RTC_FIX := true | ||
TW_DEFAULT_BRIGHTNESS := 500 | ||
TW_DEVICE_VERSION := -hraj9258 | ||
TW_EXCLUDE_TWRPAPP := true | ||
TW_EXTRA_LANGUAGES := true | ||
TW_SCREEN_BLANK_ON_BOOT := true | ||
TW_INPUT_BLACKLIST := "hbtp_vm" | ||
TW_USE_TOOLBOX := true | ||
TW_INCLUDE_NTFS_3G := true | ||
TW_INCLUDE_REPACKTOOLS := true | ||
TW_INCLUDE_RESETPROP := true | ||
|
||
|
||
TW_STATUS_ICONS_ALIGN := center | ||
TW_CUSTOM_CPU_POS := "50" | ||
TW_CUSTOM_CLOCK_POS := "400" | ||
TW_CUSTOM_BATTERY_POS := "800" | ||
|
||
# TWRP Debug Flags | ||
# TWRP_EVENT_LOGGING := true | ||
TWRP_INCLUDE_LOGCAT := true | ||
TARGET_USES_LOGD := true |
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,94 @@ | ||
# | ||
# Copyright (C) 2022 The Android Open Source Project | ||
# Copyright (C) 2022 SebaUbuntu's TWRP device tree generator | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
LOCAL_PATH := device/xiaomi/munch | ||
|
||
# API | ||
PRODUCT_TARGET_VNDK_VERSION := 30 | ||
PRODUCT_SHIPPING_API_LEVEL := 31 | ||
|
||
# A/B | ||
ENABLE_VIRTUAL_AB := true | ||
BOARD_USES_RECOVERY_AS_BOOT := true | ||
# BOARD_BUILD_SYSTEM_ROOT_IMAGE := false | ||
AB_OTA_UPDATER := true | ||
AB_OTA_PARTITIONS += \ | ||
boot \ | ||
dtbo \ | ||
system \ | ||
system_ext \ | ||
product \ | ||
vendor \ | ||
vendor_boot \ | ||
odm \ | ||
vbmeta \ | ||
vbmeta_system \ | ||
|
||
# A/B | ||
AB_OTA_POSTINSTALL_CONFIG += \ | ||
RUN_POSTINSTALL_system=true \ | ||
POSTINSTALL_PATH_system=system/bin/otapreopt_script \ | ||
FILESYSTEM_TYPE_system=ext4 \ | ||
POSTINSTALL_OPTIONAL_system=true | ||
|
||
# Boot control HAL | ||
PRODUCT_PACKAGES += \ | ||
[email protected] \ | ||
[email protected] \ | ||
bootctrl.kona \ | ||
bootctrl.kona.recovery | ||
|
||
PRODUCT_PACKAGES += \ | ||
|
||
# PRODUCT_STATIC_BOOT_CONTROL_HAL := \ | ||
# bootctrl.kona \ | ||
# libgptutils \ | ||
# libz \ | ||
# libcutils | ||
|
||
PRODUCT_PACKAGES += \ | ||
otapreopt_script \ | ||
cppreopts.sh \ | ||
update_engine \ | ||
update_verifier \ | ||
update_engine_sideload | ||
|
||
# Qcom decryption | ||
PRODUCT_PACKAGES += \ | ||
qcom_decrypt \ | ||
qcom_decrypt_fbe | ||
|
||
# Soong Namespaces : Qcom commonsys Display | ||
PRODUCT_SOONG_NAMESPACES += \ | ||
vendor/qcom/opensource/commonsys-intf/display | ||
|
||
# Recovery libs | ||
TARGET_RECOVERY_DEVICE_MODULES += \ | ||
libion \ | ||
[email protected] \ | ||
[email protected] | ||
# libdisplayconfig.qti | ||
|
||
RECOVERY_LIBRARY_SOURCE_FILES += \ | ||
$(TARGET_OUT_SHARED_LIBRARIES)/libion.so \ | ||
$(TARGET_OUT_SYSTEM_EXT_SHARED_LIBRARIES)/[email protected] \ | ||
$(TARGET_OUT_SYSTEM_EXT_SHARED_LIBRARIES)/[email protected] | ||
# $(TARGET_OUT_SYSTEM_EXT_SHARED_LIBRARIES)/libdisplayconfig.qti.so | ||
|
||
# Crypto | ||
TW_INCLUDE_CRYPTO := true | ||
TW_INCLUDE_CRYPTO_FBE := true | ||
TW_INCLUDE_FBE_METADATA_DECRYPT := true | ||
BOARD_USES_QCOM_FBE_DECRYPTION := true | ||
BOARD_USES_METADATA_PARTITION := true | ||
|
||
# Platform | ||
PLATFORM_VERSION := 99.87.36 | ||
PLATFORM_SECURITY_PATCH := 2127-12-31 | ||
PLATFORM_VERSION_LAST_STABLE := $(PLATFORM_VERSION) | ||
VENDOR_SECURITY_PATCH := $(PLATFORM_SECURITY_PATCH) | ||
BOOT_SECURITY_PATCH := $(PLATFORM_SECURITY_PATCH) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Copyright (c) 2017-2018,2020 The Linux Foundation. All rights reserved. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions are met: | ||
# * Redistributions of source code must retain the above copyright | ||
# notice, this list of conditions and the following disclaimer. | ||
# * Redistributions in binary form must reproduce the above copyright | ||
# notice, this list of conditions and the following disclaimer in the | ||
# documentation and/or other materials provided with the distribution. | ||
# * Neither the name of The Linux Foundation nor | ||
# the names of its contributors may be used to endorse or promote | ||
# products derived from this software without specific prior written | ||
# permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR | ||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | ||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | ||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | ||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
# | ||
|
||
# Qcom TWRP Default Decryption | ||
import /init.recovery.qcom_decrypt.rc | ||
|
||
on init | ||
write /sys/class/backlight/panel0-backlight/brightness 200 | ||
setprop sys.usb.configfs 1 | ||
start adbd | ||
|
||
on property:ro.boot.usbcontroller=* | ||
setprop sys.usb.controller ${ro.boot.usbcontroller} | ||
# write /sys/class/udc/${ro.boot.usbcontroller}/device/../mode peripheral | ||
|
||
on fs | ||
wait /dev/block/platform/soc/${ro.boot.bootdevice} | ||
symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice | ||
|
||
on post-fs | ||
start boot-hal-1-1 | ||
|
||
on boot | ||
start health-hal-2-1 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.