commit 8bc98e84184be3eba3587c96fc62d54461df53a0 Author: Peter Cai Date: Wed Jun 19 07:36:53 2019 +0800 init from violet tree violet pseudo-GSI tree by @GuaiYiHu diff --git a/Android.mk b/Android.mk new file mode 100644 index 00000000..1fc2f002 --- /dev/null +++ b/Android.mk @@ -0,0 +1,83 @@ +# +# Copyright (C) 2018-2019 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +LOCAL_PATH := $(call my-dir) + +ifeq ($(TARGET_DEVICE),guacamoleb) +include $(call all-makefiles-under,$(LOCAL_PATH)) + +include $(CLEAR_VARS) + +# A/B builds require us to create the mount points at compile time. +# Just creating it for all cases since it does not hurt. +FIRMWARE_MOUNT_POINT := $(TARGET_OUT_VENDOR)/firmware_mnt +$(FIRMWARE_MOUNT_POINT): $(LOCAL_INSTALLED_MODULE) + @echo "Creating $(FIRMWARE_MOUNT_POINT)" + @mkdir -p $(TARGET_OUT_VENDOR)/firmware_mnt + +BT_FIRMWARE_MOUNT_POINT := $(TARGET_OUT_VENDOR)/bt_firmware +$(BT_FIRMWARE_MOUNT_POINT): $(LOCAL_INSTALLED_MODULE) + @echo "Creating $(BT_FIRMWARE_MOUNT_POINT)" + @mkdir -p $(TARGET_OUT_VENDOR)/bt_firmware + +DSP_MOUNT_POINT := $(TARGET_OUT_VENDOR)/dsp +$(DSP_MOUNT_POINT): $(LOCAL_INSTALLED_MODULE) + @echo "Creating $(DSP_MOUNT_POINT)" + @mkdir -p $(TARGET_OUT_VENDOR)/dsp + +ALL_DEFAULT_INSTALLED_MODULES += $(FIRMWARE_MOUNT_POINT) $(BT_FIRMWARE_MOUNT_POINT) $(DSP_MOUNT_POINT) + +RFS_MSM_ADSP_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/msm/adsp/ +$(RFS_MSM_ADSP_SYMLINKS): $(LOCAL_INSTALLED_MODULE) + @echo "Creating RFS MSM ADSP folder structure: $@" + @rm -rf $@/* + @mkdir -p $(dir $@)/readonly/vendor + $(hide) ln -sf /data/vendor/tombstones/rfs/lpass $@/ramdumps + $(hide) ln -sf /mnt/vendor/persist/rfs/msm/adsp $@/readwrite + $(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared + $(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos + $(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware + $(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware + +RFS_MSM_CDSP_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/msm/cdsp/ +$(RFS_MSM_CDSP_SYMLINKS): $(LOCAL_INSTALLED_MODULE) + @echo "Creating RFS MSM CDSP folder structure: $@" + @rm -rf $@/* + @mkdir -p $(dir $@)/readonly/vendor + $(hide) ln -sf /data/vendor/tombstones/rfs/cdsp $@/ramdumps + $(hide) ln -sf /mnt/vendor/persist/rfs/msm/cdsp $@/readwrite + $(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared + $(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos + $(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware + $(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware + +RFS_MSM_MPSS_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/msm/mpss/ +$(RFS_MSM_MPSS_SYMLINKS): $(LOCAL_INSTALLED_MODULE) + @echo "Creating RFS MSM MPSS folder structure: $@" + @rm -rf $@/* + @mkdir -p $(dir $@)/readonly/vendor + $(hide) ln -sf /data/vendor/tombstones/rfs/modem $@/ramdumps + $(hide) ln -sf /mnt/vendor/persist/rfs/msm/mpss $@/readwrite + $(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared + $(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos + $(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware + $(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware + +RFS_MSM_SLPI_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/msm/slpi/ +$(RFS_MSM_SLPI_SYMLINKS): $(LOCAL_INSTALLED_MODULE) + @echo "Creating RFS MSM SLPI folder structure: $@" + @rm -rf $@/* + @mkdir -p $(dir $@)/readonly/vendor + $(hide) ln -sf /data/vendor/tombstones/rfs/slpi $@/ramdumps + $(hide) ln -sf /mnt/vendor/persist/rfs/msm/slpi $@/readwrite + $(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared + $(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos + $(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware + $(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware + +ALL_DEFAULT_INSTALLED_MODULES += $(RFS_MSM_ADSP_SYMLINKS) $(RFS_MSM_CDSP_SYMLINKS) $(RFS_MSM_MPSS_SYMLINKS) $(RFS_MSM_SLPI_SYMLINKS) + +endif diff --git a/AndroidProducts.mk b/AndroidProducts.mk new file mode 100644 index 00000000..39f85408 --- /dev/null +++ b/AndroidProducts.mk @@ -0,0 +1,8 @@ +# +# Copyright (C) 2019 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +PRODUCT_MAKEFILES := \ + $(LOCAL_DIR)/lineage_guacamoleb.mk diff --git a/BoardConfig.mk b/BoardConfig.mk new file mode 100644 index 00000000..bed02dfa --- /dev/null +++ b/BoardConfig.mk @@ -0,0 +1,121 @@ +# +# Copyright (C) 2018-2019 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +BOARD_VENDOR := oneplus +DEVICE_PATH := device/oneplus/guacamoleb + +# Architecture +TARGET_ARCH := arm64 +TARGET_ARCH_VARIANT := armv8-2a +TARGET_CPU_ABI := arm64-v8a +TARGET_CPU_ABI2 := +TARGET_CPU_VARIANT := cortex-a75 + +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 := cortex-a55 + +TARGET_USES_64_BIT_BINDER := true + +# Assert +TARGET_OTA_ASSERT_DEVICE := OnePlus7Pro + +# Bootloader +TARGET_BOOTLOADER_BOARD_NAME := sm8150 +TARGET_NO_BOOTLOADER := true + +# Kernel +BOARD_KERNEL_CMDLINE := androidboot.hardware=qcom androidboot.console=ttyMSM0 androidboot.memcg=1 lpm_levels.sleep_disabled=1 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 service_locator.enable=1 swiotlb=2048 firmware_class.path=/vendor/firmware_mnt/image loop.max_part=7 androidboot.usbcontroller=a600000.dwc3 +BOARD_KERNEL_CMDLINE += skip_override androidboot.fastboot=1 +BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive +BOARD_KERNEL_BASE := 0x00000000 +BOARD_KERNEL_PAGESIZE := 4096 +BOARD_KERNEL_TAGS_OFFSET := 0x01E00000 +BOARD_RAMDISK_OFFSET := 0x02000000 +BOARD_ROOT_EXTRA_FOLDERS := odm op1 op2 +BOARD_ROOT_EXTRA_SYMLINKS := /vendor/dsp:/dsp /vendor/firmware_mnt:/firmware /vendor/bt_firmware:/bt_firmware /mnt/vendor/persist:/persist +TARGET_KERNEL_ARCH := arm64 +TARGET_KERNEL_HEADER_ARCH := arm64 +TARGET_KERNEL_CROSS_COMPILE_PREFIX := aarch64-linux-android- +BOARD_KERNEL_IMAGE_NAME := Image-dtb +TARGET_KERNEL_SOURCE := kernel/oneplus/sm8150 +TARGET_KERNEL_CONFIG := sm8150-perf_defconfig +BOARD_KERNEL_SEPARATED_DTBO := true + +# Partitions +BOARD_BOOTIMAGE_PARTITION_SIZE := 100663296 +BOARD_CACHEIMAGE_PARTITION_SIZE := 268435456 +BOARD_RECOVERYIMAGE_PARTITION_SIZE := 100663296 +BOARD_SYSTEMIMAGE_PARTITION_SIZE := 3640655872 +BOARD_VENDORIMAGE_PARTITION_SIZE := 1073741824 +BOARD_USERDATAIMAGE_PARTITION_SIZE := 115601780736 +BOARD_DTBOIMG_PARTITION_SIZE := 8388608 +BOARD_FLASH_BLOCK_SIZE := 262144 +BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := ext4 +TARGET_NO_RECOVERY := true +BOARD_BUILD_SYSTEM_ROOT_IMAGE := true +BOARD_USES_RECOVERY_AS_BOOT := true + +TARGET_USERIMAGES_USE_EXT4 := true +TARGET_USERIMAGES_USE_F2FS := true +TARGET_USERIMAGES_SPARSE_EXT_DISABLED := false +TARGET_USES_MKE2FS := true + +TARGET_COPY_OUT_VENDOR := vendor + +# Platform +TARGET_BOARD_PLATFORM := msmnile +TARGET_BOARD_PLATFORM_GPU := qcom-adreno640 + +# 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 + +# Bluetooth: TBD +#BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(DEVICE_PATH)/bluetooth/include + +# Camera +TARGET_USES_QTI_CAMERA_DEVICE := true + +# Charger Mode +BOARD_CHARGER_ENABLE_SUSPEND := true + +# Dexopt +WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY ?= true + +# DRM +TARGET_ENABLE_MEDIADRM_64 := true + +# Filesystem +TARGET_FS_CONFIG_GEN := $(DEVICE_PATH)/config.fs + +# Graphics +NUM_FRAMEBUFFER_SURFACE_BUFFERS := 2 +TARGET_USES_HWC2 := true + +# RenderScript +OVERRIDE_RS_DRIVER := libRSDriver_adreno.so + +# RIL +TARGET_PROVIDES_QTI_TELEPHONY_JAR := true +TARGET_RIL_VARIANT := caf + +# Sepolicy: TBD + +# Recovery: TBD + +# Treble +BOARD_VNDK_VERSION := current +PRODUCT_FULL_TREBLE_OVERRIDE := true +# System.prop: TBD +#TARGET_SYSTEM_PROP += $(DEVICE_PATH)/system.prop + diff --git a/config.fs b/config.fs new file mode 100644 index 00000000..38553d3b --- /dev/null +++ b/config.fs @@ -0,0 +1,117 @@ + +[AID_VENDOR_QTI_DIAG] +value:2901 + +[AID_VENDOR_RFS] +value:2903 + +[AID_VENDOR_RFS_SHARED] +value:2904 + +[vendor/bin/wcnss_filter] +mode: 0755 +user: AID_BLUETOOTH +group: AID_BLUETOOTH +caps: BLOCK_SUSPEND + +[vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti] +mode: 0755 +user: AID_BLUETOOTH +group: AID_BLUETOOTH +caps: BLOCK_SUSPEND NET_ADMIN + +[vendor/bin/cnss-daemon] +mode: 0755 +user: AID_BLUETOOTH +group: AID_BLUETOOTH +caps: NET_BIND_SERVICE + +[vendor/bin/pm-service] +mode: 0755 +user: AID_SYSTEM +group: AID_SYSTEM +caps: NET_BIND_SERVICE + +[vendor/bin/pd-mapper] +mode: 0755 +user: AID_SYSTEM +group: AID_SYSTEM +caps: NET_BIND_SERVICE + +[vendor/bin/imsdatadaemon] +mode: 0755 +user: AID_SYSTEM +group: AID_SYSTEM +caps: NET_BIND_SERVICE + +[vendor/bin/ims_rtp_daemon] +mode: 0755 +user: AID_SYSTEM +group: AID_RADIO +caps: NET_BIND_SERVICE + +[vendor/bin/imsrcsd] +mode: 0755 +user: AID_SYSTEM +group: AID_RADIO +caps: WAKE_ALARM + +[vendor/bin/cnd] +mode: 0755 +user: AID_SYSTEM +group: AID_SYSTEM +caps: NET_BIND_SERVICE BLOCK_SUSPEND NET_ADMIN + +[vendor/bin/slim_daemon] +mode: 0755 +user: AID_GPS +group: AID_GPS +caps: NET_BIND_SERVICE + +[vendor/bin/xtwifi-client] +mode: 0755 +user: AID_GPS +group: AID_GPS +caps: NET_BIND_SERVICE BLOCK_SUSPEND WAKE_ALARM + +[vendor/bin/sensors.qti] +mode: 0755 +user: AID_SYSTEM +group: AID_SYSTEM +caps: NET_BIND_SERVICE + +[firmware/] +mode: 0771 +user: AID_SYSTEM +group: AID_SYSTEM +caps: 0 + +[firmware/image/*] +mode: 0771 +user: AID_SYSTEM +group: AID_SYSTEM +caps: 0 + +[vendor/firmware_mnt/image/*] +mode: 0771 +user: AID_ROOT +group: AID_SYSTEM +caps: 0 + +[bt_firmware/] +mode: 0771 +user: AID_SYSTEM +group: AID_SYSTEM +caps: 0 + +[persist/] +mode: 0771 +user: AID_SYSTEM +group: AID_SYSTEM +caps: 0 + +[dsp/] +mode: 0771 +user: AID_MEDIA +group: AID_MEDIA +caps: 0 diff --git a/configs/qti_whitelist.xml b/configs/qti_whitelist.xml new file mode 100644 index 00000000..c97fda8b --- /dev/null +++ b/configs/qti_whitelist.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/device.mk b/device.mk new file mode 100644 index 00000000..338b81fe --- /dev/null +++ b/device.mk @@ -0,0 +1,103 @@ +# +# Copyright (C) 2018-2019 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +# Inherit from those products. Most specific first. +$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/product_launched_with_p.mk) + +# Get non-open-source specific aspects +$(call inherit-product-if-exists, vendor/oneplus/guacamoleb/guacamoleb-vendor.mk) + +# Overlays +DEVICE_PACKAGE_OVERLAYS += \ + $(LOCAL_PATH)/overlay \ + +# AID/fs configs +PRODUCT_PACKAGES += \ + fs_config_files + +# Audio +PRODUCT_PACKAGES += \ + audio.a2dp.default \ + tinymix + +# Audio Policy: TBD + +# Camera +PRODUCT_PACKAGES += \ + Snap + +# Common init scripts +PRODUCT_PACKAGES += \ + init.qcom.rc + +# Display +PRODUCT_PACKAGES += \ + libvulkan \ + vendor.display.config@1.0 + +# Fingerprint +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.hardware.fingerprint.xml:system/etc/permissions/android.hardware.fingerprint.xml + +# HIDL +PRODUCT_PACKAGES += \ + android.hidl.base@1.0 \ + android.hidl.base@1.0_system \ + android.hidl.manager@1.0 \ + android.hidl.manager@1.0_system + +# IMS +PRODUCT_PACKAGES += \ + ims-ext-common + +# Input: TBD + +# Lights +PRODUCT_PACKAGES += \ + android.hardware.light@2.0-service.oneplus_sm8150 + +# Media: TBD + +# Net +PRODUCT_PACKAGES += \ + netutils-wrapper-1.0 + +# QTI +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/configs/qti_whitelist.xml:system/etc/sysconfig/qti_whitelist.xml \ + $(LOCAL_PATH)/permissions/privapp-permissions-qti.xml:system/etc/permissions/privapp-permissions-qti.xml + +# RCS +PRODUCT_PACKAGES += \ + rcs_service_aidl \ + rcs_service_aidl.xml \ + rcs_service_api \ + rcs_service_api.xml + +# Seccomp: TBD + +# Telephony +PRODUCT_PACKAGES += \ + telephony-ext + +PRODUCT_BOOT_JARS += \ + telephony-ext + +# TextClassifier +PRODUCT_PACKAGES += \ + textclassifier.bundle1 + +# Trust HAL +PRODUCT_PACKAGES += \ + vendor.lineage.trust@1.0-service + +# VNDK-SP +PRODUCT_PACKAGES += \ + vndk_package + +# Wifi Display: TBD diff --git a/lineage_guacamoleb.mk b/lineage_guacamoleb.mk new file mode 100644 index 00000000..5c1a7fbf --- /dev/null +++ b/lineage_guacamoleb.mk @@ -0,0 +1,28 @@ +# +# Copyright (C) 2019 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +$(call inherit-product, device/oneplus/guacamoleb/device.mk) +$(call inherit-product, vendor/lineage/config/common_full_phone.mk) + +# Device identifier. This must come after all inclusions. +PRODUCT_NAME := lineage_guacamoleb +PRODUCT_DEVICE := guacamoleb +PRODUCT_BRAND := OnePlus +PRODUCT_MODEL := OnePlus 7 Pro +PRODUCT_MANUFACTURER := OnePlus + +# Boot animation +TARGET_SCREEN_HEIGHT := 3120 +TARGET_SCREEN_WIDTH := 1440 + +# Build info +BUILD_FINGERPRINT := "OnePlus/OnePlus7Pro/OnePlus7Pro:9/PKQ1.190110.001/1906032330:user/release-keys" +PRODUCT_BUILD_PROP_OVERRIDES += \ + TARGET_DEVICE=OnePlus7Pro \ + PRODUCT_NAME=OnePlus7Pro \ + PRIVATE_BUILD_DESC="OnePlus7Pro-user 9 PKQ1.190110.001 1906032330 release-keys" + +PRODUCT_GMS_CLIENTID_BASE := android-oneplus diff --git a/permissions/privapp-permissions-qti.xml b/permissions/privapp-permissions-qti.xml new file mode 100644 index 00000000..3bc17745 --- /dev/null +++ b/permissions/privapp-permissions-qti.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendorsetup.sh b/vendorsetup.sh new file mode 100644 index 00000000..5761be31 --- /dev/null +++ b/vendorsetup.sh @@ -0,0 +1,2 @@ +add_lunch_combo lineage_guacamoleb-eng +add_lunch_combo lineage_guacamoleb-userdebug