#@TYPE: Machine
#@NAME: WaRP
#@SOC: i.MX6SL
#@DESCRIPTION: Machine configuration for i.MX6SL WaRP board.
#@MAINTAINER: Otavio Salvador <otavio@ossystems.com.br>

#Warp has an eMMC that stores the bootloader, kernel, dtb and rootfs.
#An easy way to flash the generated  <image>.sdcard image is
#following these steps:
#
# 1.Connect the serial to USB adapter from Warp to the host PC
# 2.Connect the USB OTG Warp port to the host PC
#   (Warp can be powered via USB OTG port).
# 3.In the U-boot prompt type:
#   => ums 0 mmc 0
# 4.Then the Warp eMMC will be mounted as a USB gadget in the host PC
# 5.On the host PC, copy the generated .sdcard image into Warp's eMMC:
#   $ umount /dev/<ums-device>
#   $ sudo dd if=<image>.sdcard of=/dev/<ums-device>
#
#WARNING: Double check by running dmesg on the host PC which is the
#correct node that corresponds to the Warp board. Passing an incorrect
#device number may overwrite the host PC file system, causing boot issues there.

MACHINEOVERRIDES =. "mx6sl:"

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

IMX_DEFAULT_BSP = "mainline"

# WaRP uses eMMC boot partition by default and the u-boot inside .sdcard image
# does not override it. However, build u-boot binary anyway in order to provide
# a binary to be used if an update is needed
# see how-to override eMMC boot partition on the following link
# http://git.denx.de/?p=u-boot.git;a=blob;f=board/warp/README
EXTRA_IMAGEDEPENDS += "u-boot"

UBOOT_MACHINE ?= "warp_defconfig"
UBOOT_SUFFIX = "imx"

KERNEL_DEVICETREE = "imx6sl-warp.dtb"

SERIAL_CONSOLES = "115200;ttymxc0"

MACHINE_FEATURES += "wifi bluetooth serial"
MACHINE_EXTRA_RRECOMMENDS += "bcm4330-nvram-config"
