diff --git a/Android.mk b/Android.mk index 739c6d6..2f27198 100644 --- a/Android.mk +++ b/Android.mk @@ -6,7 +6,7 @@ LOCAL_PATH := $(call my-dir) -ifneq ($(filter instantnoodle instantnoodlep kebab,$(TARGET_DEVICE)),) +ifneq ($(filter avicii,$(TARGET_DEVICE)),) include $(call all-makefiles-under,$(LOCAL_PATH)) include $(CLEAR_VARS) diff --git a/BoardConfigCommon.mk b/BoardConfig.mk similarity index 85% rename from BoardConfigCommon.mk rename to BoardConfig.mk index 44b9144..311889e 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfig.mk @@ -7,7 +7,7 @@ BUILD_BROKEN_DUP_RULES := true BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true -COMMON_PATH := device/oneplus/sm8250-common +DEVICE_PATH := device/oneplus/avicii # A/B AB_OTA_UPDATER := true @@ -55,16 +55,16 @@ BOARD_SUPPORTS_SOUND_TRIGGER := true BOARD_USES_ALSA_AUDIO := true # Bootloader -TARGET_BOOTLOADER_BOARD_NAME := kona +TARGET_BOOTLOADER_BOARD_NAME := lito # Bluetooth -BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(COMMON_PATH)/bluetooth/include +BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(DEVICE_PATH)/bluetooth/include # Properties -TARGET_ODM_PROP += $(COMMON_PATH)/odm.prop -TARGET_PRODUCT_PROP += $(COMMON_PATH)/product.prop -TARGET_SYSTEM_EXT_PROP += $(COMMON_PATH)/system_ext.prop -TARGET_VENDOR_PROP += $(COMMON_PATH)/vendor.prop +TARGET_ODM_PROP += $(DEVICE_PATH)/odm.prop +TARGET_PRODUCT_PROP += $(DEVICE_PATH)/product.prop +TARGET_SYSTEM_EXT_PROP += $(DEVICE_PATH)/system_ext.prop +TARGET_VENDOR_PROP += $(DEVICE_PATH)/vendor.prop # Display TARGET_USES_COLOR_METADATA := true @@ -79,22 +79,22 @@ TARGET_USES_QTI_MAPPER_2_0 := true TARGET_USES_QTI_MAPPER_EXTENSIONS_1_1 := true # Filesystem -TARGET_FS_CONFIG_GEN := $(COMMON_PATH)/config.fs +TARGET_FS_CONFIG_GEN := $(DEVICE_PATH)/config.fs # Fingerprint TARGET_SURFACEFLINGER_UDFPS_LIB := //hardware/oplus:libudfps_extension.oplus # HIDL DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \ - $(COMMON_PATH)/device_framework_matrix.xml \ + $(DEVICE_PATH)/device_framework_matrix.xml \ hardware/qcom-caf/common/vendor_framework_compatibility_matrix.xml \ vendor/lineage/config/device_framework_matrix.xml -DEVICE_MATRIX_FILE := $(COMMON_PATH)/compatibility_matrix.xml -DEVICE_MANIFEST_FILE := $(COMMON_PATH)/manifest.xml -ODM_MANIFEST_FILES := $(COMMON_PATH)/manifest_odm.xml +DEVICE_MATRIX_FILE := $(DEVICE_PATH)/compatibility_matrix.xml +DEVICE_MANIFEST_FILE := $(DEVICE_PATH)/manifest.xml +ODM_MANIFEST_FILES := $(DEVICE_PATH)/manifest_odm.xml # Init -TARGET_INIT_VENDOR_LIB := //$(COMMON_PATH):libinit_oplus +TARGET_INIT_VENDOR_LIB := //$(DEVICE_PATH):libinit_oplus # Kernel BOARD_BOOT_HEADER_VERSION := 2 @@ -117,12 +117,12 @@ BOARD_KERNEL_SEPARATED_DTBO := true BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION) BOARD_RAMDISK_USE_LZ4 := true TARGET_KERNEL_ADDITIONAL_FLAGS := BRAND_SHOW_FLAG=oneplus -TARGET_KERNEL_SOURCE := kernel/oneplus/sm8250 -TARGET_KERNEL_CONFIG := vendor/kona-perf_defconfig +TARGET_KERNEL_SOURCE := kernel/oneplus/sm7250 +TARGET_KERNEL_CONFIG := vendor/lito-perf_defconfig # Platform BOARD_USES_QCOM_HARDWARE := true -TARGET_BOARD_PLATFORM := kona +TARGET_BOARD_PLATFORM := lito # Metadata BOARD_USES_METADATA_PARTITION := true @@ -161,7 +161,7 @@ TARGET_USERIMAGES_USE_EXT4 := true TARGET_USERIMAGES_USE_F2FS := true # RIL -CUSTOM_APNS_FILE := $(COMMON_PATH)/configs/apns-conf.xml +CUSTOM_APNS_FILE := $(DEVICE_PATH)/configs/apns-conf.xml ENABLE_VENDOR_RIL_SERVICE := true # Security @@ -197,4 +197,4 @@ WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true WPA_SUPPLICANT_VERSION := VER_0_8_X # Include the proprietary files BoardConfig. -include vendor/oneplus/sm8250-common/BoardConfigVendor.mk +include vendor/oneplus/avicii/BoardConfigVendor.mk diff --git a/common.mk b/device.mk similarity index 99% rename from common.mk rename to device.mk index 27ab773..8632d39 100644 --- a/common.mk +++ b/device.mk @@ -46,10 +46,10 @@ PRODUCT_PACKAGES += \ android.hardware.bluetooth.audio@2.0-impl \ android.hardware.soundtrigger@2.3-impl \ audio.bluetooth.default \ - audio.primary.kona \ + audio.primary.lito \ audio.r_submix.default \ audio.usb.default \ - audio_amplifier.kona \ + audio_amplifier.lito \ liba2dpoffload \ libbatterylistener \ libcomprcapture \ @@ -134,7 +134,7 @@ PRODUCT_PACKAGES += \ android.hardware.graphics.mapper@4.0-impl-qti-display \ android.hardware.memtrack@1.0-impl \ android.hardware.memtrack@1.0-service \ - gralloc.kona \ + gralloc.lito \ libdisplayconfig.qti \ libdisplayconfig.system.qti \ libqdMetaData \ @@ -143,7 +143,7 @@ PRODUCT_PACKAGES += \ libsdmutils \ libtinyxml \ libvulkan \ - memtrack.kona \ + memtrack.lito \ vendor.display.config@1.9.vendor \ vendor.display.config@2.0 \ vendor.display.config@2.0.vendor \ @@ -465,4 +465,4 @@ PRODUCT_BOOT_JARS += \ WfdCommon # Inherit from the proprietary files makefile. -$(call inherit-product, vendor/oneplus/sm8250-common/sm8250-common-vendor.mk) +$(call inherit-product, vendor/oneplus/avicii/avicii-vendor.mk) diff --git a/extract-files.sh b/extract-files.sh index d358d54..f82d486 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -8,6 +8,9 @@ set -e +DEVICE=avicii +VENDOR=oneplus + # Load extract_utils and do some sanity checks MY_DIR="${BASH_SOURCE%/*}" if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi @@ -24,19 +27,11 @@ source "${HELPER}" # Default to sanitizing the vendor folder before extraction CLEAN_VENDOR=true -ONLY_COMMON= -ONLY_TARGET= KANG= SECTION= while [ "${#}" -gt 0 ]; do case "${1}" in - --only-common ) - ONLY_COMMON=true - ;; - --only-target ) - ONLY_TARGET=true - ;; -n | --no-cleanup ) CLEAN_VENDOR=false ;; @@ -96,19 +91,9 @@ function blob_fixup() { esac } -if [ -z "${ONLY_TARGET}" ]; then - # Initialize the helper for common device - setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${ANDROID_ROOT}" true "${CLEAN_VENDOR}" +# Initialize the helper +setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}" - extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}" -fi - -if [ -z "${ONLY_COMMON}" ] && [ -s "${MY_DIR}/../${DEVICE}/proprietary-files.txt" ]; then - # Reinitialize the helper for device - source "${MY_DIR}/../${DEVICE}/extract-files.sh" - setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}" - - extract "${MY_DIR}/../${DEVICE}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}" -fi +extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}" "${MY_DIR}/setup-makefiles.sh" diff --git a/lineage.dependencies b/lineage.dependencies index a7aa201..bb0b659 100644 --- a/lineage.dependencies +++ b/lineage.dependencies @@ -4,7 +4,7 @@ "target_path": "hardware/oplus" }, { - "repository": "android_kernel_oneplus_sm8250", - "target_path": "kernel/oneplus/sm8250" + "repository": "android_kernel_oneplus_sm7250", + "target_path": "kernel/oneplus/sm7250" } ] diff --git a/setup-makefiles.sh b/setup-makefiles.sh index 251dc57..dd4a215 100755 --- a/setup-makefiles.sh +++ b/setup-makefiles.sh @@ -8,6 +8,9 @@ set -e +DEVICE=avicii +VENDOR=oneplus + # Load extract_utils and do some sanity checks MY_DIR="${BASH_SOURCE%/*}" if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi @@ -21,28 +24,13 @@ if [ ! -f "${HELPER}" ]; then fi source "${HELPER}" -# Initialize the helper for common -setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${ANDROID_ROOT}" true +# Initialize the helper +setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" # Warning headers and guards -write_headers "instantnoodle instantnoodlep kebab" +write_headers -# The standard common blobs write_makefiles "${MY_DIR}/proprietary-files.txt" true # Finish write_footers - -if [ -s "${MY_DIR}/../${DEVICE}/proprietary-files.txt" ]; then - # Reinitialize the helper for device - setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false - - # Warning headers and guards - write_headers - - # The standard device blobs - write_makefiles "${MY_DIR}/../${DEVICE}/proprietary-files.txt" true - - # Finish - write_footers -fi