BoardConfig.mk 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. #
  2. # Copyright (C) 2020 The Android Open Source Project
  3. # Copyright (C) 2020 The TWRP Open Source Project
  4. # Copyright (C) 2020 SebaUbuntu's TWRP device tree generator
  5. #
  6. # Licensed under the Apache License, Version 2.0 (the "License");
  7. # you may not use this file except in compliance with the License.
  8. # You may obtain a copy of the License at
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  12. # Unless required by applicable law or agreed to in writing, software
  13. # distributed under the License is distributed on an "AS IS" BASIS,
  14. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. # See the License for the specific language governing permissions and
  16. # limitations under the License.
  17. #
  18. DEVICE_PATH := device/hmd/WSP_sprout
  19. # For building with minimal manifest
  20. ALLOW_MISSING_DEPENDENCIES := true
  21. # Architecture
  22. TARGET_ARCH := arm64
  23. TARGET_ARCH_VARIANT := armv8-a
  24. TARGET_CPU_ABI := arm64-v8a
  25. TARGET_CPU_ABI2 :=
  26. TARGET_CPU_VARIANT := generic
  27. TARGET_2ND_ARCH := arm
  28. TARGET_2ND_ARCH_VARIANT := armv7-a-neon
  29. TARGET_2ND_CPU_ABI := armeabi-v7a
  30. TARGET_2ND_CPU_ABI2 := armeabi
  31. TARGET_2ND_CPU_VARIANT := generic
  32. TARGET_BOARD_SUFFIX := _64
  33. TARGET_USES_64_BIT_BINDER := true
  34. # Assert
  35. TARGET_OTA_ASSERT_DEVICE := WSP_sprout
  36. # File systems
  37. BOARD_HAS_LARGE_FILESYSTEM := true
  38. #BOARD_RECOVERYIMAGE_PARTITION_SIZE := 33554432 # This is the maximum known partition size, but it can be higher, so we just omit it
  39. BOARD_SYSTEMIMAGE_PARTITION_TYPE := ext4
  40. BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := ext4
  41. BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
  42. TARGET_USERIMAGES_USE_EXT4 := true
  43. TARGET_USERIMAGES_USE_F2FS := true
  44. TARGET_COPY_OUT_VENDOR := vendor
  45. # A/B
  46. AB_OTA_UPDATER := true
  47. TW_INCLUDE_REPACKTOOLS := true
  48. # Kernel
  49. BOARD_KERNEL_CMDLINE := bootopt=64S3,32N2,64N2 buildvariant=user
  50. TARGET_PREBUILT_KERNEL := $(DEVICE_PATH)/prebuilt/Image.gz
  51. TARGET_PREBUILT_DTB := $(DEVICE_PATH)/prebuilt/dtb.img
  52. BOARD_BOOTIMG_HEADER_VERSION := 2
  53. BOARD_KERNEL_BASE := 0x40078000
  54. BOARD_KERNEL_PAGESIZE := 2048
  55. BOARD_RAMDISK_OFFSET := 0x11a88000
  56. BOARD_KERNEL_TAGS_OFFSET := 0x07808000
  57. BOARD_FLASH_BLOCK_SIZE := 131072 # (BOARD_KERNEL_PAGESIZE * 64)
  58. BOARD_MKBOOTIMG_ARGS += --ramdisk_offset $(BOARD_RAMDISK_OFFSET)
  59. BOARD_MKBOOTIMG_ARGS += --tags_offset $(BOARD_KERNEL_TAGS_OFFSET)
  60. BOARD_MKBOOTIMG_ARGS += --dtb $(TARGET_PREBUILT_DTB)
  61. BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOTIMG_HEADER_VERSION)
  62. BOARD_KERNEL_IMAGE_NAME := Image.gz
  63. TARGET_KERNEL_ARCH := arm64
  64. TARGET_KERNEL_HEADER_ARCH := arm64
  65. TARGET_KERNEL_SOURCE := kernel/hmd/WSP_sprout
  66. TARGET_KERNEL_CONFIG := WSP_sprout_defconfig
  67. # Platform
  68. TARGET_BOARD_PLATFORM := mt6761
  69. # Hack: prevent anti rollback
  70. PLATFORM_SECURITY_PATCH := 2099-12-31
  71. VENDOR_SECURITY_PATCH := 2099-12-31
  72. PLATFORM_VERSION := 16.1.0
  73. # TWRP Configuration
  74. TW_THEME := portrait_hdpi
  75. TW_EXTRA_LANGUAGES := true
  76. TW_SCREEN_BLANK_ON_BOOT := true
  77. TW_INPUT_BLACKLIST := "hbtp_vm"
  78. TW_USE_TOOLBOX := true
  79. TW_MAX_BRIGHTNESS := 255