summaryrefslogtreecommitdiffstats
path: root/src/core/main.c
Commit message (Collapse)AuthorAgeFilesLines
* [test] Allow self-tests to report exit status when running under LinuxMichael Brown2015-08-211-3/+6
| | | | | | | | | Allow the return status from an embedded image to propagate out to the eventual return status from main(). When running under Linux, this allows the pass/fail result of unit tests to be observable without having to visually inspect the console output. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Relicense files under GPL2_OR_LATER_OR_UBDLMichael Brown2015-03-021-1/+1
| | | | | | | | | | These files cannot be automatically relicensed by util/relicense.pl since they either contain unusual but trivial contributions (such as the addition of __nonnull function attributes), or contain lines dating back to the initial git revision (and so require manual knowledge of the code's origin). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Expose build timestamp, build name, and product namesMichael Brown2014-06-241-2/+2
| | | | | | | | Expose the build timestamp (measured in seconds since the Epoch) and the build name (e.g. "rtl8139.rom" or "ipxe.efi"), and provide the product name and product short name in a single centralised location. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [main] Defer "initialising devices" message until initialising devicesMichael Brown2013-11-271-1/+3
| | | | | | | | Allow the "initialising devices" message to show up on consoles which require initialisation, by deferring it until after initialise() has completed. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [autoboot] Split main control flow out of main() into a new function ipxe()Michael Brown2013-03-131-82/+2Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Include version number within only a single object fileMichael Brown2012-11-021-2/+3
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [autoboot] Avoid excess backspacing after displaying Ctrl-B promptMichael Brown2012-10-231-1/+3
| | | | | | | Remove the newline from the "Press Ctrl-B..." prompt string, so that prompt() does not attempt to backspace beyond the start of the line. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [main] Add the "scriptlet" settingMichael Brown2011-03-281-4/+19
| | | | | | | | | | | | | | | | | | | A scriptlet is a single iPXE command that can be stored in non-volatile option storage and used to override the default "autoboot" behaviour without having to reflash the iPXE image. For example, a scriptlet could contain autoboot || reboot to instruct iPXE to reboot the system if booting fails. Unlike an embedded image, the presence of a scriptlet does not inhibit the initial "Press Ctrl-B..." prompt. This allows the user to recover from setting a faulty scriptlet. Originally-implemented-by: Glenn Brown <glenn@myri.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [main] Remove shell prompt when using an embedded imageMichael Brown2011-03-071-14/+13Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Use list_first_entry() to clarify logic in main()Michael Brown2011-03-071-5/+2Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [prompt] Replace shell_banner() with a generic prompt() functionMichael Brown2011-03-071-1/+17
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [init] Remove concept of "shutdown exit flags"Michael Brown2011-01-271-1/+1
| | | | | | | | Remove the concept of shutdown exit flags, and replace it with a counter used to keep track of exposed interfaces that require devices to remain active. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [main] Match "starting execution" and "initialising devices" message styleMichael Brown2010-04-251-2/+2
| | | | | | | | Add a trailing "ok" to the "initialising devices message", to match the visual style of the "ok" now added to the "starting execution" message. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Rename gPXE to iPXEMichael Brown2010-04-201-12/+12
| | | | | | | | | | | Access to the gpxe.org and etherboot.org domains and associated resources has been revoked by the registrant of the domain. Work around this problem by renaming project from gPXE to iPXE, and updating URLs to match. Also update README, LOG and COPYRIGHTS to remove obsolete information. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [proto] Remove unsupported IGMP protocolStefan Hajnoczi2010-02-011-1/+0Star
| | | | | | | | | The IGMP code came from legacy Etherboot and was never updated to work as a gPXE protocol. There has been no demand for this protocol, so this patch removes it. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
* [proto] Remove unsupported NFS protocolStefan Hajnoczi2010-02-011-1/+0Star
| | | | | | | | | | | | | The NFS protocol code came from legacy Etherboot and was never updated to work as a gPXE protocol. There has been no demand for this protocol, so this patch removes it. I have an unfinished NFSv3 over TCP implementation for gPXE that can be used as the base for new work, should we want to resurrect this protocol. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Marty Connor <mdc@etherboot.org>
* [legal] Add a selection of FILE_LICENCE declarationsMichael Brown2009-05-181-0/+2
| | | | | Add FILE_LICENCE declarations to almost all files that make up the various standard builds of gPXE.
* [tables] Redefine methods for accessing linker tablesMichael Brown2009-03-131-4/+1Star
| | | | | | | | | | | | | | | Intel's C compiler (icc) chokes on the zero-length arrays that we currently use as part of the mechanism for accessing linker table entries. Abstract away the zero-length arrays, to make a port to icc easier. Introduce macros such as for_each_table_entry() to simplify the common case of iterating over all entries in a linker table. Represent table names as #defined string constants rather than unquoted literals; this avoids visual confusion between table names and C variable or type names, and also allows us to force a compilation error in the event of incorrect table names.
* [image] Allow for zero embedded imagesMichael Brown2009-02-241-6/+10
| | | | | | | | | | | | | | | | | | Having a default script containing #!gpxe autoboot can cause problems when entering commands to load and start a kernel manually; the default script image will still be present when the kernel is started and so will be treated as an initrd. It is possible to work around this by typing "imgfree" before any other commands, but this is counter-intuitive. Fix by allowing the embedded image list to be empty (in which case we just call autoboot()), and making this the default. Reported by alkisg@gmail.com.
* [image] Allow multiple embedded imagesMichael Brown2009-02-161-4/+11
| | | | | | | | | | 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>.
* [main] Print an "initialising devices" bannerMichael Brown2009-01-081-0/+3
| | | | | | | | | | | Some devices take a very long time to initialise. This can make it difficult to visually distinguish between the error cases of failing to start executing C code and failing to initialise a device. Add a "gPXE initialising devices..." message. The trailing ellipsis indicates to the user that this may take some time, and the presence of the message indicates to the developer that relocation etc. all succeeded.
* [i386] Rename __cdecl to __asmcallMichael Brown2008-11-191-1/+1
| | | | | __cdecl is a misleading name, since it currently encapsulates both cdecl and regparm(0) attributes. Rename to __asmcall.
* [romprefix] Add vendor branding facilities and guidelinesMichael Brown2008-10-311-2/+14
| | | | | | | | | | | | | Some hardware vendors have been known to remove all gPXE-related branding from ROMs that they build. While this is not prohibited by the GPL, it is a little impolite. Add a facility for adding branding messages via two #defines (PRODUCT_NAME and PRODUCT_SHORT_NAME) in config/general.h. This should accommodate all known OEM-mandated branding requirements. Vendors with branding requirements that cannot be satisfied by using PRODUCT_NAME and/or PRODUCT_SHORT_NAME should contact us so that we can extended this facility as necessary.
* [iSCSI] Support Windows Server 2008 direct iSCSI installationMichael Brown2008-07-171-1/+1
| | | | | | | | | | | | | Add yet another ugly hack to iscsiboot.c, this time to allow the user to inhibit the shutdown/removal of the iSCSI INT13 device (and the network devices, since they are required for the iSCSI device to function). On the plus side, the fact that shutdown() now takes flags to differentiate between shutdown-for-exit and shutdown-for-boot means that another ugly hack (to allow returning via the PXE stack on BIOSes that have broken INT 18 calls) will be easier. I feel dirty.
* [usr] Offer user a second chance to enter the shell on boot failureMichael Brown2008-03-271-3/+31
|
* If no shell was requested via Ctrl-B, exit immediately if boot fails.Michael Brown2008-02-111-6/+3Star
|
* Applied a modified version of holger's regparm patches.Michael Brown2007-07-291-1/+1
|
* Separated out initialisation functions from startup/shutdown functions.Michael Brown2007-07-041-32/+2Star
|
* Use a linker-table based system to automatically mark and start upMichael Brown2007-07-031-1/+4
| | | | | permanent processes, rather than requiring each one to have its own initialisation function.
* Call hide_etherboot() from startup(), rather than requiring the prefix toMichael Brown2007-01-141-2/+5
| | | | do it.
* Make shutdown functions callable by OS image's exec methods.Michael Brown2007-01-141-323/+28Star
|
* Move include/image.h to include/gpxe/image.hMichael Brown2007-01-111-1/+0Star
|
* Move header file for usr/autoboot.c to include/usrMichael Brown2007-01-101-1/+1
|
* Added missing headerMichael Brown2006-12-211-0/+1
|
* No longer neededMichael Brown2006-12-201-2/+0Star
|
* Split the (quick hack) boot logic out from main.c to autoboot.c, add aMichael Brown2006-12-201-13/+6Star
| | | | | "boot" command to attempt booting from within the command shell, fall back to shell if boot fails for any reason.
* Use new minimal shellMichael Brown2006-12-201-1/+6
|
* Added quick and dirty commands for testing the new NVO code.Michael Brown2006-12-051-1/+1
|
* include stdio.h to suppress printf warning, general warnings fixupsMarty Connor2006-09-271-3/+5
|
* Take out unused cleanup() function so that we can remove the linkMichael Brown2006-08-151-1/+2
| | | | dependency on dev.o.
* Removed obsolete line merged in with the cmdline stuffMichael Brown2006-08-091-1/+0Star
|
* Merge of Fredrik Hultin command_lineMarty Connor2006-08-091-0/+3
|
* Remove the static IP address hack from netdevice.c, and change theMichael Brown2006-07-201-1/+1
| | | | default test to the DHCP test.
* Removed vestigal FILO codeMarty Connor2006-06-291-4/+0Star
|
* Simplify RX data path.Michael Brown2006-06-181-9/+2Star
| | | | | | | | | | Kill off the static single net device and move to proper dynamic registration (which we need with the new device model). Break the (flawed) assumption that all network-layer protocols can use ARP; such network-layer protocols (i.e. IPv4) must now register as an ARP protocol using ARP_NET_PROTOCOL() and provide a single method for checking the existence of a local network-layer address.
* Quick hack to avoid trying to use an uninitialised net device.Michael Brown2006-06-011-4/+16
|
* Until we have a functioning UDP stack and PXE API again, there's not muchMichael Brown2006-06-011-75/+10Star
| | | | | point trying to use the old boot sequence. Replaced with a call to the AoE demo code, so that people can at least build and try something useful.
* BSS is now zeroed by libprefix (along with the otherwise non-zeroableMichael Brown2006-05-021-15/+3Star
| | | | | | | portions such as the stack) during the installation process. init_fns() are called from main(). We need to think about initial control flow some more.
* Move init.h to gpxe/init.h.Michael Brown2006-04-301-1/+1
|
* Merge from Etherboot 5.4Michael Brown2006-03-161-5/+10
|\