r1065 - in trunk/src/host: . splash

werner at sita.openmoko.org werner at sita.openmoko.org
Wed Feb 21 01:58:31 CET 2007


Author: werner
Date: 2007-02-21 01:58:26 +0100 (Wed, 21 Feb 2007)
New Revision: 1065

Added:
   trunk/src/host/splash/
   trunk/src/host/splash/README
   trunk/src/host/splash/splashimg.pl
Log:
Splash screen image converter with usage and install instructions.



Added: trunk/src/host/splash/README
===================================================================
--- trunk/src/host/splash/README	2007-02-21 00:25:23 UTC (rev 1064)
+++ trunk/src/host/splash/README	2007-02-21 00:58:26 UTC (rev 1065)
@@ -0,0 +1,53 @@
+Splash screen support
+=====================
+
+This is a description of the original splash screen setup process. We
+use the somewhat arcane JTAG upload method. Please check the OpenMoko
+Wiki for the updated and presumably more friendly instructions.
+
+
+Prerequities
+------------
+
+The u-boot running on the Neo must be from SVN revision 1061 or later.
+A reasonably recent version of Netpbm must be installed on the host. We
+assume that you have JTAG and openocd set up.
+
+
+Generating the splash image
+---------------------------
+
+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.
+
+- Download the official startup screen:
+  wget http://wiki.openmoko.org/images/c/c2/System_boot.png
+
+- Generate the compressed frame buffer dump:
+  ./splashimg.pl | gzip -9 >splash.gz
+
+
+Put the image into NAND Flash
+-----------------------------
+
+We use JTAG to upload the image into memory, then write it to Flash with
+u-boot. (Note: we assume that the image is not larger then 0x5000 bytes.
+If there is a size change, update these instructions accordingly.)
+
+- Start u-boot and enter the prompt.
+
+- With openocd, load the image into memory:
+  halt
+  load_binary wherever/splash.gz 0x32000000
+  resume
+
+- In u-boot, write it to NAND Flash:
+  nand erase splash
+  nand write.e 0x32000000 splash 0x5000
+
+- Set up the environment to load the splash screen:
+  setenv splashimage nand read.e 0x32000000 splash 0x5000\; unzip 0x32000000 0x33d00000 0x96000
+  saveenv
+
+After a reboot, the splash screen image will be displayed.

Added: trunk/src/host/splash/splashimg.pl
===================================================================
--- trunk/src/host/splash/splashimg.pl	2007-02-21 00:25:23 UTC (rev 1064)
+++ trunk/src/host/splash/splashimg.pl	2007-02-21 00:58:26 UTC (rev 1065)
@@ -0,0 +1,61 @@
+#!/usr/bin/perl
+#
+# splashimg.pl - Convert a 480x640 PNG to a splash screen raw dump 
+#
+# Copyright (C) 2006-2007 by OpenMoko, Inc.
+# Written by Werner Almesberger <werner at openmoko.org>
+# All Rights Reserved
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+
+sub usage
+{
+    print STDERR "usage: $0 [System_boot.png]\n";
+    exit(1);
+}
+
+
+&usage unless $#ARGV < 2;
+if ($ARGV[0] eq "") {
+    $file = "System_boot.png";
+}
+else {
+    $file = @ARGV[0];
+}
+
+$cmd = "pngtopnm '$file' | ppmtorgb3";
+
+system($cmd) && die "system \"$cmd\": $?";
+
+for ("red", "grn", "blu") {
+    open(FILE,"noname.$_") || die "noname.$_";
+    $f = join("",<FILE>);
+    close FILE;
+    unlink("noname.$_");
+    $f =~ s/^P5\s+(\d+)\s+(\d+)\s+(\d+)\s//s;
+    ($w,$h,$p) = ($1,$2,$3);
+    $p{$_} = $f;
+}
+
+print STDERR "$w x $h ($p)\n";
+
+for ($i = 0; $i != $w*$h; $i++) {
+    $r = unpack("C",substr($p{"red"},$i,1));
+    $g = unpack("C",substr($p{"grn"},$i,1));
+    $b = unpack("C",substr($p{"blu"},$i,1));
+    $v = ($r >> 3) << 11 | ($g >> 2) << 5 | ($b >> 3);
+    print pack("v",$v) || die "print: $!";
+}


Property changes on: trunk/src/host/splash/splashimg.pl
___________________________________________________________________
Name: svn:executable
   + *





More information about the commitlog mailing list