#@TYPE: Machine
#@NAME: Toradex Colibri iMX6DL/S
#@SOC: i.MX6DL
#@DESCRIPTION: Machine configuration for Toradex Colibri iMX6 SOM
#@MAINTAINER: Max Krummenacher <max.krummenacher@toradex.com>

MACHINEOVERRIDES =. "mx6dl:"

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

PREFERRED_PROVIDER_virtual/kernel:use-nxp-bsp ??= "linux-toradex"
KBUILD_DEFCONFIG:use-nxp-bsp ?= "colibri_imx6_defconfig"
KERNEL_DEVICETREE += "imx6dl-colibri-eval-v3.dtb imx6dl-colibri-cam-eval-v3.dtb \
                      imx6dl-colibri-aster.dtb imx6dl-colibri-iris.dtb \
                      imx6dl-colibri-iris-v2.dtb"
KERNEL_DEVICETREE:use-mainline-bsp = "imx6dl-colibri-eval-v3.dtb"
KERNEL_IMAGETYPE = "zImage"
# 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_PROVIDER_u-boot-default-script ?= "u-boot-script-toradex"

UBOOT_SUFFIX = "img"
SPL_BINARY = "SPL"
UBOOT_CONFIG ??= "spl"
UBOOT_CONFIG[spl] = "colibri_imx6_defconfig,,u-boot.img"
UBOOT_MAKE_TARGET = ""
UBOOT_ENTRYPOINT:use-mainline-bsp = "0x10008000"

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"
