More flexibility for fbsplash

Mattias Schlenker ms at mattiasschlenker.de
Mon Oct 3 12:24:05 UTC 2016



Am 01.10.2016 um 13:26 schrieb Mattias Schlenker:
>
> Hi everyone,
>
> I maintain a few (commercial) live distributions and have to fulfil 
> the need of a few customers for a nice graphical boot splash. 
> Unfortunately busybox' fbsplash was too unflexible, so I added a bit 
> more configurability:
>
>   * Specify a background color which is used to flood the whole screen
>     before drawing the image and the progress bar
>   * Specify an x and y offset of the ppm image
>   * Specify an x or y offset larger than the respective screen size to
>     move the image to the right or bottom edge of the screen (or
>     bottom right corner)
>
> The attached patch just re-uses functions already in fbsplash.c and 
> introduces five more config options, this should result in the same 
> size of the busybox binary. Even if these config options are not set, 
> the screen is blanked all black before painting the splash, which 
> might be desired in most cases (and usually is done by using 
> fullscreen images).
>
> With the patch I am able to calculate the position of logo and 
> progress bar by a script before invoking fbsplash and do not have to 
> add a splash for each and every screen resolution. Initially I was 
> thinking about adding more options: color of progess bar and the 
> posibility to specify a gradient, but this might have enlarged the 
> binary which is not desirable.

I just updated the patch: The calculation for cropping the image was 
wrong, the parameter name "IMAGE_WIDTH" proved too long on 32 bit 
systems and I added a "NOFILL=1" option. This option allows drawing an 
arbitary image to an arbitary position without completely wiping the 
framebuffer first. Take a look at the demo script (run with the path to 
your busybox binary) as first parameter: The scripts reads the 
framebuffer dimensions, creates two config files, paints an image on a 
plain background, progress bar and changing icon beneath the progress bar.

The demo script: http://distfiles.lesslinux.org/fbsplash_demo.tar.gz

The patch is attached.

Yours,
Mattias


-- 
Mattias Schlenker - Freier IT-Fachredakteur und -autor
                              redaktion at mattiasschlenker.de
Mattias Schlenker - IT-Consulting, Softwareentwicklung
                             consulting at mattiasschlenker.de

Address__ August-Bebel-Str. 74 - D-04275 LEIPZIG - GERMANY
Phone: +49 341 39290767              Fax: +49 341 30393578
Mobile: +49 163  6953657  Another mobile: +49 159 03160327
VATIN_________________________________________ DE240998538

Fork me!____________________ https://github.com/mschlenker
Website.__________________ http://www.mattiasschlenker.de/
My books!___________ http://www.arduino-hausautomation.de/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20161003/e423fb04/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: busybox-1.25.0-fbset-nofill.patch
Type: text/x-patch
Size: 4517 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20161003/e423fb04/attachment.bin>


More information about the busybox mailing list