Amit Pundir | 4e37582 | 2019-04-18 16:46:10 +0530 | [diff] [blame] | 1 | include device/linaro/dragonboard/BoardConfigCommon.mk |
| 2 | |
Peter Collingbourne | c934188 | 2022-02-02 11:33:05 -0800 | [diff] [blame] | 3 | # Primary Arch |
| 4 | TARGET_ARCH := arm64 |
| 5 | TARGET_ARCH_VARIANT := armv8-2a |
| 6 | TARGET_CPU_VARIANT := kryo385 |
| 7 | TARGET_CPU_ABI := arm64-v8a |
| 8 | |
Sumit Semwal | 434515e | 2024-04-11 12:50:21 +0530 | [diff] [blame] | 9 | ifeq ($(TARGET_64BIT_ONLY), false) |
| 10 | # Secondary Arch |
| 11 | TARGET_2ND_ARCH := arm |
| 12 | TARGET_2ND_ARCH_VARIANT := armv8-2a |
| 13 | TARGET_2ND_CPU_VARIANT := kryo385 |
| 14 | TARGET_2ND_CPU_ABI := armeabi-v7a |
| 15 | TARGET_2ND_CPU_ABI2 := armeabi |
| 16 | endif |
Peter Collingbourne | c934188 | 2022-02-02 11:33:05 -0800 | [diff] [blame] | 17 | |
Amit Pundir | 4e37582 | 2019-04-18 16:46:10 +0530 | [diff] [blame] | 18 | # Board Information |
| 19 | TARGET_BOOTLOADER_BOARD_NAME := db845c |
| 20 | TARGET_BOARD_PLATFORM := db845c |
| 21 | |
John Stultz | f36354e | 2020-01-14 00:10:06 +0000 | [diff] [blame] | 22 | TARGET_NO_KERNEL := false |
| 23 | BOARD_INCLUDE_DTB_IN_BOOTIMG := true |
Amit Pundir | dc57023 | 2024-01-11 13:07:10 +0530 | [diff] [blame] | 24 | ifeq ($(TARGET_SDCARD_BOOT), true) |
| 25 | BOARD_BOOT_HEADER_VERSION := 2 |
| 26 | # Older kernel versions define mmc@ nodes as sdhci@ nodes in their device tree |
| 27 | ifneq ($(filter 5.4 5.10 5.15, $(TARGET_KERNEL_USE)),) |
| 28 | BOARD_KERNEL_CMDLINE += androidboot.boot_devices=soc@0/8804000.sdhci |
| 29 | else |
| 30 | BOARD_KERNEL_CMDLINE += androidboot.boot_devices=soc@0/8804000.mmc |
| 31 | endif |
| 32 | BOARD_KERNEL_CMDLINE += androidboot.hardware=db845c |
| 33 | BOARD_KERNEL_CMDLINE += androidboot.verifiedbootstate=orange |
| 34 | # In case we are booting from U-Boot directly and androidboot.slot_suffix |
| 35 | # is not set. Otherwise we run into the following error: |
| 36 | # "init: [libfstab] Error updating for slotselect" |
| 37 | BOARD_KERNEL_CMDLINE += androidboot.slot_suffix=_a |
| 38 | else ifeq ($(TARGET_USES_BOOT_HDR_V3), true) |
| 39 | BOARD_BOOT_HEADER_VERSION := 3 |
| 40 | BOARD_KERNEL_CMDLINE += androidboot.boot_devices=soc@0/1d84000.ufshc |
| 41 | BOARD_KERNEL_CMDLINE += androidboot.hardware=db845c |
| 42 | BOARD_KERNEL_CMDLINE += androidboot.verifiedbootstate=orange |
| 43 | else |
| 44 | BOARD_BOOT_HEADER_VERSION := 4 |
| 45 | BOARD_BOOTCONFIG += androidboot.boot_devices=soc@0/1d84000.ufshc |
| 46 | BOARD_BOOTCONFIG += androidboot.hardware=db845c |
| 47 | BOARD_BOOTCONFIG += androidboot.verifiedbootstate=orange |
Amit Pundir | 94ccdd9 | 2024-02-20 17:50:31 +0530 | [diff] [blame] | 48 | ifeq ($(TARGET_USES_LMP), true) |
| 49 | BOARD_BOOTCONFIG += androidboot.load_modules_parallel=true |
| 50 | endif |
Amit Pundir | dd5bd1b | 2020-12-22 13:46:24 +0530 | [diff] [blame] | 51 | endif |
John Stultz | f36354e | 2020-01-14 00:10:06 +0000 | [diff] [blame] | 52 | BOARD_MKBOOTIMG_ARGS := --header_version $(BOARD_BOOT_HEADER_VERSION) |
| 53 | BOARD_KERNEL_BASE := 0x80000000 |
Amit Pundir | 21e42a3 | 2022-05-19 13:41:10 +0530 | [diff] [blame] | 54 | BOARD_KERNEL_PAGESIZE := 4096 |
| 55 | BOARD_KERNEL_CMDLINE += earlycon firmware_class.path=/vendor/firmware/ |
| 56 | BOARD_KERNEL_CMDLINE += init=/init printk.devkmsg=on |
John Stultz | 64dbd9c | 2020-04-17 05:33:08 +0000 | [diff] [blame] | 57 | BOARD_KERNEL_CMDLINE += deferred_probe_timeout=30 |
Amit Pundir | c0ad894 | 2021-12-14 19:45:56 +0530 | [diff] [blame] | 58 | BOARD_KERNEL_CMDLINE += pcie_pme=nomsi #For WiFi to work on rb5 |
Amit Pundir | 8a3b0e3 | 2022-03-21 23:44:06 +0530 | [diff] [blame] | 59 | BOARD_KERNEL_CMDLINE += qcom_geni_serial.con_enabled=1 |
Amit Pundir | c2840b7 | 2022-10-19 20:07:53 +0530 | [diff] [blame] | 60 | BOARD_KERNEL_CMDLINE += console=ttyMSM0,115200n8 |
John Stultz | f36354e | 2020-01-14 00:10:06 +0000 | [diff] [blame] | 61 | |
Amit Pundir | 4e37582 | 2019-04-18 16:46:10 +0530 | [diff] [blame] | 62 | # Image Configuration |
Amit Pundir | b8380ce | 2023-10-10 19:31:47 +0530 | [diff] [blame] | 63 | BOARD_BOOTIMAGE_PARTITION_SIZE := 100663296 #96M |
Amit Pundir | 2a5ca1a | 2022-07-25 16:48:38 +0530 | [diff] [blame] | 64 | BOARD_FLASH_BLOCK_SIZE := 4096 |
Amit Pundir | dc57023 | 2024-01-11 13:07:10 +0530 | [diff] [blame] | 65 | ifeq ($(TARGET_SDCARD_BOOT), true) |
| 66 | BOARD_USERDATAIMAGE_PARTITION_SIZE := 8589934592 #8G |
| 67 | BOARD_SUPER_PARTITION_SIZE := 4294967296 #4G |
| 68 | BOARD_DB_DYNAMIC_PARTITIONS_SIZE := 4290772992 # Reserve 4M for DAP metadata |
| 69 | BOARD_SEPOLICY_DIRS += device/linaro/dragonboard/shared/utils/sdcard-boot/sepolicy/ |
| 70 | else |
| 71 | BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE := 100663296 #96M |
| 72 | BOARD_USERDATAIMAGE_PARTITION_SIZE := 21474836480 #20G |
| 73 | BOARD_SUPER_PARTITION_SIZE := 12437225472 |
| 74 | BOARD_DB_DYNAMIC_PARTITIONS_SIZE := 12433031168 # Reserve 4M for DAP metadata |
| 75 | endif |
Amit Pundir | 4e37582 | 2019-04-18 16:46:10 +0530 | [diff] [blame] | 76 | BOARD_SUPER_PARTITION_METADATA_DEVICE := super |
Todd Kjos | b611b16 | 2020-03-09 14:14:27 -0700 | [diff] [blame] | 77 | BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE := true |
Amit Pundir | 2207bfb | 2024-01-15 12:49:32 +0530 | [diff] [blame] | 78 | BOARD_DB_DYNAMIC_PARTITIONS_PARTITION_LIST := system vendor system_ext product |
| 79 | |
| 80 | # dlkm partitions |
Amit Pundir | b027405 | 2023-07-24 12:50:45 +0530 | [diff] [blame] | 81 | include device/linaro/dragonboard/shared/utils/dlkm_loader/BoardConfig.mk |
Amit Pundir | 2207bfb | 2024-01-15 12:49:32 +0530 | [diff] [blame] | 82 | BOARD_DB_DYNAMIC_PARTITIONS_PARTITION_LIST += system_dlkm vendor_dlkm |
Amit Pundir | b027405 | 2023-07-24 12:50:45 +0530 | [diff] [blame] | 83 | BOARD_SEPOLICY_DIRS += device/linaro/dragonboard/shared/utils/dlkm_loader/sepolicy/ |
Amit Pundir | 6749c91 | 2023-09-12 10:52:20 +0530 | [diff] [blame] | 84 | |
| 85 | # Graphics |
| 86 | include device/linaro/dragonboard/shared/graphics/drm_hwcomposer/BoardConfig.mk |
| 87 | include device/linaro/dragonboard/shared/graphics/mesa/BoardConfig.mk |
| 88 | BOARD_SEPOLICY_DIRS += device/linaro/dragonboard/shared/graphics/minigbm_msm/sepolicy/ |