#############################################################################
#@TYPE: Distribution
#@NAME: AUTO-EAP-NAND
#@DESCRIPTION: For NAND based EAP targets for Automotive
#############################################################################
require conf/distro/include/base.inc

# DISTRO CONFIGURATION
DISTRO_NAME = "auto-eap-nand"
DISTRO_VERSION = "${BUILDNAME}"

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

# Distro features
DISTRO_FEATURES += "nand-boot"
DISTRO_FEATURES_NATIVE += "nand-boot"
DISTRO_FEATURES += "nand-squashfs"
DISTRO_FEATURES += "no-ssd-listener-support"
DISTRO_FEATURES += "no-rpmb-listener-support"
DISTRO_FEATURES += "persist-volume"
DISTRO_FEATURES:remove = "persist-image"

# Comment below NAND_AB_SUPPORT flag to disable nand ab-boot-support
NAND_AB_SUPPORT="true"
DISTRO_FEATURES        += "${@bb.utils.contains('NAND_AB_SUPPORT', 'true', 'ab-boot-support nand-ab', '', d)}"
DISTRO_FEATURES_NATIVE += "${@bb.utils.contains('NAND_AB_SUPPORT', 'true', 'ab-boot-support', '', d)}"

# Enable SELinux
DISTRO_FEATURES += "selinux"
DISTRO_FEATURES_FILTER_NATIVE  += "selinux"
DEFAULT_ENFORCING = "enforcing"

# Enable early ethernet
DISTRO_FEATURES += "early-eth"

# Enable performance features
PERF_BUILD = "${@['0', '1'][d.getVar('VARIANT', True) != ('' or 'debug')]}"

