lkml.org 
[lkml]   [2011]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[patch 1/1] syslinux: add suport for com32 entries in the menu
Date
From: Jorge D Cisneros <jorge.cisneros@hp.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@hp.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;
}


\
 
 \ /
  Last update: 2011-08-17 17:51    [W:0.026 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site