#@TYPE: Machine
#@NAME: {{=machine}}

#@DESCRIPTION: Machine configuration for {{=machine}} systems

require conf/machine/include/tune-mips32.inc

MACHINE_FEATURES = "screen keyboard pci usbhost ext2 ext3 serial"

KERNEL_IMAGETYPE = "vmlinux"
KERNEL_ALT_IMAGETYPE = "vmlinux.bin"

{{ if kernel_choice == "custom": preferred_kernel = "linux-yocto-custom" }}
{{ if kernel_choice == "custom": }}
PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"

{{ if kernel_choice != "custom": preferred_kernel = kernel_choice.split('_')[0] }}
{{ if kernel_choice != "custom": preferred_kernel_version = kernel_choice.split('_')[1] }}
{{ if kernel_choice != "custom": }}
PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
PREFERRED_VERSION_{{=preferred_kernel}} ?= "{{=preferred_kernel_version}}%"

{{ input type:"boolean" name:"xserver" prio:"50" msg:"Do you need support for X? (y/n)" default:"y" }}
{{ if xserver == "y": }}
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
XSERVER = "xserver-xorg \
           xserver-xorg-extension-extmod \
           xf86-input-evdev \
           xf86-video-fbdev"

SERIAL_CONSOLE = "115200 ttyS0"

MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"

IMAGE_FSTYPES ?= "jffs2 tar.bz2"
