[U-Boot] Handling images(.jpg, .bmp etc) in u-boot

Wolfgang Denk wd at denx.de
Sun Mar 24 11:05:02 CET 2013


Dear bhargavak,

In message <1364111315717-150524.post at n7.nabble.com> you wrote:
> 
> I have currently implemented u-boot splash screen, a battery charging
> animation(as a series images) in u-boot on my board, all of the above by
> creating a GIMP header (.h) for each of the image.

Why are you doing this? Why don't you just load the bmp files within
U-Boot?

> The problem I'm facing is, the size of the u-boot binary is ever increasing,
> as the headers for each image is very large even though all of them take up
> only 1/4 of the screen size(WVGA).

Why don;t you draw smaller images, then?  For battery charging state,
a pretty small image (definitely smaller than 1/4 WVGA) should be more
than adequate.

> Now, I'm supposed to implement a full screen size splash screen and add a
> few more images to accommodate extra levels of battery charging.
> 
> With this added my u-boot.bin goes upto 4-5MB (and that is bad right ??)

Yes, this is very bad.

> I just came to know that there is a method where we can create a partition
> and put images(.bmp) into the EMMC flash.
> I saw the u-boot's manual where there is a description about a environment
> variable 'splashimage'.
> 
> My concern here is, can someone please elaborate the procedure mentioned
> there.

What exactly is the problem?  JUst read the images from whichever
storage medium you may be using, and use the bmp command to displaty
them.

For example, this is the whole "code" for a slide show demo I've been
using on a number of trade shows:

	bootdelay=6
	show_one=fatload mmc 0:2 40001000 slide-${i}.bmp;bmp d 40001000
	slide_show=while mmc rescan; do for i in 1 2 3 4 5 6 7 8 ; do run show_one ; sleep ${delay} ; done ; done
	bootcmd=run slideshow


> If there are any other methods to implement the whole thing better,
> suggestions a welcome. 

Well, reduce the images you are drowing to the really needed size.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Let us not look back in anger or  forward  in  fear,  but  around  in
awareness.                                            - James Thurber


More information about the U-Boot mailing list