[syslinux] [patch 1/1] syslinux: add suport for com32 entries inthe menu

Sebastian Herbszt herbszt at gmx.de
Thu Aug 25 16:03:50 PDT 2011

Cisneros, Jorge (George) wrote:
> Sebatian
>   That's right the problem is that the module don't care the com32 line, and in this case we don't have any KERNEL o 
> LINUX label, so menu_ptr->kernel and menu_ptr->linux are empty.
>    When I  try to do something like this
>    MENU LABEL Windows
>    COM32 chain.c32
>    APPEND fs ntldr=/bootmgr
>   This module will not work, but for example others modules like vesamenu.c32 will do. The patch will read the com32 
> parameter (chain.c32) and will be execute it with the parameters (fs ntldr=/bootmgr)
> George

With this approach we need to parse all of the commands (BOOT, BSS, PXE, ...) which are currently called by label.
Maybe it is enough to skip the append if the command is called by label. This should result in the same command line
which would also be called without gfxboot. The "menu" module is different because it allows changing the APPEND

Does the following work good enough for you?


diff --git a/com32/gfxboot/gfxboot.c b/com32/gfxboot/gfxboot.c
index 35d180a..9fb40e5 100644
--- a/com32/gfxboot/gfxboot.c
+++ b/com32/gfxboot/gfxboot.c
@@ -461,6 +461,7 @@ do_include:
   gfx_menu.arg_list = calloc(gfx_menu.entries, gfx_menu.arg_size);

   for(u = 0, menu_ptr = menu; menu_ptr; menu_ptr = menu_ptr->next, u++) {
+    if(!menu_ptr->kernel && !menu_ptr->linux) menu_ptr->append = NULL;
     if(!menu_ptr->append) menu_ptr->append = menu_default->append;
     if(!menu_ptr->ipappend) menu_ptr->ipappend = menu_default->ipappend;

More information about the Syslinux mailing list