Gordon Schumacher
2007-Oct-01 18:39 UTC
[syslinux] Patch to add option-key menus (similar to SuSE patch)
I've written a patch to add option-key submenus to menu.c32 and vesamenu.c32 for doing things like changing the video mode. This was inspired the the patch that SuSE applies to the syslinux family and Grub, without the ugly pseudo-PostScript spaghetti. The patch may be found at http://www.valleyhold.org/~gordons/syslinux-optmenus.diff (it's over 30K, so posting it here didn't seem appropriate). Let me know what you think - I hope this can make it as mainline code! It's almost certainly not fully debugged yet - I'm sure you can break it if you try - but it should be a good (functional) start. Here's a short bit of documentation: OPTMENU F1...F12 TITLE submenutitle Begins a new submenu, triggered by the appropriate function key. Do not assign a function key that you have already assigned to the "F1 textfile background" function to display full-screen help, or this menu will never be displayed. OPTMENU F1...F12 ENTRY displaytext Begins a new entry in the indicated submenu. The text given is what will be displayed for that menu option. OPTMENU F1...F12 VALUE kernelappend Sets the string that will be added to the APPEND string of the currently selected boot entry. This is applied to the last ENTRY. OPTMENU F1...F12 DEFAULT entrynum Selects which entry in the indicated submenu will be selected by default. OPTMENUS F1 F2 F3... To be used in a LABEL section, this selects which fkey submenus will be active for the current LABEL. Example config file: TIMEOUT 200 DEFAULT /boot/vesamenu.c32 MENU TITLE test menu OPTMENU F2 TITLE Video mode OPTMENU F2 ENTRY Text (80 x 25) OPTMENU F2 VALUE vga=normal OPTMENU F2 ENTRY Text (80 x 50) OPTMENU F2 VALUE vga=ext OPTMENU F2 ENTRY 640 x 480 OPTMENU F2 VALUE vga=785 OPTMENU F2 ENTRY 800 x 600 OPTMENU F2 VALUE vga=788 OPTMENU F2 ENTRY 1024 x 768 OPTMENU F2 VALUE vga=791 OPTMENU F2 ENTRY 1280 x 1024 OPTMENU F2 VALUE vga=794 OPTMENU F2 ENTRY 1600 x 1200 OPTMENU F2 VALUE vga=798 OPTMENU F2 DEFAULT 4 OPTMENU F3 TITLE Virtualization OPTMENU F3 ENTRY Run in VMware OPTMENU F3 VALUE load=vmware* OPTMENU F3 ENTRY Run Native LABEL standard MENU LABEL Normal kernel KERNEL /boot/vmlinuz APPEND initrd=/boot/initrd.gz splash=silent ramdisk_size=6379 root=/dev/ram0 rw changes=slaxchanges OPTMENUS F2 F3 LABEL kdebug MENU LABEL Debugging Kernel KERNEL /boot/vmlinuz_devel APPEND initrd=/boot/initrd_devel.gz splash=silent ramdisk_size=13239 root=/dev/ram0 rw changes=slaxchanges OPTMENUS F2 LABEL memtest86 MENU LABEL Memtest86+ Memory Tester KERNEL /boot/mt86p
Gordon Schumacher
2007-Oct-01 18:46 UTC
[syslinux] Patch to add option-key menus (similar to SuSE patch)
On 10/1/07, Gordon Schumacher <whiplash at pobox.com> wrote: # I've written a patch to add option-key submenus to menu.c32 and # vesamenu.c32 for doing things like changing the video mode. This was # inspired the the patch that SuSE applies to the syslinux family and # Grub, without the ugly pseudo-PostScript spaghetti. # # The patch may be found at # http://www.valleyhold.org/~gordons/syslinux-optmenus.diff (it's over # 30K, so posting it here didn't seem appropriate). Oh yes, I almost forgot; that patch is against syslinux-3.60-pre2.