[ipxe-devel] [PATCH] ipxe: Allow config option to disable banner at ROM init

Alex Williamson alex.williamson at redhat.com
Thu Feb 6 15:53:43 UTC 2014


iPXE currently prints the "Press Ctrl-B to configure" banner twice,
once when the ROM is first called for initialization and again when we
attempt to boot from the ROM.  The problem this introduces is that it
slows boot, especially when the NIC is not the primary boot device.
Tools like libguestfs make use of QEMU VMs for performing maintenance
on disk images and may make use of NICs in the VM for network support.
If iPXE introduces a static init-time delay, that directly translates
to increased runtime for the tools.  We do however still want to allow
iPXE interaction at the point where we try to boot from the NIC.  This
change allows downstream distributions to optionally disable the ROM
init-time banner while retaining the boot-time banner to create a
single binary supporting both use cases.

Signed-off-by: Alex Williamson <alex.williamson at redhat.com>
---
 src/arch/i386/prefix/romprefix.S |    2 ++
 src/config/general.h             |    6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/src/arch/i386/prefix/romprefix.S b/src/arch/i386/prefix/romprefix.S
index 091673d..cf41ce6 100644
--- a/src/arch/i386/prefix/romprefix.S
+++ b/src/arch/i386/prefix/romprefix.S
@@ -423,6 +423,7 @@ no_pmm:
 	xorw	%di, %di
 	cs rep	movsb
 
+#if ENABLE_ROM_BANNER
 	/* Skip prompt if this is not the first PCI function */
 	testb	$PCI_FUNC_MASK, init_pci_busdevfn
 	jnz	no_shell
@@ -453,6 +454,7 @@ no_pmm:
 	pushw	%cs
 	call	exec
 no_shell:
+#endif
 	movb	$( '\n' ), %al
 	xorw	%di, %di
 	call	print_character
diff --git a/src/config/general.h b/src/config/general.h
index 0b45edf..01101f5 100644
--- a/src/config/general.h
+++ b/src/config/general.h
@@ -35,6 +35,12 @@ FILE_LICENCE ( GPL2_OR_LATER );
 				   banner should appear */
 
 /*
+ * Enable shell banner in early ROM init path
+ *
+ */
+#define ENABLE_ROM_BANNER 1
+
+/*
  * Network protocols
  *
  */




More information about the ipxe-devel mailing list