#@TYPE: Machine
#@NAME: Toradex Colibri iMX7 Dual 1GB (eMMC)
#@SOC: i.MX 7Dual
#@DESCRIPTION: Machine configuration for Toradex Colibri iMX7 SOM (eMMC)
#@MAINTAINER: Max Krummenacher <max.krummenacher@toradex.com>

MACHINEOVERRIDES =. "mx7:mx7d:"

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_imx7_defconfig"
KERNEL_DEVICETREE = " \
    imx7d-colibri-emmc-eval-v3.dtb \
    imx7d-colibri-emmc-aster.dtb \
"
KERNEL_DEVICETREE:append:use-nxp-bsp = " \
    imx7d-colibri-emmc-iris.dtb \
    imx7d-colibri-emmc-iris-v2.dtb \
"

# The kernel lives in a seperate FAT partition, don't deploy it in /boot/
RRECOMMENDS:${KERNEL_PACKAGE_NAME}-base = ""

IMX_DEFAULT_BOOTLOADER = "u-boot-toradex"
PREFERRED_RPROVIDER_u-boot-default-script = "u-boot-script-toradex"

UBOOT_SUFFIX = "imx"
UBOOT_BINARY = "u-boot-dtb.${UBOOT_SUFFIX}"
UBOOT_MACHINE ?= "colibri_imx7_emmc_defconfig"

IMAGE_FSTYPES += "tar.xz"
IMAGE_BOOT_FILES:append = " boot.scr-${MACHINE};boot.scr"
WKS_FILE_DEPENDS:append = " u-boot-default-script"

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