-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change-Id: I220c0ff41c17b7e0e05e351cd454b72bc3e5d439 Signed-off-by: Kshitij Gupta <kshitijgm@gmail.com>
- Loading branch information
0 parents
commit 6db8942
Showing
48 changed files
with
9,054 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,5 @@ | ||
LOCAL_PATH := $(call my-dir) | ||
|
||
ifeq ($(TARGET_DEVICE),begonia) | ||
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,18 @@ | ||
# | ||
# Copyright (C) 2019 Potato Open Sauce 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)/potato_begonia.mk |
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,139 @@ | ||
# | ||
# Copyright (C) 2019 Potato Open Sauce 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. | ||
# | ||
|
||
DEVICE_PATH := device/redmi/begonia | ||
|
||
# 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 := armv8-a | ||
TARGET_2ND_CPU_ABI := armeabi-v7a | ||
TARGET_2ND_CPU_ABI2 := armeabi | ||
TARGET_2ND_CPU_VARIANT := generic | ||
TARGET_USES_64_BIT_BINDER := true | ||
|
||
ENABLE_CPUSETS := true | ||
ENABLE_SCHEDBOOST := true | ||
|
||
# APEX image | ||
DEXPREOPT_GENERATE_APEX_IMAGE := true | ||
|
||
# Audio | ||
AUDIO_FEATURE_ENABLED_AAC_ADTS_OFFLOAD := true | ||
AUDIO_FEATURE_ENABLED_EXTN_FORMATS := true | ||
AUDIO_FEATURE_ENABLED_HDMI_SPK := true | ||
AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true | ||
USE_CUSTOM_AUDIO_POLICY := 1 | ||
USE_XML_AUDIO_POLICY_CONF := 1 | ||
|
||
# Bootloader | ||
TARGET_BOOTLOADER_BOARD_NAME := begonia | ||
TARGET_NO_BOOTLOADER := true | ||
TARGET_USES_UEFI := 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 | ||
|
||
# Platform | ||
TARGET_BOARD_PLATFORM := mt6785 | ||
TARGET_BOARD_PLATFORM_GPU := mali-g76mc4 | ||
|
||
# Kernel | ||
BOARD_KERNEL_CMDLINE := bootopt=64S3,32N2,64N2 androidboot.selinux=permissive | ||
BOARD_KERNEL_BASE := 0x40078000 | ||
BOARD_KERNEL_OFFSET := 0x00008000 | ||
BOARD_KERNEL_PAGESIZE := 2048 | ||
BOARD_KERNEL_TAGS_OFFSET := 0x0bc08000 | ||
BOARD_RAMDISK_OFFSET := 0x07c08000 | ||
BOARD_KERNEL_IMAGE_NAME := Image.gz-dtb | ||
BOARD_BOOTIMG_HEADER_VERSION := 1 | ||
TARGET_KERNEL_ARCH := arm64 | ||
TARGET_KERNEL_HEADER_ARCH := arm64 | ||
TARGET_KERNEL_SOURCE := kernel/xiaomi/mt6785 | ||
TARGET_KERNEL_CONFIG := begonia_user_defconfig | ||
BOARD_MKBOOTIMG_ARGS := --ramdisk_offset $(BOARD_RAMDISK_OFFSET) | ||
BOARD_MKBOOTIMG_ARGS += --tags_offset $(BOARD_KERNEL_TAGS_OFFSET) | ||
BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOTIMG_HEADER_VERSION) | ||
BOARD_KERNEL_SEPARATED_DTBO := true | ||
BOARD_KERNEL_DTBO_CFG := dtboimg.cfg | ||
|
||
# Assert | ||
TARGET_OTA_ASSERT_DEVICE := begonia | ||
|
||
# Avb | ||
BOARD_AVB_ENABLE := true | ||
BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --set_hashtree_disabled_flag | ||
BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 2 | ||
|
||
# Broken rules | ||
BUILD_BROKEN_DUP_RULES := true | ||
BUILD_BROKEN_PHONY_TARGETS := true | ||
|
||
# Partitions | ||
BOARD_FLASH_BLOCK_SIZE := 131072 | ||
BOARD_BOOTIMAGE_PARTITION_SIZE := 67108864 | ||
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 67108864 | ||
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 3758096384 | ||
BOARD_SYSTEMIMAGE_PARTITION_TYPE := ext4 | ||
BOARD_USERDATAIMAGE_PARTITION_SIZE := 120116445184 | ||
BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := ext4 | ||
BOARD_CACHEIMAGE_PARTITION_SIZE := 452984832 | ||
BOARD_DTBOIMG_PARTITION_SIZE := 33554432 | ||
TARGET_USES_MKE2FS := true | ||
|
||
# System as root | ||
BOARD_BUILD_SYSTEM_ROOT_IMAGE := true | ||
BOARD_SUPPRESS_SECURE_ERASE := true | ||
|
||
# File systems | ||
TARGET_USERIMAGES_USE_EXT4 := true | ||
TARGET_USERIMAGES_USE_F2FS := true | ||
|
||
# Recovery | ||
BOARD_HAS_LARGE_FILESYSTEM := true | ||
TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888" | ||
TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/rootdir/etc/fstab.mt6785 | ||
|
||
# Security patch level | ||
VENDOR_SECURITY_PATCH := 2019-10-01 | ||
|
||
# Releasetools | ||
TARGET_RELEASETOOLS_EXTENSIONS := $(DEVICE_PATH) | ||
|
||
# HIDL | ||
DEVICE_MANIFEST_FILE := $(DEVICE_PATH)/manifest.xml | ||
DEVICE_MATRIX_FILE := $(DEVICE_PATH)/compatibility_matrix.xml | ||
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := $(DEVICE_PATH)/framework_compatibility_matrix.xml | ||
|
||
# Treble | ||
TARGET_COPY_OUT_VENDOR := vendor | ||
BOARD_VNDK_VERSION := current | ||
BOARD_EXTRA_VNDK_VERSION := 28 | ||
PRODUCT_FULL_TREBLE_OVERRIDE := true | ||
TARGET_SYSTEM_PROP += $(DEVICE_PATH)/system.prop | ||
|
||
# Inherit from the proprietary version | ||
-include vendor/redmi/begonia/BoardConfigVendor.mk |
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,4 @@ | ||
# DO NOT USE THIS TREE UNLESS YOU KNOW WHAT YOU'RE DOING # | ||
|
||
Clearly, I don't and I'm bricked again. So, here's my work so far. | ||
The tree has a lot of unused files, since it once was compiling vendor image. |
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 @@ | ||
require version-vendor=1571914891 |
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,85 @@ | ||
<!-- Copyright (c) 2017, 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 "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. | ||
--> | ||
<compatibility-matrix version="1.0" type="device"> | ||
<hal format="hidl" optional="false"> | ||
<name>android.frameworks.schedulerservice</name> | ||
<version>1.0</version> | ||
<interface> | ||
<name>ISchedulingPolicyService</name> | ||
<instance>default</instance> | ||
</interface> | ||
</hal> | ||
<hal format="hidl" optional="false"> | ||
<name>android.frameworks.sensorservice</name> | ||
<version>1.0</version> | ||
<interface> | ||
<name>ISensorManager</name> | ||
<instance>default</instance> | ||
</interface> | ||
</hal> | ||
<hal format="hidl" optional="false"> | ||
<name>android.hidl.allocator</name> | ||
<version>1.0</version> | ||
<interface> | ||
<name>IAllocator</name> | ||
<instance>ashmem</instance> | ||
</interface> | ||
</hal> | ||
<hal format="hidl" optional="false"> | ||
<name>android.hidl.manager</name> | ||
<version>1.0</version> | ||
<interface> | ||
<name>IServiceManager</name> | ||
<instance>default</instance> | ||
</interface> | ||
</hal> | ||
<hal format="hidl" optional="false"> | ||
<name>android.hidl.memory</name> | ||
<version>1.0</version> | ||
<interface> | ||
<name>IMapper</name> | ||
<instance>ashmem</instance> | ||
</interface> | ||
</hal> | ||
<hal format="hidl" optional="false"> | ||
<name>android.hidl.token</name> | ||
<version>1.0</version> | ||
<interface> | ||
<name>ITokenManager</name> | ||
<instance>default</instance> | ||
</interface> | ||
</hal> | ||
<hal format="hidl" optional="false"> | ||
<name>android.system.wifi.keystore</name> | ||
<version>1.0</version> | ||
<interface> | ||
<name>IKeystore</name> | ||
<instance>default</instance> | ||
</interface> | ||
</hal> | ||
</compatibility-matrix> |
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,44 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- A2dp Audio HAL Audio Policy Configuration file --> | ||
<module name="a2dp" halVersion="2.0"> | ||
<mixPorts> | ||
<mixPort name="a2dp output" role="source"/> | ||
<mixPort name="a2dp input" role="sink"> | ||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" | ||
samplingRates="44100" | ||
channelMasks="AUDIO_CHANNEL_IN_STEREO"/> | ||
</mixPort> | ||
</mixPorts> | ||
<devicePorts> | ||
<devicePort tagName="BT A2DP Out" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP" role="sink"> | ||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" | ||
samplingRates="44100" | ||
channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> | ||
</devicePort> | ||
<devicePort tagName="BT A2DP Headphones" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES" role="sink"> | ||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" | ||
samplingRates="44100" | ||
channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> | ||
</devicePort> | ||
<devicePort tagName="BT A2DP Speaker" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER" role="sink"> | ||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" | ||
samplingRates="44100" | ||
channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> | ||
</devicePort> | ||
<devicePort tagName="BT A2DP In" type="AUDIO_DEVICE_IN_BLUETOOTH_A2DP" role="source"> | ||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT" | ||
samplingRates="44100" | ||
channelMasks="AUDIO_CHANNEL_IN_STEREO"/> | ||
</devicePort> | ||
</devicePorts> | ||
<routes> | ||
<route type="mix" sink="BT A2DP Out" | ||
sources="a2dp output"/> | ||
<route type="mix" sink="BT A2DP Headphones" | ||
sources="a2dp output"/> | ||
<route type="mix" sink="BT A2DP Speaker" | ||
sources="a2dp output"/> | ||
<route type="mix" sink="a2dp input" | ||
sources="BT A2DP In"/> | ||
</routes> | ||
</module> |
Oops, something went wrong.