summaryrefslogtreecommitdiffstats
path: root/src/hci
Commit message (Collapse)AuthorAgeFilesLines
...
* [settings] Use generic option-parsing libraryMichael Brown2010-11-212-40/+201
| | | | | | Total cost: 75 bytes. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [autoboot] Use generic option-parsing libraryMichael Brown2010-11-211-32/+89
| | | | | | Total saving: 32 bytes. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vlan] Use generic option-parsing libraryMichael Brown2010-11-211-99/+66Star
| | | | | | Total saving: 261 bytes. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [autoboot] Add "netboot" commandMichael Brown2010-11-201-3/+36
| | | | | Originally-implemented-by: michael-dev@fami-braun.de Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vlan] Add support for IEEE 802.1Q VLANsMichael Brown2010-11-201-0/+174
| | | | | Originally-implemented-by: michael-dev@fami-braun.de Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [list] Add list_first_entry()Michael Brown2010-11-081-3/+2Star
| | | | | | | | | There are several points in the iPXE codebase where list_for_each_entry() is (ab)used to extract only the first entry from a list. Add a macro list_first_entry() to make this code easier to read. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [hci] Use http://ipxe.org/<errno> instead of raw error numbersMichael Brown2010-10-191-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Users tend to gloss over cryptic-looking error messages such as "Boot failed: Exec format error (Error 0x2e852001)" In particular, users tend not to report the error number, which is the single most useful piece of diagnostic information in an iPXE error message. Try replacing the "Error 0x2e852001" portion with a URL, giving "Boot failed: Exec format error (http://ipxe.org/2e852001)" in the hope that users will, upon seeing something that is recognisably a URL, try viewing it in a web browser. Such users will be greeted by a web page containing a more detailed description of the error (automatically generated from the einfo text), including links to each line of code that might generate the error, and a section for additional user-contributed notes. At the time of writing, a user who visits http://ipxe.org/2e852001 would see a note saying "This error usually indicates that the SAN disk is empty, and does not yet contain a bootable operating system." which may be more useful than "Exec format error (Error 0x2e852001)". Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Modify "set" command to allow space separated valuesMichael Brown2010-09-211-5/+25
| | | | | | | | | Allow multiple, space separated values (such as kernel arguments, passed via DHCP) to be assigned to an identifier using the "set" command. Originally-implemented-by: Aaron Brooks <aaron@brooks1.net> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [lotest] Add loopback testing commandsMichael Brown2010-09-211-0/+114
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fc] Add Fibre Channel management commandsMichael Brown2010-09-151-0/+189
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [linux] Add command line argumentsPiotr Jaroszyński2010-08-191-0/+190
| | | | | | | | | | | Support qemu-like arguments for network setup: --net driver_name[,setting=value]* and global settings: --settings setting=value[,setting=value]* Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dhcp] Allow multiple interfaces in dhcp commandMichael Brown2010-08-161-22/+56
| | | | | | | | | | | | | | | | | | The "dhcp" command now accepts a list of interfaces to try until one succeeds. For example: iPXE> dhcp net0 net1 net2 If no interfaces are specified, all interfaces will be tried. Note that interfaces that fail to DHCP are closed in order to avoid memory exhaustion. This behavior differs from the previous "dhcp" command implementation but should not affect any existing scripts since a "dhcp" command failure would in any case cause the script to abort. Originally-implemented-by: Lars Kellogg-Stedman <lars@oddbit.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [hci] Continue processing while prompting for shell bannerMichael Brown2010-07-141-13/+3Star
| | | | | | | | | Continue calling step() while displaying the shell banner. This potentially allows TCP connections to close gracefully after a failed boot attempt. Inspired-by: Guo-Fu Tseng <cooldavid@cooldavid.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Fix inconsistent and ugly code formatting in shell_banner()Michael Brown2010-07-141-3/+4
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Add setting deletion (Ctrl-D) interfaceGlenn Brown2010-06-251-0/+7
| | | | | | | | | | | Make Ctrl-D delete a setting, because the Text User Interface (tui) previously provided no way to delete a setting. Also, update the on-screen instructions to describe the new feature. Deleting settings is especially important for settings stored in precious nonvolatile storage. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Enable jump scroll in config UIGlenn Brown2010-06-251-38/+77
| | | | | | | | | Implement jump scrolling with "..." displayed where the settings list continues off-screen, because there are now too many settings to fit on screen in the "config ..." text user interface. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Enable automated extraction of error usage reportsMichael Brown2010-05-312-104/+94Star
| | | | | | | Add preprocessor magic to the error definitions to enable every error usage to be tracked. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Rename gPXE to iPXEMichael Brown2010-04-2023-55/+55
| | | | | | | | | | | 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>
* [shell_banner] Avoid printing Ctrl-B prompt if BANNER_TIMEOUT <= 0Marty Connor2010-02-041-0/+4
| | | | Signed-off-by: Marty Connor <mdc@etherboot.org>
* [iwmgmt] Add wireless management commands and text for common errorsJoshua Oreman2010-01-052-0/+187
| | | | | | | | Add commands `iwstat' (to list 802.11-specific status information for 802.11 devices) and `iwlist' (to scan for available networks and print a list along with security information). Signed-off-by: Marty Connor <mdc@etherboot.org>
* [libc] Use only generic errortab entries to match generic errorsMichael Brown2009-11-161-5/+4Star
|
* [ifmgmt] Move ifmgmt_cmd.h to include/hciMichael Brown2009-06-282-31/+1Star
|
* [ifmgmt] Optimise prototype for ifcommon_exec()Michael Brown2009-06-282-12/+12
| | | | | | | | | | ifcommon_exec() was long-ago marked as __attribute__((regparm(2))) in order to minimise the size of functions that call into it. Since then, gPXE has added -mregparm=3 as a general compilation option, and this "optimisation" is now counter-productive. Change (and simplify) the prototype to minimise code size given the current compilation conditions.
* [hci] Expose ifcommon_exec() in a local header so wireless commands can use itJoshua Oreman2009-06-242-1/+32
| | | | | | | | This keeps code size down, since the wireless interface management commands have the same command-line interface and overall structure as the wired commands. Signed-off-by: Michael Brown <mcb30@etherboot.org>
* [netdevice] Add mechanism for reporting detailed link status codesMichael Brown2009-06-241-0/+1
| | | | | | | | Expand the NETDEV_LINK_UP bit into a link_rc status code field, allowing specific reasons for link failure to be reported via "ifstat". Originally-authored-by: Joshua Oreman <oremanj@rwcr.net>
* [image] Modify imgfree command to accept an argumentJoshua Oreman2009-06-231-5/+18
| | | | | | | This resolves potential difficulties occurring when more than one script is used. Total cost: 88 bytes uncompressed. Signed-off-by: Michael Brown <mcb30@etherboot.org>
* [legal] Add a selection of FILE_LICENCE declarationsMichael Brown2009-05-1826-0/+52
| | | | | Add FILE_LICENCE declarations to almost all files that make up the various standard builds of gPXE.
* [segment] Add "Requested memory not available" error messageMichael Brown2009-03-311-0/+1
| | | | | | | | | | | prep_segment() can sometimes fail because an image requests memory that is already in use by gPXE. This will happen if e.g. undionly.kpxe is used to boot memtest86; the memtest86 image is an old-format kernel that needs to be loaded at 9000:0000, but this area of memory may well already be in use by the underlying PXE stack. Add a human-friendly error message, so that the cause is more immediately visible.
* [digest] md5sum and sha1sum commandsDaniel Verkamp2009-03-271-0/+120
| | | | | Modified-by: Michael Brown <mcb30@etherboot.org> Signed-off-by: Michael Brown <mcb30@etherboot.org>
* [time] Add the sleep commandShao Miller2009-03-261-0/+30
| | | | | | | Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com> Reviewed-by: Thomas Miletich <thomas.miletich@gmail.com> Modified-by: Michael Brown <mcb30@etherboot.org> Signed-off-by: Michael Brown <mcb30@etherboot.org>
* [tables] Incorporate table data type information into table definitionMichael Brown2009-03-131-3/+2Star
| | | | | | | Eliminate the potential for mismatches between table names and the table entry data type by incorporating the data type into the definition of the table, rather than specifying it explicitly in each table accessor method.
* [tables] Redefine methods for accessing linker tablesMichael Brown2009-03-133-19/+7Star
| | | | | | | | | | | | | | | 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.
* [time] Add the time commandDaniel Verkamp2009-03-061-0/+54
| | | | Signed-off-by: Michael Brown <mcb30@etherboot.org>
* [image] Allow for zero embedded imagesMichael Brown2009-02-241-4/+4
| | | | | | | | | | | | | | | | | | 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] Added "chain" command to fetch, load, and execute imageShao Miller2009-02-241-0/+20
| | | | | | | | | | | | The "chain" command combines the functions of "imgfetch", "imgload", and "boot". chain http://etherboot.org/gtest/gtest.gpxe is equivalent to: kernel http://etherboot.org/gtest/gtest.gpxe boot
* [login] Add "login" command and UIMichael Brown2009-02-172-0/+162
|
* [editbox] Allow for password widgets that do not display their contentsMichael Brown2009-02-172-4/+9
|
* [pxe] Obey lists of PXE Boot Servers and associated Discovery Control bitsMichael Brown2009-02-051-13/+4Star
| | | | | | | | Various combinations of options 43.6, 43.7 and 43.8 dictate which servers we send Boot Server Discovery requests to, and which servers we should accept responses from. Obey these options, and remove the explicit specification of a single Boot Server from start_pxebs() and dependent functions.
* [dhcp] Split PXE menuing code out of dhcp.cMichael Brown2009-02-013-8/+97
| | | | | | | | | The DHCP client code now implements only the mechanism of the DHCP and PXE Boot Server protocols. Boot Server Discovery can be initiated manually using the "pxebs" command. The menuing code is separated out into a user-level function on a par with boot_root_path(), and is entered in preference to a normal filename boot if the DHCP vendor class is "PXEClient" and the PXE boot menu option exists.
* [commands] Fix config command to accept zero argumentsMichael Brown2008-10-121-1/+1
|
* [cmdline] Minor tidy-ups to shell_banner.cMichael Brown2008-07-241-4/+4
|
* [cmdline] Added configurable shell banner timeoutAndrew Schran2008-07-241-5/+6
| | | | | | This change allows the time for which shell banners are displayed to be configured in the config.h file. The ability to access the shell can also be effectively disabled by setting this timeout to zero.
* [image] Fail "imgexec"/"boot" if the image to execute is ambiguousMichael Brown2008-07-081-1/+1
| | | | | | | | | | | | | | | If there is more than one loaded image, refuse to automatically select the image to execute. There are at least two possible cases, with different "correct" answers: 1. User loads image A by mistake, then loads image B and types "boot". User wants to execute image B. 2. User loads image A, then loads image B (which patches image A), then types "boot". User wants to execute image A. If a user actually wants to load multiple images, they must explicitly specify which image is to be executed.
* [settings] Allow "config" command to access root settings blockMichael Brown2008-07-081-7/+7
|
* [bzimage] Kill off the initrd image typeMichael Brown2008-07-081-22/+4Star
| | | | | | | We can just treat all non-kernel images as initrds, which matches our behaviour for multiboot kernels. This allows us to eliminate initrd as an image type, and treat the "initrd" command as just another synonym for "imgfetch".
* [GDB] Remote debugging over UDPStefan Hajnoczi2008-06-301-0/+105
| | | | | | | | | | | | | | | | | This commit implements GDB over UDP. Using UDP is more complex than serial and has required some restructuring. The GDB stub is now built using one or both of GDBSERIAL and GDBUDP config.h options. To enter the debugger, execute the gPXE shell command: gdbstub <transport> [<options>...] Where <transport> is "serial" or "udp". For "udp", the name of a configured network device is required: gdbstub udp net0 The GDB stub listens on UDP port 43770 by default.
* [cmdline] Fix image command-line construction for zero-length argument listsMichael Brown2008-06-271-5/+8
| | | | This fixes a bug introduced in commit 4c85017.
* [cmdline] Remove arbitrary limit on the length of image command linesMichael Brown2008-06-121-8/+17
|
* [iSCSI] Produce meaningful errors on login failureMichael Brown2008-06-041-7/+10
| | | | | | | | Return the most appropriate of EACCES, EPERM, ENODEV, ENOTSUP, EIO or EINVAL depending on the exact error returned by the target, rather than just always returning EPERM. Also, ensure that error strings exist for these errors.
* [HCI] Display "Not an executable image" when appropriateMichael Brown2008-04-081-0/+1
| | | | | | | | | | | | | PXE is a catch-all image format with no signature checks. If an unsupported image file is loaded, it will be treated as a PXE image. In most cases, the image will be too large to be loaded as a PXE image (which has to fit in base memory), so the error returned to the user will be that the segment could not fit within the memory region. Add an explicit check to pxe_image.c to reject images larger than base memory with ENOEXEC. Add ENOEXEC to the error string table.