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

MACHINEOVERRIDES =. "mx6ull:"

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

PREFERRED_PROVIDER_virtual/kernel:use-nxp-bsp ?= "linux-toradex"
KBUILD_DEFCONFIG:use-nxp-bsp ?= "colibri-imx6ull_defconfig"
KERNEL_DEVICETREE += " \
    imx6ull-colibri-eval-v3.dtb imx6ull-colibri-wifi-eval-v3.dtb \
"
KERNEL_DEVICETREE:append:use-nxp-bsp = " \
    imx6ull-colibri-aster.dtb imx6ull-colibri-wifi-aster.dtb \
    imx6ull-colibri-iris.dtb imx6ull-colibri-wifi-iris.dtb \
    imx6ull-colibri-iris-v2.dtb imx6ull-colibri-wifi-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_BINARY = "u-boot-nand.imx"
UBOOT_MAKE_TARGET = "u-boot.imx"
UBOOT_MACHINE ?= "colibri-imx6ull_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"
