blob: ed9264cd07097f784f6ef6a9b4888a2630562f15 [file] [log] [blame]
Amit Pundir4e375822019-04-18 16:46:10 +05301include device/linaro/dragonboard/BoardConfigCommon.mk
2
Peter Collingbournec9341882022-02-02 11:33:05 -08003# Primary Arch
4TARGET_ARCH := arm64
5TARGET_ARCH_VARIANT := armv8-2a
6TARGET_CPU_VARIANT := kryo385
7TARGET_CPU_ABI := arm64-v8a
8
9# Secondary Arch
10TARGET_2ND_ARCH := arm
11TARGET_2ND_ARCH_VARIANT := armv8-2a
12TARGET_2ND_CPU_VARIANT := kryo385
13TARGET_2ND_CPU_ABI := armeabi-v7a
14TARGET_2ND_CPU_ABI2 := armeabi
15
Amit Pundir4e375822019-04-18 16:46:10 +053016# Board Information
17TARGET_BOOTLOADER_BOARD_NAME := db845c
18TARGET_BOARD_PLATFORM := db845c
19
John Stultzf36354e2020-01-14 00:10:06 +000020TARGET_NO_KERNEL := false
21BOARD_INCLUDE_DTB_IN_BOOTIMG := true
Amit Pundirdc570232024-01-11 13:07:10 +053022ifeq ($(TARGET_SDCARD_BOOT), true)
23 BOARD_BOOT_HEADER_VERSION := 2
24 # Older kernel versions define mmc@ nodes as sdhci@ nodes in their device tree
25 ifneq ($(filter 5.4 5.10 5.15, $(TARGET_KERNEL_USE)),)
26 BOARD_KERNEL_CMDLINE += androidboot.boot_devices=soc@0/8804000.sdhci
27 else
28 BOARD_KERNEL_CMDLINE += androidboot.boot_devices=soc@0/8804000.mmc
29 endif
30 BOARD_KERNEL_CMDLINE += androidboot.hardware=db845c
31 BOARD_KERNEL_CMDLINE += androidboot.verifiedbootstate=orange
32 # In case we are booting from U-Boot directly and androidboot.slot_suffix
33 # is not set. Otherwise we run into the following error:
34 # "init: [libfstab] Error updating for slotselect"
35 BOARD_KERNEL_CMDLINE += androidboot.slot_suffix=_a
36else ifeq ($(TARGET_USES_BOOT_HDR_V3), true)
37 BOARD_BOOT_HEADER_VERSION := 3
38 BOARD_KERNEL_CMDLINE += androidboot.boot_devices=soc@0/1d84000.ufshc
39 BOARD_KERNEL_CMDLINE += androidboot.hardware=db845c
40 BOARD_KERNEL_CMDLINE += androidboot.verifiedbootstate=orange
41 else
42 BOARD_BOOT_HEADER_VERSION := 4
43 BOARD_BOOTCONFIG += androidboot.boot_devices=soc@0/1d84000.ufshc
44 BOARD_BOOTCONFIG += androidboot.hardware=db845c
45 BOARD_BOOTCONFIG += androidboot.verifiedbootstate=orange
Amit Pundir94ccdd92024-02-20 17:50:31 +053046 ifeq ($(TARGET_USES_LMP), true)
47 BOARD_BOOTCONFIG += androidboot.load_modules_parallel=true
48 endif
Amit Pundirdd5bd1b2020-12-22 13:46:24 +053049endif
John Stultzf36354e2020-01-14 00:10:06 +000050BOARD_MKBOOTIMG_ARGS := --header_version $(BOARD_BOOT_HEADER_VERSION)
51BOARD_KERNEL_BASE := 0x80000000
Amit Pundir21e42a32022-05-19 13:41:10 +053052BOARD_KERNEL_PAGESIZE := 4096
53BOARD_KERNEL_CMDLINE += earlycon firmware_class.path=/vendor/firmware/
54BOARD_KERNEL_CMDLINE += init=/init printk.devkmsg=on
John Stultz64dbd9c2020-04-17 05:33:08 +000055BOARD_KERNEL_CMDLINE += deferred_probe_timeout=30
Amit Pundirc0ad8942021-12-14 19:45:56 +053056BOARD_KERNEL_CMDLINE += pcie_pme=nomsi #For WiFi to work on rb5
Amit Pundir8a3b0e32022-03-21 23:44:06 +053057BOARD_KERNEL_CMDLINE += qcom_geni_serial.con_enabled=1
Amit Pundirc2840b72022-10-19 20:07:53 +053058BOARD_KERNEL_CMDLINE += console=ttyMSM0,115200n8
John Stultzf36354e2020-01-14 00:10:06 +000059
Amit Pundir4e375822019-04-18 16:46:10 +053060# Image Configuration
Amit Pundirb8380ce2023-10-10 19:31:47 +053061BOARD_BOOTIMAGE_PARTITION_SIZE := 100663296 #96M
Amit Pundir2a5ca1a2022-07-25 16:48:38 +053062BOARD_FLASH_BLOCK_SIZE := 4096
Amit Pundirdc570232024-01-11 13:07:10 +053063ifeq ($(TARGET_SDCARD_BOOT), true)
64 BOARD_USERDATAIMAGE_PARTITION_SIZE := 8589934592 #8G
65 BOARD_SUPER_PARTITION_SIZE := 4294967296 #4G
66 BOARD_DB_DYNAMIC_PARTITIONS_SIZE := 4290772992 # Reserve 4M for DAP metadata
67 BOARD_SEPOLICY_DIRS += device/linaro/dragonboard/shared/utils/sdcard-boot/sepolicy/
68else
69 BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE := 100663296 #96M
70 BOARD_USERDATAIMAGE_PARTITION_SIZE := 21474836480 #20G
71 BOARD_SUPER_PARTITION_SIZE := 12437225472
72 BOARD_DB_DYNAMIC_PARTITIONS_SIZE := 12433031168 # Reserve 4M for DAP metadata
73endif
Amit Pundir4e375822019-04-18 16:46:10 +053074BOARD_SUPER_PARTITION_METADATA_DEVICE := super
Todd Kjosb611b162020-03-09 14:14:27 -070075BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE := true
Amit Pundir2207bfb2024-01-15 12:49:32 +053076BOARD_DB_DYNAMIC_PARTITIONS_PARTITION_LIST := system vendor system_ext product
77
78# dlkm partitions
Amit Pundirb0274052023-07-24 12:50:45 +053079include device/linaro/dragonboard/shared/utils/dlkm_loader/BoardConfig.mk
Amit Pundir2207bfb2024-01-15 12:49:32 +053080BOARD_DB_DYNAMIC_PARTITIONS_PARTITION_LIST += system_dlkm vendor_dlkm
Amit Pundirb0274052023-07-24 12:50:45 +053081BOARD_SEPOLICY_DIRS += device/linaro/dragonboard/shared/utils/dlkm_loader/sepolicy/
Amit Pundir6749c912023-09-12 10:52:20 +053082
83# Graphics
84include device/linaro/dragonboard/shared/graphics/drm_hwcomposer/BoardConfig.mk
85include device/linaro/dragonboard/shared/graphics/mesa/BoardConfig.mk
86BOARD_SEPOLICY_DIRS += device/linaro/dragonboard/shared/graphics/minigbm_msm/sepolicy/