[fbcon] Always draw cursor using current foreground and background colours

Signed-off-by: Michael Brown <mcb30@ipxe.org>
[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>
[mucurses] Use centralised concept of colour pairs

Signed-off-by: Michael Brown <mcb30@ipxe.org>
[cmdline] Add the "colour" and "cpair" commands

Signed-off-by: Michael Brown <mcb30@ipxe.org>
[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>
[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>
[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>