Configuring the boot splash screens

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(Splash Screen)
(+links)
 
(24 intermediate revisions by 14 users not shown)
Line 1: Line 1:
=== Splash Screen ===
+
There are three boot screens (also called splashes or splash screens) as of 13 Nov. 2007.  The [[U-Boot]] splash is displayed until the kernel takes over.  Presumably the kernel will eventually display a splash while it boots.  When userspace initializes, psplash displays a splash.  Finally X displays a splash when it starts.
  
Is a raw framebuffer bitmap and gzipped.
+
=== [[U-Boot]] Splash ===
  
Here is a basic description: http://svn.openmoko.org/trunk/src/host/splash/README
+
Werner's README states the following:
 +
: "The splash image is a raw dump of the 480x640x16 frame buffer, with RGB
 +
: 5:6:5 organization and HWSWP = 1. To save a lot of space and to greatly
 +
: improve speed, we gzip the raw dump."
  
Use [[dfu-util]] to send to the OpenMoko.
+
 
 +
So what you have to do to create your U-boot splashscreen is
 +
# create your splash-file with the dimensions 480x640 (in 16bit preferrably) and save it in png format
 +
# get the necessary tools for converting it
 +
#* get the conversion script
 +
#** download the Perl script kindly provided by [http://svn.openmoko.org/developers/werner/splash/ Werner Almesberger]
 +
#** make it executable with ''`chmod u+x splashimage.pl`''
 +
#* Optionally: have a look at the README file. It should contain the most up-to-date info from Werner himself.
 +
#* Make sure to have netpbm installed.
 +
#** Check your ${PATH} for ''pngtopnm'' and ''pbmtorgb3'' executables.
 +
#** If those programs are missing, check whether rle-support is enabled for netpbm.
 +
#* If you don't have Dfu-util already, get [http://wiki.openmoko.org/wiki/Dfu-util#Binaries it here].
 +
# convert the png-file
 +
#* execute ''`./splashimg.pl yourfancynewsplashscreen.png | gzip -9 > bootscreen.splash`''
 +
#** '''Make sure you redirect the output!''' The perl-script shoves the splash-data to stdout.
 +
#** ''-pnm'' makes the pngtopnm-executable dispensable and eats a generic pnm-/pbm-file - gimp can export to them, for example.
 +
#** If you omit the png-file, ''splashimg.pl'' will be looking for a file named ''System_boot.png''
 +
#** ''-32'' will create a 480x640x32 frame buffer
 +
#: ( I have '''no''' idea if that's supported (???) )
 +
#** ''-swap'' causes some XOR operation performed in the end of the image creation.
 +
#: ( Some kind of inverting? Option for different edianness? )
 +
# upload your new bootscreen.splash ( you need alt-name: splash )
 +
#* if you don't know how to do that: check the instructions found [http://wiki.openmoko.org/wiki/Dfu-util#Command-line_options here]
 +
# '''IMPORTANT!''' check the exact size of your splash-file (e.g. ''ls -l'' or ''du -b'')
 +
#:: Explanation: The flash-partition reserved for the splash image (dubbed ''splash'') is 655360 Bytes (0xa0000) in size; per default u-boot only reads 20480 (0x5000) of those, though.
 +
#:
 +
#* Essentially, this leaves you with 3 choices:
 +
#** Make a splash image that's gzip'd smaller than 20480 Bytes. This is somewhat boring, as it imposes limits to your creativity.
 +
#** Turn off the read-limit, so u-boot scans the whole splash-partition before commencing boot. This would mean a little longer time till the image is actually displayed. And I mean: little.
 +
#** Or tailor the read size to the size of your splash.
 +
#*** If it's smaller than the pre-defined 0x5000 Bytes, u-boot is done with reading sooner.
 +
#*** If it's bigger than the 0x5000 Bytes, you will ''have'' to adapt it or your image won't be displayed correctly.
 +
#:
 +
#: So, if you do (need) to edit the size:
 +
# Start your u-boot. And make sure you're in NAND (as opposed to NOR).
 +
#:: (You do that by pressing ''PWR'' briefly before pressing ''AUX'' - keep them both pressed until the u-boot appears.)
 +
#* Now select USB-Console, plugin your USB-cable and start the tty-console of your choice
 +
#:: e.g. ''`screen /dev/ttyACM0`''
 +
#:
 +
#* for the GTA01:
 +
#*: ''setenv splashimage nand read.e 0x32000000 splash 0x5000\; unzip 0x32000000 0x33d00000 0x96000''
 +
#*: ''saveenv''
 +
#* for the GTA02:
 +
#*: ''setenv splashimage nand read.e 0x32000000 splash 0x5000\; unzip 0x32000000 0x8800000 0x96000''
 +
#*: ''saveenv''
 +
