]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[prefix] Allow iPXE's own command line to be executed as a script
authorMichael Brown <mcb30@ipxe.org>
Mon, 7 Mar 2011 22:02:07 +0000 (22:02 +0000)
committerMichael Brown <mcb30@ipxe.org>
Mon, 7 Mar 2011 22:28:31 +0000 (22:28 +0000)
commitb2332d511807b87bd71cf73acaaf48e671d71c9d
treefde829da1d96d26c6d1047c0a41cc2aa8558df1c
parent202cf094ebcbea4dec43e57ae29a3bbe808807e4
[prefix] Allow iPXE's own command line to be executed as a script

Some prefixes (e.g. .lkrn) allow a command line to be passed in to
iPXE.  At present, this command line is ignored.

If a command line is provided, treat it as an embedded script (without
an explicit "#!ipxe" magic marker).  This allows for patterns of
invocation such as

  title  iPXE
  kernel /boot/ipxe.lkrn dhcp && \
         sanboot iscsi:10.0.4.1::::iqn.2010-04.org.ipxe.dolphin:storage

Here GRUB is instructed to load ipxe.lkrn with an embedded script
equivalent to

  #!ipxe
  dhcp
  sanboot iscsi:10.0.4.1::::iqn.2010-04.org.ipxe.dolphin:storage

This can be used to effectively vary the embedded script without
having to rebuild ipxe.lkrn.

Originally-implemented-by: Dave Hansen <dave@sr71.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/i386/core/cmdline.c [new file with mode: 0644]
src/arch/i386/prefix/lkrnprefix.S
src/image/embedded.c
src/image/script.c
src/include/ipxe/init.h
src/include/ipxe/script.h [new file with mode: 0644]