2005-03-08 18:53:11 +00:00
|
|
|
/*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2, or (at
|
|
|
|
* your option) any later version.
|
|
|
|
*/
|
|
|
|
|
2005-04-12 16:48:45 +00:00
|
|
|
#include "etherboot.h"
|
|
|
|
#include "dev.h"
|
|
|
|
#include "console.h"
|
2005-05-17 13:33:49 +00:00
|
|
|
#include "image.h"
|
2005-04-18 11:00:42 +00:00
|
|
|
|
|
|
|
#include "config/general.h"
|
|
|
|
|
2005-04-18 12:43:18 +00:00
|
|
|
/*
|
|
|
|
* Build ID string calculations
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#undef XSTR
|
|
|
|
#undef STR
|
|
|
|
#define XSTR(s) STR(s)
|
|
|
|
#define STR(s) #s
|
|
|
|
|
2005-03-08 18:53:11 +00:00
|
|
|
#ifdef BUILD_SERIAL
|
2005-04-18 12:43:18 +00:00
|
|
|
#include "config/.buildserial.h"
|
2005-04-18 12:45:31 +00:00
|
|
|
#define BUILD_SERIAL_STR " #" XSTR(BUILD_SERIAL_NUM)
|
2005-04-18 12:43:18 +00:00
|
|
|
#else
|
|
|
|
#define BUILD_SERIAL_STR ""
|
2005-03-08 18:53:11 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef BUILD_ID
|
2005-04-18 12:45:31 +00:00
|
|
|
#define BUILD_ID_STR " " BUILD_ID
|
2005-04-18 12:43:18 +00:00
|
|
|
#else
|
|
|
|
#define BUILD_ID_STR ""
|
2005-03-08 18:53:11 +00:00
|
|
|
#endif
|
2005-04-18 12:43:18 +00:00
|
|
|
|
|
|
|
#if defined(BUILD_ID) || defined(BUILD_SERIAL)
|
2005-04-18 12:45:31 +00:00
|
|
|
#define BUILD_STRING " [build" BUILD_ID_STR BUILD_SERIAL_STR "]"
|
2005-04-18 12:43:18 +00:00
|
|
|
#else
|
|
|
|
#define BUILD_STRING ""
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Print out configuration
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
void print_config ( void ) {
|
|
|
|
printf( "Etherboot " VERSION BUILD_STRING
|
2005-03-08 18:53:11 +00:00
|
|
|
" (GPL) http://etherboot.org\n"
|
|
|
|
"Drivers: " );
|
2005-04-12 16:48:45 +00:00
|
|
|
print_drivers();
|
2005-05-17 13:33:49 +00:00
|
|
|
printf( " Images: " );
|
|
|
|
print_images();
|
|
|
|
|
2005-03-08 18:53:11 +00:00
|
|
|
#ifdef PXE_EXPORT /* All possible exports */
|
2005-05-17 13:33:49 +00:00
|
|
|
printf ( " Exports: PXE " );
|
2005-03-08 18:53:11 +00:00
|
|
|
#endif /* All possible exports */
|
2005-05-17 13:33:49 +00:00
|
|
|
|
2005-03-08 18:53:11 +00:00
|
|
|
#if (BOOTP_SERVER != 67) || (BOOTP_CLIENT != 68)
|
|
|
|
printf( "[DHCP ports %d and %d] ",
|
|
|
|
BOOTP_SERVER, BOOTP_CLIENT);
|
|
|
|
#endif
|
|
|
|
putchar('\n');
|
|
|
|
printf( "Protocols: "
|
|
|
|
#ifdef RARP_NOT_BOOTP
|
|
|
|
"RARP "
|
|
|
|
#else
|
|
|
|
# ifndef NO_DHCP_SUPPORT
|
|
|
|
"DHCP "
|
|
|
|
# else
|
|
|
|
"BOOTP "
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
#ifdef DOWNLOAD_PROTO_TFTP
|
|
|
|
"TFTP "
|
|
|
|
#endif
|
2005-05-19 16:47:19 +00:00
|
|
|
#ifdef DOWNLOAD_PROTO_FSP
|
|
|
|
"FSP "
|
|
|
|
#endif
|
2005-03-08 18:53:11 +00:00
|
|
|
#ifdef DOWNLOAD_PROTO_NFS
|
|
|
|
"NFS "
|
|
|
|
#endif
|
|
|
|
#ifdef DOWNLOAD_PROTO_SLAM
|
|
|
|
"SLAM "
|
|
|
|
#endif
|
|
|
|
#ifdef DOWNLOAD_PROTO_TFTM
|
|
|
|
"TFTM "
|
|
|
|
#endif
|
|
|
|
#ifdef DOWNLOAD_PROTO_HTTP
|
|
|
|
"HTTP "
|
|
|
|
#endif
|
|
|
|
#ifdef PROTO_LACP
|
|
|
|
"LACP "
|
|
|
|
#endif
|
|
|
|
#ifdef DNS_RESOLVER
|
|
|
|
"DNS "
|
|
|
|
#endif
|
|
|
|
"\n");
|
2005-04-08 15:01:17 +00:00
|
|
|
#ifdef KEEP_IT_REAL
|
|
|
|
printf( "Keeping It Real [EXPERIMENTAL]\n" );
|
|
|
|
#endif
|
2005-03-08 18:53:11 +00:00
|
|
|
}
|
|
|
|
|
2005-04-08 15:01:17 +00:00
|
|
|
/*
|
|
|
|
* Drag in all requested console types
|
|
|
|
*
|
2005-04-18 11:00:42 +00:00
|
|
|
* CONSOLE_DUAL sets both CONSOLE_FIRMWARE and CONSOLE_SERIAL for
|
|
|
|
* legacy compatibility.
|
2005-04-16 09:35:17 +00:00
|
|
|
*
|
2005-04-08 15:01:17 +00:00
|
|
|
*/
|
|
|
|
|
2005-04-18 12:43:18 +00:00
|
|
|
#ifdef CONSOLE_DUAL
|
2005-04-18 11:00:42 +00:00
|
|
|
#undef CONSOLE_FIRMWARE
|
|
|
|
#define CONSOLE_FIRMWARE 1
|
|
|
|
#undef CONSOLE_SERIAL
|
|
|
|
#define CONSOLE_SERIAL 1
|
2005-04-08 15:01:17 +00:00
|
|
|
#endif
|
|
|
|
|
2005-04-18 12:43:18 +00:00
|
|
|
#ifdef CONSOLE_FIRMWARE
|
2005-04-08 15:01:17 +00:00
|
|
|
REQUIRE_OBJECT ( bios_console );
|
|
|
|
#endif
|
|
|
|
|
2005-04-18 12:43:18 +00:00
|
|
|
#ifdef CONSOLE_SERIAL
|
2005-04-08 15:01:17 +00:00
|
|
|
REQUIRE_OBJECT ( serial );
|
|
|
|
#endif
|
|
|
|
|
2005-04-18 12:43:18 +00:00
|
|
|
#ifdef CONSOLE_DIRECT_VGA
|
2005-04-08 15:01:17 +00:00
|
|
|
REQUIRE_OBJECT ( video_subr );
|
|
|
|
#endif
|
|
|
|
|
2005-04-18 12:43:18 +00:00
|
|
|
#ifdef CONSOLE_BTEXT
|
2005-04-08 15:01:17 +00:00
|
|
|
REQUIRE_OBJECT ( btext );
|
|
|
|
#endif
|
|
|
|
|
2005-04-18 12:43:18 +00:00
|
|
|
#ifdef CONSOLE_PC_KBD
|
2005-04-08 15:01:17 +00:00
|
|
|
REQUIRE_OBJECT ( pc_kbd );
|
|
|
|
#endif
|
|
|
|
|
2005-05-02 11:13:47 +00:00
|
|
|
/*
|
|
|
|
* Drag in all requested protocols
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#ifdef DOWNLOAD_PROTO_TFTP
|
|
|
|
REQUIRE_OBJECT ( tftp );
|
|
|
|
#endif
|
|
|
|
#ifdef DOWNLOAD_PROTO_NFS
|
|
|
|
REQUIRE_OBJECT ( nfs );
|
|
|
|
#endif
|
|
|
|
#ifdef DOWNLOAD_PROTO_HTTP
|
|
|
|
REQUIRE_OBJECT ( http );
|
|
|
|
#endif
|
|
|
|
#ifdef DOWNLOAD_PROTO_TFTM
|
|
|
|
REQUIRE_OBJECT ( tftm );
|
|
|
|
#endif
|
|
|
|
#ifdef DOWNLOAD_PROTO_SLAM
|
|
|
|
REQUIRE_OBJECT ( slam );
|
|
|
|
#endif
|
|
|
|
|
2005-04-30 14:39:21 +00:00
|
|
|
/*
|
|
|
|
* Drag in any required resolvers
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#ifdef DNS_RESOLVER
|
2005-04-30 14:49:41 +00:00
|
|
|
REQUIRE_OBJECT ( dns );
|
2005-04-30 14:39:21 +00:00
|
|
|
#endif
|
2005-05-01 10:58:49 +00:00
|
|
|
|
|
|
|
#ifdef NMB_RESOLVER
|
|
|
|
REQUIRE_OBJECT ( nmb );
|
|
|
|
#endif
|
2005-05-17 13:33:49 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* 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
|
2006-06-11 01:55:43 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Drag in miscellaneous objects
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#ifdef NULL_TRAP
|
|
|
|
REQUIRE_OBJECT ( nulltrap );
|
|
|
|
#endif
|