david/ipxe
david
/
ipxe
Archived
1
0
Fork 0
Commit Graph

4513 Commits

Author SHA1 Message Date
Michael Brown 22001cb206 [settings] Explicitly separate the concept of a completed fetched setting
The fetch_setting() family of functions may currently modify the
definition of the specified setting (e.g. to add missing type
information).  Clean up this interface by requiring callers to provide
an explicit buffer to contain the completed definition of the fetched
setting, if required.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-12-05 00:37:02 +00:00
Michael Brown a2638a8edd [fbcon] Add support for displaying a cursor
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-12-02 17:27:37 +00:00
Michael Brown fb6edd4e13 [menu] Hide cursor when displaying menu
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-12-02 17:25:36 +00:00
Michael Brown b7a0a128ff [settings] Hide cursor when not actively editing a setting
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-12-02 17:23:51 +00:00
Michael Brown 936971d0ed [mucurses] Implement curs_set() to control cursor visibility
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-12-02 17:23:09 +00:00
Michael Brown 135bf35b11 [console] Allow '?' as an intermediate byte in ANSI escape sequences
The ANSI escape sequences to show and hide the cursor take the form
"<ESC>[?25h" and "<ESC>[?25l" respectively.  iPXE currently treats the
'?' character as the final byte.  Fix by explicitly treating '?' as an
intermediate byte.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-12-02 17:20:36 +00:00
Michael Brown 1403bda951 [build] Fix building on OpenBSD 5.4
OpenBSD 5.4 seems to generate dynamically linked binaries by default,
which breaks our build process.  Fix by forcing the linker to always
create static binaries.

Reported-by: Jiri B <jirib@devio.us>
Tested-by: Jiri B <jirib@devio.us>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-12-02 15:58:38 +00:00
Michael Brown d4f7816de7 [vesafb] Select an optimal mode, rather than the first acceptable mode
There is no requirement for VBE modes to be listed in increasing order
of resolution.  With the present logic, this can cause e.g. a 1024x768
mode to be selected if the user asks for 640x480, if the 1024x768 mode
is earlier in the mode list.

Define a scoring system for modes as

  score = ( width * height - bpp )

and choose the mode with the lowest score among all acceptable modes.
This should prefer to choose the mode closest to the requested
resolution, with a slight preference for higher colour depths.

Reported-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-28 14:59:48 +00:00
Michael Brown 00bb19257f [vesafb] Return meaningful error when no suitable mode is found
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-28 12:12:05 +00:00
Michael Brown 405416e4c4 [vesafb] Skip modes for which we cannot get mode information
The VirtualBox BIOS fails to retrieve mode information (with status
0x0100) for some modes within the mode list.  Skip any such modes,
rather than treating this as a fatal error.

Reported-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-28 11:51:47 +00:00
Michael Brown 9678fedbe4 [vesafb] Include raw status value within VBE error messages
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-28 11:51:32 +00:00
Michael Brown aa2e04fe1c [vesafb] Add VESA frame buffer console
The VESA frame buffer console uses the VESA BIOS extensions (VBE) to
enumerate video modes, selects an appropriate mode, and then hands off
to the generic frame buffer code.

The font is extracted from the VGA BIOS, avoiding the need to provide
an external font file.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-28 05:55:45 +00:00
Michael Brown decf9dd133 [fbcon] Add generic concept of a frame buffer console
Add support for a simple frame buffer console, using single buffering
and a fixed-width bitmap font.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-28 05:55:45 +00:00
Michael Brown 0b81be823d [cmdline] Add "console" command to configure console
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-28 05:55:45 +00:00
Michael Brown c501c980e0 [console] Add concept of generic console configuration
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-28 05:55:43 +00:00
Michael Brown b2251743d8 [console] Allow console input and output to be disabled independently
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-28 05:54:53 +00:00
Michael Brown 7271b50890 [mucurses] Use "<ESC>[2J" ANSI escape sequence to clear screen
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-28 05:03:05 +00:00
Michael Brown 0ee89338dd [pnm] Add support for PNM images
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-27 11:27:51 +00:00
Michael Brown 09f31e9fc4 [image] Add image_pixbuf() to create pixel buffer from image
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-27 11:27:50 +00:00
Michael Brown 2c161283d5 [image] Allow for non-executable image formats
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-27 11:27:50 +00:00
Michael Brown 95851d1305 [pixbuf] Add generic concept of a pixel buffer
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-27 11:27:50 +00:00
Michael Brown 02a63c6dec [console] Pass escape sequence context to ANSI escape sequence handlers
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-27 11:27:50 +00:00
Michael Brown 3102866a7f [main] Defer "initialising devices" message until initialising devices
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>
2013-11-27 11:27:50 +00:00
Michael Brown 1312c467ee [test] Include failing code within failed test result output
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-27 11:27:45 +00:00
Michael Brown 017e6c56af [dhcpv6] Allow stateful DHCPv6 to apply obtained IPv6 addresses
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-15 15:23:09 +00:00
Michael Brown 6b1eee0452 [ipv6] Separate the concepts of prefix and address creation
Allow for IPv6 routing table entries to be created for an on-link
prefix where a local address has not yet been assigned to the network
device.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-15 15:22:54 +00:00
Christian Hesse 3f9a482b88 [build] Update build system for Syslinux 6.x
Syslinux 6.x places its files into a bios subdirectory, and requires
that a ldlinux.c32 module be included within the ISO image.  Add the
relevant search paths for isolinux.bin, and include the file
ldlinux.c32 within the ISO image if it exists.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-15 11:59:44 +00:00
Michael Brown 2fa34085e2 [dhcpv6] Add basic support for stateful and stateless DHCPv6
Add support for the stateful and stateless variants of the DHCPv6
protocol.  The resulting settings block is registered as
"net<x>.dhcpv6", and DHCPv6 options can be obtained using
e.g. "${net0.dhcpv6/23:ipv6}" to obtain the IPv6 DNS server address.

