Skip to content

Commit

Permalink
BGT_sprout: Hello BGT_sprout
Browse files Browse the repository at this point in the history
  • Loading branch information
KaguraRinko committed Jun 23, 2024
1 parent 7c0be39 commit 06629c7
Show file tree
Hide file tree
Showing 91 changed files with 47 additions and 3,617 deletions.
3 changes: 0 additions & 3 deletions Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,4 @@
//

soong_namespace {
imports: [
"hardware/xiaomi",
],
}
2 changes: 1 addition & 1 deletion Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

LOCAL_PATH := $(call my-dir)

ifeq ($(TARGET_DEVICE),gauguin)
ifeq ($(TARGET_DEVICE),BGT_sprout)

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

Expand Down
6 changes: 3 additions & 3 deletions AndroidProducts.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#

PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/aosp_gauguin.mk
$(LOCAL_DIR)/aosp_BGT_sprout.mk

COMMON_LUNCH_CHOICES := \
aosp_gauguin-userdebug \
aosp_gauguin-eng
aosp_BGT_sprout-userdebug \
aosp_BGT_sprout-eng
16 changes: 6 additions & 10 deletions BoardConfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0
#

DEVICE_PATH := device/xiaomi/gauguin
DEVICE_PATH := device/nokia/BGT_sprout

# Architecture
TARGET_ARCH := arm64
Expand All @@ -20,14 +20,14 @@ TARGET_2ND_CPU_ABI2 := armeabi
TARGET_2ND_CPU_VARIANT := cortex-a76

# Assert
TARGET_OTA_ASSERT_DEVICE := gauguin,gauguinpro,gauguininpro
TARGET_OTA_ASSERT_DEVICE := BGT_sprout

# Build
BUILD_BROKEN_DUP_RULES := true
BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true

# Bootloader
TARGET_BOOTLOADER_BOARD_NAME := gauguin
TARGET_BOOTLOADER_BOARD_NAME := lito
TARGET_NO_BOOTLOADER := true

# Kernel
Expand All @@ -40,8 +40,8 @@ BOARD_KERNEL_SEPARATED_DTBO := true
BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOTIMG_HEADER_VERSION)
TARGET_KERNEL_ADDITIONAL_FLAGS := DTC_EXT=$(shell pwd)/prebuilts/misc/$(HOST_OS)-x86/dtc/dtc
TARGET_KERNEL_CLANG_COMPILE := true
TARGET_KERNEL_SOURCE := kernel/xiaomi/gauguin
TARGET_KERNEL_CONFIG := vendor/gauguin_user_defconfig
TARGET_KERNEL_SOURCE := kernel/BGT_sprout
TARGET_KERNEL_CONFIG := vendor/lito_defconfig
TARGET_KERNEL_LLVM_BINUTILS := false
TARGET_KERNEL_CLANG_PATH := $(shell pwd)/prebuilts/clang/kernel/linux-x86/clang-r416183b

Expand Down Expand Up @@ -81,10 +81,6 @@ DEVICE_MATRIX_FILE := $(DEVICE_PATH)/compatibility_matrix.xml
ODM_MANIFEST_NFC_FILES := $(DEVICE_PATH)/manifest_nfc.xml
ODM_MANIFEST_SKUS += nfc

# Init
TARGET_INIT_VENDOR_LIB := //$(DEVICE_PATH):libinit_gauguin
TARGET_RECOVERY_DEVICE_MODULES := libinit_gauguin

# Media
TARGET_USES_ION := true

Expand Down Expand Up @@ -191,4 +187,4 @@ WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
WPA_SUPPLICANT_VERSION := VER_0_8_X

# Inherit from the proprietary version
include vendor/xiaomi/gauguin/BoardConfigVendor.mk
include vendor/nokia/BGT_sprout/BoardConfigVendor.mk
14 changes: 7 additions & 7 deletions aosp_gauguin.mk → aosp_BGT_sprout.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)

# Inherit from gauguin device
$(call inherit-product, device/xiaomi/gauguin/device.mk)
# Inherit from BGT_sprout device
$(call inherit-product, device/nokia/BGT_sprout/device.mk)

# Inherit some common AOSP stuff.
$(call inherit-product, vendor/aosp/config/common_full_phone.mk)
Expand All @@ -19,9 +19,9 @@ TARGET_INCLUDE_LIVE_WALLPAPERS := false
TARGET_SUPPORTS_QUICK_TAP := true

