123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196 |
- # Kernel
- ifeq ($(TARGET_PREBUILT_KERNEL),)
- LOCAL_KERNEL := device/thead/th1520-kernel/kernel-5.10
- else
- LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
- endif
- ifeq ($(TARGET_PREBUILT_DTB), )
- LOCAL_DTB := device/thead/th1520-kernel/light-lpi4a-android.dtb
- else
- LOCAL_DTB := $(TARGET_PREBUILT_DTB)
- endif
- PRODUCT_COPY_FILES := \
- $(LOCAL_KERNEL):kernel \
- # Load beaglev_ahead feature config
- $(call inherit-product, device/thead/th1520/beaglev_ahead/product_config.mk)
- # Install th1520 platform common packages
- $(call inherit-product, device/thead/th1520/th1520-common.mk)
- # Install generic packages
- $(call inherit-product, vendor/thead/proprietary/config/generic/generic.mk)
- # Install beaglev_ahead proprietary packages
- $(call inherit-product, vendor/thead/proprietary/config/boards/beaglev_ahead/device-vendor.mk)
- # Overlay
- DEVICE_PACKAGE_OVERLAYS := device/thead/th1520/beaglev_ahead/overlay
- # evb_ligth init files
- PRODUCT_COPY_FILES += \
- device/thead/th1520/beaglev_ahead/init.beaglev_ahead.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.beaglev_ahead.rc \
- device/thead/th1520/beaglev_ahead/init.common.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.beaglev_ahead.usb.rc \
- device/thead/th1520/beaglev_ahead/init.connectivity.beaglev_ahead.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.connectivity.beaglev_ahead.rc \
- device/thead/th1520/beaglev_ahead/ueventd.beaglev_ahead.rc:$(TARGET_COPY_OUT_VENDOR)/etc/ueventd.rc \
- # beaglev_ahead fstab files
- PRODUCT_COPY_FILES += \
- device/thead/th1520/beaglev_ahead/fstab.beaglev_ahead:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.beaglev_ahead \
- device/thead/th1520/beaglev_ahead/fstab.beaglev_ahead.ramdisk:$(TARGET_COPY_OUT_RAMDISK)/fstab.beaglev_ahead \
- device/thead/th1520/beaglev_ahead/fstab.enableswap:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.enableswap \
- # Recovery files
- PRODUCT_COPY_FILES += \
- device/thead/th1520/beaglev_ahead/init.recovery.beaglev_ahead.rc:recovery/root/init.recovery.beaglev_ahead.rc \
- # beaglev_ahead media configurations
- PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \
- frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml \
- frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video.xml \
- $(LOCAL_PATH)/media_codecs_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance.xml \
- # beaglev_ahead permission configurations
- PRODUCT_COPY_FILES += \
- frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml \
- frameworks/native/data/etc/android.hardware.opengles.aep.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.opengles.aep.xml \
- PRODUCT_COPY_FILES += $(LOCAL_PATH)/android.software.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.xml
- PRODUCT_COPY_FILES += $(LOCAL_PATH)/android.hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.xml
- # ethernet #
- PRODUCT_COPY_FILES += \
- frameworks/native/data/etc/android.hardware.ethernet.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.ethernet.xml
- # The device supports verified boot
- PRODUCT_COPY_FILES += \
- frameworks/native/data/etc/android.software.verified_boot.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.verified_boot.xml
- # USB properties
- PRODUCT_VENDOR_PROPERTIES += \
- ro.boot.usb_mode=1 \
- ro.boot.usb_speed=5
- # Display lcd denstity
- TARGET_SCREEN_DENSITY := 320
- # Enable AVB
- BOARD_AVB_ENABLE := true
- BOARD_BOOTIMAGE_PARTITION_SIZE := 0x2000000
- # BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x2800000
- # Installs gsi keys into ramdisk, to boot a developer GSI with verified boot.
- $(call inherit-product, $(SRC_TARGET_DIR)/product/developer_gsi_keys.mk)
- # Set Vendor SPL to match platform
- VENDOR_SECURITY_PATCH = $(PLATFORM_SECURITY_PATCH)
- # Set boot SPL
- BOOT_SECURITY_PATCH = $(PLATFORM_SECURITY_PATCH)
- # product.img
- BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
- TARGET_COPY_OUT_PRODUCT := product
- # system_ext.img
- BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
- TARGET_COPY_OUT_SYSTEM_EXT := system_ext
- #vendor_ramdisk.img
- BOARD_BUILD_VENDOR_RAMDISK_IMAGE := true
- PRODUCT_PACKAGES += \
- linker.vendor_ramdisk \
- e2fsck.vendor_ramdisk \
- BOARD_AVB_VBMETA_SYSTEM := system system_ext product
- BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
- BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA2048
- BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
- BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 1
- # Enable chained vbmeta for boot images
- BOARD_AVB_BOOT_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
- BOARD_AVB_BOOT_ALGORITHM := SHA256_RSA2048
- BOARD_AVB_BOOT_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
- BOARD_AVB_BOOT_ROLLBACK_INDEX_LOCATION := 2
- # Fix cts bug CtsThemeHostTestCases about xhdpi assets missing
- PRODUCT_AAPT_PREF_CONFIG := xhdpi
- # Enable APK Verity, which depends on fs-verity support in kernel.
- PRODUCT_PROPERTY_OVERRIDES += ro.apk_verity.mode=2
- PRODUCT_COPY_FILES += \
- system/core/libprocessgroup/profiles/cgroups.json:$(TARGET_COPY_OUT_VENDOR)/etc/cgroups.json \
- system/core/libprocessgroup/profiles/task_profiles.json:$(TARGET_COPY_OUT_VENDOR)/etc/task_profiles.json
- # fastbootd
- PRODUCT_PACKAGES += \
- fastbootd \
- # Dumpstate HAL
- PRODUCT_PACKAGES += \
- android.hardware.dumpstate@1.1-service.th1520
- # Atrace HAL
- PRODUCT_PACKAGES += \
- android.hardware.atrace@1.0-service.th1520
- #
- # OemLock aidl HAL
- #
- PRODUCT_PACKAGES += \
- android.hardware.oemlock-service.th1520
- #
- # Authsecret HAL
- #
- PRODUCT_PACKAGES += \
- android.hardware.authsecret@1.0-service
- #
- # Authsecret AIDL HAL
- #
- PRODUCT_PACKAGES += \
- android.hardware.authsecret-service.example
- # Input Classifier HAL
- PRODUCT_PACKAGES += \
- android.hardware.input.classifier@1.0-service.default
- # Reboot escrow
- PRODUCT_PACKAGES += \
- android.hardware.rebootescrow-service.default
- # Set system properties identifying the chipset
- PRODUCT_VENDOR_PROPERTIES += ro.soc.manufacturer=T-HEAD
- PRODUCT_VENDOR_PROPERTIES += ro.soc.model=TH1520
- PRODUCT_PACKAGES_DEBUG += \
- sg_write_buffer \
- f2fs_io \
- check_f2fs
- # Use FUSE passthrough
- PRODUCT_PRODUCT_PROPERTIES += \
- persist.sys.fuse.passthrough.enable=true
- # Fix cts bug CtsNativeVerifiedBootTestCases
- PRODUCT_PRODUCT_PROPERTIES += \
- partition.system.verified.hash_alg=$(BOARD_AVB_VBMETA_SYSTEM_ALGORITHM) \
- partition.system_ext.verified.hash_alg=$(BOARD_AVB_VBMETA_SYSTEM_ALGORITHM) \
- partition.vendor.verified.hash_alg=$(BOARD_AVB_VBMETA_SYSTEM_ALGORITHM) \
- partition.product.verified.hash_alg=$(BOARD_AVB_VBMETA_SYSTEM_ALGORITHM) \
- ifeq ($(PRODUCT_BUILD_TYPE), daily)
- DAILY_BUILD_TIME := $(shell date +"%Y-%m-%d:%H:%M:%S")
- PRODUCT_PRODUCT_PROPERTIES += \
- ro.product.beaglev_ahead.version=RV64.Android.$(PLATFORM_VERSION_LAST_STABLE).alpha.V0.2.daily$(DAILY_BUILD_TIME)
- else
- PRODUCT_PRODUCT_PROPERTIES += \
- ro.product.beaglev_ahead.version=RV64.Android.$(PLATFORM_VERSION_LAST_STABLE).alpha.V0.2
- endif
|