Blame view

imx8m/smarc_mx8mm/BoardConfig.mk 5.16 KB
3199ddb4e   Eric Lee   Android 10.0 patc...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
  #
  # SoC-specific compile-time definitions.
  #
  
  BOARD_SOC_TYPE := IMX8MM
  BOARD_TYPE := SMARC-IMX8MM
  BOARD_HAVE_VPU := true
  BOARD_VPU_TYPE := hantro
  HAVE_FSL_IMX_GPU2D := true
  HAVE_FSL_IMX_GPU3D := true
  HAVE_FSL_IMX_IPU := false
  HAVE_FSL_IMX_PXP := false
  BOARD_KERNEL_BASE := 0x40400000
  TARGET_GRALLOC_VERSION := v3
  TARGET_HIGH_PERFORMANCE := true
  TARGET_USES_HWC2 := true
  TARGET_HWCOMPOSER_VERSION := v2.0
  USE_OPENGL_RENDERER := true
  TARGET_HAVE_VULKAN := true
  ENABLE_CFI=false
  
  SOONG_CONFIG_IMXPLUGIN += \
                            BOARD_HAVE_VPU \
                            BOARD_VPU_TYPE
  
  SOONG_CONFIG_IMXPLUGIN_BOARD_SOC_TYPE = IMX8MM
  SOONG_CONFIG_IMXPLUGIN_BOARD_HAVE_VPU = true
  SOONG_CONFIG_IMXPLUGIN_BOARD_VPU_TYPE = hantro
  
  #
  # Product-specific compile-time definitions.
  #
  
  IMX_DEVICE_PATH := device/embedian/imx8m/smarc_mx8mm
  
  include device/fsl/imx8m/BoardConfigCommon.mk
  ifeq ($(PREBUILT_FSL_IMX_CODEC),true)
  -include $(FSL_CODEC_PATH)/fsl-codec/fsl-codec.mk
  endif
  
  BUILD_TARGET_FS ?= ext4
  TARGET_USERIMAGES_USE_EXT4 := true
  
  TARGET_RECOVERY_FSTAB = $(IMX_DEVICE_PATH)/fstab.freescale
  
  # Support gpt
  ifeq ($(IMX_NO_PRODUCT_PARTITION),true)
  BOARD_BPT_INPUT_FILES += device/fsl/common/partition/device-partitions-13GB-ab-no-product.bpt
  ADDITION_BPT_PARTITION = partition-table-28GB:device/fsl/common/partition/device-partitions-28GB-ab-no-product.bpt \
                           partition-table-dual:device/fsl/common/partition/device-partitions-13GB-ab-dual-bootloader-no-product.bpt \
                           partition-table-28GB-dual:device/fsl/common/partition/device-partitions-28GB-ab-dual-bootloader-no-product.bpt
  else
  BOARD_BPT_INPUT_FILES += device/fsl/common/partition/device-partitions-13GB-ab.bpt
  ADDITION_BPT_PARTITION = partition-table-28GB:device/fsl/common/partition/device-partitions-28GB-ab.bpt \
                           partition-table-dual:device/fsl/common/partition/device-partitions-13GB-ab-dual-bootloader.bpt \
                           partition-table-28GB-dual:device/fsl/common/partition/device-partitions-28GB-ab-dual-bootloader.bpt
  endif
  
  # Vendor Interface manifest and compatibility
  DEVICE_MANIFEST_FILE := $(IMX_DEVICE_PATH)/manifest.xml
  DEVICE_MATRIX_FILE := $(IMX_DEVICE_PATH)/compatibility_matrix.xml
  
  TARGET_BOOTLOADER_BOARD_NAME := SMARC
  
  USE_OPENGL_RENDERER := true
  
  BOARD_WLAN_DEVICE            := qcwcn
  # QCA wifi support dual interface
  WIFI_HIDL_FEATURE_DUAL_INTERFACE := true
  # Qcom 1PJ(QCA9377) BT
  BOARD_HAVE_BLUETOOTH_QCOM := true
  SOONG_CONFIG_IMXPLUGIN += BOARD_BLUETOOTH_NO_DLE
  SOONG_CONFIG_IMXPLUGIN_BOARD_BLUETOOTH_NO_DLE = true
  BOARD_HAS_QCA_BT_ROME := true
  BOARD_HAVE_BLUETOOTH_BLUEZ := false
  QCOM_BT_USE_SIBS := true
  ifeq ($(QCOM_BT_USE_SIBS), true)
      WCNSS_FILTER_USES_SIBS := true
  endif
  
  # common wifi configs
  WPA_SUPPLICANT_VERSION       := VER_0_8_X
  BOARD_WPA_SUPPLICANT_DRIVER  := NL80211
  BOARD_HOSTAPD_DRIVER         := NL80211
  BOARD_HOSTAPD_PRIVATE_LIB               := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
  BOARD_WPA_SUPPLICANT_PRIVATE_LIB        := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
  
  BOARD_USE_SENSOR_FUSION := true
  
  # we don't support sparse image.
  TARGET_USERIMAGES_SPARSE_EXT_DISABLED := false
  
  BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(IMX_DEVICE_PATH)/bluetooth
  
  BOARD_HAVE_USB_CAMERA := true
  
  USE_ION_ALLOCATOR := true
  USE_GPU_ALLOCATOR := false
  
  BOARD_AVB_ENABLE := true
  BOARD_AVB_ALGORITHM := SHA256_RSA4096
  # The testkey_rsa4096.pem is copied from external/avb/test/data/testkey_rsa4096.pem
  BOARD_AVB_KEY_PATH := device/fsl/common/security/testkey_rsa4096.pem
  TARGET_USES_MKE2FS := true
  
  # define frame buffer count
  NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
  
  ifeq ($(PRODUCT_IMX_DRM),true)
  CMASIZE=736M
  else
  CMASIZE=800M
  endif
  
  ifeq ($(LOW_MEMORY),true)
  BOARD_KERNEL_CMDLINE := console=ttymxc1,115200 earlycon=imxuart,0x30890000,115200 init=/init androidboot.console=ttymxc1 androidboot.hardware=freescale cma=320M@0x400M-0xb80M androidboot.primary_display=imx-drm firmware_class.path=/vendor/firmware transparent_hugepage=never loop.max_part=7 androidboot.displaymode=720p galcore.contiguousSize=33554432
  else
  BOARD_KERNEL_CMDLINE := console=ttymxc1,115200 earlycon=imxuart,0x30890000,115200 init=/init androidboot.console=ttymxc1 androidboot.hardware=freescale cma=$(CMASIZE)@0x400M-0xb80M androidboot.primary_display=imx-drm firmware_class.path=/vendor/firmware transparent_hugepage=never loop.max_part=7
  endif
  
  # Set the density to 213 tvdpi to match CDD.
  BOARD_KERNEL_CMDLINE += androidboot.lcd_density=213
  
  # Default wificountrycode
  BOARD_KERNEL_CMDLINE += androidboot.wificountrycode=CN
  
  ifeq ($(TARGET_USERIMAGES_USE_UBIFS),true)
  ifeq ($(TARGET_USERIMAGES_USE_EXT4),true)
  $(error "TARGET_USERIMAGES_USE_UBIFS and TARGET_USERIMAGES_USE_EXT4 config open in same time, please only choose one target file system image")
  endif
  endif
  
  BOARD_PREBUILT_DTBOIMAGE := out/target/product/smarc_mx8mm/dtbo-smarcimx8mm.img
  
  TARGET_BOARD_DTS_CONFIG := smarcimx8mm:fsl-smarcimx8mm.dtb
  
  BOARD_SEPOLICY_DIRS := \
         device/fsl/imx8m/sepolicy \
         $(IMX_DEVICE_PATH)/sepolicy
  
  ifeq ($(PRODUCT_IMX_DRM),true)
  BOARD_SEPOLICY_DIRS += \
         $(IMX_DEVICE_PATH)/sepolicy_drm
  endif
  
  TARGET_BOARD_KERNEL_HEADERS := device/fsl/common/kernel-headers
  
  ALL_DEFAULT_INSTALLED_MODULES += $(BOARD_VENDOR_KERNEL_MODULES)