summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Brown2005-05-17 15:33:49 +0200
committerMichael Brown2005-05-17 15:33:49 +0200
commit6e8f29d3cb92a81c65ad9fe6fc694e93298ca524 (patch)
tree75c1982c745bed9e42a13f6317d91dd6b7719418 /src
parentUse __unused instead of __used for static data structures. (diff)
downloadipxe-6e8f29d3cb92a81c65ad9fe6fc694e93298ca524.tar.gz
ipxe-6e8f29d3cb92a81c65ad9fe6fc694e93298ca524.tar.xz
ipxe-6e8f29d3cb92a81c65ad9fe6fc694e93298ca524.zip
Image formats moved into the new config system
Diffstat (limited to 'src')
-rw-r--r--src/Config30
-rw-r--r--src/core/config.c72
2 files changed, 38 insertions, 64 deletions
diff --git a/src/Config b/src/Config
index 8114837dd..ca069c769 100644
--- a/src/Config
+++ b/src/Config
@@ -163,29 +163,6 @@
#
# Boot image options:
#
-# -DTAGGED_IMAGE
-# Add tagged image kernel boot support (recommended).
-# -DAOUT_IMAGE
-# Add a.out kernel boot support (generic).
-# -DELF_IMAGE
-# Add generic ELF kernel boot support (recommended).
-# -DEL64F_IMAGE
-# Add generic ELF64 kernel boot support (useful for > 4GB disks).
-# -DWINCE_IMAGE
-# Add the ability to boot WINCE.... now only sis630 OK!
-# -DPXE_IMAGE
-# Add the ability to boot PXE NBPs. Requires
-# PXE_EXPORT. Currently not supported on
-# anything other than i386
-# -DFREEBSD_PXEEMU
-# Add the ability to boot PXE images... only FreeBSD supported
-# -DIMAGE_MULTIBOOT
-# Add Multiboot image support (currently only
-# for ELF images).
-# Without this, generic ELF support is selected.
-# -DIMAGE_FREEBSD
-# Add FreeBSD image loading support (requires at least
-# -DAOUT_IMAGE and/or -DELF_IMAGE).
# -DFREEBSD_KERNEL_ENV
# Pass in FreeBSD kernel environment
# -DAOUT_LYNX_KDI
@@ -324,13 +301,6 @@ CFLAGS+= -DBACKOFF_LIMIT=7 -DCONGESTED
# CFLAGS+= -DTRY_FLOPPY_FIRST=4
# CFLAGS+= -DEXIT_IF_NO_OFFER
-# Enable tagged image, generic ELF, Multiboot ELF
-# or FreeBSD ELF/a.out boot image support
-CFLAGS+= -DTAGGED_IMAGE -DELF_IMAGE
-# CFLAGS+= -DAOUT_IMAGE -DIMAGE_MULTIBOOT -DIMAGE_FREEBSD
-# CFLAGS+= -DAOUT_IMAGE -DAOUT_LYNX_KDI
-# CFLAGS+= -DCOFF_IMAGE
-# CFLAGS+= -DRAW_IMAGE
# Multicast Support
# CFLAGS+= -DALLMULTI -DMULTICAST_LEVEL1 -DMULTICAST_LEVEL2
diff --git a/src/core/config.c b/src/core/config.c
index fa49fdda7..f8683063f 100644
--- a/src/core/config.c
+++ b/src/core/config.c
@@ -8,6 +8,7 @@
#include "etherboot.h"
#include "dev.h"
#include "console.h"
+#include "image.h"
#include "config/general.h"
@@ -48,42 +49,13 @@ void print_config ( void ) {
" (GPL) http://etherboot.org\n"
"Drivers: " );
print_drivers();
- printf( " Images: "
-#ifdef TAGGED_IMAGE
- "NBI "
-#endif
-#ifdef ELF64_IMAGE
- "ELF64 "
-#endif
-#ifdef ELF_IMAGE
- "ELF "
-#endif
-#ifdef COFF_IMAGE
- "COFF "
-#endif
-#ifdef IMAGE_FREEBSD
- "FreeBSD "
-#endif
-#ifdef IMAGE_MULTIBOOT
- "Multiboot "
-#endif
-#ifdef AOUT_IMAGE
- "a.out "
-#endif
-#ifdef WINCE_IMAGE
- "WINCE "
-#endif
-#ifdef PXE_IMAGE
- "PXE "
-#endif
+ printf( " Images: " );
+ print_images();
+
#ifdef PXE_EXPORT /* All possible exports */
- " Exports: "
-#ifdef PXE_EXPORT
- "PXE "
-#endif
+ printf ( " Exports: PXE " );
#endif /* All possible exports */
- " "
- );
+
#if (BOOTP_SERVER != 67) || (BOOTP_CLIENT != 68)
printf( "[DHCP ports %d and %d] ",
BOOTP_SERVER, BOOTP_CLIENT);
@@ -201,3 +173,35 @@ REQUIRE_OBJECT ( dns );
#ifdef NMB_RESOLVER
REQUIRE_OBJECT ( nmb );
#endif
+
+/*
+ * Drag in all requested image formats
+ *
+ */
+#ifdef TAGGED_IMAGE
+REQUIRE_OBJECT ( nbi );
+#endif
+#ifdef ELF64_IMAGE
+REQUIRE_OBJECT ( elf64 );
+#endif
+#ifdef ELF_IMAGE
+REQUIRE_OBJECT ( elf );
+#endif
+#ifdef COFF_IMAGE
+REQUIRE_OBJECT ( coff );
+#endif
+#ifdef IMAGE_FREEBSD
+REQUIRE_OBJECT ( freebsd );
+#endif
+#ifdef IMAGE_MULTIBOOT
+REQUIRE_OBJECT ( multiboot );
+#endif
+#ifdef AOUT_IMAGE
+REQUIRE_OBJECT ( aout );
+#endif
+#ifdef WINCE_IMAGE
+REQUIRE_OBJECT ( wince );
+#endif
+#ifdef PXE_IMAGE
+REQUIRE_OBJECT ( pxe );
+#endif