]> git.ipfire.org Git - thirdparty/ipxe.git/log
thirdparty/ipxe.git
11 years ago[settings] Remove "uristring" setting type
Michael Brown [Mon, 17 Feb 2014 16:14:25 +0000 (16:14 +0000)] 
[settings] Remove "uristring" setting type

Commit b5f5f73 ("[cmdline] Expand settings within each command-line
token individually") effectively rendered the "uristring" setting type
obsolete, since strings containing whitespace no longer break the
command line parser.  The concept of the "uristring" type is not well
defined, since URI escaping rules depend on which portion of a URI is
being escaped.

Remove the "uristring" type, converting it into an alias for the
"string" setting type so as to avoid breaking existing scripts.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[dhcp] Copy exactly the required length when resizing DHCP options
Michael Brown [Wed, 26 Feb 2014 16:44:05 +0000 (16:44 +0000)] 
[dhcp] Copy exactly the required length when resizing DHCP options

When resizing DHCP options, iPXE currently calculates the length to be
copied by subtracting the destination pointer from the end of buffer
pointer.  This works and guarantees not to write beyond the end of the
buffer, but may end up reading beyond the end of the buffer.

Fix by calculating the required length exactly.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[dns] Update end-of-name pointer after processing CNAME record
Michael Brown [Wed, 26 Feb 2014 15:54:16 +0000 (15:54 +0000)] 
[dns] Update end-of-name pointer after processing CNAME record

Commit d4c0226 ("[dns] Support DNS search lists") introduced a
regression when handling CNAME records resolving to names longer than
the original name.  The "end of name" offset stored in dns->offset was
not updated to reflect the length of the new name, causing
dns_question() to append the (empty) search suffix at an incorrect
offset within the name buffer, resulting in a mangled DNS name.

In the case of a CNAME record resolving to a name shorter than or
equal in length to the original name, then the mangling would occur in
an unused portion of the name buffer.  In the common case of a name
server returning the A (or AAAA) record along with the CNAME record,
this would cause name resolution to succeed despite the mangling.  (If
the name server did not return the A or AAAA record along with the
CNAME record, then the mangling would be revealed by the subsequent
invalid query packet.)

Reported-by: Nicolas Sylvain <nsylvain@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[dns] Support DNS search lists
Michael Brown [Fri, 31 Jan 2014 18:16:42 +0000 (18:16 +0000)] 
[dns] Support DNS search lists

Update the DNS resolver to support DNS search lists (as provided by
DHCP option 119, DHCPv6 option 24, or NDP option 31).

Add validation code to ensure that parsing of DNS packets does not
overrun the input, get stuck in infinite loops, or (worse) write
beyond the end of allocated buffers.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[intel] Add some missing PCI IDs
Michael Brown [Wed, 29 Jan 2014 16:43:39 +0000 (16:43 +0000)] 
[intel] Add some missing PCI IDs

Tested-by: Philipp Hagen <Philipp.Hagen@she.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[cmdline] Always clear screen after reconfiguring console
Michael Brown [Wed, 22 Jan 2014 22:32:40 +0000 (22:32 +0000)] 
[cmdline] Always clear screen after reconfiguring console

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[fbcon] Allow ANSI CUP with missing arguments
Michael Brown [Wed, 22 Jan 2014 22:42:59 +0000 (22:42 +0000)] 
[fbcon] Allow ANSI CUP with missing arguments

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[cmdline] Add margin options to the "console" command
Michael Brown [Wed, 22 Jan 2014 14:08:15 +0000 (14:08 +0000)] 
[cmdline] Add margin options to the "console" command

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[cmdline] Rename "console" command's --bpp option to --depth
Michael Brown [Wed, 22 Jan 2014 13:22:32 +0000 (13:22 +0000)] 
[cmdline] Rename "console" command's --bpp option to --depth

Rename the "--bpp" option to "--depth", to free up the single-letter
option "-b" for "--bottom" in preparation for adding margin support.

This does not break backwards compatibility with documented features,
since the "console" command has not yet been documented.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[vesafb] Allow for an arbitrary margin around the text area
Michael Brown [Wed, 22 Jan 2014 14:04:48 +0000 (14:04 +0000)] 
[vesafb] Allow for an arbitrary margin around the text area

Allow for an arbitrary margin to be specified in the console
configuration.  If the actual screen size does not match the requested
screen size, then update any margins specified so that they remain in
the same place relative to the requested screen size.  If margins are
unspecified (i.e. zero), then leave them as zero.

The underlying assumption here is that any specified margins are
likely to describe an area within a background picture, and so should
remain in the same place relative to that background picture.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[fbcon] Allow for an arbitrary margin around the text area
Michael Brown [Wed, 22 Jan 2014 13:57:07 +0000 (13:57 +0000)] 
[fbcon] Allow for an arbitrary margin around the text area

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[fbcon] Centre background picture on console
Michael Brown [Fri, 17 Jan 2014 17:44:50 +0000 (17:44 +0000)] 
[fbcon] Centre background picture on console

Centre the background picture on the console, to give a more
consistent result when the aspect ratio does not match the requested
width and height.

Once drawn for the first time, nothing should ever overwrite the
margins of the display.  We can therefore eliminate the logic used to
redraw only the margin areas, and use much simpler code to draw the
complete initial background image.

Simplify the redrawing logic further by making the background picture
buffer equal in size to the frame buffer.  In the common case of a
background picture which is designed to fill the screen, this wastes
no extra memory, and the combined code simplifications reduce the size
of fbcon.o by approximately 15%.

Redefine the concept of "margin" to match the intuitive definition
(i.e. the size of the gap, rather than the position of the boundary
line).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[vesafb] Handle failures from fbcon_init()
Michael Brown [Wed, 22 Jan 2014 14:03:57 +0000 (14:03 +0000)] 
[vesafb] Handle failures from fbcon_init()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[png] Add support for PNG images
Michael Brown [Mon, 6 Jan 2014 17:59:21 +0000 (18:59 +0100)] 
[png] Add support for PNG images

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[test] Generalise pnm_ok() to pixbuf_ok()
Michael Brown [Mon, 6 Jan 2014 19:10:18 +0000 (19:10 +0000)] 
[test] Generalise pnm_ok() to pixbuf_ok()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[test] Rewrite pnm_ok() using okx()
Michael Brown [Mon, 6 Jan 2014 17:58:46 +0000 (18:58 +0100)] 
[test] Rewrite pnm_ok() using okx()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[uaccess] Add memcmp_user()
Michael Brown [Mon, 6 Jan 2014 17:56:58 +0000 (18:56 +0100)] 
[uaccess] Add memcmp_user()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[libc] Add abs()
Michael Brown [Tue, 7 Jan 2014 03:53:56 +0000 (03:53 +0000)] 
[libc] Add abs()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[deflate] Fix literal data length calculation
Michael Brown [Wed, 8 Jan 2014 22:21:23 +0000 (23:21 +0100)] 
[deflate] Fix literal data length calculation

Fix incorrect calculation used to determine length of data to be
copied within a literal data block, and add a test case to prevent
this bug from going undetected in future.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[deflate] Add support for DEFLATE decompression
Michael Brown [Wed, 1 Jan 2014 20:17:26 +0000 (21:17 +0100)] 
[deflate] Add support for DEFLATE decompression

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[test] Add okx() macro taking an explicit file name and line number
Michael Brown [Fri, 3 Jan 2014 23:35:45 +0000 (00:35 +0100)] 
[test] Add okx() macro taking an explicit file name and line number

Allow test reports to specify an explicit file name and line number
using the extended okx() macro.  This allows large blocks of test
report code such as tcpip_random_ok() to be implemented as functions
rather than macros.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[libc] Add isprint()
Michael Brown [Fri, 3 Jan 2014 01:21:52 +0000 (02:21 +0100)] 
[libc] Add isprint()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[build] Build ROMs used by qemu and VMware as part of "make all"
Michael Brown [Thu, 26 Dec 2013 22:36:34 +0000 (23:36 +0100)] 
[build] Build ROMs used by qemu and VMware as part of "make all"

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[ipv6] Fix compilation under FreeBSD
Michael Brown [Sat, 21 Dec 2013 13:21:30 +0000 (13:21 +0000)] 
[ipv6] Fix compilation under FreeBSD

Reported-by: Dewey Hylton <dewey@hyltown.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[build] Remove obsolete check for GNU as version 2.9.1
Michael Brown [Sat, 21 Dec 2013 13:13:46 +0000 (13:13 +0000)] 
[build] Remove obsolete check for GNU as version 2.9.1

Reported-by: Dewey Hylton <dewey@hyltown.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[vesafb] Set "magic" colour to transparent when a background picture is used
Michael Brown [Mon, 9 Dec 2013 15:32:42 +0000 (15:32 +0000)] 
[vesafb] Set "magic" colour to transparent when a background picture is used

Use the magic colour facility to cause the user interface background
to become transparent when we have a background picture.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[console] Add concept of a "magic" colour
Michael Brown [Mon, 9 Dec 2013 15:30:59 +0000 (15:30 +0000)] 
[console] Add concept of a "magic" colour

The magic basic colour can be remapped at runtime from COLOR_NORMAL_BG
(usually blue) to COLOR_DEFAULT (which will be transparent as a
background colour on the framebuffer console).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[cmdline] Add the "colour" and "cpair" commands
Michael Brown [Sun, 8 Dec 2013 01:03:35 +0000 (01:03 +0000)] 
[cmdline] Add the "colour" and "cpair" commands

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[mucurses] Use centralised concept of colour pairs
Michael Brown [Sat, 7 Dec 2013 21:00:09 +0000 (21:00 +0000)] 
[mucurses] Use centralised concept of colour pairs

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[console] Add centralised concept of colours and colour pairs
Michael Brown [Sat, 7 Dec 2013 20:53:20 +0000 (20:53 +0000)] 
[console] Add centralised concept of colours and colour pairs

Add a centralised concept of colours and colour pairs (using the
default colour pairs as configured via config/colour.h).  A colour
pair consists of a pair of colour indices.

Add the ability to redefine both a colour pair and an individual
colour index, with minimal overhead if this feature is not required
(e.g. because the relevant shell commands are not present in the
build).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[fbcon] Always draw cursor using current foreground and background colours
Michael Brown [Sun, 8 Dec 2013 01:28:50 +0000 (01:28 +0000)] 
[fbcon] Always draw cursor using current foreground and background colours

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[lkrnprefix] Include iPXE version string in image header
Michael Brown [Fri, 6 Dec 2013 20:11:36 +0000 (20:11 +0000)] 
[lkrnprefix] Include iPXE version string in image header

Originally-implemented-by: Christian Hesse <list@eworm.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[fbcon] Update the console width and height after changing mode
Michael Brown [Fri, 6 Dec 2013 17:51:34 +0000 (17:51 +0000)] 
[fbcon] Update the console width and height after changing mode

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[console] Allow consoles to update the recorded console size
Michael Brown [Fri, 6 Dec 2013 17:47:54 +0000 (17:47 +0000)] 
[console] Allow consoles to update the recorded console size

Provide a mechanism for consoles to update the recorded console width
and height, and use this width and height to provide the curses COLS
and LINES variables.

We choose not to use ANSI escape sequences to obtain the width and
height, for two reasons:

- iPXE's model is that all output is sent to all consoles; we could
  therefore end up with multiple consoles reporting conflicting widths
  and heights

- when a serial console is in use, we probably don't want to resize
  the output shown on the BIOS console to match the size of the serial
  console, since it's likely that the serial console is in use only
  for debugging.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[build] Fix LABEL name for .liso images
Christian Hesse [Mon, 2 Dec 2013 12:19:52 +0000 (13:19 +0100)] 
[build] Fix LABEL name for .liso images

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[menu] Adapt user interface to fit display size
Michael Brown [Fri, 6 Dec 2013 17:00:06 +0000 (17:00 +0000)] 
[menu] Adapt user interface to fit display size

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[login] Adapt user interface to fit display size
Michael Brown [Fri, 6 Dec 2013 16:50:43 +0000 (16:50 +0000)] 
[login] Adapt user interface to fit display size

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[settings] Adapt user interface to fit display size
Michael Brown [Fri, 6 Dec 2013 16:44:35 +0000 (16:44 +0000)] 
[settings] Adapt user interface to fit display size

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[vesafb] Work around data corruption bug in bochs/qemu VBE implementation
Michael Brown [Fri, 6 Dec 2013 02:37:36 +0000 (02:37 +0000)] 
[vesafb] Work around data corruption bug in bochs/qemu VBE implementation

The vgabios used by bochs and qemu (and other virtualisation products)
has a bug in its implementation of INT 10,4f00 which causes the high
16 bits of %ebx and %edx to become corrupted.

The vgabios code uses a "pushaw"/"popaw" pair to preserve the low 16
bits of all non-segment registers.  The vgabios code is compiled using
bcc, which generates 8086-compatible code and so never touches the
high 16 bits of the 32-bit registers.  However, the function
vbe_biosfn_return_controller_information() includes the line:

    size_64k = (Bit16u)((Bit32u)cur_info->info.XResolution *
cur_info->info.XResolution *
cur_info->info.BitsPerPixel) >> 19;

which generates an implicit call to the "lmulul" function.  This
function is implemented in vbe.c as:

    ; helper function for memory size calculation
    lmulul:
      and eax, #0x0000FFFF
      shl ebx, #16
      or  eax, ebx
      SEG SS
      mul eax, dword ptr [di]
      mov ebx, eax
      shr ebx, #16
      ret

which modifies %eax, %ebx, and %edx (as a result of the "mul"
instruction, which places its result into %edx:%eax).

Work around this problem by marking %ebx and %edx as being clobbered
by the call to INT 10,4f00.  (%eax is already used as an output
register, so does not need to be on the clobber list.)

Reported-by: Oliver Rath <rath@mglug.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[ipv6] Expose NDP-provided settings (including the DNS server)
Michael Brown [Thu, 5 Dec 2013 16:44:50 +0000 (16:44 +0000)] 
[ipv6] Expose NDP-provided settings (including the DNS server)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[dhcpv6] Add DHCPv6 "filename" setting
Michael Brown [Thu, 5 Dec 2013 15:12:50 +0000 (15:12 +0000)] 
[dhcpv6] Add DHCPv6 "filename" setting

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[settings] Merge SETTING_IPv4 and SETTING_IPv6
Michael Brown [Thu, 5 Dec 2013 15:11:15 +0000 (15:11 +0000)] 
[settings] Merge SETTING_IPv4 and SETTING_IPv6

Allow for equivalent IPv4 and IPv6 settings (which requires equivalent
settings to be adjacent within the settings list).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[settings] Allow for multiple definitions of each predefined setting
Michael Brown [Tue, 19 Nov 2013 15:34:58 +0000 (15:34 +0000)] 
[settings] Allow for multiple definitions of each predefined setting

Allow for multiple setting definitions with the same name but
different scopes and tags.  For example, allow for a "filename"
setting with default scope and tag value 67 (for DHCPv4) and a
corresponding "filename" setting with IPv6 scope and tag value 59 (for
DHCPv6).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[settings] Force settings into alphabetical order within sections
Michael Brown [Thu, 5 Dec 2013 12:38:51 +0000 (12:38 +0000)] 
[settings] Force settings into alphabetical order within sections

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[dhcpv6] Use DUID-UUID form of client DUID
Michael Brown [Thu, 5 Dec 2013 03:18:59 +0000 (03:18 +0000)] 
[dhcpv6] Use DUID-UUID form of client DUID

Use the system UUID to generate the client DUID-UUID as per RFC 6355.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[linux] Provide access to SMBIOS via /dev/mem
Michael Brown [Thu, 5 Dec 2013 03:15:53 +0000 (03:15 +0000)] 
[linux] Provide access to SMBIOS via /dev/mem

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[ipv6] Add support for resolving IPv6 addresses via the "nslookup" command
Michael Brown [Thu, 5 Dec 2013 01:52:34 +0000 (01:52 +0000)] 
[ipv6] Add support for resolving IPv6 addresses via the "nslookup" command

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[syslog] Add support for IPv6 syslog server
Michael Brown [Thu, 5 Dec 2013 01:21:51 +0000 (01:21 +0000)] 
[syslog] Add support for IPv6 syslog server

Note that IANA has not yet assigned a DHCPv6 option code for the
syslog server.  When a code is assigned, the definition of
DHCPV6_LOG_SERVERS should be updated.  Until then, an IPv6 address of
a syslog server can be configured manually using e.g.

  set syslog6 3ffe:302:11:2::8309

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[socket] Ensure socket address structure sizes are fixed
Michael Brown [Thu, 5 Dec 2013 01:21:10 +0000 (01:21 +0000)] 
[socket] Ensure socket address structure sizes are fixed

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[dns] Add support for resolving IPv6 addresses via AAAA records
Michael Brown [Wed, 4 Dec 2013 22:21:47 +0000 (22:21 +0000)] 
[dns] Add support for resolving IPv6 addresses via AAAA records

Our policy is to prefer IPv6 addreses to IPv4 addresses, but to
request IPv6 addresses only if we have an IPv6 address for the name
server itself.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[settings] Add fetch_ipv6_setting()
Michael Brown [Wed, 4 Dec 2013 23:36:53 +0000 (23:36 +0000)] 
[settings] Add fetch_ipv6_setting()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[settings] Allow for IPv6 setting types in non-IPv6 builds
Michael Brown [Wed, 4 Dec 2013 22:06:10 +0000 (22:06 +0000)] 
[settings] Allow for IPv6 setting types in non-IPv6 builds

Allow for the existence of references to IPv6 setting types without
dragging in the whole IPv6 stack, by placing the definition of
setting_type_ipv6 in core/settings.c and providing weak stub methods
for parse_ipv6_setting() and format_ipv6_setting().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[settings] Explicitly separate the concept of a completed fetched setting
Michael Brown [Tue, 3 Dec 2013 16:48:56 +0000 (16:48 +0000)] 
[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>
11 years ago[fbcon] Add support for displaying a cursor
Michael Brown [Mon, 2 Dec 2013 17:27:37 +0000 (17:27 +0000)] 
[fbcon] Add support for displaying a cursor

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[menu] Hide cursor when displaying menu
Michael Brown [Mon, 2 Dec 2013 17:25:16 +0000 (17:25 +0000)] 
[menu] Hide cursor when displaying menu

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[settings] Hide cursor when not actively editing a setting
Michael Brown [Mon, 2 Dec 2013 17:23:51 +0000 (17:23 +0000)] 
[settings] Hide cursor when not actively editing a setting

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[mucurses] Implement curs_set() to control cursor visibility
Michael Brown [Mon, 2 Dec 2013 17:23:09 +0000 (17:23 +0000)] 
[mucurses] Implement curs_set() to control cursor visibility

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[console] Allow '?' as an intermediate byte in ANSI escape sequences
Michael Brown [Mon, 2 Dec 2013 17:20:36 +0000 (17:20 +0000)] 
[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>
11 years ago[build] Fix building on OpenBSD 5.4
Michael Brown [Mon, 2 Dec 2013 15:55:45 +0000 (15:55 +0000)] 
[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>
11 years ago[vesafb] Select an optimal mode, rather than the first acceptable mode
Michael Brown [Thu, 28 Nov 2013 14:56:25 +0000 (14:56 +0000)] 
[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>
11 years ago[vesafb] Return meaningful error when no suitable mode is found
Michael Brown [Thu, 28 Nov 2013 12:12:05 +0000 (12:12 +0000)] 
[vesafb] Return meaningful error when no suitable mode is found

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[vesafb] Skip modes for which we cannot get mode information
Michael Brown [Thu, 28 Nov 2013 11:41:07 +0000 (11:41 +0000)] 
[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>
11 years ago[vesafb] Include raw status value within VBE error messages
Michael Brown [Thu, 28 Nov 2013 11:50:31 +0000 (11:50 +0000)] 
[vesafb] Include raw status value within VBE error messages

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[vesafb] Add VESA frame buffer console
Michael Brown [Thu, 28 Nov 2013 04:15:34 +0000 (04:15 +0000)] 
[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>
11 years ago[fbcon] Add generic concept of a frame buffer console
Michael Brown [Thu, 28 Nov 2013 04:14:58 +0000 (04:14 +0000)] 
[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>
11 years ago[cmdline] Add "console" command to configure console
Michael Brown [Wed, 27 Nov 2013 19:43:25 +0000 (19:43 +0000)] 
[cmdline] Add "console" command to configure console

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[console] Add concept of generic console configuration
Michael Brown [Wed, 27 Nov 2013 19:42:23 +0000 (19:42 +0000)] 
[console] Add concept of generic console configuration

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[console] Allow console input and output to be disabled independently
Michael Brown [Thu, 28 Nov 2013 05:41:45 +0000 (05:41 +0000)] 
[console] Allow console input and output to be disabled independently

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[mucurses] Use "<ESC>[2J" ANSI escape sequence to clear screen
Michael Brown [Thu, 28 Nov 2013 05:01:29 +0000 (05:01 +0000)] 
[mucurses] Use "<ESC>[2J" ANSI escape sequence to clear screen

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[pnm] Add support for PNM images
Michael Brown [Tue, 26 Nov 2013 16:29:30 +0000 (16:29 +0000)] 
[pnm] Add support for PNM images

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[image] Add image_pixbuf() to create pixel buffer from image
Michael Brown [Wed, 27 Nov 2013 01:13:18 +0000 (01:13 +0000)] 
[image] Add image_pixbuf() to create pixel buffer from image

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[image] Allow for non-executable image formats
Michael Brown [Tue, 26 Nov 2013 16:29:45 +0000 (16:29 +0000)] 
[image] Allow for non-executable image formats

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[pixbuf] Add generic concept of a pixel buffer
Michael Brown [Tue, 26 Nov 2013 16:28:36 +0000 (16:28 +0000)] 
[pixbuf] Add generic concept of a pixel buffer

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[console] Pass escape sequence context to ANSI escape sequence handlers
Michael Brown [Mon, 25 Nov 2013 14:01:40 +0000 (14:01 +0000)] 
[console] Pass escape sequence context to ANSI escape sequence handlers

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[main] Defer "initialising devices" message until initialising devices
Michael Brown [Mon, 18 Nov 2013 14:07:37 +0000 (14:07 +0000)] 
[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>
11 years ago[test] Include failing code within failed test result output
Michael Brown [Wed, 27 Nov 2013 03:03:16 +0000 (03:03 +0000)] 
[test] Include failing code within failed test result output

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[dhcpv6] Allow stateful DHCPv6 to apply obtained IPv6 addresses
Michael Brown [Fri, 15 Nov 2013 15:23:09 +0000 (15:23 +0000)] 
[dhcpv6] Allow stateful DHCPv6 to apply obtained IPv6 addresses

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[ipv6] Separate the concepts of prefix and address creation
Michael Brown [Fri, 15 Nov 2013 15:12:25 +0000 (15:12 +0000)] 
[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>
11 years ago[build] Update build system for Syslinux 6.x
Christian Hesse [Wed, 13 Nov 2013 10:46:02 +0000 (11:46 +0100)] 
[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>
11 years ago[dhcpv6] Add basic support for stateful and stateless DHCPv6
Michael Brown [Fri, 8 Nov 2013 14:35:29 +0000 (14:35 +0000)] 
[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>
11 years ago[ipv6] Add "ipv6" setting type
Michael Brown [Thu, 14 Nov 2013 12:34:35 +0000 (12:34 +0000)] 
[ipv6] Add "ipv6" setting type

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[ipv6] Use given source address only if it is not the unspecified address
Michael Brown [Fri, 8 Nov 2013 15:52:07 +0000 (15:52 +0000)] 
[ipv6] Use given source address only if it is not the unspecified address

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[settings] Move user-class setting from dhcp.c to settings.c
Michael Brown [Fri, 8 Nov 2013 15:52:56 +0000 (15:52 +0000)] 
[settings] Move user-class setting from dhcp.c to settings.c

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[base16] Fix comparison of signed and unsigned integers
Michael Brown [Tue, 12 Nov 2013 22:16:24 +0000 (22:16 +0000)] 
[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>
11 years ago[pxe] Ensure cached DHCPACK is retrieved prior to network device creation
Michael Brown [Fri, 8 Nov 2013 12:45:22 +0000 (12:45 +0000)] 
[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>
11 years ago[cmdline] Generate command option help text automatically
Michael Brown [Thu, 7 Nov 2013 17:00:51 +0000 (17:00 +0000)] 
[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>
11 years ago[ipv6] Add IPv6 network device configurator
Michael Brown [Thu, 7 Nov 2013 14:44:28 +0000 (14:44 +0000)] 
[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>
11 years ago[dhcp] Remove obsolete dhcp() function
Michael Brown [Mon, 4 Nov 2013 23:07:06 +0000 (23:07 +0000)] 
[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>
11 years ago[cmdline] Make "dhcp" command a synonym for "ifconf"
Michael Brown [Mon, 4 Nov 2013 23:05:48 +0000 (23:05 +0000)] 
[cmdline] Make "dhcp" command a synonym for "ifconf"

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[cmdline] Add "ifconf" command
Michael Brown [Mon, 4 Nov 2013 17:06:21 +0000 (17:06 +0000)] 
[cmdline] Add "ifconf" command

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[autoboot] Use ifconf() to configure network device
Michael Brown [Mon, 4 Nov 2013 23:06:45 +0000 (23:06 +0000)] 
[autoboot] Use ifconf() to configure network device

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[ifmgmt] Add ifconf() to carry out network device configuration
Michael Brown [Mon, 4 Nov 2013 17:05:53 +0000 (17:05 +0000)] 
[ifmgmt] Add ifconf() to carry out network device configuration

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[parseopt] Add parse_netdev_configurator()
Michael Brown [Mon, 4 Nov 2013 17:05:16 +0000 (17:05 +0000)] 
[parseopt] Add parse_netdev_configurator()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[dhcp] Add DHCP network device configurator
Michael Brown [Thu, 31 Oct 2013 15:44:39 +0000 (15:44 +0000)] 
[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>
11 years ago[netdevice] Add generic concept of a network device configurator
Michael Brown [Thu, 31 Oct 2013 15:37:52 +0000 (15:37 +0000)] 
[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>
11 years ago[cmdline] Allow "if<xxx>" commands to take options
Michael Brown [Mon, 4 Nov 2013 16:15:21 +0000 (16:15 +0000)] 
[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>
11 years ago[ifmgmt] Rewrite iflinkwait() to use monojob_wait()
Michael Brown [Fri, 1 Nov 2013 17:38:45 +0000 (17:38 +0000)] 
[ifmgmt] Rewrite iflinkwait() to use monojob_wait()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[autoboot] Fix shell banner timeout
Michael Brown [Tue, 5 Nov 2013 16:58:34 +0000 (16:58 +0000)] 
[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>
11 years ago[cmdline] Rewrite "sync" command to use monojob_wait()
Michael Brown [Fri, 1 Nov 2013 01:56:33 +0000 (01:56 +0000)] 
[cmdline] Rewrite "sync" command to use monojob_wait()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
11 years ago[monojob] Report ongoing job status as overall return status on timeout
Michael Brown [Fri, 1 Nov 2013 15:13:33 +0000 (15:13 +0000)] 
[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>