#@TYPE: Machine
#@NAME: APQ8017
#@DESCRIPTION: Machine configuration for QTI MTP with APQ8017

require conf/machine/include/apq8017.inc

PREFERRED_PROVIDER_virtual/bootloader = "lk"

KERNEL_IMAGETYPE = "Image.gz-dtb"
KERNEL_DTS_NAME = "msm8917"
KERNEL_BASE = "0x81C00000"
KERNEL_TAGS_OFFSET = "0x81900000"

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

KERNEL_CMD_PARAMS = "noinitrd ro console=ttyHSL0,115200,n8 androidboot.hardware=qcom ehci-hcd.park=3 msm_rtb.filter=0x37 lpm_levels.sleep_disabled=1 rootwait androidboot.bootdevice=7824900.sdhci"
KERNEL_CMD_PARAMS:remove = "${@bb.utils.contains_any('VARIANT', 'perf user', 'console=ttyHSL0,115200,n8', '', d)}"

# readonly-rootfs
DISTRO_FEATURES:append = " ro-rootfs"

DISTRO_FEATURES:append = " userfs-factory-reset "

#enable selinux
DISTRO_FEATURES:append = " selinux"
DEFAULT_ENFORCING = "enforcing"

# Use systemd init manager.
DISTRO_FEATURES:remove = "sysvinit"
DISTRO_FEATURES:append = " systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
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 = ""

