dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: bmp support in the build system

bmp support in the build system

From: Dave Chapman <>
Date: Mon, 26 Dec 2005 14:09:21 +0100


I've been working on adding support for the use of bmp files directly in
the Rockbox source - i.e. putting .bmp files in CVS instead of including
bitmaps in .c files.

An initial work-in-progress patch is here:

The zip file contains two new directories - apps/bitmaps/ and
apps/plugins/bitmaps/ - containing bmp files for the Rockbox logo and
Sudoku as a proof of concept test.

Each of those two bitmaps/ directories contains a standard Rockbox
"SOURCES" file and a Makefile which creates libbitmaps.a and
libpluginbitmaps.a respectively.

The configure script has been modified to create a BMP2RB variable
containing the bmp2rb command for native bitmaps for that target - e.g.
"$(toolsdir)/bmp2rb -f 2" for iriver h1x0.

This has turned out to be more complicated than I thought. Some
unresolved (or poorly resolved) problems are:

1) Each target uses multiple bitmaps formats - potentially we could have
three different formats - mono, native (main unit), and native (remote).
  These could potentially requre different parameters passed to bmp2rb.c

In the current patch, this has been resolved by adding a "-m" option to
bmp2rb. For non-mono targets, this causes bmp2rb to ignore the -f
option and output a "-f 0" bitmap if the input bitmap has depth 1.

But maybe we need a less hackish and more flexible solution. Any ideas?

2) Moving the #ifs into the bitmap SOURCES file simplifies the code a
lot, but currently the sizes of the bitmaps still need to be defined in
the C file itself - the size isn't taken from the output from bmp2rb.
I've ignored this for now.

Any comments/suggestions welcome.

Received on 2005-12-26

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy