[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>
[ipv6] Fix compilation under FreeBSD

Reported-by: Dewey Hylton <dewey@hyltown.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
[build] Build ROMs used by qemu and VMware as part of "make all"

Signed-off-by: Michael Brown <mcb30@ipxe.org>
[libc] Add isprint()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
[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>
[deflate] Add support for DEFLATE decompression

Signed-off-by: Michael Brown <mcb30@ipxe.org>
[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>
[libc] Add abs()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
[uaccess] Add memcmp_user()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
[test] Rewrite pnm_ok() using okx()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
[test] Generalise pnm_ok() to pixbuf_ok()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
[png] Add support for PNG images

Signed-off-by: Michael Brown <mcb30@ipxe.org>
[vesafb] Handle failures from fbcon_init()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
[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>
[fbcon] Allow for an arbitrary margin around the text area

Signed-off-by: Michael Brown <mcb30@ipxe.org>
[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>
[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>
[cmdline] Add margin options to the "console" command

Signed-off-by: Michael Brown <mcb30@ipxe.org>
[fbcon] Allow ANSI CUP with missing arguments

Signed-off-by: Michael Brown <mcb30@ipxe.org>
[cmdline] Always clear screen after reconfiguring console

Signed-off-by: Michael Brown <mcb30@ipxe.org>