diff --git a/config/grub/config/grub.cfg b/config/grub/config/grub.cfg index 274521c6d709447126cfdf8e7d57388416efdeea..0d7df9972d16ae2d829ebb87af0dc91de40d8576 100644 --- a/config/grub/config/grub.cfg +++ b/config/grub/config/grub.cfg @@ -14,15 +14,33 @@ terminal_input --append at_keyboard terminal_input --append usb_keyboard terminal_output --append cbmemc -gfxpayload=keep -terminal_output --append gfxterm - -if [ -f (cbfsdisk)/background.png ]; then - insmod png - background_image (cbfsdisk)/background.png -elif [ -f (cbfsdisk)/background.jpg ]; then - insmod jpeg - background_image (cbfsdisk)/background.jpg +# User interface overrides wherever "keystatus" is supported +# Keep SHIFT key pressed before powering on to disable graphics +if keystatus --shift; then + terminal_output --append vga_text +else + gfxpayload=keep + terminal_output --append gfxterm + + if [ -f (cbfsdisk)/background.png ]; then + insmod png + background_image (cbfsdisk)/background.png + elif [ -f (cbfsdisk)/background.jpg ]; then + insmod jpeg + background_image (cbfsdisk)/background.jpg + fi +fi + +# Keep CTRL pressed to enable default serial terminal (COM1 or the like) +if keystatus --ctrl; then + serial + terminal_input --append serial + terminal_output --append serial +fi + +# Keep ALT pressed to enable spkmodem +if keystatus --alt; then + terminal_output --append spkmodem fi set default="0" @@ -342,4 +360,34 @@ menuentry 'Load MemTest86+ [m]' --hotkey='m' { set root='cbfsdisk' chainloader /img/memtest } -fi \ No newline at end of file +fi + +submenu 'Other' { + menuentry 'Enable default serial terminal' { + serial + terminal_input --append serial + terminal_output --append serial + } + + menuentry 'Disable default serial terminal' { + terminal_input --remove serial + terminal_output --remove serial + } + + menuentry 'Enable gfxterm' { + terminal_output --append gfxterm + terminal_output --remove vga_text + } + menuentry 'Disable gfxterm' { + terminal_output --remove gfxterm + terminal_output --append vga_text + } + + menuentry 'Enable spkmodem' { + terminal_output --append spkmodem + } + + menuentry 'Disable spkmodem' { + terminal_output --remove spkmodem + } +} \ No newline at end of file