More flexibility for fbsplash

Simon Rettberg simon.rettberg at rz.uni-freiburg.de
Wed Oct 5 17:21:39 UTC 2016


I'd welcome this patch to busybox. We currently maintain a similar patch  
that adds a floodfill switch (which just uses the color of the top left  
pixel of the image) and a switch for centering the image on screen. Your  
patch is a perfect fit for us, as we were planning on adding functionality  
to freely position the image on screen too. So if this makes it into  
busybox I'd happily throw away our patch.

Cheers,
Simon

Am 03.10.2016, 14:24 Uhr, schrieb Mattias Schlenker  
<ms at mattiasschlenker.de>:

>
>
> 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
>


More information about the busybox mailing list