summaryrefslogtreecommitdiffstats
path: root/src/hci
Commit message (Collapse)AuthorAgeFilesLines
...
* [console] Move putchar() and getchar() declarations to stdio.hMichael Brown2012-03-261-1/+0Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Add the "imgtrust" and "imgverify" commandsMichael Brown2012-03-251-0/+172
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Simplify image management commands and internal APIMichael Brown2012-03-252-225/+173Star
| | | | | | | | | | | | | | | | | | | | | | Remove the name, cmdline, and action parameters from imgdownload() and imgdownload_string(). These functions now simply download and return an image. Add the function imgacquire(), which will interpret a "name or URI string" parameter and return either an existing image or a newly downloaded image. Use imgacquire() to merge similar image-management commands that currently differ only by whether they take the name of an existing image or the URI of a new image to download. For example, "chain" and "imgexec" can now be merged. Extend imgstat and imgfree commands to take an optional list of images. Remove the arbitrary restriction on the length of image names. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Eliminate the register_and_xxx_image() functionsMichael Brown2011-10-251-6/+3Star
| | | | | | | | All users of imgdownload() require registration of the image, so make registration an integral part of imgdownload() itself and simplify the "action" parameter to be one of image_select(), image_exec() et al. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Make "sleep" command available by defaultMichael Brown2011-10-241-40/+0Star
| | | | | | | | | | | | | | | The "sleep" command is generally useful to have. For example: :dhcp_retry dhcp && goto dhcp_done sleep 5 goto dhcp_retry :dhcp_done Make the "sleep" command available by default, leaving TIME_CMD controlling only the (fairly specialist) "time" command. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [sanboot] Add "sanhook" and "sanunhook" commandsMichael Brown2011-04-241-20/+114
| | | | | | | Expose the multiple-SAN-drive capability of the iPXE core via the iPXE command line by adding commands to hook and unhook additional drives. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Add support for shell historyMichael Brown2011-03-301-1/+10
| | | | | | | The up and down arrow keys will now function roughly as expected at the iPXE command line. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [readline] Add history supportMichael Brown2011-03-301-9/+215
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [readline] Add replace_string()Michael Brown2011-03-301-0/+11
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [readline] Add init_editstring() wrapper functionMichael Brown2011-03-302-4/+2Star
| | | | | | | | Standardise on using init_editstring() to initialise an embedded editable string, to match the coding style used by other embedded objects. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Display "delete" option only for locally-originated settingsMichael Brown2011-03-281-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Remove redundant call to basename()Michael Brown2011-03-271-3/+0Star
| | | | | | | | | There is no need to explicitly call basename() to construct an image name in imgfetch_core_exec(), since image_set_uri() will do so automatically anyway (and will do so without getting confused by URIs with query strings). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Add "read" commandMichael Brown2011-03-271-39/+88
| | | | | | | | | | | | The "read" command allows a script to prompt a user to enter a setting. For example: echo -n Static IP address: read net0/ip Total cost: 17 bytes. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Refer to online documentation for settings helpMichael Brown2011-03-231-2/+9
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Match terminology used elsewhereMichael Brown2011-03-231-1/+1
| | | | | | | iPXE documentation tends to refer to "settings" rather than "options", since settings can be more general than DHCP options. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Return to first row on navigating to a new settings blockMichael Brown2011-03-231-4/+6
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Add hierarchy navigation in "config" user interfaceMichael Brown2011-03-231-199/+260
| | | | | | | Allow the user to browse through the settings block hierarchy. Originally-implemented-by: Glenn Brown <glenn@myri.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Display locally-originated settings in boldMichael Brown2011-03-221-1/+11
| | | | | Originally-implemented-by: Glenn Brown <glenn@myri.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Display canonical setting name in "config" user interfaceMichael Brown2011-03-221-4/+16
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Display only applicable settings in "config" user interfaceMichael Brown2011-03-221-10/+18
| | | | | | | | | Display only settings relevant to the current scope. For example, "config net0" no longer displays SMBIOS settings, and "config smbios" displays only SMBIOS settings. Originally-implemented-by: Glenn Brown <glenn@myri.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Display canonical setting name in output of "show" commandMichael Brown2011-03-221-4/+6
| | | | | | | | | | | | | | | | | | Enable the "show" command to display the full, canonicalised name of the fetched setting. For example: iPXE> show mac net0/mac:hex = 52:54:00:12:34:56 iPXE> dhcp && show ip DHCP (net0 52:54:00:12:34:56)... ok net0.dhcp/ip:ipv4 = 10.0.0.168 iPXE> show net0/6 net0.dhcp/dns:ipv4 = 10.0.0.6 Inspired-by: Glenn Brown <glenn@myri.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Use concat_args() in "set" commandMichael Brown2011-03-221-24/+20Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [console] Try to avoid problems caused by keycode 86Michael Brown2011-03-1618-7/+14
| | | | | | | | | | | | | | | | | The "us" keyboard layout contains a mapping for keycode 86 (which seems not to correspond to any physical key on many US keyboards) to the ASCII character '<'. This mapping causes conflicts with the mapping for keycode 51, which also maps (with shift) to '<'. Change the keyboard mapping generator to choose the lowest keycode for each ASCII character as indicating the relevant mapping to use, on the basis that a lower keycode roughly indicates a "more normal" key. On a German keyboard, which has keys for both keycode 51 and keycode 86 present, this causes '<' to be remapped to ';', which is a closer match to typical user expectations. Reported-by: Sven Dreyer <sven@dreyer-net.de> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [console] Add keymap generatorMichael Brown2011-03-1632-0/+926
| | | | | | | | Inspired by LILO's keytab-lilo.pl, genkeymap.pl uses "loadkeys -b" to obtain a Linux keyboard map, and generates a file keymap_xx.c in hci/keymap. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [console] Move include/console.h to include/ipxe/console.hMichael Brown2011-03-095-5/+5
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Simplify use of imgdownload()Michael Brown2011-03-091-56/+55Star
| | | | | | | Allow imgdownload() to be called without first having to allocate (and so keep track of) an image. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [prompt] Replace shell_banner() with a generic prompt() functionMichael Brown2011-03-071-56/+0Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [console] Add a timeout parameter to getkey()Michael Brown2011-03-074-4/+4
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Add generic concat_args() functionMichael Brown2011-03-071-30/+15Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Clear the command line rather than setting an empty command lineMichael Brown2011-03-071-3/+6
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Simplify image managementMichael Brown2011-03-071-34/+30Star
| | | | | | | | | | | Refactor the {load,exec} image operations as {probe,exec}. This makes the probe mechanism cleaner, eliminates some forward declarations, avoids holding magic state in image->priv, eliminates the possibility of screwing up between the "load" and "exec" stages, and makes the documentation simpler since the concept of "loading" (as distinct from "executing") no longer needs to be explained. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [parseopt] Refer to online documentation for command helpMichael Brown2011-03-0417-64/+34Star
| | | | | | | | | | The online documentation (e.g. http://ipxe.org/cmd/ifopen), though not yet complete, is far more comprehensive than could be provided within the iPXE binary. Save around 200 bytes (compressed) by removing the command descriptions from the interactive help, and instead referring users directly to the web page describing the relevant command. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [autoboot] Connect SAN disk during a filename boot, if applicableMichael Brown2011-01-271-4/+16
| | | | | | | | | | | | | | | | | | | For performing installations direct to a SAN target, it can be very useful to hook a SAN disk and then proceed to perform a filename boot. For example, the user may wish to hook the (empty) SAN installation disk and then boot into the OS installer via TFTP. This provides an alternative mechanism to using "keep-san" and relying on the BIOS to fall through to boot from the installation media, which is unreliable on many BIOSes. When a root-path is specified in addition to a boot filename, attempt to hook the root-path as a SAN disk before booting from the specified filename. Since the root-path may be used for non-SAN purposes (e.g. an NFS root mount point), ignore the root-path if it contains a URI scheme that we do not support. Originally-implemented-by: Jarrod Johnson <jarrod.b.johnson@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Match user expectations for &&, ||, goto, and exitMichael Brown2010-11-291-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The && and || operators should be left-associative, since that is how they are treated in most other languages (including C and Unix shell). For example, in the command: dhcp net0 && goto dhcp_ok || echo No DHCP on net0 if the "dhcp net0" fails then the "echo" should be executed. After an "exit" or a successful "goto", further commands on the same line should never be executed. For example: goto somewhere && echo This should never be printed exit 0 && echo This should never be printed exit 1 && echo This should never be printed An "exit" should cause the current shell or script to terminate and return the specified exit status to its caller. For example: chain test.ipxe && echo Success || echo Failure [in test.ipxe] #!ipxe exit 0 should echo "Success". Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [shell] Add "shell" commandMichael Brown2010-11-281-2/+45
| | | | | | | The "shell" command allows a script to enter an interactive shell, which is potentially useful for troubleshooting. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Allow "set" command to take an empty valueMichael Brown2010-11-221-1/+1
| | | | | | | | | | Allow "set <variable>" to be used to set the variable to an empty value, if permitted by the setting type. Note that some settings backends do not differentiate between an empty value and a non-existent value, so this may or may not be equivalent to "clear <variable>". Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [autoboot] Merge "netboot" command into "autoboot"Michael Brown2010-11-221-64/+4Star
| | | | | | | | | | Allow "autoboot" to accept an optional list of network devices, and remove the "netboot" command. This saves around 130 bytes. The "netboot" command has existed for approximately 48 hours, so its removal should not cause backwards compatibility issues for anyone. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [script] Allow "exit" to exit a scriptMichael Brown2010-11-221-27/+12Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Add some missing FILE_LICENCE declarationsMichael Brown2010-11-223-0/+6
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Use generic option-parsing libraryMichael Brown2010-11-221-315/+156Star
| | | | | | Total saving: 548 bytes. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [login] Use generic option-parsing libraryMichael Brown2010-11-221-6/+50
| | | | | | Total cost: 7 bytes. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [route] Use generic option-parsing libraryMichael Brown2010-11-221-34/+17Star
| | | | | | Total saving: 71 bytes. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [san] Use generic option-parsing libraryMichael Brown2010-11-221-33/+41
| | | | | | Total saving: 73 bytes. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [time] Use generic option-parsing libraryMichael Brown2010-11-221-24/+58
| | | | | | Total saving: 88 bytes. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [lotest] Use generic option-parsing libraryMichael Brown2010-11-221-59/+42Star
| | | | | | Total saving: 145 bytes. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [gdb] Use generic option-parsing libraryMichael Brown2010-11-221-42/+50
| | | | | | Total saving: 42 bytes. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [fc] Use generic option-parsing libraryMichael Brown2010-11-221-105/+134
| | | | | | Total saving: 111 bytes. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [digest] Use generic option-parsing libraryMichael Brown2010-11-221-25/+25
| | | | | | Total saving: 68 bytes. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dhcp] Use generic option-parsing libraryMichael Brown2010-11-221-120/+35Star
| | | | | | Total saving: 329 bytes. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ifmgmt] Use generic option-parsing libraryMichael Brown2010-11-222-94/+137
| | | | | | Total cost: 66 bytes Signed-off-by: Michael Brown <mcb30@ipxe.org>