psplash: add 1bpp support for boc01
authorJeremy Lainé <jeremy.laine@m4x.org>
Tue, 23 Dec 2008 02:53:11 +0000 (03:53 +0100)
committerJeremy Lainé <jeremy.laine@m4x.org>
Tue, 23 Dec 2008 02:53:11 +0000 (03:53 +0100)
packages/psplash/files/boc01/psplash-bar-img.h [new file with mode: 0644]
packages/psplash/files/boc01/psplash-hand-img.h [new file with mode: 0644]
packages/psplash/files/psplash_1bpp.patch [new file with mode: 0644]
packages/psplash/psplash_svn.bb

diff --git a/packages/psplash/files/boc01/psplash-bar-img.h b/packages/psplash/files/boc01/psplash-bar-img.h
new file mode 100644 (file)
index 0000000..af806ab
--- /dev/null
@@ -0,0 +1,17 @@
+/* GdkPixbuf RGB C-Source image dump 1-byte-run-length-encoded */
+
+#define BAR_IMG_ROWSTRIDE (384)
+#define BAR_IMG_WIDTH (128)
+#define BAR_IMG_HEIGHT (32)
+#define BAR_IMG_BYTES_PER_PIXEL (3) /* 3:RGB, 4:RGBA */
+#define BAR_IMG_RLE_PIXEL_DATA ((uint8*) \
+  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
+  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
+  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
+  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
+  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
+  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
+  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \
+  "\377\377\377\377\377\377\377\377\240\377\377\377")
+
+
diff --git a/packages/psplash/files/boc01/psplash-hand-img.h b/packages/psplash/files/boc01/psplash-hand-img.h
new file mode 100644 (file)
index 0000000..c945462
--- /dev/null
@@ -0,0 +1,129 @@
+/* GdkPixbuf RGB C-Source image dump 1-byte-run-length-encoded */
+
+#define HAND_IMG_ROWSTRIDE (384)
+#define HAND_IMG_WIDTH (128)
+#define HAND_IMG_HEIGHT (64)
+#define HAND_IMG_BYTES_PER_PIXEL (3) /* 3:RGB, 4:RGBA */
+#define HAND_IMG_RLE_PIXEL_DATA ((uint8*) \
+  "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\270\377" \
+  "\377\377\205\0\0\0\374\377\377\377\210\0\0\0\374\377\377\377\206\0\0" \
+  "\0\374\377\377\377\206\0\0\0\375\377\377\377\205\0\0\0\375\377\377\377" \
+  "\205\0\0\0\374\377\377\377\206\0\0\0\215\377\377\377\203\0\0\0\354\377" \
+  "\377\377\205\0\0\0\214\377\377\377\204\0\0\0\354\377\377\377\206\0\0" \
+  "\0\211\377\377\377\206\0\0\0\355\377\377\377\205\0\0\0\210\377\377\377" \
+  "\205\0\0\0\357\377\377\377\205\0\0\0\206\377\377\377\204\0\0\0\362\377" \
+  "\377\377\205\0\0\0\205\377\377\377\203\0\0\0\364\377\377\377\205\0\0" \
+  "\0\204\377\377\377\1\0\0\0\370\377\377\377\204\0\0\0\375\377\377\377" \
+  "\204\0\0\0\375\377\377\377\204\0\0\0\374\377\377\377\205\0\0\0\374\377" \
+  "\377\377\205\0\0\0\314\377\377\377\204\0\0\0\202\377\377\377\204\0\0" \
+  "\0\240\377\377\377\202\0\0\0\204\377\377\377\204\0\0\0\256\377\377\377" \
+  "\213\0\0\0\223\377\377\377\204\0\0\0\202\377\377\377\204\0\0\0\237\377" \
+  "\377\377\203\0\0\0\205\377\377\377\204\0\0\0\255\377\377\377\206\0\0" \
+  "\0\1\377\377\377\206\0\0\0\222\377\377\377\203\0\0\0\203\377\377\377" \
+  "\203\0\0\0\236\377\377\377\203\0\0\0\207\377\377\377\204\0\0\0\256\377" \
+  "\377\377\204\0\0\0\204\377\377\377\203\0\0\0\222\377\377\377\203\0\0" \
+  "\0\203\377\377\377\203\0\0\0\236\377\377\377\202\0\0\0\211\377\377\377" \
+  "\203\0\0\0\256\377\377\377\204\0\0\0\204\377\377\377\204\0\0\0\221\377" \
+  "\377\377\203\0\0\0\203\377\377\377\203\0\0\0\235\377\377\377\202\0\0" \
+  "\0\212\377\377\377\204\0\0\0\255\377\377\377\204\0\0\0\205\377\377\377" \
+  "\203\0\0\0\207\377\377\377\203\0\0\0\207\377\377\377\203\0\0\0\203\377" \
+  "\377\377\203\0\0\0\207\377\377\377\203\0\0\0\215\377\377\377\1\0\0\0" \
+  "\206\377\377\377\203\0\0\0\211\377\377\377\204\0\0\0\254\377\377\377" \
+  "\204\0\0\0\204\377\377\377\204\0\0\0\204\377\377\377\210\0\0\0\205\377" \
+  "\377\377\203\0\0\0\203\377\377\377\203\0\0\0\205\377\377\377\210\0\0" \
+  "\0\205\377\377\377\202\0\0\0\1\377\377\377\204\0\0\0\203\377\377\377" \
+  "\207\0\0\0\210\377\377\377\203\0\0\0\254\377\377\377\204\0\0\0\203\377" \
+  "\377\377\204\0\0\0\204\377\377\377\203\0\0\0\204\377\377\377\203\0\0" \
+  "\0\204\377\377\377\203\0\0\0\203\377\377\377\203\0\0\0\203\377\377\377" \
+  "\203\0\0\0\205\377\377\377\203\0\0\0\202\377\377\377\211\0\0\0\202\377" \
+  "\377\377\202\0\0\0\204\377\377\377\203\0\0\0\207\377\377\377\204\0\0" \
+  "\0\253\377\377\377\212\0\0\0\204\377\377\377\203\0\0\0\206\377\377\377" \
+  "\203\0\0\0\203\377\377\377\203\0\0\0\203\377\377\377\203\0\0\0\203\377" \
+  "\377\377\203\0\0\0\205\377\377\377\203\0\0\0\203\377\377\377\204\0\0" \
+  "\0\205\377\377\377\202\0\0\0\206\377\377\377\203\0\0\0\207\377\377\377" \
+  "\203\0\0\0\253\377\377\377\213\0\0\0\203\377\377\377\203\0\0\0\207\377" \
+  "\377\377\202\0\0\0\203\377\377\377\203\0\0\0\203\377\377\377\203\0\0" \
+  "\0\202\377\377\377\203\0\0\0\207\377\377\377\203\0\0\0\202\377\377\377" \
+  "\203\0\0\0\206\377\377\377\213\0\0\0\207\377\377\377\203\0\0\0\253\377" \
+  "\377\377\204\0\0\0\205\377\377\377\203\0\0\0\202\377\377\377\202\0\0" \
+  "\0\210\377\377\377\203\0\0\0\202\377\377\377\203\0\0\0\203\377\377\377" \
+  "\203\0\0\0\202\377\377\377\203\0\0\0\207\377\377\377\203\0\0\0\202\377" \
+  "\377\377\203\0\0\0\205\377\377\377\214\0\0\0\210\377\377\377\203\0\0" \
+  "\0\252\377\377\377\204\0\0\0\205\377\377\377\204\0\0\0\1\377\377\377" \
+  "\202\0\0\0\210\377\377\377\203\0\0\0\202\377\377\377\203\0\0\0\203\377" \
+  "\377\377\203\0\0\0\202\377\377\377\203\0\0\0\207\377\377\377\203\0\0" \
+  "\0\202\377\377\377\203\0\0\0\205\377\377\377\203\0\0\0\221\377\377\377" \
+  "\203\0\0\0\252\377\377\377\204\0\0\0\206\377\377\377\203\0\0\0\1\377" \
+  "\377\377\202\0\0\0\210\377\377\377\203\0\0\0\202\377\377\377\203\0\0" \
+  "\0\203\377\377\377\203\0\0\0\202\377\377\377\203\0\0\0\207\377\377\377" \
+  "\203\0\0\0\202\377\377\377\203\0\0\0\205\377\377\377\203\0\0\0\222\377" \
+  "\377\377\203\0\0\0\251\377\377\377\204\0\0\0\206\377\377\377\203\0\0" \
+  "\0\1\377\377\377\202\0\0\0\210\377\377\377\203\0\0\0\202\377\377\377" \
+  "\203\0\0\0\203\377\377\377\203\0\0\0\202\377\377\377\203\0\0\0\207\377" \
+  "\377\377\203\0\0\0\202\377\377\377\203\0\0\0\205\377\377\377\203\0\0" \
+  "\0\222\377\377\377\203\0\0\0\251\377\377\377\204\0\0\0\205\377\377\377" \
+  "\204\0\0\0\1\377\377\377\203\0\0\0\207\377\377\377\202\0\0\0\203\377" \
+  "\377\377\203\0\0\0\203\377\377\377\203\0\0\0\202\377\377\377\204\0\0" \
+  "\0\206\377\377\377\203\0\0\0\202\377\377\377\203\0\0\0\206\377\377\377" \
+  "\203\0\0\0\222\377\377\377\202\0\0\0\251\377\377\377\204\0\0\0\205\377" \
+  "\377\377\203\0\0\0\202\377\377\377\203\0\0\0\206\377\377\377\203\0\0" \
+  "\0\203\377\377\377\203\0\0\0\203\377\377\377\203\0\0\0\203\377\377\377" \
+  "\203\0\0\0\205\377\377\377\203\0\0\0\203\377\377\377\203\0\0\0\206\377" \
+  "\377\377\204\0\0\0\205\377\377\377\202\0\0\0\212\377\377\377\203\0\0" \
+  "\0\247\377\377\377\206\0\0\0\1\377\377\377\205\0\0\0\204\377\377\377" \
+  "\203\0\0\0\204\377\377\377\203\0\0\0\203\377\377\377\204\0\0\0\202\377" \
+  "\377\377\204\0\0\0\204\377\377\377\203\0\0\0\203\377\377\377\203\0\0" \
+  "\0\204\377\377\377\204\0\0\0\206\377\377\377\211\0\0\0\213\377\377\377" \
+  "\203\0\0\0\246\377\377\377\214\0\0\0\207\377\377\377\207\0\0\0\203\377" \
+  "\377\377\214\0\0\0\204\377\377\377\207\0\0\0\204\377\377\377\206\0\0" \
+  "\0\206\377\377\377\207\0\0\0\215\377\377\377\202\0\0\0\376\377\377\377" \
+  "\202\0\0\0\376\377\377\377\203\0\0\0\376\377\377\377\202\0\0\0\376\377" \
+  "\377\377\202\0\0\0\377\377\377\377\302\377\377\377\1\0\0\0\230\377\377" \
+  "\377\1\0\0\0\345\377\377\377\202\0\0\0\230\377\377\377\202\0\0\0\344" \
+  "\377\377\377\202\0\0\0\230\377\377\377\202\0\0\0\344\377\377\377\202" \
+  "\0\0\0\230\377\377\377\202\0\0\0\343\377\377\377\205\0\0\0\210\377\377" \
+  "\377\205\0\0\0\211\377\377\377\202\0\0\0\210\377\377\377\206\0\0\0\213" \
+  "\377\377\377\206\0\0\0\212\377\377\377\206\0\0\0\211\377\377\377\2\0" \
+  "\0\0\377\377\377\205\0\0\0\202\377\377\377\205\0\0\0\234\377\377\377" \
+  "\206\0\0\0\206\377\377\377\211\0\0\0\207\377\377\377\202\0\0\0\207\377" \
+  "\377\377\210\0\0\0\210\377\377\377\211\0\0\0\210\377\377\377\210\0\0" \
+  "\0\207\377\377\377\220\0\0\0\235\377\377\377\202\0\0\0\207\377\377\377" \
+  "\204\0\0\0\203\377\377\377\204\0\0\0\206\377\377\377\202\0\0\0\206\377" \
+  "\377\377\203\0\0\0\204\377\377\377\203\0\0\0\207\377\377\377\203\0\0" \
+  "\0\204\377\377\377\203\0\0\0\206\377\377\377\203\0\0\0\204\377\377\377" \
+  "\203\0\0\0\206\377\377\377\204\0\0\0\203\377\377\377\204\0\0\0\203\377" \
+  "\377\377\203\0\0\0\234\377\377\377\202\0\0\0\207\377\377\377\203\0\0" \
+  "\0\205\377\377\377\203\0\0\0\206\377\377\377\202\0\0\0\206\377\377\377" \
+  "\202\0\0\0\206\377\377\377\202\0\0\0\206\377\377\377\203\0\0\0\206\377" \
+  "\377\377\202\0\0\0\205\377\377\377\203\0\0\0\206\377\377\377\202\0\0" \
+  "\0\206\377\377\377\203\0\0\0\204\377\377\377\203\0\0\0\204\377\377\377" \
+  "\203\0\0\0\234\377\377\377\202\0\0\0\207\377\377\377\213\0\0\0\206\377" \
+  "\377\377\202\0\0\0\205\377\377\377\214\0\0\0\205\377\377\377\202\0\0" \
+  "\0\216\377\377\377\203\0\0\0\206\377\377\377\203\0\0\0\205\377\377\377" \
+  "\203\0\0\0\204\377\377\377\203\0\0\0\204\377\377\377\203\0\0\0\234\377" \
+  "\377\377\202\0\0\0\207\377\377\377\213\0\0\0\206\377\377\377\202\0\0" \
+  "\0\205\377\377\377\214\0\0\0\204\377\377\377\203\0\0\0\216\377\377\377" \
+  "\203\0\0\0\207\377\377\377\202\0\0\0\205\377\377\377\203\0\0\0\204\377" \
+  "\377\377\203\0\0\0\204\377\377\377\203\0\0\0\234\377\377\377\202\0\0" \
+  "\0\207\377\377\377\202\0\0\0\217\377\377\377\202\0\0\0\206\377\377\377" \
+  "\202\0\0\0\216\377\377\377\202\0\0\0\216\377\377\377\203\0\0\0\206\377" \
+  "\377\377\203\0\0\0\205\377\377\377\203\0\0\0\204\377\377\377\203\0\0" \
+  "\0\204\377\377\377\203\0\0\0\234\377\377\377\202\0\0\0\207\377\377\377" \
+  "\203\0\0\0\205\377\377\377\203\0\0\0\206\377\377\377\202\0\0\0\206\377" \
+  "\377\377\202\0\0\0\206\377\377\377\202\0\0\0\206\377\377\377\203\0\0" \
+  "\0\206\377\377\377\202\0\0\0\206\377\377\377\202\0\0\0\206\377\377\377" \
+  "\202\0\0\0\206\377\377\377\203\0\0\0\204\377\377\377\203\0\0\0\204\377" \
+  "\377\377\203\0\0\0\234\377\377\377\202\0\0\0\210\377\377\377\212\0\0" \
+  "\0\206\377\377\377\202\0\0\0\206\377\377\377\212\0\0\0\207\377\377\377" \
+  "\212\0\0\0\206\377\377\377\212\0\0\0\206\377\377\377\203\0\0\0\204\377" \
+  "\377\377\203\0\0\0\204\377\377\377\203\0\0\0\234\377\377\377\202\0\0" \
+  "\0\211\377\377\377\210\0\0\0\207\377\377\377\202\0\0\0\207\377\377\377" \
+  "\210\0\0\0\211\377\377\377\210\0\0\0\210\377\377\377\210\0\0\0\207\377" \
+  "\377\377\203\0\0\0\204\377\377\377\203\0\0\0\204\377\377\377\203\0\0" \
+  "\0\235\377\377\377\1\0\0\0\212\377\377\377\205\0\0\0\211\377\377\377" \
+  "\1\0\0\0\212\377\377\377\204\0\0\0\215\377\377\377\204\0\0\0\214\377" \
+  "\377\377\204\0\0\0\212\377\377\377\1\0\0\0\206\377\377\377\1\0\0\0\206" \
+  "\377\377\377\202\0\0\0\377\377\377\377\377\377\377\377\377\377\377\377" \
+  "\377\377\377\377\204\377\377\377")
+
+
diff --git a/packages/psplash/files/psplash_1bpp.patch b/packages/psplash/files/psplash_1bpp.patch
new file mode 100644 (file)
index 0000000..e5324f6
--- /dev/null
@@ -0,0 +1,33 @@
+--- orig/psplash-fb.c  (revision 249)
++++ new/psplash-fb.c   (working copy)
+@@ -62,7 +62,7 @@
+       goto fail;
+     }
+   
+-  if (fb_var.bits_per_pixel < 16)
++  if (fb_var.bits_per_pixel != 1 && fb_var.bits_per_pixel < 16)
+     {
+       fprintf(stderr,
+             "Error, no support currently for %i bpp frame buffers\n",
+@@ -143,7 +143,7 @@
+   return NULL;
+ }
+-#define OFFSET(fb,x,y) (((y) * (fb)->stride) + ((x) * ((fb)->bpp >> 3)))
++#define OFFSET(fb,x,y) (((fb)->bpp == 1) ? (((y) * ((fb)->stride << 3)) + (x)) : (((y) * (fb)->stride) + ((x) * ((fb)->bpp >> 3))))
+ inline void
+ psplash_fb_plot_pixel (PSplashFB    *fb, 
+@@ -188,6 +188,12 @@
+       *(volatile uint16 *) (fb->data + off) 
+       = ((red >> 3) << 11) | ((green >> 2) << 5) | (blue >> 3);
+       break;
++    case 1:
++      if ((red + green + blue) > 384)
++        *(fb->data + (off >> 3)) |= (1 << (7 - (off & 0x07)));
++      else
++        *(fb->data + (off >> 3)) ^= (1 << (7 - (off & 0x07)));
++      break;
+     default:
+       /* depth not supported yet */
+       break;
index fdd4aea..0fd3864 100644 (file)
@@ -21,6 +21,7 @@ S = "${WORKDIR}/psplash"
 # This really should be default, but due yo openmoko hack below, can't be easily
 SRC_URI_append_angstrom = " file://logo-math.patch;patch=1 "
 SRC_URI_append_openmoko = " file://configurability.patch;patch=1 "
+SRC_URI_append_boc01 = " file://psplash_1bpp.patch;patch=1 "
 
 inherit autotools pkgconfig update-rc.d