aboutsummaryrefslogtreecommitdiffstats
path: root/gpxe/src/core/main.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-02-17 20:17:17 -0800
committerH. Peter Anvin <hpa@zytor.com>2009-02-17 20:17:17 -0800
commitd0c6656a62113b913948361779d6298fe76f6e61 (patch)
treeefa2541a1abae4760717c6db421ea818114ab6f7 /gpxe/src/core/main.c
parent85b92a462dab7ce36c48614ea18314f8fc83ca9c (diff)
downloadsyslinux.git-d0c6656a62113b913948361779d6298fe76f6e61.tar.gz
syslinux.git-d0c6656a62113b913948361779d6298fe76f6e61.tar.xz
syslinux.git-d0c6656a62113b913948361779d6298fe76f6e61.zip
Update gPXE to version 0.9.6+ 277b84c6e7d49f3cf01c855007f591de8c7cb75f
Update gPXE to version 0.9.6+, from commit 277b84c6e7d49f3cf01c855007f591de8c7cb75f in the main gPXE repository. The only differences is src/config/general.h which has a few protocols added, and src/arch/i386/prefix/boot1a.S which was called boot1a.s in the upstream repository.
Diffstat (limited to 'gpxe/src/core/main.c')
-rw-r--r--gpxe/src/core/main.c36
1 files changed, 29 insertions, 7 deletions
diff --git a/gpxe/src/core/main.c b/gpxe/src/core/main.c
index d5892261..8d360c42 100644
--- a/gpxe/src/core/main.c
+++ b/gpxe/src/core/main.c
@@ -19,7 +19,9 @@ Literature dealing with the network protocols:
#include <gpxe/features.h>
#include <gpxe/shell.h>
#include <gpxe/shell_banner.h>
+#include <gpxe/image.h>
#include <usr/autoboot.h>
+#include <config/general.h>
#define NORMAL "\033[0m"
#define BOLD "\033[1m"
@@ -33,14 +35,29 @@ static struct feature features_end[0] __table_end ( struct feature, features );
*
* @ret rc Return status code
*/
-__cdecl int main ( void ) {
+__asmcall int main ( void ) {
struct feature *feature;
+ struct image *image;
+
+ /* Some devices take an unreasonably long time to initialise */
+ printf ( PRODUCT_SHORT_NAME " initialising devices...\n" );
initialise();
startup();
- /* Print welcome banner */
- printf ( NORMAL "\n\n\n" BOLD "gPXE " VERSION
+ /*
+ * Print welcome banner
+ *
+ *
+ * If you wish to brand this build of gPXE, please do so by
+ * defining the string PRODUCT_NAME in config/general.h.
+ *
+ * While nothing in the GPL prevents you from removing all
+ * references to gPXE or http://etherboot.org, we prefer you
+ * not to do so.
+ *
+ */
+ printf ( NORMAL "\n\n" PRODUCT_NAME "\n" BOLD "gPXE " VERSION
NORMAL " -- Open Source Boot Firmware -- "
CYAN "http://etherboot.org" NORMAL "\n"
"Features:" );
@@ -53,11 +70,16 @@ __cdecl int main ( void ) {
/* User wants shell; just give them a shell */
shell();
} else {
- /* User doesn't want shell; try booting. If booting
- * fails, offer a second chance to enter the shell for
- * diagnostics.
+ /* User doesn't want shell; load and execute the first
+ * image. If booting fails (i.e. if the image
+ * returns, or fails to execute), offer a second
+ * chance to enter the shell for diagnostics.
*/
- autoboot();
+ for_each_image ( image ) {
+ image_exec ( image );
+ break;
+ }
+
if ( shell_banner() )
shell();
}