IPv6 addresses obtained via stateful DHCPv6 are not yet applied to the
network device.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-14 12:35:43 +00:00
Michael Brown c1570d3dfb [ipv6] Add "ipv6" setting type
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-14 12:35:43 +00:00
Michael Brown 95623e353b [ipv6] Use given source address only if it is not the unspecified address
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-14 12:35:43 +00:00
Michael Brown 4484edd1c0 [settings] Move user-class setting from dhcp.c to settings.c
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-14 12:35:43 +00:00
Michael Brown 4f078801e9 [base16] Fix comparison of signed and unsigned integers
gcc 4.7.1 fails to report this erroneous comparison unless assertions
are enabled.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-14 12:35:43 +00:00
Michael Brown c3d1e78697 [pxe] Ensure cached DHCPACK is retrieved prior to network device creation
The retrieval of the cached DHCPACK and the creation of network
devices are both currently scheduled as STARTUP_NORMAL.  It is
therefore possible that the cached DHCPACK will not be retrieved in
time for cachedhcp_probe() to apply it to the relevant network device.

Fix by retrieving the cached DHCPACK at initialisation time rather
than at startup time.

As an optimisation, an unclaimed cached DHCPACK can be freed
immediately after the last network device has been created, rather
than waiting until shutdown.

Reported-by: Espen Braastad <espen.braastad@redpill-linpro.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-08 12:45:22 +00:00
Michael Brown 43eba2f555 [cmdline] Generate command option help text automatically
Generate the command option help text automatically from the list of
defined options.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-07 17:00:51 +00:00
Michael Brown 6871a8113f [ipv6] Add IPv6 network device configurator
Include IPv6 within the generic network device configurator
mechanism.  The IPv6 configurator will send a router solicitation and
wait for a router advertisement to be received.  (As per RFC4861
section 6.3.7, we do this even if advertisements have been received
prior to sending the router solicitation.)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-07 15:04:47 +00:00
Michael Brown c99f9ee9df [dhcp] Remove obsolete dhcp() function
All functionality provided by dhcp() has now been obviated by the more
generic ifconf().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-05 17:42:55 +00:00
Michael Brown 452fb2d0a2 [cmdline] Make "dhcp" command a synonym for "ifconf"
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-05 17:42:55 +00:00
Michael Brown 506152d467 [cmdline] Add "ifconf" command
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-05 17:42:55 +00:00
Michael Brown 2525e55c19 [autoboot] Use ifconf() to configure network device
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-05 17:42:50 +00:00
Michael Brown 26b87b221b [ifmgmt] Add ifconf() to carry out network device configuration
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-05 17:30:20 +00:00
Michael Brown 3a67224c62 [parseopt] Add parse_netdev_configurator()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-05 17:30:20 +00:00
Michael Brown 759dcf5a9b [dhcp] Add DHCP network device configurator
Provide an interface to DHCP via the generic network device
configurator mechanism.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-05 17:30:20 +00:00
Michael Brown f2bc138391 [netdevice] Add generic concept of a network device configurator
iPXE supports multiple mechanisms for network device configuration:
DHCPv4 for IPv4, FIP for FCoE, and SLAAC for IPv6.  At present, DHCPv4
requires an explicit action (e.g. a "dhcp" command), FIP is initiated
implicitly upon opening a network device, and SLAAC takes place
whenever a RA happens to be received.

Add a generic concept of a network device configurator, which provides
a common interface to triggering configuration and to reporting the
result of the configuration process.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-05 17:30:15 +00:00
Michael Brown 55e85ad1ee [cmdline] Allow "if<xxx>" commands to take options
Allow commands implemented using ifcommon_exec() to accept
command-specific options.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-05 17:15:24 +00:00
Michael Brown 16d37102ca [ifmgmt] Rewrite iflinkwait() to use monojob_wait()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-05 17:15:24 +00:00
Michael Brown 170d493bf3 [autoboot] Fix shell banner timeout
Commit 5e1fa5c ("[parseopt] Add parse_timeout()") introduced a
regression causing the shell banner timeout value (calculated in
milliseconds) to be treated as a timer tick count, resulting in a
timeout of approximately two minutes rather than the intended two
seconds.

Reported-by: Christian Hesse <list@eworm.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-05 17:09:30 +00:00
Michael Brown 92c56e129b [cmdline] Rewrite "sync" command to use monojob_wait()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-01 17:00:16 +00:00
Michael Brown dc7a023715 [monojob] Report ongoing job status as overall return status on timeout
If a job times out then use the most recent ongoing error status
reported via job_progress() (if available) as the overall return
status.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-01 16:26:08 +00:00
Michael Brown d1be9f4acc [monojob] Add timeout parameter to monojob_wait()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-01 16:26:02 +00:00
Michael Brown 5674a3c087 [job] Allow job_progress() to return an ongoing job status code, if known
Some background jobs have a meaningful ongoing status code (e.g. the
current link status for a job waiting for a network link to come up).
Allow this to be exposed via the job_progress() method.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-01 16:17:28 +00:00