[<prev] [next>] [day] [month] [year] [list]
Message-ID: <E78CE97B1F363A40BABB9C077B911FB001B50F@G9W0339.americas.hpqcorp.net>
Date: Wed, 17 Aug 2011 15:37:46 +0000
From: "Cisneros, Jorge (George)" <jorge.cisneros@...com>
To: "syslinux@...or.com" <syslinux@...or.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [patch 1/1] syslinux: add suport for com32 entries in the menu
From: Jorge D Cisneros <jorge.cisneros@...com>
Problem: The actual code only check for entries with kernel or linux, so this example will not work, this patch is to add support to gfxboot to detect the entry COM32 and use any module, in this case the module is chain.c32
Version: Syslinux 4.04
Example:
UI gfxboot.c32
LABEL boot_hd0
MENU LABEL Boot from first hard drive
COM32 chain.c32
APPEND hd0
Signed-off-by: Jorge D Cisneros <jorge.cisneros@...com>
--
--- com32/gfxboot/gfxboot.c.orig 2011-08-17 10:04:44.000000000 -0500
+++ com32/gfxboot/gfxboot.c 2011-08-17 10:07:34.000000000 -0500
@@ -125,6 +125,7 @@ typedef struct menu_s {
char *alt_kernel; // alternative name in case user has replaced it
char *linux; // de facto an alias for 'kernel'
char *localboot; // boot from local disk
+ char *com32; // boot other com32 modules
char *initrd; // initrd as separate line (instead of as part of 'append')
char *append; // kernel args
char *ipappend; // append special pxelinux args (see doc)
@@ -374,6 +375,11 @@ int read_config_file(const char *filenam
continue;
}
+ if(!strcasecmp(s, "com32") && menu_ptr) {
+ menu_ptr->com32 = strdup(t);
+ continue;
+ }
+
if(!strcasecmp(s, "initrd") && menu_ptr) {
menu_ptr->initrd = strdup(t);
continue;
@@ -866,7 +872,13 @@ void boot_entry(menu_t *menu_ptr, char *
if(menu_ptr->localboot) {
gfx_done();
syslinux_local_boot(strtol(menu_ptr->localboot, NULL, 0));
+ return;
+ }
+ if(menu_ptr->com32) {
+ gfx_done();
+ asprintf(&cmd_buf, "%s %s", menu_ptr->com32, arg);
+ syslinux_run_command(cmd_buf);
return;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists