load function_video {
	if [ x$feature_all_video_module = xy ]
	then
		insmod all_video
	else
		insmod video_bochs
		insmod video_cirrus
		if test "${grub_platform}" == "efi"
		then
			insmod efi_gop
			insmod efi_uga
		elif test "${grub_platform}" == "pc"
		then
			insmod vbe
			insmod vga
		fi
	fi
}

set color_normal=white/black
set color_highlight=black/light-gray
set timeout=10
set timeout_style=menu

set theme=/boot/grub/tileos-theme/theme.txt

if loadfont /boot/grub/dejavu-bold-14.pf2
then
	set gfxmode=auto
	export gfxmode
	load_video
	insmod gfxterm
	terminal_output gfxterm
	insmod gfxmenu
	insmod png
	export theme
fi


menuentry "Start TileOS" {
	set gfxpayload=keep
	linux	@KERNEL_LIVE@ @APPEND_LIVE@
	initrd	@INITRD_LIVE@
	
}

# Memtest (if any)
if [ "${grub_platform}" = "pc" ] -a @ENABLE_MEMTEST@; then
	source /boot/grub/memtest.cfg
fi

# Firmware setup (UEFI)
if [ "${grub_platform}" = "efi" ]; then
	menuentry "UEFI Firmware Settings" {
		fwsetup
	}
fi

menuentry "Power Off" --class shutdown {
	halt
}