#:
 +
#: In those commands, replace the 0x5000 with the size of your choice - or omit it altogether. The minimum size you have to put is the size of your splash-file - or you will receive garbage.
 +
#: Also consider that this is a basic terminal; input is not ''exactly'' like on the shells you're used to.
 +
 
 +
 
 +
=== See also ===
 +
 
 +
This ticket has recent explanations: <strike>[http://docs.openmoko.org/trac/ticket/1735 1735]</strike>.
 +
 
 +
== Linux kernel ==
 +
''To Do''
 +
 
 +
== psplash ==
 +
You need to recompile psplash, because the picture is hardcoded.  There is a script in the source for psplash for making a new header file.  On Ubuntu, you need the libgtk2.0-dev package to run the script.
 +
 
 +
make-image-header.sh my_image.png HAND
 +
mv my_image-img.h psplash-hand-img.h
 +
 
 +
Then add your custom header to the OpenEmbedded recipe (org.openembedded.dev/packages/psplash/files/openmoko/psplash-hand-img.h), or rebuild psplash by hand.
 +
 
 +
== X splash ==
 +
 
 +
The X server accepts a -root-ppm option, which takes a plain old (raw) ppm file.  Replace /usr/share/pixmaps/xsplash-vga.ppm on the phone or org.openembedded.dev/packages/xserver-kdrive-common/xserver-kdrive-common/openmoko/xsplash-vga.ppm in OpenEmbedded.
 +
 
 +
With more gory details, ''/etc/X11/Xserver'' ends with the lines:
 +
<pre>
 +
# start off server in conventional location.                              
 +
                                                               
 +
ARGS="$ARGS -dpi 285 -screen 480x640 -hide-cursor -root-ppm
 +
/usr/share/pixmaps/jsplash-vga.ppm vt1"                                    
 +
   
 +
#ARGS="$ARGS -dpi 285 -screen 480x640 -hide-cursor vt1"                    
 +
                                                               
 +
DISPLAY=':0'                                                              
 +
                                                               
 +
exec xinit /etc/X11/Xsession -- $XSERVER $DISPLAY $ARGS $* >/tmp/x.log 2>&1
 +
</pre>
 +
 
 +
The '-root-ppm' is the static splash screen.  
 +
 
 +
Following that, Xsession starts enlightenment, passing it $E_PROFILE as
 +
defined in ''/etc/enlightenment/default_profile''.
 +
 
 +
== E splash ==
 +
 
 +
''/usr/share/enlightenment/data/init'' contains one or more .edj files
 +
that each define an animated splash init that appears next, and until
 +
enlightenment finishes loading.  The .edj file used is determined by
 +
$E_PROFILE.  So if default_profile contains E_PROFILE='-profile illume'
 +
then enlightenment will try to start up with ''illume_init.edj'' for the splash
 +
(the 'cylon' animated blip, or various other animations depending on image)
 +
and will try to use ''/usr/share/enlightenment/data/themes/illume.edj'' as the
 +
theme for illume.  If it's E_PROFILE='-profile fso' then it looks for
 +
''fso_init.edj'' splash and ''fso.edj'' theme, etc.
 +
 
 +
== See also ==
 +
* [[Themes]]
 +
* [[Edje]]
 +
 
 +
[[Category:Middleware settings]]

Latest revision as of 10:02, 10 February 2012

There are three boot screens (also called splashes or splash screens) as of 13 Nov. 2007. The U-Boot splash is displayed until the kernel takes over. Presumably the kernel will eventually display a splash while it boots. When userspace initializes, psplash displays a splash. Finally X displays a splash when it starts.

Contents

[edit] U-Boot Splash

Werner's README states the following:

"The splash image is a raw dump of the 480x640x16 frame buffer, with RGB
5:6:5 organization and HWSWP = 1. To save a lot of space and to greatly
improve speed, we gzip the raw dump."


So what you have to do to create your U-boot splashscreen is

  1. create your splash-file with the dimensions 480x640 (in 16bit preferrably) and save it in png format
  2. get the necessary tools for converting it
    • get the conversion script
      • download the Perl script kindly provided by Werner Almesberger
      • make it executable with `chmod u+x splashimage.pl`
    • Optionally: have a look at the README file. It should contain the most up-to-date info from Werner himself.
    • Make sure to have netpbm installed.
      • Check your ${PATH} for pngtopnm and pbmtorgb3 executables.
      • If those programs are missing, check whether rle-support is enabled for netpbm.
    • If you don't have Dfu-util already, get it here.
  3. convert the png-file
    • execute `./splashimg.pl yourfancynewsplashscreen.png | gzip -9 > bootscreen.splash`
      • Make sure you redirect the output! The perl-script shoves the splash-data to stdout.
      • -pnm makes the pngtopnm-executable dispensable and eats a generic pnm-/pbm-file - gimp can export to them, for example.
      • If you omit the png-file, splashimg.pl will be looking for a file named System_boot.png
      • -32 will create a 480x640x32 frame buffer
    ( I have no idea if that's supported (???) )
      • -swap causes some XOR operation performed in the end of the image creation.
    ( Some kind of inverting? Option for different edianness? )
  4. upload your new bootscreen.splash ( you need alt-name: splash )
    • if you don't know how to do that: check the instructions found here
  5. IMPORTANT! check the exact size of your splash-file (e.g. ls -l or du -b)
    Explanation: The flash-partition reserved for the splash image (dubbed splash) is 655360 Bytes (0xa0000) in size; per default u-boot only reads 20480 (0x5000) of those, though.
    • Essentially, this leaves you with 3 choices:
      • Make a splash image that's gzip'd smaller than 20480 Bytes. This is somewhat boring, as it imposes limits to your creativity.
      • Turn off the read-limit, so u-boot scans the whole splash-partition before commencing boot. This would mean a little longer time till the image is actually displayed. And I mean: little.
      • Or tailor the read size to the size of your splash.
        • If it's smaller than the pre-defined 0x5000 Bytes, u-boot is done with reading sooner.
        • If it's bigger than the 0x5000 Bytes, you will have to adapt it or your image won't be displayed correctly.
    So, if you do (need) to edit the size:
  6. Start your u-boot. And make sure you're in NAND (as opposed to NOR).
    (You do that by pressing PWR briefly before pressing AUX - keep them both pressed until the u-boot appears.)
    • Now select USB-Console, plugin your USB-cable and start the tty-console of your choice
    e.g. `screen /dev/ttyACM0`
    • for the GTA01:
      setenv splashimage nand read.e 0x32000000 splash 0x5000\; unzip 0x32000000 0x33d00000 0x96000
      saveenv
    • for the GTA02:
      setenv splashimage nand read.e 0x32000000 splash 0x5000\; unzip 0x32000000 0x8800000 0x96000
      saveenv
    In those commands, replace the 0x5000 with the size of your choice - or omit it altogether. The minimum size you have to put is the size of your splash-file - or you will receive garbage.
    Also consider that this is a basic terminal; input is not exactly like on the shells you're used to.


[edit] See also

This ticket has recent explanations: 1735.

[edit] Linux kernel

To Do

[edit] psplash

You need to recompile psplash, because the picture is hardcoded. There is a script in the source for psplash for making a new header file. On Ubuntu, you need the libgtk2.0-dev package to run the script.

make-image-header.sh my_image.png HAND mv my_image-img.h psplash-hand-img.h

Then add your custom header to the OpenEmbedded recipe (org.openembedded.dev/packages/psplash/files/openmoko/psplash-hand-img.h), or rebuild psplash by hand.

[edit] X splash

The X server accepts a -root-ppm option, which takes a plain old (raw) ppm file. Replace /usr/share/pixmaps/xsplash-vga.ppm on the phone or org.openembedded.dev/packages/xserver-kdrive-common/xserver-kdrive-common/openmoko/xsplash-vga.ppm in OpenEmbedded.

With more gory details, /etc/X11/Xserver ends with the lines:

# start off server in conventional location.                               
                                                               
ARGS="$ARGS -dpi 285 -screen 480x640 -hide-cursor -root-ppm
/usr/share/pixmaps/jsplash-vga.ppm vt1"                                    
   
#ARGS="$ARGS -dpi 285 -screen 480x640 -hide-cursor vt1"                    
                                                               
DISPLAY=':0'                                                               
                                                               
exec xinit /etc/X11/Xsession -- $XSERVER $DISPLAY $ARGS $* >/tmp/x.log 2>&1

The '-root-ppm' is the static splash screen.  

Following that, Xsession starts enlightenment, passing it $E_PROFILE as defined in /etc/enlightenment/default_profile.

[edit] E splash

/usr/share/enlightenment/data/init contains one or more .edj files that each define an animated splash init that appears next, and until enlightenment finishes loading.  The .edj file used is determined by $E_PROFILE.  So if default_profile contains E_PROFILE='-profile illume' then enlightenment will try to start up with illume_init.edj for the splash (the 'cylon' animated blip, or various other animations depending on image) and will try to use /usr/share/enlightenment/data/themes/illume.edj as the theme for illume.  If it's E_PROFILE='-profile fso' then it looks for fso_init.edj splash and fso.edj theme, etc.

[edit] See also

Personal tools

Splash Screen

Is a raw framebuffer bitmap and gzipped.

Here is a basic description: http://svn.openmoko.org/trunk/src/host/splash/README

Use dfu-util to send to the OpenMoko.