#@TYPE: Machine
#@NAME: C.H.I.P. board
#@DESCRIPTION: Machine configuration for C.H.I.P. board

DEFAULTTUNE ?= "cortexa8t-neon"
include conf/machine/include/tune-cortexa8.inc

PREFERRED_PROVIDER_virtual/kernel ?= "linux-chip"
PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-chip"
PREFERRED_PROVIDER_u-boot ?= "u-boot-chip"

MACHINE_FEATURES = "bluetooth usbgadget usbhost wifi"

SERIAL_CONSOLES = "115200;ttyS0 115200;ttyGS0"

KERNEL_IMAGETYPE = "zImage"
KERNEL_DEVICETREE = "sun5i-r8-chip.dtb"

IMAGE_FSTYPES += "ubi"
UBI_VOLNAME = "rootfs"
MKUBIFS_ARGS = "-e 0x1f8000 -c 2000 -m 0x4000 -x lzo"
UBINIZE_ARGS = "-m 0x4000 -p 0x200000 -s 16384"
IMAGE_INSTALL_append = " kernel-devicetree kernel-image kernel-modules"

EXTRA_IMAGEDEPENDS += "u-boot-chip"
UBOOT_MACHINE = "CHIP_defconfig"
