BoardConfigCommon.mk 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #
  2. # Copyright (C) 2021 The Android Open-Source Project
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. #
  16. TARGET_ARCH := riscv64
  17. TARGET_CPU_ABI := riscv64
  18. TARGET_ARCH_VARIANT :=
  19. TARGET_CPU_VARIANT := generic
  20. -include vendor/thead/proprietary/config/arch/th1520.mk
  21. TARGET_USERIMAGES_USE_EXT4 := true
  22. BOARD_VNDK_VERSION := current
  23. BOARD_BOOTCONFIG += androidboot.console=ttyS0
  24. BOARD_BOOTCONFIG += androidboot.bootreason=cold,powerkey
  25. BOARD_BOOTCONFIG += androidboot.usb_mode=2
  26. BOARD_BOOTCONFIG += androidboot.usb_speed=5
  27. BOARD_BOOTCONFIG += androidboot.boot_devices=soc/ffe7080000.sdhci
  28. BOARD_BOOTCONFIG += androidboot.slot_suffix=_a
  29. BOARD_BOOTCONFIG += androidboot.selinux=permissive
  30. BOARD_KERNEL_CMDLINE += bootconfig
  31. # Include *.dtb to vendor_boot.img and use Android Boot Image v4
  32. BOARD_INCLUDE_DTB_IN_BOOTIMG := true
  33. BOARD_BOOT_HEADER_VERSION := 4
  34. BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
  35. # vendor_boot.img
  36. BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE := 0x02000000
  37. BOARD_DTBOIMG_PARTITION_SIZE := 0x100000 # 1 MiB
  38. # Pass unsigned dtbo image (generated by build/tasks/dtimages.mk) to Android
  39. # build system for AVB signing
  40. DTBO_UNSIGNED := dtbo-unsigned.img
  41. # $(PRODUCT_OUT) hasn't been defined yet, so use "=" instead of ":="
  42. # so that it is resolved later
  43. BOARD_PREBUILT_DTBOIMAGE = $(PRODUCT_OUT)/$(DTBO_UNSIGNED)
  44. # Enable dex pre-opt to speed up initial boot
  45. WITH_DEXPREOPT := true
  46. #AB, no retrofit
  47. BOARD_SUPER_PARTITION_SIZE := 4294967296 # 4GB
  48. BOARD_SUPER_PARTITION_GROUPS := th1520_dynamic_partitions
  49. BOARD_TH1520_DYNAMIC_PARTITIONS_PARTITION_LIST := system vendor system_ext product
  50. BOARD_TH1520_DYNAMIC_PARTITIONS_SIZE := 2143289344 # 4GB/2 - 4M
  51. BOARD_SUPER_PARTITION_METADATA_DEVICE := super
  52. BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT := true
  53. BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE := true
  54. BOARD_USES_METADATA_PARTITION := true
  55. BOARD_SEPOLICY_DIRS += device/thead/th1520/sepolicy/vendor
  56. BOARD_ROOT_EXTRA_SYMLINKS += /vendor/firmware:/lib/firmware