CFT: Graphics support for /boot/loader

David Naylor naylor.b.david at
Tue Feb 10 05:03:11 PST 2009

On Tuesday 10 February 2009 11:08:09 Oliver Fromme wrote:
> Hi,
> Sorry for the late reply.  I'm swamped with emails, and
> real life takes its time, too ...
> Alexey Shuvaev wrote:
>  > Looks good, BTW is 640x480 in 4 bits per pixel the maximum of standard
>  > VGA? Can you go higher or you are already in protected mode with
>  > (almost) no BIOS? I mean, 640x480 is ok, but 4 bits per pixel... mmm...
>  > the same 16 colors as in text mode... although with a palette...
> For logos and simple graphics, 16 colors is actually not
> that bad.  Look at the various examples (screen shots) that
> you can find here:
> With a proper palette and dithering you can make quite
> nice background graphics with only 16 colors.  I made all
> of those with the netbpm tools, xv and a little bit of gimp.
> Also take into account that this is "only" a boot screen.
> Most people will see it only for a few seconds.
> Regarding your question about VGA modes:
> Standard VGA supports at most 640x480 at 4 bits and 320x200
> at 8 bits.  So that's the common denominator.
> There are some "hacked modes" (sometimes called "mode X")
> that allow somewhat higher resolutions, such as 704×528
> at 4 bits or 360x256 at 8 bits.  But those don't work well
> with all monitors.
> And then there is VESA, of course.  I plan to add limited
> VESA support, so higher resolutions are possible.  However,
> there are a few issues with VESA support:
>  - 1. Some VESA BIOS implementations have serious bugs,
>    because nobody uses it in the Windows world.
>  - 2. There is no simple and reliable way to autodetect
>    which resolutions are supported by the monitor.
>  - 3. There are many, many different VESA modes and display
>    resolutions.  It's unfeasible that FreeBSD ships with
>    appropriate graphics files for every conceivable VESA
>    mode, color depth, display size and height/width ratio.
> So, the default FreeBSD boot loader (as shipped on the CD
> or DVD images) will use the standard VGA mode 640x480 at
> 4 bits, because that's the only thing guaranteed to work
> everywhere out of the box.  It might be possible to use
> a VESA mode at higher color depth (e.g. 8 bits), but the
> default resolution should stay at 640x480.
> Of course, those who want higher resolutions will be able
> to use them by editing their theme.conf file and providing
> graphics files of appropriate size.
> Best regards
>    Oliver

Agreed about 'default' behaviour, but...

It would be a nice feature to support themes at multiple (high) resolutions 
(and depth) [for example]:
 - Provide images at the common aspect ratios (and at the largest resolutions) 
and scale the image to the correct size.
 - Provide the correct theme.conf for the various aspect ratios/sizes (perhaps 
by using relative offsets [i.e. top: 10%, left-middle: 25%, width: 15%])
 - Add a switch in loader.conf to choose the correct resolution...
 - Add caching/tool to do the scaling for first point.  Or provide a way 
to 'compile' the themes at various resolutions (and provide proper theme.conf 
files for that specific resolution?)

Of course the above is just a suggestion...  

Also, GRUB AFAIK supports higher resolutions, perhaps they have found a way to 
handle the VESA problems...

Oh, and nice work ;-).  Loader is looking very good.  


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part.
Url :

More information about the freebsd-current mailing list