Skip to content

Commit

Permalink
m8: update for Android 10 (SAR) support
Browse files Browse the repository at this point in the history
- update tree for USB config and bootloader offset
- Add missing LD_PRELOAD
- Remove ld.config.txt (use upstream fix)
- Update prebuilt kernel to fix UMS & MTP
- Fix broken decryption on Android 10
- Update scripts to latest versions
- Cleanup old kernels and files
- Needs "sar-fixes" topic patches to be merged
- update vendor init
- updates for new TWRP SAR detection
- cleanup decryption scripts
- update dtb for all variant support
- fix offmode charging

Change-Id: I5a29161146d72b64aea9b0f890dd77d46a25b91e
  • Loading branch information
CaptainThrowback committed Feb 29, 2020
1 parent 35c7c8c commit 99ad305
Show file tree
Hide file tree
Showing 46 changed files with 780 additions and 238 deletions.
7 changes: 2 additions & 5 deletions Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@
# limitations under the License.
#

ifeq ($(TARGET_DEVICE),m8)

LOCAL_PATH := $(call my-dir)

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

include $(CLEAR_VARS)
ifneq ($(filter m8,$(TARGET_DEVICE)),)
include $(call all-makefiles-under,$(LOCAL_PATH))
endif
1 change: 0 additions & 1 deletion AndroidProducts.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/omni_m8.mk

36 changes: 26 additions & 10 deletions BoardConfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -53,42 +53,58 @@ TARGET_CPU_VARIANT := krait
TARGET_USE_KRAIT_BIONIC_OPTIMIZATION := true

# Kernel
BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.hardware=qcom user_debug=31 ehci-hcd.park=3 zcache androidboot.selinux=permissive
BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.hardware=qcom user_debug=31 ehci-hcd.park=3 zcache androidboot.bootdevice=msm_sdcc.1 androidboot.selinux=permissive
BOARD_KERNEL_BASE := 0x00000000
BOARD_KERNEL_PAGESIZE := 2048
BOARD_MKBOOTIMG_ARGS := --kernel_offset 0x00008000 --ramdisk_offset 0x02008000 --dt device/$(BOARD_VENDOR)/$(TARGET_DEVICE)/prebuilt/dt.img --tags_offset 0x01e00000
BOARD_MKBOOTIMG_ARGS := --kernel_offset 0x00008000 --ramdisk_offset 0x02008000 --tags_offset 0x01e00000 --dt device/$(BOARD_VENDOR)/$(TARGET_DEVICE)/prebuilt/dtb
TARGET_PREBUILT_KERNEL := device/$(BOARD_VENDOR)/$(TARGET_DEVICE)/prebuilt/zImage

# Partitions
BOARD_BOOTIMAGE_PARTITION_SIZE := 16777216
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 25165824
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2818572288
BOARD_USERDATAIMAGE_PARTITION_SIZE := 11676942336
BOARD_FLASH_BLOCK_SIZE := 131072 # (BOARD_KERNEL_PAGESIZE * 64)

# Filesystem
TARGET_USERIMAGES_USE_EXT4 := true
TARGET_USERIMAGES_USE_F2FS := true

# Android version & Security Patch Level
# Default TWRP Values
PLATFORM_VERSION := 16.1.0
PLATFORM_SECURITY_PATCH := 2025-12-05

# Recovery
BOARD_HAS_LARGE_FILESYSTEM := true
BOARD_HAS_NO_MISC_PARTITION := true
BOARD_HAS_NO_SELECT_BUTTON := true
BOARD_NEEDS_LZMA_MINIGZIP := true
BOARD_RECOVERY_SWIPE := true
BOARD_USES_MMCUTILS := true
COMMON_GLOBAL_CPPFLAGS += -DBOARD_RECOVERY_BLDRMSG_OFFSET=2048
TARGET_PREBUILT_KERNEL := device/$(BOARD_VENDOR)/$(TARGET_DEVICE)/prebuilt/kernel
TARGET_RECOVERY_DEVICE_MODULES := chargeled tzdata
TW_RECOVERY_ADDITIONAL_RELINK_FILES += $(TARGET_OUT)/usr/share/zoneinfo/tzdata
BOOTLOADER_MESSAGE_OFFSET := 2048

# TWRP Build Flags
TW_THEME := portrait_hdpi
TW_EXCLUDE_DEFAULT_USB_INIT := true
TW_INCLUDE_DUMLOCK := true
TW_INCLUDE_CRYPTO := true
TW_CRYPTO_USE_SYSTEM_VOLD := true
TW_OVERRIDE_SYSTEM_PROPS := "ro.build.fingerprint"
TW_NO_EXFAT_FUSE := true
TW_NO_SCREEN_BLANK := true
TARGET_RECOVERY_DEVICE_MODULES := chargeled liblog_htc_sbin tzdata
TW_RECOVERY_ADDITIONAL_RELINK_FILES += $(TARGET_OUT)/usr/share/zoneinfo/tzdata
TW_USE_TOOLBOX := true

# TWRP Debugging
#TWRP_EVENT_LOGGING := true
#TARGET_USES_LOGD := true
#TWRP_INCLUDE_LOGCAT := true
#TARGET_RECOVERY_DEVICE_MODULES += debuggerd
#TW_RECOVERY_ADDITIONAL_RELINK_FILES += $(TARGET_OUT)/bin/debuggerd
#TARGET_RECOVERY_DEVICE_MODULES += strace
#TW_RECOVERY_ADDITIONAL_RELINK_FILES += $(TARGET_OUT)/xbin/strace
#TW_CRYPTO_SYSTEM_VOLD_DEBUG := true
#TW_CRYPTO_SYSTEM_VOLD_DISABLE_TIMEOUT := true

# Vendor Init
TARGET_INIT_VENDOR_LIB := libinit_$(TARGET_DEVICE)
TARGET_UNIFIED_DEVICE := true

8 changes: 4 additions & 4 deletions init/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ LOCAL_MODULE_TAGS := optional
LOCAL_C_INCLUDES := system/core/init
LOCAL_CFLAGS := -Wall -DANDROID_TARGET=\"$(TARGET_BOARD_PLATFORM)\"

LOCAL_C_INCLUDES += device/qcom/htc-common/init
LOCAL_WHOLE_STATIC_LIBRARIES += libinit_htcCommon

LOCAL_SRC_FILES := init_$(TARGET_DEVICE).c
LOCAL_SRC_FILES := init_$(TARGET_DEVICE).cpp

LOCAL_MODULE := libinit_$(TARGET_DEVICE)

LOCAL_STATIC_LIBRARIES := \
libbase

include $(BUILD_STATIC_LIBRARY)
189 changes: 0 additions & 189 deletions init/init_m8.c

This file was deleted.

Loading

0 comments on commit 99ad305

Please sign in to comment.