Draft: Add bootlogo support from command line
Add the early_param "logo" and parse the address and size from it to load a linux_logo structure from this memory location. the memory location should contain the linux_logo structure as well as the logo data and maybe the clut.
The internal representation of a simple bootlogo is via a struct linux_logo. Using this representation, it is fairly easy to construct a binary containing the boot logo data, possibly a clut and the logo description in the similar format the kernel already uses for integrated bootlogos.
Suppose one wants to add a dynamic boot logo loaded by the bootloader, the logo address can be supplied by a kernel command line in the following form:
logo=<size_in_bytes>@<physical_address>
In future versions this may be added by the device tree instead or a similar approach to simplefb or simpledrm may be used.
With the physical address and the size reserve the memory block during boot-up and free it later. Because it is only used during early boot the use of phys_to_virt should be sufficient, and no special physical/virtual memory handling is necessary.
The pointers data and clut in the linux_logo structure supplied by this approach are offsets in this memory block. To be of use the real memory offsets need to be added inside the structure.
Tested using a converted PNG file logo.png to a logo.dat file on an 800x480 display with netpbm tools:
WIDTH=800
HEIGHT=480
pngtopam logo.png > logo.ppm
pnmpad -width $WIDTH -height $HEIGHT logo.ppm > logo_pad.ppm
pnmcolormap 224 logo_pad.ppm > colormap
pnmremap -floyd -plain -mapfile=colormap logo_pad.ppm > logo_plain.ppm
gfpnmtologo -t clut224 -o logo.dat -f bin logo_plain.ppm
Load the logo.dat into RAM by the bootloader and provide the early boot parameter.