device-beaglev_ahead.mk 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. # Kernel
  2. ifeq ($(TARGET_PREBUILT_KERNEL),)
  3. LOCAL_KERNEL := device/thead/th1520-kernel/kernel-5.10
  4. else
  5. LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
  6. endif
  7. ifeq ($(TARGET_PREBUILT_DTB), )
  8. LOCAL_DTB := device/thead/th1520-kernel/light-lpi4a-android.dtb
  9. else
  10. LOCAL_DTB := $(TARGET_PREBUILT_DTB)
  11. endif
  12. PRODUCT_COPY_FILES := \
  13. $(LOCAL_KERNEL):kernel \
  14. # Load beaglev_ahead feature config
  15. $(call inherit-product, device/thead/th1520/beaglev_ahead/product_config.mk)
  16. # Install th1520 platform common packages
  17. $(call inherit-product, device/thead/th1520/th1520-common.mk)
  18. # Install generic packages
  19. $(call inherit-product, vendor/thead/proprietary/config/generic/generic.mk)
  20. # Install beaglev_ahead proprietary packages
  21. $(call inherit-product, vendor/thead/proprietary/config/boards/beaglev_ahead/device-vendor.mk)
  22. # Overlay
  23. DEVICE_PACKAGE_OVERLAYS := device/thead/th1520/beaglev_ahead/overlay
  24. # evb_ligth init files
  25. PRODUCT_COPY_FILES += \
  26. device/thead/th1520/beaglev_ahead/init.beaglev_ahead.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.beaglev_ahead.rc \
  27. device/thead/th1520/beaglev_ahead/init.common.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.beaglev_ahead.usb.rc \
  28. device/thead/th1520/beaglev_ahead/init.connectivity.beaglev_ahead.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.connectivity.beaglev_ahead.rc \
  29. device/thead/th1520/beaglev_ahead/ueventd.beaglev_ahead.rc:$(TARGET_COPY_OUT_VENDOR)/etc/ueventd.rc \
  30. # beaglev_ahead fstab files
  31. PRODUCT_COPY_FILES += \
  32. device/thead/th1520/beaglev_ahead/fstab.beaglev_ahead:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.beaglev_ahead \
  33. device/thead/th1520/beaglev_ahead/fstab.beaglev_ahead.ramdisk:$(TARGET_COPY_OUT_RAMDISK)/fstab.beaglev_ahead \
  34. device/thead/th1520/beaglev_ahead/fstab.enableswap:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.enableswap \
  35. # Recovery files
  36. PRODUCT_COPY_FILES += \
  37. device/thead/th1520/beaglev_ahead/init.recovery.beaglev_ahead.rc:recovery/root/init.recovery.beaglev_ahead.rc \
  38. # beaglev_ahead media configurations
  39. PRODUCT_COPY_FILES += \
  40. $(LOCAL_PATH)/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \
  41. frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml \
  42. frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video.xml \
  43. $(LOCAL_PATH)/media_codecs_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance.xml \
  44. # beaglev_ahead permission configurations
  45. PRODUCT_COPY_FILES += \
  46. frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml \
  47. frameworks/native/data/etc/android.hardware.opengles.aep.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.opengles.aep.xml \
  48. PRODUCT_COPY_FILES += $(LOCAL_PATH)/android.software.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.xml
  49. PRODUCT_COPY_FILES += $(LOCAL_PATH)/android.hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.xml
  50. # ethernet #
  51. PRODUCT_COPY_FILES += \
  52. frameworks/native/data/etc/android.hardware.ethernet.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.ethernet.xml
  53. # The device supports verified boot
  54. PRODUCT_COPY_FILES += \
  55. frameworks/native/data/etc/android.software.verified_boot.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.verified_boot.xml
  56. # USB properties
  57. PRODUCT_VENDOR_PROPERTIES += \
  58. ro.boot.usb_mode=1 \
  59. ro.boot.usb_speed=5
  60. # Display lcd denstity
  61. TARGET_SCREEN_DENSITY := 320
  62. # Enable AVB
  63. BOARD_AVB_ENABLE := true
  64. BOARD_BOOTIMAGE_PARTITION_SIZE := 0x2000000
  65. # BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x2800000
  66. # Installs gsi keys into ramdisk, to boot a developer GSI with verified boot.
  67. $(call inherit-product, $(SRC_TARGET_DIR)/product/developer_gsi_keys.mk)
  68. # Set Vendor SPL to match platform
  69. VENDOR_SECURITY_PATCH = $(PLATFORM_SECURITY_PATCH)
  70. # Set boot SPL
  71. BOOT_SECURITY_PATCH = $(PLATFORM_SECURITY_PATCH)
  72. # product.img
  73. BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
  74. TARGET_COPY_OUT_PRODUCT := product
  75. # system_ext.img
  76. BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
  77. TARGET_COPY_OUT_SYSTEM_EXT := system_ext
  78. #vendor_ramdisk.img
  79. BOARD_BUILD_VENDOR_RAMDISK_IMAGE := true
  80. PRODUCT_PACKAGES += \
  81. linker.vendor_ramdisk \
  82. e2fsck.vendor_ramdisk \
  83. BOARD_AVB_VBMETA_SYSTEM := system system_ext product
  84. BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
  85. BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA2048
  86. BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
  87. BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 1
  88. # Enable chained vbmeta for boot images
  89. BOARD_AVB_BOOT_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
  90. BOARD_AVB_BOOT_ALGORITHM := SHA256_RSA2048
  91. BOARD_AVB_BOOT_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
  92. BOARD_AVB_BOOT_ROLLBACK_INDEX_LOCATION := 2
  93. # Fix cts bug CtsThemeHostTestCases about xhdpi assets missing
  94. PRODUCT_AAPT_PREF_CONFIG := xhdpi
  95. # Enable APK Verity, which depends on fs-verity support in kernel.
  96. PRODUCT_PROPERTY_OVERRIDES += ro.apk_verity.mode=2
  97. PRODUCT_COPY_FILES += \
  98. system/core/libprocessgroup/profiles/cgroups.json:$(TARGET_COPY_OUT_VENDOR)/etc/cgroups.json \
  99. system/core/libprocessgroup/profiles/task_profiles.json:$(TARGET_COPY_OUT_VENDOR)/etc/task_profiles.json
  100. # fastbootd
  101. PRODUCT_PACKAGES += \
  102. fastbootd \
  103. # Dumpstate HAL
  104. PRODUCT_PACKAGES += \
  105. android.hardware.dumpstate@1.1-service.th1520
  106. # Atrace HAL
  107. PRODUCT_PACKAGES += \
  108. android.hardware.atrace@1.0-service.th1520
  109. #
  110. # OemLock aidl HAL
  111. #
  112. PRODUCT_PACKAGES += \
  113. android.hardware.oemlock-service.th1520
  114. #
  115. # Authsecret HAL
  116. #
  117. PRODUCT_PACKAGES += \
  118. android.hardware.authsecret@1.0-service
  119. #
  120. # Authsecret AIDL HAL
  121. #
  122. PRODUCT_PACKAGES += \
  123. android.hardware.authsecret-service.example
  124. # Input Classifier HAL
  125. PRODUCT_PACKAGES += \
  126. android.hardware.input.classifier@1.0-service.default
  127. # Reboot escrow
  128. PRODUCT_PACKAGES += \
  129. android.hardware.rebootescrow-service.default
  130. # Set system properties identifying the chipset
  131. PRODUCT_VENDOR_PROPERTIES += ro.soc.manufacturer=T-HEAD
  132. PRODUCT_VENDOR_PROPERTIES += ro.soc.model=TH1520
  133. PRODUCT_PACKAGES_DEBUG += \
  134. sg_write_buffer \
  135. f2fs_io \
  136. check_f2fs
  137. # Use FUSE passthrough
  138. PRODUCT_PRODUCT_PROPERTIES += \
  139. persist.sys.fuse.passthrough.enable=true
  140. # Fix cts bug CtsNativeVerifiedBootTestCases
  141. PRODUCT_PRODUCT_PROPERTIES += \
  142. partition.system.verified.hash_alg=$(BOARD_AVB_VBMETA_SYSTEM_ALGORITHM) \
  143. partition.system_ext.verified.hash_alg=$(BOARD_AVB_VBMETA_SYSTEM_ALGORITHM) \
  144. partition.vendor.verified.hash_alg=$(BOARD_AVB_VBMETA_SYSTEM_ALGORITHM) \
  145. partition.product.verified.hash_alg=$(BOARD_AVB_VBMETA_SYSTEM_ALGORITHM) \
  146. ifeq ($(PRODUCT_BUILD_TYPE), daily)
  147. DAILY_BUILD_TIME := $(shell date +"%Y-%m-%d:%H:%M:%S")
  148. PRODUCT_PRODUCT_PROPERTIES += \
  149. ro.product.beaglev_ahead.version=RV64.Android.$(PLATFORM_VERSION_LAST_STABLE).alpha.V0.2.daily$(DAILY_BUILD_TIME)
  150. else
  151. PRODUCT_PRODUCT_PROPERTIES += \
  152. ro.product.beaglev_ahead.version=RV64.Android.$(PLATFORM_VERSION_LAST_STABLE).alpha.V0.2
  153. endif