iPXE discussion forum
iPXE script calls another iPXE script recursively - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: iPXE script calls another iPXE script recursively (/showthread.php?tid=7616)



iPXE script calls another iPXE script recursively - Siddharth - 2015-02-10 02:31

Hello,

I am writing a system which benchmarks http transfers in iPXE for different file sizes.

I have written the following(recursive) script:

(script.ipxe on somserver)
#!ipxe
chain http://someserver/script.ipxe
prompt

I get the following error after some recursions

http://someserver/script.ipxe.... Error 0x0001f714 (http://ipxe.org/0001f714)
Not in a script: Error 0x3d028001 (http://ipxe.org/3d028001)
Could not boot: Error 0x3d028001 (http://ipxe.org/3d028001)


I suspect iPXE may be running out of stack space. Is there another reason for this occurring? Is there a solution for this?

thanks
Siddharth


RE: iPXE script calls another iPXE script recursively - robinsmidsrod - 2015-03-09 10:15

Try to change the "chain" into "chain -ar". That makes it behave like a tail call (or similar to the exec function in bash). Obviously it means that you can't return back to the previous script. And yes, iPXE is running out of stack space when you do what you did recursively.