# Device identifier. This must come after all inclusions.
PRODUCT_NAME := aosp_gauguin
PRODUCT_DEVICE := gauguin
PRODUCT_BRAND := Xiaomi
PRODUCT_MANUFACTURER := Xiaomi
PRODUCT_NAME := aosp_BGT_sprout
PRODUCT_DEVICE := BGT_sprout
PRODUCT_BRAND := nokia
PRODUCT_MANUFACTURER := nokia

PRODUCT_GMS_CLIENTID_BASE := android-xiaomi
PRODUCT_GMS_CLIENTID_BASE := android-nokia
30 changes: 8 additions & 22 deletions device.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,22 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/developer_gsi_keys.mk)
$(call inherit-product, frameworks/native/build/phone-xhdpi-6144-dalvik-heap.mk)

# Get non-open-source specific aspects
$(call inherit-product, vendor/xiaomi/gauguin/gauguin-vendor.mk)
$(call inherit-product, vendor/nokia/BGT_sprout/BGT_sprout-vendor.mk)

# Overlays
PRODUCT_PACKAGES += \
CarrierConfigOverlayGauguin \
FrameworkResOverlayGauguin \
SettingsOverlayGauguin \
CarrierConfigOverlayBGT_sprout \
FrameworkResOverlayBGT_sprout \
SettingsOverlayBGT_sprout \
SettingsOverlayM2007J17C \
SettingsOverlayM2007J17G \
SettingsOverlayM2007J17I \
SystemUIOverlayGauguin \
TelephonyOverlayGauguin \
SystemUIOverlayBGT_sprout \
TelephonyOverlayBGT_sprout \

# Soong namespaces
PRODUCT_SOONG_NAMESPACES += \
$(LOCAL_PATH) \
hardware/xiaomi
$(LOCAL_PATH)

# Boot animation
TARGET_SCREEN_HEIGHT := 2400
Expand Down Expand Up @@ -198,10 +197,6 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \
[email protected]

# Fingerprint
PRODUCT_PACKAGES += \
[email protected]_gauguin

# Fastbootd
PRODUCT_PACKAGES += \
fastbootd
Expand Down Expand Up @@ -259,7 +254,6 @@ PRODUCT_PACKAGES += \
init.qcom.usb.sh \
init.recovery.qcom.rc \
init.target.rc \
init.xiaomi.rc \
ueventd.qcom.rc

# IPACM
Expand All @@ -286,10 +280,6 @@ PRODUCT_COPY_FILES += \
PRODUCT_PACKAGES += \
[email protected]

# Lights
PRODUCT_PACKAGES += \
[email protected]_gauguin

# LiveDisplay
PRODUCT_PACKAGES += \
[email protected]
Expand Down Expand Up @@ -374,10 +364,6 @@ PRODUCT_PACKAGES += \
libOmxVenc \
libstagefrighthw

# Parts
PRODUCT_PACKAGES += \
XiaomiParts

# Perf
PRODUCT_PACKAGES += \
[email protected]
Expand Down Expand Up @@ -460,7 +446,7 @@ PRODUCT_PACKAGES += \

# Vibrator
PRODUCT_PACKAGES += \
vendor.qti.hardware.vibrator.service.xiaomi_gauguin
vendor.qti.hardware.vibrator.service

PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/vibrator/etc/excluded-input-devices.xml:$(TARGET_COPY_OUT_VENDOR)/etc/excluded-input-devices.xml
Expand Down
19 changes: 2 additions & 17 deletions extract-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

set -e

DEVICE=gauguin
VENDOR=xiaomi
DEVICE=BGT_sprout
VENDOR=nokia

# Load extract_utils and do some sanity checks
MY_DIR="${BASH_SOURCE%/*}"
Expand Down Expand Up @@ -53,21 +53,6 @@ if [ -z "${SRC}" ]; then
SRC="adb"
fi

function blob_fixup() {
case "${1}" in
vendor/lib64/[email protected])
hexdump -ve '1/1 "%.2X"' "${2}" | sed "s/210080529A0A0094/210080521F2003D5/g" | xxd -r -p > "${EXTRACT_TMP_DIR}/${1##*/}"
mv "${EXTRACT_TMP_DIR}/${1##*/}" "${2}"
;;
vendor/lib64/camera/components/com.mi.node.watermark.so)
"${PATCHELF}" --add-needed "libpiex_shim.so" "${2}"
;;
vendor/lib64/camera/components/com.mi.node.superlowlightraw.so)
"${PATCHELF}" --add-needed "libweakcount_shim.so" "${2}"
;;
esac
}

# Initialize the helper
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" true "${CLEAN_VENDOR}"

Expand Down
33 changes: 0 additions & 33 deletions fingerprint/Android.bp

This file was deleted.

Loading

0 comments on commit 06629c7

Please sign in to comment.