#@TYPE: Machine
#@NAME: SA415M
#@DESCRIPTION: Machine configuration for QTI sa415m

require conf/machine/include/sdxpoorwills.inc

KERNEL_IMAGETYPE = "zImage-dtb"
KERNEL_DTS_NAME = "sdxpoorwills"
KERNEL_BASE = "0x80000000"
KERNEL_TAGS_OFFSET = "0x82000000"

KERNEL_CONFIG ?= "${@['sa415m-perf_defconfig', 'sa415m_defconfig'][d.getVar('VARIANT', True) == ('' or 'debug')]}"

KERNEL_CMD_PARAMS = "noinitrd ro rootwait console=ttyMSM0,115200,n8 androidboot.hardware=qcom msm_rtb.filter=0x37 androidboot.console=ttyMSM0 lpm_levels.sleep_disabled=1  firmware_class.path=/lib/firmware/updates service_locator.enable=1"
KERNEL_CMD_PARAMS:remove = "${@bb.utils.contains_any('VARIANT', 'perf user', 'console=ttyMSM0,115200,n8 androidboot.console=ttyMSM0', '', d)}"

BOOTIMAGE_TARGET = "${MACHINE}-boot.img"

# Volume sizes
SYSTEM_VOLUME_SIZE = "100MiB"
CACHE_VOLUME_SIZE = "15MiB"
SYSTEMRW_VOLUME_SIZE = "6MiB"
PERSIST_VOLUME_SIZE = "6MiB"

# Enable recovery image generation.
RECOVERY_IMAGE ?= "1"

VIRTUAL-RUNTIME_dev_manager = "udev"
VIRTUAL-RUNTIME_init_manager = "systemd"

# Change Image features for systemd.
IMAGE_DEV_MANAGER = "udev"
IMAGE_INIT_MANAGER = "systemd"
IMAGE_INITSCRIPTS = ""

MACHINE_MNT_POINTS = "/firmware /persist /cache"

# Enable coredump
SYSTEMD_ENABLE_COREDUMP = "1"
SYSTEMD_COREDUMP_PATH = "${userfsdatadir}/coredump"

# Enable SDK feature
SDK_IMAGE = "1"

# Enable early USB init
DISTRO_FEATURES:append = " early-usb-init"
DISTRO_FEATURES:append = " cmnlib-preload"
