# Common definitions for TQ-Systems GmbH TQMa64xxL modules

# needed for easier compatible / preferred_provider
MACHINEOVERRIDES =. "tqma64xxl:"

# Default providers, may need to override for specific machines
# needs to be set before inclusion of am64xx.inc
PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-tq"
PREFERRED_PROVIDER_u-boot ?= "u-boot-tq"
PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-tq"

TQ_FW_ENV_CONFIGS = "mmc0 mmc1 spi"

# From meta-ti-bsp: PREFERRED_PROVIDER and tuning
require conf/machine/include/am64xx.inc

# Available variants: am64x-gp am64x_sr2-hs-fs am64x_sr2-hs
SYSFW_DEFAULT_VARIANT ?= "am64x_sr2-hs-fs"

KERNEL_CLASSES += "ti-secdev"
KERNEL_IMAGETYPE = "fitImage"

# All 3 tiboot3 variants are installed to the boot partition
# The default variant is additionally installed as tiboot3.bin
IMAGE_BOOT_FILES = " \
    u-boot.${UBOOT_SUFFIX} \
    tiboot3-am64x-gp-tqma64xxl.bin \
    tiboot3-am64x_sr2-hs-fs-tqma64xxl.bin \
    tiboot3-am64x_sr2-hs-tqma64xxl.bin \
    tiboot3-${SYSFW_DEFAULT_VARIANT}-tqma64xxl.bin;tiboot3.bin \
"

# TQ u-boot and kernel

require conf/machine/include/tqmxx.inc

MACHINE_FEATURES:remove = "efi"
EFI_PROVIDER = ""

# List common SoC features
MACHINE_FEATURES += "\
    apm \
    can \
    ext2 \
    pci \
    ubi \
    usbgadget \
    usbhost \
    vfat \
"

# Common image configuration
require conf/machine/include/tq-image.inc

# TI image configuration
require conf/machine/include/tq-image-ti.inc
