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

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

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

require conf/machine/include/tune-x86_64.inc
require conf/machine/include/ia32-base.inc

{{ input type:"boolean" name:"xserver" prio:"50" msg:"Do you need support for X? (y/n)" default:"y" }}

{{ if xserver == "y": }}
{{ input type:"choicelist" name:"xserver_choice" prio:"50" msg:"Please select an xserver for this machine:" default:"xserver_i915" }}

{{ input type:"choice" val:"xserver_vesa" msg:"VESA xserver support" }}
{{ input type:"choice" val:"xserver_i915" msg:"i915 xserver support" }}
{{ if xserver == "y": }}
XSERVER ?= "${XSERVER_IA32_BASE} \
           ${XSERVER_IA32_EXT} \
{{ if xserver == "y" and xserver_choice == "xserver_vesa": }}
           ${XSERVER_IA32_VESA} \
{{ if xserver == "y" and xserver_choice == "xserver_i915": }}
           ${XSERVER_IA32_I915} \
{{ if xserver == "y" and xserver == "y": }}
           "

{{ if xserver == "y" and xserver_choice == "xserver_vesa": }}
APPEND += "video=vesafb vga=0x318"
