#@TYPE: Machine
#@NAME: APQ8053-32
#@DESCRIPTION: 32-bit Machine configuration for QTI MTP with APQ8053

require conf/machine/include/apq8053.inc

DEFAULTTUNE = "armv7a-neon"

PREFERRED_PROVIDER_virtual/bootloader = "lk"

KERNEL_IMAGETYPE = "zImage-dtb"
KERNEL_DTS_NAME = "msm8953"
KERNEL_BASE = "0x80000000"
KERNEL_TAGS_OFFSET = "0x81900000"

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

KERNEL_CMD_PARAMS = "noinitrd ro console=ttyMSM0,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=ttyMSM0,115200,n8', '', d)}"

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

# enable audio as a loadable kernel module
DISTRO_FEATURES:append = " audio-dlkm"

#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 = ""

# Disable journalling for RO rootfs.
IMAGE_EXT4_EXTRA_OPTIONS = "${@bb.utils.contains('DISTRO_FEATURES','ro-rootfs',' -J -b 4096 ','',d)}"
