diff options
author | Michael Brown <mcb30@etherboot.org> | 2009-02-16 00:28:30 +0000 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2009-02-16 00:30:36 +0000 |
commit | 076154a1c6ca987f84450c0225c190c9cdd77c59 (patch) | |
tree | fbe8e2e7ccbd9de5f048894f9a58687df0c975de /src/usr | |
parent | f16668dd600c266ee573badc295745cbb0c0f879 (diff) | |
download | ipxe-076154a1c6ca987f84450c0225c190c9cdd77c59.tar.gz |
[image] Allow multiple embedded images
This patch extends the embedded image feature to allow multiple
embedded images instead of just one.
gPXE now always boots the first embedded image on startup instead of
doing the hardcoded DHCP boot (aka autoboot).
Based heavily upon a patch by Stefan Hajnoczi <stefanha@gmail.com>.
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/autoboot.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/usr/autoboot.c b/src/usr/autoboot.c index cad625e4..98e79a7f 100644 --- a/src/usr/autoboot.c +++ b/src/usr/autoboot.c @@ -23,7 +23,6 @@ #include <gpxe/dhcp.h> #include <gpxe/settings.h> #include <gpxe/image.h> -#include <gpxe/embedded.h> #include <gpxe/sanboot.h> #include <gpxe/uri.h> #include <usr/ifmgmt.h> @@ -60,30 +59,6 @@ static struct net_device * find_boot_netdev ( void ) { } /** - * Boot embedded image - * - * @ret rc Return status code - */ -static int boot_embedded_image ( void ) { - struct image *image; - int rc; - - image = embedded_image(); - if ( !image ) - return ENOENT; - - if ( ( rc = imgload ( image ) ) != 0 ) { - printf ( "Could not load embedded image: %s\n", - strerror ( rc ) ); - } else if ( ( rc = imgexec ( image ) ) != 0 ) { - printf ( "Could not boot embedded image: %s\n", - strerror ( rc ) ); - } - image_put ( image ); - return rc; -} - -/** * Boot using next-server and filename * * @v filename Boot filename @@ -196,11 +171,6 @@ static int netboot ( struct net_device *netdev ) { return rc; route(); - /* Try to boot an embedded image if we have one */ - rc = boot_embedded_image (); - if ( rc != ENOENT ) - return rc; - /* Try PXE menu boot, if applicable */ fetch_string_setting ( NULL, &vendor_class_id_setting, buf, sizeof ( buf ) ); |