#@TYPE: Machine
#@NAME: IMX6UL-PICO
#@SOC: i.MX6UL
#@DESCRIPTION: Machine configuration for IMX6UL-PICO board.
#@MAINTAINER: Daiane Angolini <daiane.angolini@nxp.com>

MACHINEOVERRIDES =. "mx6ul:"

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

IMX_DEFAULT_BSP = "mainline"
IMX_DEFAULT_BOOTLOADER = "u-boot-fslc"

SERIAL_CONSOLES = "115200;ttymxc5"

KERNEL_DEVICETREE = " \
    imx6ul-pico-dwarf.dtb \
    imx6ul-pico-hobbit.dtb \
    imx6ul-pico-pi.dtb \
"

SPL_BINARY = "SPL"
UBOOT_SUFFIX = "img"
UBOOT_MAKE_TARGET = ""

UBOOT_CONFIG ??= "dwarf hobbit pi generic"
UBOOT_CONFIG[dwarf] = "pico-dwarf-imx6ul_defconfig"
UBOOT_CONFIG[generic] = "pico-imx6ul_defconfig"
UBOOT_CONFIG[hobbit] = "pico-hobbit-imx6ul_defconfig"
UBOOT_CONFIG[pi] = "pico-pi-imx6ul_defconfig"

UBOOT_EXTLINUX = "1"
UBOOT_EXTLINUX_ROOT = "root=PARTUUID=${uuid}"
UBOOT_EXTLINUX_CONSOLE = "console=${console},${baudrate}"

MACHINE_ESSENTIAL_EXTRA_RDEPENDS += " \
    kernel-image \
    kernel-devicetree \
    u-boot-fslc \
"

MACHINE_FEATURES += "wifi bluetooth"

WKS_FILES ?= "imx-uboot-spl.wks.in"
WKS_FILE_DEPENDS ?= ""
IMAGE_FSTYPES = "wic.bmap wic.xz ext4.gz"
