Mailing List Archive

Trying to invoke menu.c32 programmatically.
I have a (very) modified menu system modelled on complex.c.

Most stuff works as I would like but I want to invoke menu.c32
with a specific config (basically I want to integrate the UBCD
into my bootable disk).

If I were doing this from a .cfg file I would have something like:

LABEL ubcd_menu
MENU LABEL ^U UBCD Menu
KERNEL /boot/isolinux/menu.c32
APPEND /UBCD/menus/main.cfg

and it would all work nicely (and indeed those lines
are from my /boot/isolinux/isolinux.cfg and do work nicely).

However, when my program invokes runsyslinuxcmd(cmd)
with (effectively) "/boot/isolinux/menu.c32 /UBCD/menus/main.cfg"
it doesn't do what I want. It does find menu.c32 but it is invoked
with my /boot/isolinux/isolinux.cfg, as though the argument
had been completely lost.

I've been poking around trying to find the code that handles
KERNEL/APPEND but I've managed to lose myself in a maze of
twisty little passages ...

Thanks for any help,

Antonio
arcarlini@iee.org

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.485 / Virus Database: 269.13.3/986 - Release Date:
03/09/2007 09:31



_______________________________________________
SYSLINUX mailing list
Submissions to SYSLINUX@zytor.com
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.
Re: Trying to invoke menu.c32 programmatically. [ In reply to ]
Antonio Carlini wrote:
> I have a (very) modified menu system modelled on complex.c.
>
> Most stuff works as I would like but I want to invoke menu.c32
> with a specific config (basically I want to integrate the UBCD
> into my bootable disk).
>
> If I were doing this from a .cfg file I would have something like:
>
> LABEL ubcd_menu
> MENU LABEL ^U UBCD Menu
> KERNEL /boot/isolinux/menu.c32
> APPEND /UBCD/menus/main.cfg
>
> and it would all work nicely (and indeed those lines
> are from my /boot/isolinux/isolinux.cfg and do work nicely).
>
> However, when my program invokes runsyslinuxcmd(cmd)
> with (effectively) "/boot/isolinux/menu.c32 /UBCD/menus/main.cfg"
> it doesn't do what I want. It does find menu.c32 but it is invoked
> with my /boot/isolinux/isolinux.cfg, as though the argument
> had been completely lost.
>

That *should* have worked...

Normally what I would recommend is something like:

syslinux_run_kernel_image("menu.c32", "/UBCD/menus/main.cfg", 0,
IMAGE_TYPE_KERNEL);

Bugs, of course, do happen.

-hpa

_______________________________________________
SYSLINUX mailing list
Submissions to SYSLINUX@zytor.com
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.
Re: Trying to invoke menu.c32 programmatically. [ In reply to ]
H. Peter Anvin wrote:

> That *should* have worked...

Thanks for the quick response.

> Normally what I would recommend is something like:
>
> syslinux_run_kernel_image("menu.c32", "/UBCD/menus/main.cfg", 0,
> IMAGE_TYPE_KERNEL);

Well the first thing I noticed is that neither IMAGE_TYPE_KERNEL
nor syslinux_run_kernel_image seemed to exist anywhere in the
codebase - so I upgraded from 3.36 to 3.51 :-)


> Bugs, of course, do happen.

I'm fully expecting it to be mine. I just cannot find it
right now!

I've modified my code to basically forget my menus and just invoke
runsyslinuxcmd or syslinux_run_kernel_image. So now I have:

/boot/isolinux/isolinux.cfg:
-------------------------------------
DEFAULT /boot/isolinux/vesamenu.c32
PROMPT 0
ALLOWOPTIONS 0
TOTALTIMEOUT 450

LABEL dvd_menu
MENU LABEL ^D DVD Menu
MENU DEFAULT
KERNEL /boot/isolinux/aio.c32

LABEL ubcd_menu
MENU LABEL ^U UBCD Menu
KERNEL /boot/isolinux/menu.c32
APPEND /UBCD/menus/main.cfg
-------------------------------------

I've chopped some gunk. Basically if I invoke the UBCD
menu at that point, it works as expected. If I invoke
my DVD menu I end up in my aio.c32 hack of complex.c32.

I've basically now #if 0'd out almost all of my code
and just setvideomode(0x03) followed by a single
fixed command.

Here's what I find while further hacking:

a) runsyslinuxcmd("/UBCD/isolinux/menu.c32 /UBCD/menus/main.cfg");

This invokes menu.c32 but with /boot/isolinux/isolinux.cfg.

b) syslinux_run_kernel_image("/UBCD/isolinux/menu.c32",
"/UBCD/menus/main.cfg",
0, IMAGE_TYPE_KERNEL);

Complains that "No LABEL entries found in configuration file!"
and then sits at the "boot:" prompt.

c) syslinux_run_kernel_image("menu.c32",
"/UBCD/menus/main.cfg",
0, IMAGE_TYPE_KERNEL);
This behaves exactly as (b) does.

d) syslinux_run_kernel_image("vesamenu.c32",
"/UBCD/menus/main.cfg",
0, IMAGE_TYPE_KERNEL);
This returns to the "boot:" prompt.

I cannot even find a command that, when typed at the "boot:"
prompt, will invoke menu.c32 with the correct menu. If I
try something like:
boot: /boot/isolinux/menu.c32 /UBCD/menus/main.cfg
it behaves as though it had opened /boot/isolinux/isolinux.cfg
and displays the wrong menu.

Antonio


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.485 / Virus Database: 269.13.5/990 - Release Date:
04/09/2007 22:36



_______________________________________________
SYSLINUX mailing list
Submissions to SYSLINUX@zytor.com
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.