Blame view

imx8m/smarc_mx8mq/BoardConfig.mk 5.72 KB
804b7b25a   Eric Lee   Android Q10.0.0_2...
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
  #
  # SoC-specific compile-time definitions.
  #
  
  BOARD_SOC_TYPE := IMX8MQ
  BOARD_TYPE := SMARC-IMX8MQ
  BOARD_HAVE_VPU := true
  BOARD_VPU_TYPE := hantro
  HAVE_FSL_IMX_GPU2D := false
  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 = IMX8MQ
  SOONG_CONFIG_IMXPLUGIN_BOARD_HAVE_VPU = true
  SOONG_CONFIG_IMXPLUGIN_BOARD_VPU_TYPE = hantro
  SOONG_CONFIG_IMXPLUGIN_BOARD_VPU_ONLY = false
  
  #
  # Product-specific compile-time definitions.
  #
  
  IMX_DEVICE_PATH := device/embedian/imx8m/smarc_mx8mq
  
  include device/fsl/imx8m/BoardConfigCommon.mk
  
  BUILD_TARGET_FS ?= ext4
  TARGET_USERIMAGES_USE_EXT4 := true
  
  TARGET_RECOVERY_FSTAB = $(IMX_DEVICE_PATH)/fstab.freescale
  
  # Support gpt
  ifeq ($(TARGET_USE_DYNAMIC_PARTITIONS),true)
    BOARD_BPT_INPUT_FILES += device/fsl/common/partition/device-partitions-13GB-ab_super.bpt
    ADDITION_BPT_PARTITION = partition-table-28GB:device/fsl/common/partition/device-partitions-28GB-ab_super.bpt \
                             partition-table-dual:device/fsl/common/partition/device-partitions-13GB-ab-dual-bootloader_super.bpt \
                             partition-table-28GB-dual:device/fsl/common/partition/device-partitions-28GB-ab-dual-bootloader_super.bpt
  else
    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
  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            := nxp
  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)
  
  WIFI_HIDL_FEATURE_DUAL_INTERFACE := true
  
  BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(IMX_DEVICE_PATH)/bluetooth
  
  # NXP 8997 BT
  BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(IMX_DEVICE_PATH)/bluetooth
  BOARD_CUSTOM_BT_CONFIG := $(BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR)/vnd_config.txt
  BOARD_HAVE_BLUETOOTH_NXP := true
  
  BOARD_USE_SENSOR_FUSION := true
  
  # we don't support sparse image.
  TARGET_USERIMAGES_SPARSE_EXT_DISABLED := false
  
  BOARD_HAVE_USB_CAMERA := true
  BOARD_HAVE_USB_MJPEG_CAMERA := false
  
  USE_ION_ALLOCATOR := true
  USE_GPU_ALLOCATOR := false
  
  BOARD_AVB_ENABLE := true
  TARGET_USES_MKE2FS := 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
  
  # define frame buffer count
  NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
  
  ifeq ($(PRODUCT_IMX_DRM),true)
  CMASIZE=736M
  else
  CMASIZE=1280M
  endif
  
  # NXP default config
  BOARD_KERNEL_CMDLINE := console=ttymxc0,115200 earlycon=imxuart,0x30880000,115200 init=/init androidboot.console=ttymxc0 androidboot.hardware=freescale firmware_class.path=/vendor/firmware loop.max_part=7
  
  # framebuffer config
  BOARD_KERNEL_CMDLINE += androidboot.fbTileSupport=enable
  
  # memory config
  BOARD_KERNEL_CMDLINE += transparent_hugepage=never cma=$(CMASIZE)
  
  # display config
  BOARD_KERNEL_CMDLINE += androidboot.lcd_density=240 androidboot.primary_display=imx-dcss androidboot.gui_resolution=1080p
  
  # wifi config
  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
b22ddec54   Eric Lee   Fix the name typo
134
  BOARD_PREBUILT_DTBOIMAGE := out/target/product/smarc_mx8mq/dtbo-imx8mq-smarc-hdmi.img
804b7b25a   Eric Lee   Android Q10.0.0_2...
135
136
  
  TARGET_BOARD_DTS_CONFIG := \
02f55036e   Eric Lee   Fix the path erro...
137
138
139
140
141
142
          imx8mq-smarc-dcss-lvds:imx8mq-smarc-dcss-lvds.dtb \
          imx8mq-smarc-dp:imx8mq-smarc-dp.dtb \
          imx8mq-smarc:imx8mq-smarc.dtb \
          imx8mq-smarc-dual-display:imx8mq-smarc-dual-display.dtb \
          imx8mq-smarc-hdmi:imx8mq-smarc-hdmi.dtb \
          imx8mq-smarc-lcdif-lvds:imx8mq-smarc-lcdif-lvds.dtb
804b7b25a   Eric Lee   Android Q10.0.0_2...
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
  
  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)
  
  BOARD_USES_METADATA_PARTITION := true
  BOARD_ROOT_EXTRA_FOLDERS += metadata
  
  PRODUCT_COPY_FILES += \
      $(IMX_DEVICE_PATH)/init.recovery.freescale.rc:root/init.recovery.freescale.rc