#@TYPE: Machine
#@NAME: Toradex Colibri iMX6ULL 1GB (eMMC)
#@SOC: i.MX6ULL
#@DESCRIPTION: Machine configuration for Toradex Colibri iMX6 ULL 1GB (eMMC) SOM
#@MAINTAINER: Max Krummenacher <max.krummenacher@toradex.com>

MACHINEOVERRIDES =. "mx6:mx6ul:mx6ull:"

require conf/machine/include/imx-base.inc
require conf/machine/include/arm/armv7a/tune-cortexa7.inc

PREFERRED_PROVIDER_virtual/kernel:use-nxp-bsp ?= "linux-toradex"
PREFERRED_PROVIDER_virtual/kernel:preempt-rt = "linux-toradex"

PREFERRED_PROVIDER_virtual/kernel:use-mainline-bsp = "linux-toradex-mainline"
PREFERRED_PROVIDER_virtual/kernel:use-mainline-bsp:preempt-rt = "linux-toradex-mainline-rt"
PREFERRED_PROVIDER_virtual/dtb:use-mainline-bsp = "device-tree-overlays-mainline"

KERNEL_DEVICETREE:use-mainline-bsp = " \
    imx6ull-colibri-emmc-eval-v3.dtb \
"
KERNEL_DEVICETREE:use-nxp-bsp = " \
    imx6ull-colibri-emmc-aster.dtb \
    imx6ull-colibri-emmc-eval-v3.dtb \
    imx6ull-colibri-emmc-iris.dtb \
    imx6ull-colibri-emmc-iris-v2.dtb \
"

KERNEL_IMAGETYPE = "zImage"
# The kernel lives in its own ubi volume.
RRECOMMENDS:${KERNEL_PACKAGE_NAME}-base = ""

IMX_DEFAULT_BOOTLOADER = "u-boot-toradex"
PREFERRED_PROVIDER_u-boot-default-script ?= "u-boot-script-toradex"
UBOOT_MAKE_TARGET = "u-boot.imx"
UBOOT_MACHINE ?= "colibri-imx6ull-emmc_defconfig"
UBOOT_SUFFIX = "imx"

IMAGE_FSTYPES += "tar.xz"
# wic support
IMAGE_BOOT_FILES:append = " boot.scr-${MACHINE};boot.scr"
WKS_FILE_DEPENDS:append = " u-boot-default-script"
WKS_FILE = "sdimage-bootpart.wks"

MACHINE_FEATURES += "screen usbgadget usbhost vfat ext2 alsa touchscreen wifi bluetooth 3g"
MACHINE_FIRMWARE:remove = "firmware-imx-epdc"
