[syslinux] Trying to invoke menu.c32 programmatically.
Antonio Carlini
arcarlini at iee.org
Wed Sep 5 13:50:13 PDT 2007
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
More information about the Syslinux
mailing list