###############################################################################################
#@TYPE: Distribution
#@NAME: MSM-USER
#@DESCRIPTION: QTI Linux Distribution for MSM targets with production orientation (glibc based)
################################################################################################

require conf/distro/include/msm.inc

# DISTRO CONFIGURATION
DISTRO_NAME = "msm-user"
DISTRO_VERSION = "${BUILDNAME}"
LINUX_KERNEL_TYPE = "perf"
VIRTUAL-RUNTIME_dev_manager ?= "busybox-mdev"

# Add msm-user to distro overrides
DISTROOVERRIDES = "msm:msm-user"

# Basic distribution features
DISTRO_FEATURES += "sysvinit eabi ipv6 ipv4 largefile thumb-interwork xattr ${MICRO_GOLD} ${DISTRO_FEATURES_LIBC}"

# MSMs are emmc based targets
DISTRO_FEATURES += "emmc-boot"

# Enable performance features
PERF_BUILD = "1"

# Build optimization to disable debugging features, mainly for production images.
USER_BUILD = "1"

# Retain existing directory structure for base product image.
# Append variants like '-perf', '-user', 'perf-minimal' etc to deploy dir.
DEPLOY_NAME ?= "${MACHINE}${@['-' + d.getVar('PRODUCT', True), ''][d.getVar('PRODUCT', True) == ('' or 'base')]}${@['-' + d.getVar('VARIANT', True), ''][d.getVar('VARIANT', True) == ('')]}"
DEPLOY_DIR_IMAGE = "${DEPLOY_DIR}/images/${DEPLOY_NAME}"

# Do not allow GPLv3 packages in user image.
#INCOMPATIBLE_LICENSE = "GPL-3.0 LGPL-3.0 AGPL-3.0"

