forked from LineageOS/android_device_huawei_charlotte
-
Notifications
You must be signed in to change notification settings - Fork 1
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 c588724
Showing
14 changed files
with
863 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,32 @@ | ||
# | ||
# Copyright 2012 The Android Open Source 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. | ||
# | ||
|
||
# This contains the module build definitions for the hardware-specific | ||
# components for this device. | ||
# | ||
# As much as possible, those components should be built unconditionally, | ||
# with device-specific names to avoid collisions, to avoid device-specific | ||
# bitrot and build breakages. Building a component unconditionally does | ||
# *not* include it on all devices, so it is safe even with hardware-specific | ||
# components. | ||
|
||
ifneq ($(filter charlotte,$(TARGET_DEVICE)),) | ||
|
||
LOCAL_PATH := $(call my-dir) | ||
|
||
include $(call all-makefiles-under,$(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 2012 The Android Open Source 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)/omni_charlotte.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,57 @@ | ||
# Bootloader | ||
TARGET_BOOTLOADER_BOARD_NAME := KIRIN | ||
TARGET_NO_BOOTLOADER := true | ||
|
||
# Platform | ||
TARGET_BOARD_PLATFORM := generic | ||
TARGET_BOARD_PLATFORM_GPU := kirin | ||
|
||
# Architecture | ||
TARGET_ARCH := arm64 | ||
TARGET_ARCH_VARIANT := armv8-a | ||
TARGET_CPU_ABI := arm64-v8a | ||
TARGET_CPU_ABI2 := | ||
TARGET_CPU_VARIANT := generic | ||
TARGET_CPU_SMP := true | ||
|
||
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 | ||
|
||
BOARD_KERNEL_CMDLINE := | ||
|
||
BOARD_KERNEL_BASE := 0x10000000 | ||
BOARD_KERNEL_PAGESIZE := 2048 | ||
BOARD_MKBOOTIMG_ARGS := --kernel_offset 0x8000 --ramdisk_offset 0x01000000 --tags_offset 0x0100 | ||
|
||
# phony empty kernel to satisfy build system, but this device does not | ||
# include a kernel in the recovery image -- flash to recovery_ramdisk | ||
TARGET_PREBUILT_KERNEL := device/huawei/charlotte/dummykernel | ||
# else uncomment below to build from sauce | ||
# TARGET_KERNEL_SOURCE := kernel/huawei/charlotte | ||
# TARGET_KERNEL_CONFIG := charlotte_defconfig | ||
|
||
BOARD_BOOTIMAGE_PARTITION_SIZE := 16777216 | ||
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 33554432 | ||
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 5905580032 | ||
BOARD_USERDATAIMAGE_PARTITION_SIZE := 119663493120 | ||
BOARD_FLASH_BLOCK_SIZE := 131072 # (BOARD_KERNEL_PAGESIZE * 64) | ||
BOARD_VOLD_EMMC_SHARES_DEV_MAJOR := true | ||
|
||
TARGET_USERIMAGES_USE_EXT4 := true | ||
BOARD_HAS_NO_SELECT_BUTTON := true | ||
|
||
TW_THEME := portrait_hdpi | ||
BOARD_SUPPRESS_SECURE_ERASE := true | ||
RECOVERY_SDCARD_ON_DATA := true | ||
TW_EXCLUDE_DEFAULT_USB_INIT := true | ||
TW_BRIGHTNESS_PATH := /sys/class/leds/lcd_backlight0/brightness | ||
TW_NO_SCREEN_BLANK := true | ||
TW_DEFAULT_BRIGHTNESS := "2048" | ||
TW_CUSTOM_BATTERY_PATH := /sys/class/power_supply/Battery | ||
# Device crashes if /sbin/modprobe is present so this is needed: | ||
BOARD_CUSTOM_BOOTIMG_MK := device/huawei/charlotte/custombootimg.mk | ||
# MTP will not work until we update it to support ffs | ||
TW_EXCLUDE_MTP := 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,3 @@ | ||
Taken from Huawei Blanc and adjusted for Charlotte. | ||
|
||
Mad props to TWRP team and Dees-Troy. |
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 @@ | ||
$(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTIMG) \ | ||
$(recovery_ramdisk) \ | ||
$(recovery_kernel) \ | ||
$(MKBOOTFS) $(MINIGZIP) | ||
@echo ----- Removing modprobe symlink ----- | ||
rm -f $(TARGET_RECOVERY_ROOT_OUT)/sbin/modprobe | ||
@echo ----- Compressing recovery ramdisk ------ | ||
$(hide) $(MKBOOTFS) -d $(TARGET_OUT) $(TARGET_RECOVERY_ROOT_OUT) | $(MINIGZIP) > $(recovery_ramdisk) | ||
@echo ----- Making recovery image ------ | ||
$(MKBOOTIMG) $(INTERNAL_RECOVERYIMAGE_ARGS) --output $@ | ||
@echo ----- Made recovery image -------- $@ | ||
$(hide) $(call assert-max-image-size,$@,$(BOARD_RECOVERYIMAGE_PARTITION_SIZE),raw) | ||
|
||
|
||
$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) | ||
$(call pretty,"Target boot image: $@") | ||
$(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) --output $@ | ||
$(hide) $(call assert-max-image-size,$@,$(BOARD_BOOTIMAGE_PARTITION_SIZE),raw) |
Empty file.
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,45 @@ | ||
# | ||
# Copyright 2012 The Android Open Source 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. | ||
# | ||
|
||
# Sample: This is where we'd set a backup provider if we had one | ||
# $(call inherit-product, device/sample/products/backup_overlay.mk) | ||
|
||
# Get the prebuilt list of APNs | ||
$(call inherit-product, vendor/omni/config/gsm.mk) | ||
|
||
# Inherit from the common Open Source product configuration | ||
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk) | ||
|
||
# Inherit from our custom product configuration | ||
$(call inherit-product, vendor/omni/config/common.mk) | ||
|
||
PRODUCT_PACKAGES += \ | ||
charger_res_images \ | ||
charger | ||
|
||
PRODUCT_COPY_FILES += \ | ||
device/huawei/charlotte/dummykernel:kernel | ||
|
||
PRODUCT_NAME := omni_charlotte | ||
PRODUCT_DEVICE := charlotte | ||
PRODUCT_BRAND := Huawei | ||
PRODUCT_MODEL := P20 Pro | ||
PRODUCT_MANUFACTURER := Huawei | ||
|
||
# Kernel inline build | ||
#TARGET_KERNEL_CONFIG := charlotte_defconfig | ||
#TARGET_VARIANT_CONFIG := charlotte_defconfig | ||
#TARGET_SELINUX_CONFIG := charlotte_defconfig |
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,17 @@ | ||
/kernel emmc /dev/block/bootdevice/by-name/kernel flags=display="Kernel";backup=1 | ||
/ramdisk emmc /dev/block/bootdevice/by-name/ramdisk flags=display="Boot Ramdisk";backup=1 | ||
/recovery_ramdisk emmc /dev/block/bootdevice/by-name/recovery_ramdisk flags=display="Recovery Ramdisk";backup=1 | ||
/cache ext4 /dev/block/bootdevice/by-name/cache | ||
/cust ext4 /dev/block/bootdevice/by-name/cust flags=display="Cust";backup=1 | ||
/misc emmc /dev/block/bootdevice/by-name/misc flags=display="Misc";backup=0 | ||
/oeminfo emmc /dev/block/bootdevice/by-name/oeminfo flags=display="OEMinfo";backup=1 | ||
/data ext4 /dev/block/bootdevice/by-name/userdata | ||
/system ext4 /dev/block/bootdevice/by-name/system | ||
/system_image emmc /dev/block/bootdevice/by-name/system | ||
/vendor ext4 /dev/block/bootdevice/by-name/vendor | ||
/vendor_image emmc /dev/block/bootdevice/by-name/vendor | ||
|
||
#/usbotg auto /dev/block/sda1 /dev/block/sda flags=display="USB OTG";storage;removable;backup=0 | ||
#/devices/ff200000.hisi_usb/ff100000.dwc3/* auto auto defaults flags=display="USB OTG";storage;removable;backup=0 | ||
#/devices/platform/ff200000.hisi_usb/ff100000.dwc3/* auto auto defaults flags=display="USB OTG";storage;removable;backup=0 | ||
#/devices/platform/e7f00000.hifi_usb/* auto auto defaults flags=display="USB OTG";storage;removable;backup=0 |
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,10 @@ | ||
on fs | ||
start fixlinks | ||
|
||
on post-fs-data | ||
stop oeminfo_nvm | ||
|
||
service fixlinks /sbin/fixlinks.sh | ||
oneshot | ||
disabled | ||
seclabel u:r:recovery:s0 |
Oops, something went wrong.