[ipxe-devel] Size-barrier for chainloading ipxe-scripts?

Michael Brown mbrown at fensystems.co.uk
Mon Apr 2 10:16:50 UTC 2012


On Monday 02 Apr 2012 08:42:35 Oliver Rath wrote:
> is there a size-barrer for chainloading scripts? I.e. if you want to use
> the new menu-commands excessivly in the way, that you are chainloading
> #!ipxe-scripts very often (by navigating through many menus), is there a
> max number of bytes that the sum of chainloaded (or the size of single)
> scripts may have?

There are three ways to handle submenus:

a) all in one script, using gotos - no problems

b) multiple scripts, using chain to enter a submenu, exit to return from the 
submenu.  No problem provided that you remember to imgfree the submenu script 
after it returns.  I'm planning on adding a "chain --free" option to make this 
easier to do.

c) multiple scripts, using chain to enter a submenu _and_ chain to return to 
the original menu.  This will currently run out of internal stack space after 
a few iterations.  To work properly, it needs the ability to tail-recurse 
between scripts.  This is supported internally but not yet exposed via the 
command line.  I'm planning on adding a "chain --replace" option to make this 
possible to do.

Michael



More information about the ipxe-devel mailing list