Merge branch 'master' of /pub/scm/gpxe
[gpxe.git] / src / core / main.c
blob09dccc76166350dff0f1d756a0d8857682b71428
1 /**************************************************************************
2 gPXE - Network Bootstrap Program
4 Literature dealing with the network protocols:
5 ARP - RFC826
6 RARP - RFC903
7 UDP - RFC768
8 BOOTP - RFC951, RFC2132 (vendor extensions)
9 DHCP - RFC2131, RFC2132 (options)
10 TFTP - RFC1350, RFC2347 (options), RFC2348 (blocksize), RFC2349 (tsize)
11 RPC - RFC1831, RFC1832 (XDR), RFC1833 (rpcbind/portmapper)
12 NFS - RFC1094, RFC1813 (v3, useful for clarifications, not implemented)
13 IGMP - RFC1112
15 **************************************************************************/
17 #include <gpxe/init.h>
18 #include <gpxe/shell.h>
19 #include <gpxe/shell_banner.h>
20 #include <usr/autoboot.h>
22 /**
23 * Main entry point
25 * @ret rc Return status code
27 int main ( void ) {
29 initialise();
30 startup();
32 /* Try autobooting if we're not going straight to the shell */
33 if ( ! shell_banner() ) {
34 autoboot();
37 /* Autobooting failed or the user wanted the shell */
38 shell();
40 shutdown();
42 return 0;